@aztec/simulator 0.41.0 → 0.43.0
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/acvm/acvm.d.ts +2 -2
- package/dest/acvm/acvm.d.ts.map +1 -1
- package/dest/acvm/acvm.js +3 -3
- package/dest/acvm/oracle/oracle.d.ts +7 -4
- package/dest/acvm/oracle/oracle.d.ts.map +1 -1
- package/dest/acvm/oracle/oracle.js +32 -12
- package/dest/acvm/oracle/typed_oracle.d.ts +6 -3
- package/dest/acvm/oracle/typed_oracle.d.ts.map +1 -1
- package/dest/acvm/oracle/typed_oracle.js +15 -6
- package/dest/acvm/serialize.js +2 -2
- package/dest/avm/avm_gas.d.ts +1 -5
- package/dest/avm/avm_gas.d.ts.map +1 -1
- package/dest/avm/avm_gas.js +69 -73
- package/dest/avm/avm_memory_types.d.ts.map +1 -1
- package/dest/avm/avm_memory_types.js +2 -4
- package/dest/avm/avm_simulator.d.ts +5 -0
- package/dest/avm/avm_simulator.d.ts.map +1 -1
- package/dest/avm/avm_simulator.js +8 -1
- package/dest/avm/fixtures/index.d.ts +6 -0
- package/dest/avm/fixtures/index.d.ts.map +1 -1
- package/dest/avm/fixtures/index.js +18 -1
- package/dest/avm/index.d.ts +2 -0
- package/dest/avm/index.d.ts.map +1 -0
- package/dest/avm/index.js +2 -0
- package/dest/avm/journal/host_storage.d.ts +1 -1
- package/dest/avm/journal/host_storage.d.ts.map +1 -1
- package/dest/avm/journal/journal.d.ts +5 -3
- package/dest/avm/journal/journal.d.ts.map +1 -1
- package/dest/avm/journal/journal.js +23 -14
- package/dest/avm/journal/trace.d.ts +3 -1
- package/dest/avm/journal/trace.d.ts.map +1 -1
- package/dest/avm/journal/trace.js +8 -1
- package/dest/avm/journal/trace_types.d.ts +5 -0
- package/dest/avm/journal/trace_types.d.ts.map +1 -1
- package/dest/avm/journal/trace_types.js +1 -5
- package/dest/avm/opcodes/accrued_substate.d.ts +2 -2
- package/dest/avm/opcodes/accrued_substate.d.ts.map +1 -1
- package/dest/avm/opcodes/accrued_substate.js +36 -21
- package/dest/avm/opcodes/arithmetic.d.ts +1 -7
- package/dest/avm/opcodes/arithmetic.d.ts.map +1 -1
- package/dest/avm/opcodes/arithmetic.js +12 -20
- package/dest/avm/opcodes/bitwise.d.ts.map +1 -1
- package/dest/avm/opcodes/bitwise.js +11 -8
- package/dest/avm/opcodes/comparators.d.ts.map +1 -1
- package/dest/avm/opcodes/comparators.js +7 -5
- package/dest/avm/opcodes/contract.d.ts.map +1 -1
- package/dest/avm/opcodes/contract.js +20 -24
- package/dest/avm/opcodes/control_flow.d.ts.map +1 -1
- package/dest/avm/opcodes/control_flow.js +4 -2
- package/dest/avm/opcodes/conversion.js +2 -2
- package/dest/avm/opcodes/ec_add.d.ts +19 -0
- package/dest/avm/opcodes/ec_add.d.ts.map +1 -0
- package/dest/avm/opcodes/ec_add.js +78 -0
- package/dest/avm/opcodes/external_calls.d.ts.map +1 -1
- package/dest/avm/opcodes/external_calls.js +11 -5
- package/dest/avm/opcodes/hashing.d.ts.map +1 -1
- package/dest/avm/opcodes/hashing.js +10 -2
- package/dest/avm/opcodes/instruction.d.ts +1 -1
- package/dest/avm/opcodes/instruction.d.ts.map +1 -1
- package/dest/avm/opcodes/instruction.js +6 -4
- package/dest/avm/opcodes/instruction_impl.d.ts.map +1 -1
- package/dest/avm/opcodes/instruction_impl.js +4 -2
- package/dest/avm/opcodes/memory.d.ts +1 -5
- package/dest/avm/opcodes/memory.d.ts.map +1 -1
- package/dest/avm/opcodes/memory.js +14 -18
- package/dest/avm/opcodes/multi_scalar_mul.d.ts +16 -0
- package/dest/avm/opcodes/multi_scalar_mul.d.ts.map +1 -0
- package/dest/avm/opcodes/multi_scalar_mul.js +95 -0
- package/dest/avm/opcodes/storage.d.ts +1 -6
- package/dest/avm/opcodes/storage.d.ts.map +1 -1
- package/dest/avm/opcodes/storage.js +11 -14
- package/dest/avm/serialization/bytecode_serialization.d.ts.map +1 -1
- package/dest/avm/serialization/bytecode_serialization.js +6 -2
- package/dest/avm/serialization/instruction_serialization.d.ts +3 -1
- package/dest/avm/serialization/instruction_serialization.d.ts.map +1 -1
- package/dest/avm/serialization/instruction_serialization.js +4 -2
- package/dest/client/client_execution_context.d.ts +24 -20
- package/dest/client/client_execution_context.d.ts.map +1 -1
- package/dest/client/client_execution_context.js +52 -55
- package/dest/client/db_oracle.d.ts +7 -1
- package/dest/client/db_oracle.d.ts.map +1 -1
- package/dest/client/execution_note_cache.d.ts +0 -17
- package/dest/client/execution_note_cache.d.ts.map +1 -1
- package/dest/client/execution_note_cache.js +1 -24
- package/dest/client/execution_result.d.ts +8 -4
- package/dest/client/execution_result.d.ts.map +1 -1
- package/dest/client/execution_result.js +16 -6
- package/dest/client/private_execution.d.ts +2 -3
- package/dest/client/private_execution.d.ts.map +1 -1
- package/dest/client/private_execution.js +20 -9
- package/dest/client/simulator.d.ts +2 -17
- package/dest/client/simulator.d.ts.map +1 -1
- package/dest/client/simulator.js +24 -33
- package/dest/client/unconstrained_execution.d.ts +2 -3
- package/dest/client/unconstrained_execution.d.ts.map +1 -1
- package/dest/client/unconstrained_execution.js +5 -7
- package/dest/client/view_data_oracle.d.ts +2 -0
- package/dest/client/view_data_oracle.d.ts.map +1 -1
- package/dest/client/view_data_oracle.js +7 -1
- package/dest/index.d.ts +3 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +4 -2
- package/dest/mocks/fixtures.d.ts +14 -10
- package/dest/mocks/fixtures.d.ts.map +1 -1
- package/dest/mocks/fixtures.js +22 -16
- package/dest/{simulator → providers}/acvm_native.d.ts.map +1 -1
- package/dest/{simulator → providers}/acvm_native.js +13 -14
- package/dest/providers/acvm_wasm.d.ts.map +1 -0
- package/dest/providers/acvm_wasm.js +15 -0
- package/dest/providers/index.d.ts.map +1 -0
- package/dest/{simulator → providers}/index.js +1 -1
- package/dest/{simulator → providers}/simulation_provider.d.ts.map +1 -1
- package/dest/{simulator → providers}/simulation_provider.js +1 -1
- package/dest/public/abstract_phase_manager.d.ts +53 -53
- package/dest/public/abstract_phase_manager.d.ts.map +1 -1
- package/dest/public/abstract_phase_manager.js +146 -153
- package/dest/public/app_logic_phase_manager.d.ts +8 -9
- package/dest/public/app_logic_phase_manager.d.ts.map +1 -1
- package/dest/public/app_logic_phase_manager.js +15 -15
- package/dest/public/{db.d.ts → db_interfaces.d.ts} +4 -3
- package/dest/public/db_interfaces.d.ts.map +1 -0
- package/dest/public/db_interfaces.js +2 -0
- package/dest/public/execution.d.ts +16 -23
- package/dest/public/execution.d.ts.map +1 -1
- package/dest/public/execution.js +1 -51
- package/dest/public/executor.d.ts +4 -31
- package/dest/public/executor.d.ts.map +1 -1
- package/dest/public/executor.js +40 -283
- package/dest/public/fee_payment.d.ts +11 -0
- package/dest/public/fee_payment.d.ts.map +1 -0
- package/dest/public/fee_payment.js +24 -0
- package/dest/public/hints_builder.d.ts +2 -1
- package/dest/public/hints_builder.d.ts.map +1 -1
- package/dest/public/hints_builder.js +6 -2
- package/dest/public/index.d.ts +8 -6
- package/dest/public/index.d.ts.map +1 -1
- package/dest/public/index.js +9 -7
- package/dest/public/phase_manager_factory.d.ts +4 -4
- package/dest/public/phase_manager_factory.d.ts.map +1 -1
- package/dest/public/phase_manager_factory.js +5 -5
- package/dest/public/{public_executor.d.ts → public_db_sources.d.ts} +6 -3
- package/dest/public/public_db_sources.d.ts.map +1 -0
- package/dest/public/public_db_sources.js +244 -0
- package/dest/public/public_kernel.js +14 -14
- package/dest/public/public_processor.d.ts +6 -4
- package/dest/public/public_processor.d.ts.map +1 -1
- package/dest/public/public_processor.js +48 -30
- package/dest/public/setup_phase_manager.d.ts +8 -10
- package/dest/public/setup_phase_manager.d.ts.map +1 -1
- package/dest/public/setup_phase_manager.js +12 -21
- package/dest/public/tail_phase_manager.d.ts +7 -13
- package/dest/public/tail_phase_manager.d.ts.map +1 -1
- package/dest/public/tail_phase_manager.js +17 -37
- package/dest/public/teardown_phase_manager.d.ts +8 -10
- package/dest/public/teardown_phase_manager.d.ts.map +1 -1
- package/dest/public/teardown_phase_manager.js +16 -22
- package/dest/public/transitional_adaptors.d.ts +2 -2
- package/dest/public/transitional_adaptors.d.ts.map +1 -1
- package/dest/public/transitional_adaptors.js +14 -6
- package/package.json +12 -9
- package/src/acvm/acvm.ts +0 -3
- package/src/acvm/oracle/oracle.ts +68 -16
- package/src/acvm/oracle/typed_oracle.ts +31 -6
- package/src/acvm/serialize.ts +1 -1
- package/src/avm/avm_gas.ts +68 -73
- package/src/avm/avm_memory_types.ts +1 -3
- package/src/avm/avm_simulator.ts +9 -0
- package/src/avm/fixtures/index.ts +24 -0
- package/src/avm/index.ts +1 -0
- package/src/avm/journal/host_storage.ts +1 -1
- package/src/avm/journal/journal.ts +32 -22
- package/src/avm/journal/trace.ts +9 -0
- package/src/avm/journal/trace_types.ts +4 -0
- package/src/avm/opcodes/accrued_substate.ts +53 -20
- package/src/avm/opcodes/arithmetic.ts +18 -22
- package/src/avm/opcodes/bitwise.ts +13 -8
- package/src/avm/opcodes/comparators.ts +9 -4
- package/src/avm/opcodes/contract.ts +22 -26
- package/src/avm/opcodes/control_flow.ts +3 -1
- package/src/avm/opcodes/conversion.ts +1 -1
- package/src/avm/opcodes/ec_add.ts +92 -0
- package/src/avm/opcodes/external_calls.ts +11 -3
- package/src/avm/opcodes/hashing.ts +11 -1
- package/src/avm/opcodes/instruction.ts +5 -3
- package/src/avm/opcodes/instruction_impl.ts +4 -1
- package/src/avm/opcodes/memory.ts +19 -19
- package/src/avm/opcodes/multi_scalar_mul.ts +114 -0
- package/src/avm/opcodes/storage.ts +10 -17
- package/src/avm/serialization/bytecode_serialization.ts +5 -1
- package/src/avm/serialization/instruction_serialization.ts +2 -0
- package/src/client/client_execution_context.ts +76 -60
- package/src/client/db_oracle.ts +8 -1
- package/src/client/execution_note_cache.ts +0 -28
- package/src/client/execution_result.ts +21 -7
- package/src/client/private_execution.ts +36 -21
- package/src/client/simulator.ts +25 -35
- package/src/client/unconstrained_execution.ts +9 -12
- package/src/client/view_data_oracle.ts +8 -0
- package/src/index.ts +3 -1
- package/src/mocks/fixtures.ts +30 -32
- package/src/{simulator → providers}/acvm_native.ts +21 -19
- package/src/{simulator → providers}/acvm_wasm.ts +2 -16
- package/src/public/abstract_phase_manager.ts +209 -258
- package/src/public/app_logic_phase_manager.ts +24 -40
- package/src/public/{db.ts → db_interfaces.ts} +4 -2
- package/src/public/execution.ts +15 -77
- package/src/public/executor.ts +61 -399
- package/src/public/fee_payment.ts +26 -0
- package/src/public/hints_builder.ts +6 -0
- package/src/public/index.ts +8 -12
- package/src/public/phase_manager_factory.ts +7 -7
- package/src/public/{public_executor.ts → public_db_sources.ts} +65 -9
- package/src/public/public_kernel.ts +24 -24
- package/src/public/public_processor.ts +81 -40
- package/src/public/setup_phase_manager.ts +21 -46
- package/src/public/tail_phase_manager.ts +19 -67
- package/src/public/teardown_phase_manager.ts +23 -42
- package/src/public/transitional_adaptors.ts +41 -5
- package/dest/public/db.d.ts.map +0 -1
- package/dest/public/db.js +0 -2
- package/dest/public/public_execution_context.d.ts +0 -121
- package/dest/public/public_execution_context.d.ts.map +0 -1
- package/dest/public/public_execution_context.js +0 -214
- package/dest/public/public_executor.d.ts.map +0 -1
- package/dest/public/public_executor.js +0 -197
- package/dest/public/state_actions.d.ts +0 -39
- package/dest/public/state_actions.d.ts.map +0 -1
- package/dest/public/state_actions.js +0 -80
- package/dest/public/utils.d.ts +0 -8
- package/dest/public/utils.d.ts.map +0 -1
- package/dest/public/utils.js +0 -31
- package/dest/simulator/acvm_wasm.d.ts.map +0 -1
- package/dest/simulator/acvm_wasm.js +0 -22
- package/dest/simulator/index.d.ts.map +0 -1
- package/src/public/public_execution_context.ts +0 -289
- package/src/public/state_actions.ts +0 -102
- package/src/public/utils.ts +0 -33
- /package/dest/{simulator → providers}/acvm_native.d.ts +0 -0
- /package/dest/{simulator → providers}/acvm_wasm.d.ts +0 -0
- /package/dest/{simulator → providers}/index.d.ts +0 -0
- /package/dest/{simulator → providers}/simulation_provider.d.ts +0 -0
- /package/src/{simulator → providers}/index.ts +0 -0
- /package/src/{simulator → providers}/simulation_provider.ts +0 -0
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import { type PublicKernelRequest, PublicKernelType, type Tx } from '@aztec/circuit-types';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
CombineHints,
|
|
4
4
|
type GlobalVariables,
|
|
5
5
|
type Header,
|
|
6
6
|
type KernelCircuitPublicInputs,
|
|
7
|
-
type LogHash,
|
|
8
|
-
MAX_NEW_NOTE_HASHES_PER_TX,
|
|
9
7
|
MAX_NEW_NULLIFIERS_PER_TX,
|
|
10
8
|
MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
|
|
11
|
-
type MAX_UNENCRYPTED_LOGS_PER_TX,
|
|
12
|
-
type NoteHash,
|
|
13
|
-
type Proof,
|
|
14
9
|
type PublicKernelCircuitPublicInputs,
|
|
15
10
|
PublicKernelTailCircuitPrivateInputs,
|
|
16
|
-
makeEmptyProof,
|
|
17
11
|
mergeAccumulatedData,
|
|
18
|
-
sortByCounter,
|
|
19
12
|
} from '@aztec/circuits.js';
|
|
20
|
-
import { type Tuple } from '@aztec/foundation/serialize';
|
|
21
13
|
import { type PublicExecutor, type PublicStateDB } from '@aztec/simulator';
|
|
22
14
|
import { type MerkleTreeOperations } from '@aztec/world-state';
|
|
23
15
|
|
|
24
|
-
import { AbstractPhaseManager
|
|
25
|
-
import { type ContractsDataSourcePublicDB } from './
|
|
16
|
+
import { AbstractPhaseManager } from './abstract_phase_manager.js';
|
|
17
|
+
import { type ContractsDataSourcePublicDB } from './public_db_sources.js';
|
|
26
18
|
import { type PublicKernelCircuitSimulator } from './public_kernel_circuit_simulator.js';
|
|
27
19
|
|
|
28
20
|
export class TailPhaseManager extends AbstractPhaseManager {
|
|
@@ -34,85 +26,51 @@ export class TailPhaseManager extends AbstractPhaseManager {
|
|
|
34
26
|
historicalHeader: Header,
|
|
35
27
|
protected publicContractsDB: ContractsDataSourcePublicDB,
|
|
36
28
|
protected publicStateDB: PublicStateDB,
|
|
37
|
-
phase:
|
|
29
|
+
phase: PublicKernelType = PublicKernelType.TAIL,
|
|
38
30
|
) {
|
|
39
31
|
super(db, publicExecutor, publicKernel, globalVariables, historicalHeader, phase);
|
|
40
32
|
}
|
|
41
33
|
|
|
42
|
-
override async handle(
|
|
43
|
-
tx: Tx,
|
|
44
|
-
previousPublicKernelOutput: PublicKernelCircuitPublicInputs,
|
|
45
|
-
previousPublicKernelProof: Proof,
|
|
46
|
-
) {
|
|
34
|
+
override async handle(tx: Tx, previousPublicKernelOutput: PublicKernelCircuitPublicInputs) {
|
|
47
35
|
this.log.verbose(`Processing tx ${tx.getTxHash()}`);
|
|
48
|
-
const [inputs, finalKernelOutput] = await this.
|
|
49
|
-
previousPublicKernelOutput,
|
|
50
|
-
previousPublicKernelProof,
|
|
51
|
-
).catch(
|
|
36
|
+
const [inputs, finalKernelOutput] = await this.simulate(previousPublicKernelOutput).catch(
|
|
52
37
|
// the abstract phase manager throws if simulation gives error in non-revertible phase
|
|
53
38
|
async err => {
|
|
54
39
|
await this.publicStateDB.rollbackToCommit();
|
|
55
40
|
throw err;
|
|
56
41
|
},
|
|
57
42
|
);
|
|
58
|
-
// commit the state updates from this transaction
|
|
59
|
-
await this.publicStateDB.commit();
|
|
60
43
|
|
|
61
44
|
// Return a tail proving request
|
|
62
|
-
const
|
|
45
|
+
const kernelRequest: PublicKernelRequest = {
|
|
63
46
|
type: PublicKernelType.TAIL,
|
|
64
47
|
inputs: inputs,
|
|
65
48
|
};
|
|
66
49
|
|
|
67
50
|
return {
|
|
68
|
-
|
|
51
|
+
publicProvingRequests: [kernelRequest],
|
|
69
52
|
publicKernelOutput: previousPublicKernelOutput,
|
|
70
53
|
finalKernelOutput,
|
|
71
|
-
publicKernelProof: makeEmptyProof(),
|
|
72
|
-
revertReason: undefined,
|
|
73
54
|
returnValues: [],
|
|
74
|
-
gasUsed: undefined,
|
|
75
55
|
};
|
|
76
56
|
}
|
|
77
57
|
|
|
78
|
-
private async runTailKernelCircuit(
|
|
79
|
-
previousOutput: PublicKernelCircuitPublicInputs,
|
|
80
|
-
previousProof: Proof,
|
|
81
|
-
): Promise<[PublicKernelTailCircuitPrivateInputs, KernelCircuitPublicInputs]> {
|
|
82
|
-
// Temporary hack. Should sort them in the tail circuit.
|
|
83
|
-
previousOutput.end.unencryptedLogsHashes = this.sortLogsHashes<typeof MAX_UNENCRYPTED_LOGS_PER_TX>(
|
|
84
|
-
previousOutput.end.unencryptedLogsHashes,
|
|
85
|
-
);
|
|
86
|
-
const [inputs, output] = await this.simulate(previousOutput, previousProof);
|
|
87
|
-
|
|
88
|
-
// Temporary hack. Should sort them in the tail circuit.
|
|
89
|
-
const noteHashes = mergeAccumulatedData(
|
|
90
|
-
previousOutput.endNonRevertibleData.newNoteHashes,
|
|
91
|
-
previousOutput.end.newNoteHashes,
|
|
92
|
-
MAX_NEW_NOTE_HASHES_PER_TX,
|
|
93
|
-
);
|
|
94
|
-
output.end.newNoteHashes = this.sortNoteHashes<typeof MAX_NEW_NOTE_HASHES_PER_TX>(noteHashes);
|
|
95
|
-
|
|
96
|
-
return [inputs, output];
|
|
97
|
-
}
|
|
98
|
-
|
|
99
58
|
private async simulate(
|
|
100
59
|
previousOutput: PublicKernelCircuitPublicInputs,
|
|
101
|
-
previousProof: Proof,
|
|
102
60
|
): Promise<[PublicKernelTailCircuitPrivateInputs, KernelCircuitPublicInputs]> {
|
|
103
|
-
const inputs = await this.buildPrivateInputs(previousOutput
|
|
61
|
+
const inputs = await this.buildPrivateInputs(previousOutput);
|
|
104
62
|
// We take a deep copy (clone) of these to pass to the prover
|
|
105
63
|
return [inputs.clone(), await this.publicKernel.publicKernelCircuitTail(inputs)];
|
|
106
64
|
}
|
|
107
65
|
|
|
108
|
-
private async buildPrivateInputs(previousOutput: PublicKernelCircuitPublicInputs
|
|
109
|
-
const previousKernel = this.getPreviousKernelData(previousOutput
|
|
66
|
+
private async buildPrivateInputs(previousOutput: PublicKernelCircuitPublicInputs) {
|
|
67
|
+
const previousKernel = this.getPreviousKernelData(previousOutput);
|
|
110
68
|
|
|
111
|
-
const { validationRequests, endNonRevertibleData, end } = previousOutput;
|
|
69
|
+
const { validationRequests, endNonRevertibleData: nonRevertibleData, end: revertibleData } = previousOutput;
|
|
112
70
|
|
|
113
71
|
const pendingNullifiers = mergeAccumulatedData(
|
|
114
|
-
|
|
115
|
-
|
|
72
|
+
nonRevertibleData.newNullifiers,
|
|
73
|
+
revertibleData.newNullifiers,
|
|
116
74
|
MAX_NEW_NULLIFIERS_PER_TX,
|
|
117
75
|
);
|
|
118
76
|
|
|
@@ -127,8 +85,8 @@ export class TailPhaseManager extends AbstractPhaseManager {
|
|
|
127
85
|
);
|
|
128
86
|
|
|
129
87
|
const pendingPublicDataWrites = mergeAccumulatedData(
|
|
130
|
-
|
|
131
|
-
|
|
88
|
+
nonRevertibleData.publicDataUpdateRequests,
|
|
89
|
+
revertibleData.publicDataUpdateRequests,
|
|
132
90
|
MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
|
|
133
91
|
);
|
|
134
92
|
|
|
@@ -145,6 +103,8 @@ export class TailPhaseManager extends AbstractPhaseManager {
|
|
|
145
103
|
|
|
146
104
|
const currentState = await this.db.getStateReference();
|
|
147
105
|
|
|
106
|
+
const hints = CombineHints.fromPublicData({ nonRevertibleData, revertibleData });
|
|
107
|
+
|
|
148
108
|
return new PublicKernelTailCircuitPrivateInputs(
|
|
149
109
|
previousKernel,
|
|
150
110
|
nullifierReadRequestHints,
|
|
@@ -152,15 +112,7 @@ export class TailPhaseManager extends AbstractPhaseManager {
|
|
|
152
112
|
publicDataHints,
|
|
153
113
|
publicDataReadRequestHints,
|
|
154
114
|
currentState.partial,
|
|
115
|
+
hints,
|
|
155
116
|
);
|
|
156
117
|
}
|
|
157
|
-
|
|
158
|
-
private sortNoteHashes<N extends number>(noteHashes: Tuple<NoteHash, N>): Tuple<Fr, N> {
|
|
159
|
-
return sortByCounter(noteHashes).map(n => n.value) as Tuple<Fr, N>;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
private sortLogsHashes<N extends number>(unencryptedLogsHashes: Tuple<LogHash, N>): Tuple<LogHash, N> {
|
|
163
|
-
// TODO(6052): logs here may have duplicate counters from nested calls
|
|
164
|
-
return sortByCounter(unencryptedLogsHashes);
|
|
165
|
-
}
|
|
166
118
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { PublicKernelType, type PublicProvingRequest, type Tx } from '@aztec/circuit-types';
|
|
2
2
|
import {
|
|
3
3
|
type Fr,
|
|
4
4
|
type Gas,
|
|
5
5
|
type GlobalVariables,
|
|
6
6
|
type Header,
|
|
7
|
-
type Proof,
|
|
8
7
|
type PublicKernelCircuitPublicInputs,
|
|
9
8
|
} from '@aztec/circuits.js';
|
|
10
9
|
import { type PublicExecutor, type PublicStateDB } from '@aztec/simulator';
|
|
@@ -12,8 +11,8 @@ import { type MerkleTreeOperations } from '@aztec/world-state';
|
|
|
12
11
|
|
|
13
12
|
import { inspect } from 'util';
|
|
14
13
|
|
|
15
|
-
import { AbstractPhaseManager,
|
|
16
|
-
import { type ContractsDataSourcePublicDB } from './
|
|
14
|
+
import { AbstractPhaseManager, makeAvmProvingRequest } from './abstract_phase_manager.js';
|
|
15
|
+
import { type ContractsDataSourcePublicDB } from './public_db_sources.js';
|
|
17
16
|
import { type PublicKernelCircuitSimulator } from './public_kernel_circuit_simulator.js';
|
|
18
17
|
|
|
19
18
|
/**
|
|
@@ -28,52 +27,34 @@ export class TeardownPhaseManager extends AbstractPhaseManager {
|
|
|
28
27
|
historicalHeader: Header,
|
|
29
28
|
protected publicContractsDB: ContractsDataSourcePublicDB,
|
|
30
29
|
protected publicStateDB: PublicStateDB,
|
|
31
|
-
phase:
|
|
30
|
+
phase: PublicKernelType = PublicKernelType.TEARDOWN,
|
|
32
31
|
) {
|
|
33
32
|
super(db, publicExecutor, publicKernel, globalVariables, historicalHeader, phase);
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
override async handle(
|
|
37
|
-
tx: Tx,
|
|
38
|
-
previousPublicKernelOutput: PublicKernelCircuitPublicInputs,
|
|
39
|
-
previousPublicKernelProof: Proof,
|
|
40
|
-
) {
|
|
35
|
+
override async handle(tx: Tx, previousPublicKernelOutput: PublicKernelCircuitPublicInputs) {
|
|
41
36
|
this.log.verbose(`Processing tx ${tx.getTxHash()}`);
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
tx.unencryptedLogs.addFunctionLogs(newUnencryptedFunctionLogs);
|
|
58
|
-
await this.publicStateDB.checkpoint();
|
|
37
|
+
const { publicProvingInformation, kernelOutput, newUnencryptedLogs, revertReason, gasUsed } =
|
|
38
|
+
await this.processEnqueuedPublicCalls(tx, previousPublicKernelOutput).catch(
|
|
39
|
+
// the abstract phase manager throws if simulation gives error in a non-revertible phase
|
|
40
|
+
async err => {
|
|
41
|
+
await this.publicStateDB.rollbackToCommit();
|
|
42
|
+
throw err;
|
|
43
|
+
},
|
|
44
|
+
);
|
|
45
|
+
if (revertReason) {
|
|
46
|
+
await this.publicStateDB.rollbackToCheckpoint();
|
|
47
|
+
} else {
|
|
48
|
+
// TODO(#6464): Should we allow emitting contracts in the public teardown phase?
|
|
49
|
+
// if so, we should insert them here
|
|
50
|
+
tx.unencryptedLogs.addFunctionLogs(newUnencryptedLogs);
|
|
51
|
+
}
|
|
59
52
|
|
|
60
53
|
// Return a list of teardown proving requests
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
type: PublicKernelType.TEARDOWN,
|
|
64
|
-
inputs: input,
|
|
65
|
-
};
|
|
66
|
-
return request;
|
|
54
|
+
const publicProvingRequests: PublicProvingRequest[] = publicProvingInformation.map(info => {
|
|
55
|
+
return makeAvmProvingRequest(info, PublicKernelType.TEARDOWN);
|
|
67
56
|
});
|
|
68
|
-
return {
|
|
69
|
-
kernelRequests,
|
|
70
|
-
kernelInputs,
|
|
71
|
-
publicKernelOutput,
|
|
72
|
-
publicKernelProof,
|
|
73
|
-
revertReason,
|
|
74
|
-
returnValues: [],
|
|
75
|
-
gasUsed,
|
|
76
|
-
};
|
|
57
|
+
return { publicProvingRequests, publicKernelOutput: kernelOutput, revertReason, returnValues: [], gasUsed };
|
|
77
58
|
}
|
|
78
59
|
|
|
79
60
|
protected override getTransactionFee(tx: Tx, previousPublicKernelOutput: PublicKernelCircuitPublicInputs): Fr {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
// All code in this file needs to die once the public executor is phased out in favor of the AVM.
|
|
2
2
|
import { UnencryptedFunctionL2Logs } from '@aztec/circuit-types';
|
|
3
3
|
import {
|
|
4
|
+
AvmContractInstanceHint,
|
|
5
|
+
AvmExecutionHints,
|
|
6
|
+
AvmExternalCallHint,
|
|
7
|
+
AvmKeyValueHint,
|
|
4
8
|
CallContext,
|
|
5
|
-
|
|
6
|
-
type Gas,
|
|
9
|
+
Gas,
|
|
7
10
|
type GasSettings,
|
|
8
11
|
type GlobalVariables,
|
|
9
12
|
type Header,
|
|
@@ -16,6 +19,8 @@ import { gunzip } from 'zlib';
|
|
|
16
19
|
import { type AvmContext } from '../avm/avm_context.js';
|
|
17
20
|
import { AvmExecutionEnvironment } from '../avm/avm_execution_environment.js';
|
|
18
21
|
import { type AvmContractCallResults } from '../avm/avm_message_call_result.js';
|
|
22
|
+
import { type PartialPublicExecutionResult } from '../avm/journal/journal.js';
|
|
23
|
+
import { type WorldStateAccessTrace } from '../avm/journal/trace.js';
|
|
19
24
|
import { Mov } from '../avm/opcodes/memory.js';
|
|
20
25
|
import { createSimulationError } from '../common/errors.js';
|
|
21
26
|
import { type PublicExecution, type PublicExecutionResult } from './execution.js';
|
|
@@ -48,7 +53,7 @@ export function createAvmExecutionEnvironment(
|
|
|
48
53
|
current.args,
|
|
49
54
|
gasSettings,
|
|
50
55
|
transactionFee,
|
|
51
|
-
current.
|
|
56
|
+
current.functionSelector,
|
|
52
57
|
);
|
|
53
58
|
}
|
|
54
59
|
|
|
@@ -65,22 +70,50 @@ export function createPublicExecution(
|
|
|
65
70
|
isStaticCall: avmEnvironment.isStaticCall,
|
|
66
71
|
sideEffectCounter: startSideEffectCounter,
|
|
67
72
|
});
|
|
68
|
-
const functionData = new FunctionData(avmEnvironment.temporaryFunctionSelector, /*isPrivate=*/ false);
|
|
69
73
|
const execution: PublicExecution = {
|
|
70
74
|
contractAddress: avmEnvironment.address,
|
|
71
75
|
callContext,
|
|
72
76
|
args: calldata,
|
|
73
|
-
|
|
77
|
+
functionSelector: avmEnvironment.temporaryFunctionSelector,
|
|
74
78
|
};
|
|
75
79
|
return execution;
|
|
76
80
|
}
|
|
77
81
|
|
|
82
|
+
function computeHints(trace: WorldStateAccessTrace, executionResult: PartialPublicExecutionResult): AvmExecutionHints {
|
|
83
|
+
return new AvmExecutionHints(
|
|
84
|
+
trace.publicStorageReads.map(read => new AvmKeyValueHint(read.counter, read.value)),
|
|
85
|
+
trace.noteHashChecks.map(check => new AvmKeyValueHint(check.counter, new Fr(check.exists ? 1 : 0))),
|
|
86
|
+
trace.nullifierChecks.map(check => new AvmKeyValueHint(check.counter, new Fr(check.exists ? 1 : 0))),
|
|
87
|
+
trace.l1ToL2MessageChecks.map(check => new AvmKeyValueHint(check.counter, new Fr(check.exists ? 1 : 0))),
|
|
88
|
+
executionResult.nestedExecutions.map(nested => {
|
|
89
|
+
const gasUsed = new Gas(
|
|
90
|
+
nested.startGasLeft.daGas - nested.endGasLeft.daGas,
|
|
91
|
+
nested.startGasLeft.l2Gas - nested.endGasLeft.l2Gas,
|
|
92
|
+
);
|
|
93
|
+
return new AvmExternalCallHint(/*success=*/ new Fr(nested.reverted ? 0 : 1), nested.returnValues, gasUsed);
|
|
94
|
+
}),
|
|
95
|
+
trace.gotContractInstances.map(
|
|
96
|
+
instance =>
|
|
97
|
+
new AvmContractInstanceHint(
|
|
98
|
+
instance.address,
|
|
99
|
+
new Fr(instance.exists ? 1 : 0),
|
|
100
|
+
instance.salt,
|
|
101
|
+
instance.deployer,
|
|
102
|
+
instance.contractClassId,
|
|
103
|
+
instance.initializationHash,
|
|
104
|
+
instance.publicKeysHash,
|
|
105
|
+
),
|
|
106
|
+
),
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
78
110
|
export function convertAvmResultsToPxResult(
|
|
79
111
|
avmResult: AvmContractCallResults,
|
|
80
112
|
startSideEffectCounter: number,
|
|
81
113
|
fromPx: PublicExecution,
|
|
82
114
|
startGas: Gas,
|
|
83
115
|
endAvmContext: AvmContext,
|
|
116
|
+
bytecode: Buffer | undefined,
|
|
84
117
|
): PublicExecutionResult {
|
|
85
118
|
const endPersistableState = endAvmContext.persistableState;
|
|
86
119
|
const endMachineState = endAvmContext.machineState;
|
|
@@ -100,6 +133,9 @@ export function convertAvmResultsToPxResult(
|
|
|
100
133
|
startGasLeft: startGas,
|
|
101
134
|
endGasLeft: endMachineState.gasLeft,
|
|
102
135
|
transactionFee: endAvmContext.environment.transactionFee,
|
|
136
|
+
bytecode: bytecode,
|
|
137
|
+
calldata: endAvmContext.environment.calldata,
|
|
138
|
+
avmHints: computeHints(endPersistableState.trace, endPersistableState.transitionalExecutionResult),
|
|
103
139
|
};
|
|
104
140
|
}
|
|
105
141
|
|
package/dest/public/db.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../src/public/db.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB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uB,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;IAErE;;;OAGG;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAE/D;;;;OAIG;IACH,kBAAkB,CAAC,UAAU,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEhE;;;;OAIG;IACH,iBAAiB,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE9D;;;;OAIG;IACH,0CAA0C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC,CAAC;CAC5G"}
|
package/dest/public/db.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { UnencryptedFunctionL2Logs, type UnencryptedL2Log } from '@aztec/circuit-types';
|
|
2
|
-
import { type FunctionSelector, type Gas, type GasSettings, type GlobalVariables, type Header, type Nullifier } from '@aztec/circuits.js';
|
|
3
|
-
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
4
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
5
|
-
import { type ContractInstance } from '@aztec/types/contracts';
|
|
6
|
-
import { TypedOracle } from '../acvm/index.js';
|
|
7
|
-
import { type PackedValuesCache, type SideEffectCounter } from '../common/index.js';
|
|
8
|
-
import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db.js';
|
|
9
|
-
import { type PublicExecution, type PublicExecutionResult } from './execution.js';
|
|
10
|
-
/**
|
|
11
|
-
* The execution context for a public tx simulation.
|
|
12
|
-
*/
|
|
13
|
-
export declare class PublicExecutionContext extends TypedOracle {
|
|
14
|
-
/**
|
|
15
|
-
* Data for this execution.
|
|
16
|
-
*/
|
|
17
|
-
readonly execution: PublicExecution;
|
|
18
|
-
readonly header: Header;
|
|
19
|
-
readonly globalVariables: GlobalVariables;
|
|
20
|
-
private readonly packedValuesCache;
|
|
21
|
-
readonly sideEffectCounter: SideEffectCounter;
|
|
22
|
-
readonly stateDb: PublicStateDB;
|
|
23
|
-
readonly contractsDb: PublicContractsDB;
|
|
24
|
-
readonly commitmentsDb: CommitmentsDB;
|
|
25
|
-
readonly availableGas: Gas;
|
|
26
|
-
readonly transactionFee: Fr;
|
|
27
|
-
readonly gasSettings: GasSettings;
|
|
28
|
-
readonly pendingNullifiers: Nullifier[];
|
|
29
|
-
private allUnencryptedLogs;
|
|
30
|
-
private log;
|
|
31
|
-
private storageActions;
|
|
32
|
-
private nestedExecutions;
|
|
33
|
-
private unencryptedLogs;
|
|
34
|
-
constructor(
|
|
35
|
-
/**
|
|
36
|
-
* Data for this execution.
|
|
37
|
-
*/
|
|
38
|
-
execution: PublicExecution, header: Header, globalVariables: GlobalVariables, packedValuesCache: PackedValuesCache, sideEffectCounter: SideEffectCounter, stateDb: PublicStateDB, contractsDb: PublicContractsDB, commitmentsDb: CommitmentsDB, availableGas: Gas, transactionFee: Fr, gasSettings: GasSettings, pendingNullifiers: Nullifier[], allUnencryptedLogs?: UnencryptedL2Log[], log?: import("@aztec/foundation/log").Logger);
|
|
39
|
-
/**
|
|
40
|
-
* Generates the initial witness for a public function.
|
|
41
|
-
* @param args - The arguments to the function.
|
|
42
|
-
* @param callContext - The call context of the function.
|
|
43
|
-
* @param header - Contains data required to reconstruct a block hash (historical roots etc.).
|
|
44
|
-
* @param globalVariables - The global variables.
|
|
45
|
-
* @param witnessStartIndex - The index where to start inserting the parameters.
|
|
46
|
-
* @returns The initial witness.
|
|
47
|
-
*/
|
|
48
|
-
getInitialWitness(witnessStartIndex?: number): Map<number, string>;
|
|
49
|
-
/**
|
|
50
|
-
* Return the nested execution results during this execution.
|
|
51
|
-
*/
|
|
52
|
-
getNestedExecutions(): PublicExecutionResult[];
|
|
53
|
-
/**
|
|
54
|
-
* Return the encrypted logs emitted during this execution.
|
|
55
|
-
*/
|
|
56
|
-
getUnencryptedLogs(): UnencryptedFunctionL2Logs;
|
|
57
|
-
/**
|
|
58
|
-
* Return the encrypted logs emitted during this execution, including nested calls.
|
|
59
|
-
*/
|
|
60
|
-
getAllUnencryptedLogs(): UnencryptedFunctionL2Logs;
|
|
61
|
-
/**
|
|
62
|
-
* Return the data read and updated during this execution.
|
|
63
|
-
*/
|
|
64
|
-
getStorageActionData(): {
|
|
65
|
-
contractStorageReads: import("@aztec/circuits.js").ContractStorageRead[];
|
|
66
|
-
contractStorageUpdateRequests: import("@aztec/circuits.js").ContractStorageUpdateRequest[];
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Pack the given array of arguments.
|
|
70
|
-
* @param args - Arguments to pack
|
|
71
|
-
*/
|
|
72
|
-
packArgumentsArray(args: Fr[]): Promise<Fr>;
|
|
73
|
-
/**
|
|
74
|
-
* Pack the given returns.
|
|
75
|
-
* @param returns - Returns to pack
|
|
76
|
-
*/
|
|
77
|
-
packReturns(returns: Fr[]): Promise<Fr>;
|
|
78
|
-
/**
|
|
79
|
-
* Unpack the given returns.
|
|
80
|
-
* @param returnsHash - Returns hash to unpack
|
|
81
|
-
*/
|
|
82
|
-
unpackReturns(returnsHash: Fr): Promise<Fr[]>;
|
|
83
|
-
/**
|
|
84
|
-
* Fetches a message from the db, given its key.
|
|
85
|
-
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
86
|
-
* @param messageHash - Hash of the message.
|
|
87
|
-
* @param secret - Secret used to compute a nullifier.
|
|
88
|
-
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
89
|
-
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
90
|
-
*/
|
|
91
|
-
getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<import("../acvm/index.js").MessageLoadOracleInputs<16>>;
|
|
92
|
-
/**
|
|
93
|
-
* Emit an unencrypted log.
|
|
94
|
-
* @param log - The unencrypted log to be emitted.
|
|
95
|
-
*/
|
|
96
|
-
emitUnencryptedLog(log: UnencryptedL2Log, _counter: number): void;
|
|
97
|
-
/**
|
|
98
|
-
* Read the public storage data.
|
|
99
|
-
* @param startStorageSlot - The starting storage slot.
|
|
100
|
-
* @param numberOfElements - Number of elements to read from the starting storage slot.
|
|
101
|
-
*/
|
|
102
|
-
storageRead(startStorageSlot: Fr, numberOfElements: number): Promise<Fr[]>;
|
|
103
|
-
/**
|
|
104
|
-
* Write some values to the public storage.
|
|
105
|
-
* @param startStorageSlot - The starting storage slot.
|
|
106
|
-
* @param values - The values to be written.
|
|
107
|
-
*/
|
|
108
|
-
storageWrite(startStorageSlot: Fr, values: Fr[]): Promise<Fr[]>;
|
|
109
|
-
/**
|
|
110
|
-
* Calls a public function as a nested execution.
|
|
111
|
-
* @param targetContractAddress - The address of the contract to call.
|
|
112
|
-
* @param functionSelector - The function selector of the function to call.
|
|
113
|
-
* @param argsHash - The packed arguments to pass to the function.
|
|
114
|
-
* @returns The return values of the public function.
|
|
115
|
-
*/
|
|
116
|
-
callPublicFunction(targetContractAddress: AztecAddress, functionSelector: FunctionSelector, argsHash: Fr, sideEffectCounter: number, isStaticCall: boolean, isDelegateCall: boolean): Promise<Fr[]>;
|
|
117
|
-
checkNullifierExists(nullifier: Fr): Promise<boolean>;
|
|
118
|
-
getContractInstance(address: AztecAddress): Promise<ContractInstance>;
|
|
119
|
-
debugLog(message: string, fields: Fr[]): void;
|
|
120
|
-
}
|
|
121
|
-
//# sourceMappingURL=public_execution_context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public_execution_context.d.ts","sourceRoot":"","sources":["../../src/public/public_execution_context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,SAAS,EAEf,MAAM,oBAA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