@aztec/simulator 4.0.0-nightly.20260121 → 4.0.0-nightly.20260122

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.
@@ -1,5 +1,5 @@
1
1
  import { EthAddress } from '@aztec/foundation/eth-address';
2
- import { deserializeFromMessagePack, serializeWithMessagePack } from '@aztec/stdlib/avm';
2
+ import { PublicTxEffect, deserializeFromMessagePack, serializeWithMessagePack } from '@aztec/stdlib/avm';
3
3
  import { TreeSnapshots } from '@aztec/stdlib/tx';
4
4
  import { NativeWorldStateService } from '@aztec/world-state';
5
5
  import { createInterface } from 'readline';
@@ -54,7 +54,8 @@ async function simulateWithFuzzer(dataDir, mapSizeKb, txHint, globals, rawContra
54
54
  reverted: !result.revertCode.isOK(),
55
55
  output,
56
56
  revertReason: result.findRevertReason()?.message,
57
- publicInputs: result.publicInputs
57
+ publicInputs: result.publicInputs,
58
+ publicTxEffect: result.publicTxEffect
58
59
  };
59
60
  }
60
61
  async function execute(base64Line) {
@@ -70,7 +71,8 @@ async function execute(base64Line) {
70
71
  reverted: result.reverted,
71
72
  output: result.output,
72
73
  revertReason: result.revertReason ?? '',
73
- endTreeSnapshots: result.publicInputs.endTreeSnapshots
74
+ endTreeSnapshots: result.publicInputs.endTreeSnapshots,
75
+ publicTxEffect: result.publicTxEffect
74
76
  });
75
77
  const base64Response = resultBuffer.toString('base64') + '\n';
76
78
  await writeOutput(base64Response);
@@ -80,7 +82,8 @@ async function execute(base64Line) {
80
82
  reverted: true,
81
83
  output: [],
82
84
  revertReason: `Unexpected Error ${error.message}`,
83
- endTreeSnapshots: TreeSnapshots.empty()
85
+ endTreeSnapshots: TreeSnapshots.empty(),
86
+ publicTxEffect: PublicTxEffect.empty()
84
87
  });
85
88
  await writeOutput(errorResult.toString('base64') + '\n');
86
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/simulator",
3
- "version": "4.0.0-nightly.20260121",
3
+ "version": "4.0.0-nightly.20260122",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./server": "./dest/server.js",
@@ -64,26 +64,26 @@
64
64
  ]
65
65
  },
66
66
  "dependencies": {
67
- "@aztec/constants": "4.0.0-nightly.20260121",
68
- "@aztec/foundation": "4.0.0-nightly.20260121",
69
- "@aztec/native": "4.0.0-nightly.20260121",
70
- "@aztec/noir-acvm_js": "4.0.0-nightly.20260121",
71
- "@aztec/noir-noirc_abi": "4.0.0-nightly.20260121",
72
- "@aztec/noir-protocol-circuits-types": "4.0.0-nightly.20260121",
73
- "@aztec/noir-types": "4.0.0-nightly.20260121",
74
- "@aztec/protocol-contracts": "4.0.0-nightly.20260121",
75
- "@aztec/stdlib": "4.0.0-nightly.20260121",
76
- "@aztec/telemetry-client": "4.0.0-nightly.20260121",
77
- "@aztec/world-state": "4.0.0-nightly.20260121",
67
+ "@aztec/constants": "4.0.0-nightly.20260122",
68
+ "@aztec/foundation": "4.0.0-nightly.20260122",
69
+ "@aztec/native": "4.0.0-nightly.20260122",
70
+ "@aztec/noir-acvm_js": "4.0.0-nightly.20260122",
71
+ "@aztec/noir-noirc_abi": "4.0.0-nightly.20260122",
72
+ "@aztec/noir-protocol-circuits-types": "4.0.0-nightly.20260122",
73
+ "@aztec/noir-types": "4.0.0-nightly.20260122",
74
+ "@aztec/protocol-contracts": "4.0.0-nightly.20260122",
75
+ "@aztec/stdlib": "4.0.0-nightly.20260122",
76
+ "@aztec/telemetry-client": "4.0.0-nightly.20260122",
77
+ "@aztec/world-state": "4.0.0-nightly.20260122",
78
78
  "lodash.clonedeep": "^4.5.0",
79
79
  "lodash.merge": "^4.6.2",
80
80
  "tslib": "^2.4.0"
81
81
  },
82
82
  "devDependencies": {
83
- "@aztec/kv-store": "4.0.0-nightly.20260121",
84
- "@aztec/merkle-tree": "4.0.0-nightly.20260121",
85
- "@aztec/noir-contracts.js": "4.0.0-nightly.20260121",
86
- "@aztec/noir-test-contracts.js": "4.0.0-nightly.20260121",
83
+ "@aztec/kv-store": "4.0.0-nightly.20260122",
84
+ "@aztec/merkle-tree": "4.0.0-nightly.20260122",
85
+ "@aztec/noir-contracts.js": "4.0.0-nightly.20260122",
86
+ "@aztec/noir-test-contracts.js": "4.0.0-nightly.20260122",
87
87
  "@jest/globals": "^30.0.0",
88
88
  "@types/jest": "^30.0.0",
89
89
  "@types/lodash.clonedeep": "^4.5.7",
@@ -3,6 +3,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
3
3
  import {
4
4
  AvmCircuitPublicInputs,
5
5
  type AvmTxHint,
6
+ PublicTxEffect,
6
7
  deserializeFromMessagePack,
7
8
  serializeWithMessagePack,
8
9
  } from '@aztec/stdlib/avm';
@@ -58,7 +59,13 @@ async function simulateWithFuzzer(
58
59
  rawPublicDataWrites: any[], // Public data tree writes to apply before simulation
59
60
  rawNoteHashes: any[], // Note hashes to apply before simulation
60
61
  protocolContracts: ProtocolContracts, // Protocol contracts mapping from C++
61
- ): Promise<{ reverted: boolean; output: Fr[]; revertReason?: string; publicInputs: AvmCircuitPublicInputs }> {
62
+ ): Promise<{
63
+ reverted: boolean;
64
+ output: Fr[];
65
+ revertReason?: string;
66
+ publicInputs: AvmCircuitPublicInputs;
67
+ publicTxEffect: PublicTxEffect;
68
+ }> {
62
69
  const worldStateService = await openExistingWorldState(dataDir, mapSizeKb);
63
70
 
64
71
  const simulator = await AvmFuzzerSimulator.create(worldStateService, globals, protocolContracts);
@@ -90,6 +97,7 @@ async function simulateWithFuzzer(
90
97
  output,
91
98
  revertReason: result.findRevertReason()?.message,
92
99
  publicInputs: result.publicInputs!,
100
+ publicTxEffect: result.publicTxEffect,
93
101
  };
94
102
  }
95
103
 
@@ -119,6 +127,7 @@ async function execute(base64Line: string): Promise<void> {
119
127
  output: result.output,
120
128
  revertReason: result.revertReason ?? '',
121
129
  endTreeSnapshots: result.publicInputs.endTreeSnapshots,
130
+ publicTxEffect: result.publicTxEffect,
122
131
  });
123
132
  const base64Response = resultBuffer.toString('base64') + '\n';
124
133
  await writeOutput(base64Response);
@@ -129,6 +138,7 @@ async function execute(base64Line: string): Promise<void> {
129
138
  output: [] as Fr[],
130
139
  revertReason: `Unexpected Error ${error.message}`,
131
140
  endTreeSnapshots: TreeSnapshots.empty(),
141
+ publicTxEffect: PublicTxEffect.empty(),
132
142
  });
133
143
  await writeOutput(errorResult.toString('base64') + '\n');
134
144
  }