@aztec/simulator 3.0.0-nightly.20251217 → 3.0.0-nightly.20251218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/public/avm/avm_memory_types.d.ts +1 -3
- package/dest/public/avm/avm_memory_types.d.ts.map +1 -1
- package/dest/public/avm/avm_memory_types.js +2 -2
- package/dest/public/fixtures/custom_bytecode_tests.d.ts +3 -1
- package/dest/public/fixtures/custom_bytecode_tests.d.ts.map +1 -1
- package/dest/public/fixtures/custom_bytecode_tests.js +45 -1
- package/dest/public/fixtures/opcode_spammer.d.ts +3 -7
- package/dest/public/fixtures/opcode_spammer.d.ts.map +1 -1
- package/dest/public/fixtures/opcode_spammer.js +443 -166
- package/dest/public/public_tx_simulator/contract_provider_for_cpp.js +11 -11
- package/package.json +16 -16
- package/src/public/avm/avm_memory_types.ts +2 -2
- package/src/public/fixtures/custom_bytecode_tests.ts +61 -1
- package/src/public/fixtures/opcode_spammer.ts +434 -153
- package/src/public/public_tx_simulator/contract_provider_for_cpp.ts +11 -11
|
@@ -18,7 +18,7 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
18
18
|
) {}
|
|
19
19
|
|
|
20
20
|
public getContractInstance = async (address: string): Promise<Buffer | undefined> => {
|
|
21
|
-
this.log.
|
|
21
|
+
this.log.trace(`Contract provider callback: getContractInstance(${address})`);
|
|
22
22
|
|
|
23
23
|
const aztecAddr = AztecAddress.fromString(address);
|
|
24
24
|
|
|
@@ -33,7 +33,7 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
public getContractClass = async (classId: string): Promise<Buffer | undefined> => {
|
|
36
|
-
this.log.
|
|
36
|
+
this.log.trace(`Contract provider callback: getContractClass(${classId})`);
|
|
37
37
|
|
|
38
38
|
// Parse classId string to Fr
|
|
39
39
|
const classIdFr = Fr.fromString(classId);
|
|
@@ -50,7 +50,7 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
public addContracts = async (contractDeploymentDataBuffer: Buffer): Promise<void> => {
|
|
53
|
-
this.log.
|
|
53
|
+
this.log.trace(`Contract provider callback: addContracts`);
|
|
54
54
|
|
|
55
55
|
const rawData: any = deserializeFromMessagePack(contractDeploymentDataBuffer);
|
|
56
56
|
|
|
@@ -58,12 +58,12 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
58
58
|
const contractDeploymentData = ContractDeploymentData.fromPlainObject(rawData);
|
|
59
59
|
|
|
60
60
|
// Add contracts to the contracts DB
|
|
61
|
-
this.log.
|
|
61
|
+
this.log.trace(`Calling contractsDB.addContracts`);
|
|
62
62
|
await this.contractsDB.addContracts(contractDeploymentData);
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
public getBytecodeCommitment = async (classId: string): Promise<Buffer | undefined> => {
|
|
66
|
-
this.log.
|
|
66
|
+
this.log.trace(`Contract provider callback: getBytecodeCommitment(${classId})`);
|
|
67
67
|
|
|
68
68
|
// Parse classId string to Fr
|
|
69
69
|
const classIdFr = Fr.fromString(classId);
|
|
@@ -81,7 +81,7 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
public getDebugFunctionName = async (address: string, selector: string): Promise<string | undefined> => {
|
|
84
|
-
this.log.
|
|
84
|
+
this.log.trace(`Contract provider callback: getDebugFunctionName(${address}, ${selector})`);
|
|
85
85
|
|
|
86
86
|
// Parse address and selector strings
|
|
87
87
|
const aztecAddr = AztecAddress.fromString(address);
|
|
@@ -89,7 +89,7 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
89
89
|
const functionSelector = FunctionSelector.fromFieldOrUndefined(selectorFr);
|
|
90
90
|
|
|
91
91
|
if (!functionSelector) {
|
|
92
|
-
this.log.
|
|
92
|
+
this.log.trace(`calldata[0] is not a function selector: ${selector}`);
|
|
93
93
|
return undefined;
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -97,7 +97,7 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
97
97
|
const name = await this.contractsDB.getDebugFunctionName(aztecAddr, functionSelector);
|
|
98
98
|
|
|
99
99
|
if (!name) {
|
|
100
|
-
this.log.
|
|
100
|
+
this.log.trace(`Debug function name not found for ${address}:${selector}`);
|
|
101
101
|
return undefined;
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -105,17 +105,17 @@ export class ContractProviderForCpp implements ContractProvider {
|
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
public createCheckpoint = (): Promise<void> => {
|
|
108
|
-
this.log.
|
|
108
|
+
this.log.trace(`Contract provider callback: createCheckpoint`);
|
|
109
109
|
return Promise.resolve(this.contractsDB.createCheckpoint());
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
public commitCheckpoint = (): Promise<void> => {
|
|
113
|
-
this.log.
|
|
113
|
+
this.log.trace(`Contract provider callback: commitCheckpoint`);
|
|
114
114
|
return Promise.resolve(this.contractsDB.commitCheckpoint());
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
public revertCheckpoint = (): Promise<void> => {
|
|
118
|
-
this.log.
|
|
118
|
+
this.log.trace(`Contract provider callback: revertCheckpoint`);
|
|
119
119
|
return Promise.resolve(this.contractsDB.revertCheckpoint());
|
|
120
120
|
};
|
|
121
121
|
}
|