@aztec/simulator 3.0.0-nightly.20251217 → 3.0.0-nightly.20251219

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.
@@ -98,6 +98,7 @@ async function execute(base64Line: string): Promise<void> {
98
98
  });
99
99
  writeSync(process.stdout.fd, resultBuffer.toString('base64') + '\n');
100
100
  } catch (error: any) {
101
+ // If we error, treat as reverted
101
102
  const errorResult = serializeWithMessagePack({
102
103
  reverted: true,
103
104
  output: [] as string[],
@@ -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.debug(`Contract provider callback: getContractInstance(${address})`);
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.debug(`Contract provider callback: getContractClass(${classId})`);
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.debug(`Contract provider callback: addContracts`);
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.debug(`Calling contractsDB.addContracts`);
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.debug(`Contract provider callback: getBytecodeCommitment(${classId})`);
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.debug(`Contract provider callback: getDebugFunctionName(${address}, ${selector})`);
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.debug(`calldata[0] is not a function selector: ${selector}`);
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.debug(`Debug function name not found for ${address}:${selector}`);
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.debug(`Contract provider callback: createCheckpoint`);
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.debug(`Contract provider callback: commitCheckpoint`);
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.debug(`Contract provider callback: revertCheckpoint`);
118
+ this.log.trace(`Contract provider callback: revertCheckpoint`);
119
119
  return Promise.resolve(this.contractsDB.revertCheckpoint());
120
120
  };
121
121
  }