@aztec/simulator 0.74.0 → 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2
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.js +18 -21
- package/dest/acvm/acvm_types.js +3 -2
- package/dest/acvm/deserialize.js +9 -13
- package/dest/acvm/index.js +0 -1
- package/dest/acvm/oracle/index.js +0 -1
- package/dest/acvm/oracle/oracle.js +42 -23
- package/dest/acvm/oracle/typed_oracle.js +36 -38
- package/dest/acvm/serialize.js +7 -14
- package/dest/avm/avm_context.js +24 -27
- package/dest/avm/avm_contract_call_result.js +12 -7
- package/dest/avm/avm_execution_environment.js +10 -7
- package/dest/avm/avm_gas.js +93 -56
- package/dest/avm/avm_machine_state.js +60 -61
- package/dest/avm/avm_memory_types.js +166 -255
- package/dest/avm/avm_simulator.js +68 -47
- package/dest/avm/avm_tree.js +282 -276
- package/dest/avm/bytecode_utils.js +8 -6
- package/dest/avm/errors.js +46 -63
- package/dest/avm/fixtures/avm_simulation_tester.js +18 -17
- package/dest/avm/fixtures/base_avm_simulation_tester.js +21 -16
- package/dest/avm/fixtures/index.js +27 -26
- package/dest/avm/fixtures/simple_contract_data_source.js +9 -13
- package/dest/avm/index.js +0 -1
- package/dest/avm/journal/index.js +0 -1
- package/dest/avm/journal/journal.js +147 -200
- package/dest/avm/journal/nullifiers.js +43 -46
- package/dest/avm/journal/public_storage.js +73 -87
- package/dest/avm/opcodes/accrued_substate.js +140 -110
- package/dest/avm/opcodes/addressing_mode.js +29 -31
- package/dest/avm/opcodes/arithmetic.js +17 -15
- package/dest/avm/opcodes/bitwise.js +40 -26
- package/dest/avm/opcodes/comparators.js +12 -10
- package/dest/avm/opcodes/contract.js +31 -29
- package/dest/avm/opcodes/control_flow.js +47 -43
- package/dest/avm/opcodes/conversion.js +30 -26
- package/dest/avm/opcodes/ec_add.js +35 -34
- package/dest/avm/opcodes/environment_getters.js +33 -33
- package/dest/avm/opcodes/external_calls.js +83 -74
- package/dest/avm/opcodes/hashing.js +69 -61
- package/dest/avm/opcodes/index.js +0 -1
- package/dest/avm/opcodes/instruction.js +31 -40
- package/dest/avm/opcodes/instruction_impl.js +12 -15
- package/dest/avm/opcodes/memory.js +177 -156
- package/dest/avm/opcodes/misc.js +27 -25
- package/dest/avm/opcodes/multi_scalar_mul.js +43 -41
- package/dest/avm/opcodes/storage.js +28 -25
- package/dest/avm/serialization/buffer_cursor.js +4 -4
- package/dest/avm/serialization/bytecode_serialization.js +292 -89
- package/dest/avm/serialization/instruction_serialization.js +67 -28
- package/dest/avm/test_utils.js +6 -9
- package/dest/client/client_execution_context.js +197 -219
- package/dest/client/db_oracle.js +4 -7
- package/dest/client/execution_note_cache.js +80 -81
- package/dest/client/index.js +0 -1
- package/dest/client/pick_notes.js +27 -30
- package/dest/client/private_execution.js +13 -14
- package/dest/client/simulator.js +44 -48
- package/dest/client/unconstrained_execution.js +8 -11
- package/dest/client/view_data_oracle.js +130 -139
- package/dest/common/debug_fn_name.js +1 -4
- package/dest/common/errors.js +30 -39
- package/dest/common/hashed_values_cache.js +16 -20
- package/dest/common/index.js +0 -1
- package/dest/common/message_load_oracle_inputs.js +7 -7
- package/dest/common/simulation_provider.js +3 -6
- package/dest/common.js +0 -1
- package/dest/providers/acvm_native.js +46 -32
- package/dest/providers/acvm_wasm.js +18 -10
- package/dest/providers/acvm_wasm_with_blobs.js +2 -5
- package/dest/providers/factory.js +5 -5
- package/dest/providers/index.js +0 -1
- package/dest/public/bytecode_errors.js +1 -2
- package/dest/public/db_interfaces.js +1 -2
- package/dest/public/execution.js +2 -4
- package/dest/public/executor_metrics.js +16 -12
- package/dest/public/fee_payment.js +2 -5
- package/dest/public/fixtures/index.js +0 -1
- package/dest/public/fixtures/public_tx_simulation_tester.js +13 -17
- package/dest/public/fixtures/utils.js +11 -14
- package/dest/public/index.js +0 -1
- package/dest/public/public_db_sources.js +79 -87
- package/dest/public/public_processor.js +310 -306
- package/dest/public/public_processor_metrics.js +46 -27
- package/dest/public/public_tx_context.js +97 -118
- package/dest/public/public_tx_simulator.js +299 -314
- package/dest/public/side_effect_errors.js +1 -2
- package/dest/public/side_effect_trace.js +44 -71
- package/dest/public/side_effect_trace_interface.js +1 -2
- package/dest/public/unique_class_ids.js +22 -27
- package/dest/public/utils.js +16 -11
- package/dest/server.js +0 -1
- package/dest/stats/index.js +0 -1
- package/dest/stats/stats.js +1 -2
- package/dest/test/utils.js +5 -4
- package/package.json +11 -11
- package/src/acvm/oracle/typed_oracle.ts +34 -34
- package/src/avm/avm_machine_state.ts +18 -14
- package/src/avm/avm_memory_types.ts +43 -183
- package/src/avm/avm_simulator.ts +37 -11
- package/src/avm/opcodes/accrued_substate.ts +7 -21
- package/src/avm/opcodes/addressing_mode.ts +9 -2
- package/src/avm/opcodes/arithmetic.ts +1 -3
- package/src/avm/opcodes/bitwise.ts +2 -6
- package/src/avm/opcodes/comparators.ts +1 -3
- package/src/avm/opcodes/contract.ts +1 -3
- package/src/avm/opcodes/control_flow.ts +1 -9
- package/src/avm/opcodes/conversion.ts +1 -3
- package/src/avm/opcodes/ec_add.ts +1 -3
- package/src/avm/opcodes/environment_getters.ts +1 -3
- package/src/avm/opcodes/external_calls.ts +3 -6
- package/src/avm/opcodes/hashing.ts +3 -9
- package/src/avm/opcodes/memory.ts +6 -20
- package/src/avm/opcodes/misc.ts +1 -3
- package/src/avm/opcodes/multi_scalar_mul.ts +1 -7
- package/src/avm/opcodes/storage.ts +2 -6
- package/src/client/index.ts +2 -2
- package/dest/acvm/acvm.d.ts +0 -35
- package/dest/acvm/acvm.d.ts.map +0 -1
- package/dest/acvm/acvm_types.d.ts +0 -10
- package/dest/acvm/acvm_types.d.ts.map +0 -1
- package/dest/acvm/deserialize.d.ts +0 -36
- package/dest/acvm/deserialize.d.ts.map +0 -1
- package/dest/acvm/index.d.ts +0 -6
- package/dest/acvm/index.d.ts.map +0 -1
- package/dest/acvm/oracle/index.d.ts +0 -14
- package/dest/acvm/oracle/index.d.ts.map +0 -1
- package/dest/acvm/oracle/oracle.d.ts +0 -49
- package/dest/acvm/oracle/oracle.d.ts.map +0 -1
- package/dest/acvm/oracle/typed_oracle.d.ts +0 -75
- package/dest/acvm/oracle/typed_oracle.d.ts.map +0 -1
- package/dest/acvm/serialize.d.ts +0 -20
- package/dest/acvm/serialize.d.ts.map +0 -1
- package/dest/avm/avm_context.d.ts +0 -39
- package/dest/avm/avm_context.d.ts.map +0 -1
- package/dest/avm/avm_contract_call_result.d.ts +0 -30
- package/dest/avm/avm_contract_call_result.d.ts.map +0 -1
- package/dest/avm/avm_execution_environment.d.ts +0 -21
- package/dest/avm/avm_execution_environment.d.ts.map +0 -1
- package/dest/avm/avm_gas.d.ts +0 -60
- package/dest/avm/avm_gas.d.ts.map +0 -1
- package/dest/avm/avm_machine_state.d.ts +0 -93
- package/dest/avm/avm_machine_state.d.ts.map +0 -1
- package/dest/avm/avm_memory_types.d.ts +0 -310
- package/dest/avm/avm_memory_types.d.ts.map +0 -1
- package/dest/avm/avm_simulator.d.ts +0 -37
- package/dest/avm/avm_simulator.d.ts.map +0 -1
- package/dest/avm/avm_tree.d.ts +0 -281
- package/dest/avm/avm_tree.d.ts.map +0 -1
- package/dest/avm/bytecode_utils.d.ts +0 -5
- package/dest/avm/bytecode_utils.d.ts.map +0 -1
- package/dest/avm/errors.d.ts +0 -121
- package/dest/avm/errors.d.ts.map +0 -1
- package/dest/avm/fixtures/avm_simulation_tester.d.ts +0 -21
- package/dest/avm/fixtures/avm_simulation_tester.d.ts.map +0 -1
- package/dest/avm/fixtures/base_avm_simulation_tester.d.ts +0 -35
- package/dest/avm/fixtures/base_avm_simulation_tester.d.ts.map +0 -1
- package/dest/avm/fixtures/index.d.ts +0 -67
- package/dest/avm/fixtures/index.d.ts.map +0 -1
- package/dest/avm/fixtures/simple_contract_data_source.d.ts +0 -31
- package/dest/avm/fixtures/simple_contract_data_source.d.ts.map +0 -1
- package/dest/avm/index.d.ts +0 -4
- package/dest/avm/index.d.ts.map +0 -1
- package/dest/avm/journal/index.d.ts +0 -2
- package/dest/avm/journal/index.d.ts.map +0 -1
- package/dest/avm/journal/journal.d.ts +0 -176
- package/dest/avm/journal/journal.d.ts.map +0 -1
- package/dest/avm/journal/nullifiers.d.ts +0 -62
- package/dest/avm/journal/nullifiers.d.ts.map +0 -1
- package/dest/avm/journal/public_storage.d.ts +0 -66
- package/dest/avm/journal/public_storage.d.ts.map +0 -1
- package/dest/avm/opcodes/accrued_substate.d.ts +0 -75
- package/dest/avm/opcodes/accrued_substate.d.ts.map +0 -1
- package/dest/avm/opcodes/addressing_mode.d.ts +0 -27
- package/dest/avm/opcodes/addressing_mode.d.ts.map +0 -1
- package/dest/avm/opcodes/arithmetic.d.ts +0 -37
- package/dest/avm/opcodes/arithmetic.d.ts.map +0 -1
- package/dest/avm/opcodes/bitwise.d.ts +0 -50
- package/dest/avm/opcodes/bitwise.d.ts.map +0 -1
- package/dest/avm/opcodes/comparators.d.ts +0 -25
- package/dest/avm/opcodes/comparators.d.ts.map +0 -1
- package/dest/avm/opcodes/contract.d.ts +0 -21
- package/dest/avm/opcodes/contract.d.ts.map +0 -1
- package/dest/avm/opcodes/control_flow.d.ts +0 -41
- package/dest/avm/opcodes/control_flow.d.ts.map +0 -1
- package/dest/avm/opcodes/conversion.d.ts +0 -17
- package/dest/avm/opcodes/conversion.d.ts.map +0 -1
- package/dest/avm/opcodes/ec_add.d.ts +0 -19
- package/dest/avm/opcodes/ec_add.d.ts.map +0 -1
- package/dest/avm/opcodes/environment_getters.d.ts +0 -28
- package/dest/avm/opcodes/environment_getters.d.ts.map +0 -1
- package/dest/avm/opcodes/external_calls.d.ts +0 -50
- package/dest/avm/opcodes/external_calls.d.ts.map +0 -1
- package/dest/avm/opcodes/hashing.d.ts +0 -36
- package/dest/avm/opcodes/hashing.d.ts.map +0 -1
- package/dest/avm/opcodes/index.d.ts +0 -16
- package/dest/avm/opcodes/index.d.ts.map +0 -1
- package/dest/avm/opcodes/instruction.d.ts +0 -70
- package/dest/avm/opcodes/instruction.d.ts.map +0 -1
- package/dest/avm/opcodes/instruction_impl.d.ts +0 -19
- package/dest/avm/opcodes/instruction_impl.d.ts.map +0 -1
- package/dest/avm/opcodes/memory.d.ts +0 -74
- package/dest/avm/opcodes/memory.d.ts.map +0 -1
- package/dest/avm/opcodes/misc.d.ts +0 -17
- package/dest/avm/opcodes/misc.d.ts.map +0 -1
- package/dest/avm/opcodes/multi_scalar_mul.d.ts +0 -16
- package/dest/avm/opcodes/multi_scalar_mul.d.ts.map +0 -1
- package/dest/avm/opcodes/storage.d.ts +0 -24
- package/dest/avm/opcodes/storage.d.ts.map +0 -1
- package/dest/avm/serialization/buffer_cursor.d.ts +0 -28
- package/dest/avm/serialization/buffer_cursor.d.ts.map +0 -1
- package/dest/avm/serialization/bytecode_serialization.d.ts +0 -21
- package/dest/avm/serialization/bytecode_serialization.d.ts.map +0 -1
- package/dest/avm/serialization/instruction_serialization.d.ts +0 -105
- package/dest/avm/serialization/instruction_serialization.d.ts.map +0 -1
- package/dest/avm/test_utils.d.ts +0 -16
- package/dest/avm/test_utils.d.ts.map +0 -1
- package/dest/client/client_execution_context.d.ts +0 -214
- package/dest/client/client_execution_context.d.ts.map +0 -1
- package/dest/client/db_oracle.d.ts +0 -229
- package/dest/client/db_oracle.d.ts.map +0 -1
- package/dest/client/execution_note_cache.d.ts +0 -93
- package/dest/client/execution_note_cache.d.ts.map +0 -1
- package/dest/client/index.d.ts +0 -15
- package/dest/client/index.d.ts.map +0 -1
- package/dest/client/pick_notes.d.ts +0 -85
- package/dest/client/pick_notes.d.ts.map +0 -1
- package/dest/client/private_execution.d.ts +0 -19
- package/dest/client/private_execution.d.ts.map +0 -1
- package/dest/client/simulator.d.ts +0 -60
- package/dest/client/simulator.d.ts.map +0 -1
- package/dest/client/unconstrained_execution.d.ts +0 -10
- package/dest/client/unconstrained_execution.d.ts.map +0 -1
- package/dest/client/view_data_oracle.d.ts +0 -159
- package/dest/client/view_data_oracle.d.ts.map +0 -1
- package/dest/common/debug_fn_name.d.ts +0 -4
- package/dest/common/debug_fn_name.d.ts.map +0 -1
- package/dest/common/errors.d.ts +0 -54
- package/dest/common/errors.d.ts.map +0 -1
- package/dest/common/hashed_values_cache.d.ts +0 -28
- package/dest/common/hashed_values_cache.d.ts.map +0 -1
- package/dest/common/index.d.ts +0 -3
- package/dest/common/index.d.ts.map +0 -1
- package/dest/common/message_load_oracle_inputs.d.ts +0 -15
- package/dest/common/message_load_oracle_inputs.d.ts.map +0 -1
- package/dest/common/simulation_provider.d.ts +0 -19
- package/dest/common/simulation_provider.d.ts.map +0 -1
- package/dest/common.d.ts +0 -2
- package/dest/common.d.ts.map +0 -1
- package/dest/providers/acvm_native.d.ts +0 -40
- package/dest/providers/acvm_native.d.ts.map +0 -1
- package/dest/providers/acvm_wasm.d.ts +0 -15
- package/dest/providers/acvm_wasm.d.ts.map +0 -1
- package/dest/providers/acvm_wasm_with_blobs.d.ts +0 -19
- package/dest/providers/acvm_wasm_with_blobs.d.ts.map +0 -1
- package/dest/providers/factory.d.ts +0 -12
- package/dest/providers/factory.d.ts.map +0 -1
- package/dest/providers/index.d.ts +0 -5
- package/dest/providers/index.d.ts.map +0 -1
- package/dest/public/bytecode_errors.d.ts +0 -4
- package/dest/public/bytecode_errors.d.ts.map +0 -1
- package/dest/public/db_interfaces.d.ts +0 -105
- package/dest/public/db_interfaces.d.ts.map +0 -1
- package/dest/public/execution.d.ts +0 -102
- package/dest/public/execution.d.ts.map +0 -1
- package/dest/public/executor_metrics.d.ts +0 -13
- package/dest/public/executor_metrics.d.ts.map +0 -1
- package/dest/public/fee_payment.d.ts +0 -11
- package/dest/public/fee_payment.d.ts.map +0 -1
- package/dest/public/fixtures/index.d.ts +0 -3
- package/dest/public/fixtures/index.d.ts.map +0 -1
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts +0 -21
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +0 -1
- package/dest/public/fixtures/utils.d.ts +0 -17
- package/dest/public/fixtures/utils.d.ts.map +0 -1
- package/dest/public/index.d.ts +0 -9
- package/dest/public/index.d.ts.map +0 -1
- package/dest/public/public_db_sources.d.ts +0 -81
- package/dest/public/public_db_sources.d.ts.map +0 -1
- package/dest/public/public_processor.d.ts +0 -72
- package/dest/public/public_processor.d.ts.map +0 -1
- package/dest/public/public_processor_metrics.d.ts +0 -27
- package/dest/public/public_processor_metrics.d.ts.map +0 -1
- package/dest/public/public_tx_context.d.ts +0 -131
- package/dest/public/public_tx_context.d.ts.map +0 -1
- package/dest/public/public_tx_simulator.d.ts +0 -99
- package/dest/public/public_tx_simulator.d.ts.map +0 -1
- package/dest/public/side_effect_errors.d.ts +0 -4
- package/dest/public/side_effect_errors.d.ts.map +0 -1
- package/dest/public/side_effect_trace.d.ts +0 -126
- package/dest/public/side_effect_trace.d.ts.map +0 -1
- package/dest/public/side_effect_trace_interface.d.ts +0 -32
- package/dest/public/side_effect_trace_interface.d.ts.map +0 -1
- package/dest/public/unique_class_ids.d.ts +0 -37
- package/dest/public/unique_class_ids.d.ts.map +0 -1
- package/dest/public/utils.d.ts +0 -5
- package/dest/public/utils.d.ts.map +0 -1
- package/dest/server.d.ts +0 -6
- package/dest/server.d.ts.map +0 -1
- package/dest/stats/index.d.ts +0 -2
- package/dest/stats/index.d.ts.map +0 -1
- package/dest/stats/stats.d.ts +0 -4
- package/dest/stats/stats.d.ts.map +0 -1
- package/dest/test/utils.d.ts +0 -12
- package/dest/test/utils.d.ts.map +0 -1
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
4
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
5
|
-
import { type Logger } from '@aztec/foundation/log';
|
|
6
|
-
import { type FunctionsOf } from '@aztec/foundation/types';
|
|
7
|
-
import { Addressing } from './opcodes/addressing_mode.js';
|
|
8
|
-
/** MemoryValue gathers the common operations for all memory types. */
|
|
9
|
-
export declare abstract class MemoryValue {
|
|
10
|
-
abstract add(rhs: MemoryValue): MemoryValue;
|
|
11
|
-
abstract sub(rhs: MemoryValue): MemoryValue;
|
|
12
|
-
abstract mul(rhs: MemoryValue): MemoryValue;
|
|
13
|
-
abstract div(rhs: MemoryValue): MemoryValue;
|
|
14
|
-
abstract equals(rhs: MemoryValue): boolean;
|
|
15
|
-
abstract lt(rhs: MemoryValue): boolean;
|
|
16
|
-
abstract build(n: bigint): MemoryValue;
|
|
17
|
-
abstract toBigInt(): bigint;
|
|
18
|
-
abstract toBuffer(): Buffer;
|
|
19
|
-
toFr(): Fr;
|
|
20
|
-
toAztecAddress(): AztecAddress;
|
|
21
|
-
toNumber(): number;
|
|
22
|
-
toString(): string;
|
|
23
|
-
}
|
|
24
|
-
/** IntegralValue gathers the common operations for all integral memory types. */
|
|
25
|
-
export declare abstract class IntegralValue extends MemoryValue {
|
|
26
|
-
abstract shl(rhs: IntegralValue): IntegralValue;
|
|
27
|
-
abstract shr(rhs: IntegralValue): IntegralValue;
|
|
28
|
-
abstract and(rhs: IntegralValue): IntegralValue;
|
|
29
|
-
abstract or(rhs: IntegralValue): IntegralValue;
|
|
30
|
-
abstract xor(rhs: IntegralValue): IntegralValue;
|
|
31
|
-
abstract not(): IntegralValue;
|
|
32
|
-
}
|
|
33
|
-
declare const Uint1_base: {
|
|
34
|
-
new (n: number | bigint): {
|
|
35
|
-
readonly n: bigint;
|
|
36
|
-
build(n: bigint): any;
|
|
37
|
-
add(rhs: any): any;
|
|
38
|
-
sub(rhs: any): any;
|
|
39
|
-
mul(rhs: any): any;
|
|
40
|
-
div(rhs: any): any;
|
|
41
|
-
shr(rhs: any): any;
|
|
42
|
-
shl(rhs: any): any;
|
|
43
|
-
and(rhs: any): any;
|
|
44
|
-
or(rhs: any): any;
|
|
45
|
-
xor(rhs: any): any;
|
|
46
|
-
not(): any;
|
|
47
|
-
equals(rhs: any): boolean;
|
|
48
|
-
lt(rhs: any): boolean;
|
|
49
|
-
toBigInt(): bigint;
|
|
50
|
-
toBuffer(): Buffer;
|
|
51
|
-
toFr(): Fr;
|
|
52
|
-
toAztecAddress(): AztecAddress;
|
|
53
|
-
toNumber(): number;
|
|
54
|
-
toString(): string;
|
|
55
|
-
};
|
|
56
|
-
readonly mod: bigint;
|
|
57
|
-
readonly bitmask: bigint;
|
|
58
|
-
};
|
|
59
|
-
export declare class Uint1 extends Uint1_base {
|
|
60
|
-
}
|
|
61
|
-
declare const Uint8_base: {
|
|
62
|
-
new (n: number | bigint): {
|
|
63
|
-
readonly n: bigint;
|
|
64
|
-
build(n: bigint): any;
|
|
65
|
-
add(rhs: any): any;
|
|
66
|
-
sub(rhs: any): any;
|
|
67
|
-
mul(rhs: any): any;
|
|
68
|
-
div(rhs: any): any;
|
|
69
|
-
shr(rhs: any): any;
|
|
70
|
-
shl(rhs: any): any;
|
|
71
|
-
and(rhs: any): any;
|
|
72
|
-
or(rhs: any): any;
|
|
73
|
-
xor(rhs: any): any;
|
|
74
|
-
not(): any;
|
|
75
|
-
equals(rhs: any): boolean;
|
|
76
|
-
lt(rhs: any): boolean;
|
|
77
|
-
toBigInt(): bigint;
|
|
78
|
-
toBuffer(): Buffer;
|
|
79
|
-
toFr(): Fr;
|
|
80
|
-
toAztecAddress(): AztecAddress;
|
|
81
|
-
toNumber(): number;
|
|
82
|
-
toString(): string;
|
|
83
|
-
};
|
|
84
|
-
readonly mod: bigint;
|
|
85
|
-
readonly bitmask: bigint;
|
|
86
|
-
};
|
|
87
|
-
export declare class Uint8 extends Uint8_base {
|
|
88
|
-
}
|
|
89
|
-
declare const Uint16_base: {
|
|
90
|
-
new (n: number | bigint): {
|
|
91
|
-
readonly n: bigint;
|
|
92
|
-
build(n: bigint): any;
|
|
93
|
-
add(rhs: any): any;
|
|
94
|
-
sub(rhs: any): any;
|
|
95
|
-
mul(rhs: any): any;
|
|
96
|
-
div(rhs: any): any;
|
|
97
|
-
shr(rhs: any): any;
|
|
98
|
-
shl(rhs: any): any;
|
|
99
|
-
and(rhs: any): any;
|
|
100
|
-
or(rhs: any): any;
|
|
101
|
-
xor(rhs: any): any;
|
|
102
|
-
not(): any;
|
|
103
|
-
equals(rhs: any): boolean;
|
|
104
|
-
lt(rhs: any): boolean;
|
|
105
|
-
toBigInt(): bigint;
|
|
106
|
-
toBuffer(): Buffer;
|
|
107
|
-
toFr(): Fr;
|
|
108
|
-
toAztecAddress(): AztecAddress;
|
|
109
|
-
toNumber(): number;
|
|
110
|
-
toString(): string;
|
|
111
|
-
};
|
|
112
|
-
readonly mod: bigint;
|
|
113
|
-
readonly bitmask: bigint;
|
|
114
|
-
};
|
|
115
|
-
export declare class Uint16 extends Uint16_base {
|
|
116
|
-
}
|
|
117
|
-
declare const Uint32_base: {
|
|
118
|
-
new (n: number | bigint): {
|
|
119
|
-
readonly n: bigint;
|
|
120
|
-
build(n: bigint): any;
|
|
121
|
-
add(rhs: any): any;
|
|
122
|
-
sub(rhs: any): any;
|
|
123
|
-
mul(rhs: any): any;
|
|
124
|
-
div(rhs: any): any;
|
|
125
|
-
shr(rhs: any): any;
|
|
126
|
-
shl(rhs: any): any;
|
|
127
|
-
and(rhs: any): any;
|
|
128
|
-
or(rhs: any): any;
|
|
129
|
-
xor(rhs: any): any;
|
|
130
|
-
not(): any;
|
|
131
|
-
equals(rhs: any): boolean;
|
|
132
|
-
lt(rhs: any): boolean;
|
|
133
|
-
toBigInt(): bigint;
|
|
134
|
-
toBuffer(): Buffer;
|
|
135
|
-
toFr(): Fr;
|
|
136
|
-
toAztecAddress(): AztecAddress;
|
|
137
|
-
toNumber(): number;
|
|
138
|
-
toString(): string;
|
|
139
|
-
};
|
|
140
|
-
readonly mod: bigint;
|
|
141
|
-
readonly bitmask: bigint;
|
|
142
|
-
};
|
|
143
|
-
export declare class Uint32 extends Uint32_base {
|
|
144
|
-
}
|
|
145
|
-
declare const Uint64_base: {
|
|
146
|
-
new (n: number | bigint): {
|
|
147
|
-
readonly n: bigint;
|
|
148
|
-
build(n: bigint): any;
|
|
149
|
-
add(rhs: any): any;
|
|
150
|
-
sub(rhs: any): any;
|
|
151
|
-
mul(rhs: any): any;
|
|
152
|
-
div(rhs: any): any;
|
|
153
|
-
shr(rhs: any): any;
|
|
154
|
-
shl(rhs: any): any;
|
|
155
|
-
and(rhs: any): any;
|
|
156
|
-
or(rhs: any): any;
|
|
157
|
-
xor(rhs: any): any;
|
|
158
|
-
not(): any;
|
|
159
|
-
equals(rhs: any): boolean;
|
|
160
|
-
lt(rhs: any): boolean;
|
|
161
|
-
toBigInt(): bigint;
|
|
162
|
-
toBuffer(): Buffer;
|
|
163
|
-
toFr(): Fr;
|
|
164
|
-
toAztecAddress(): AztecAddress;
|
|
165
|
-
toNumber(): number;
|
|
166
|
-
toString(): string;
|
|
167
|
-
};
|
|
168
|
-
readonly mod: bigint;
|
|
169
|
-
readonly bitmask: bigint;
|
|
170
|
-
};
|
|
171
|
-
export declare class Uint64 extends Uint64_base {
|
|
172
|
-
}
|
|
173
|
-
declare const Uint128_base: {
|
|
174
|
-
new (n: number | bigint): {
|
|
175
|
-
readonly n: bigint;
|
|
176
|
-
build(n: bigint): any;
|
|
177
|
-
add(rhs: any): any;
|
|
178
|
-
sub(rhs: any): any;
|
|
179
|
-
mul(rhs: any): any;
|
|
180
|
-
div(rhs: any): any;
|
|
181
|
-
shr(rhs: any): any;
|
|
182
|
-
shl(rhs: any): any;
|
|
183
|
-
and(rhs: any): any;
|
|
184
|
-
or(rhs: any): any;
|
|
185
|
-
xor(rhs: any): any;
|
|
186
|
-
not(): any;
|
|
187
|
-
equals(rhs: any): boolean;
|
|
188
|
-
lt(rhs: any): boolean;
|
|
189
|
-
toBigInt(): bigint;
|
|
190
|
-
toBuffer(): Buffer;
|
|
191
|
-
toFr(): Fr;
|
|
192
|
-
toAztecAddress(): AztecAddress;
|
|
193
|
-
toNumber(): number;
|
|
194
|
-
toString(): string;
|
|
195
|
-
};
|
|
196
|
-
readonly mod: bigint;
|
|
197
|
-
readonly bitmask: bigint;
|
|
198
|
-
};
|
|
199
|
-
export declare class Uint128 extends Uint128_base {
|
|
200
|
-
}
|
|
201
|
-
export declare class Field extends MemoryValue {
|
|
202
|
-
static readonly MODULUS: bigint;
|
|
203
|
-
private readonly rep;
|
|
204
|
-
constructor(v: number | bigint | Fr | Buffer);
|
|
205
|
-
build(n: bigint): Field;
|
|
206
|
-
add(rhs: Field): Field;
|
|
207
|
-
sub(rhs: Field): Field;
|
|
208
|
-
mul(rhs: Field): Field;
|
|
209
|
-
div(rhs: Field): Field;
|
|
210
|
-
fdiv(rhs: Field): Field;
|
|
211
|
-
equals(rhs: Field): boolean;
|
|
212
|
-
lt(rhs: Field): boolean;
|
|
213
|
-
toBigInt(): bigint;
|
|
214
|
-
toBuffer(): Buffer;
|
|
215
|
-
}
|
|
216
|
-
export declare enum TypeTag {
|
|
217
|
-
FIELD = 0,
|
|
218
|
-
UINT1 = 1,
|
|
219
|
-
UINT8 = 2,
|
|
220
|
-
UINT16 = 3,
|
|
221
|
-
UINT32 = 4,
|
|
222
|
-
UINT64 = 5,
|
|
223
|
-
UINT128 = 6,
|
|
224
|
-
INVALID = 7
|
|
225
|
-
}
|
|
226
|
-
export type TaggedMemoryInterface = FunctionsOf<TaggedMemory>;
|
|
227
|
-
export declare class TaggedMemory implements TaggedMemoryInterface {
|
|
228
|
-
static readonly log: Logger;
|
|
229
|
-
static readonly TRACK_MEMORY_ACCESSES: boolean;
|
|
230
|
-
static readonly MAX_MEMORY_SIZE: number;
|
|
231
|
-
private _mem;
|
|
232
|
-
constructor();
|
|
233
|
-
getMaxMemorySize(): number;
|
|
234
|
-
/** Returns a MeteredTaggedMemory instance to track the number of reads and writes if TRACK_MEMORY_ACCESSES is set. */
|
|
235
|
-
track(type?: string): TaggedMemoryInterface;
|
|
236
|
-
get(offset: number): MemoryValue;
|
|
237
|
-
getAs<T>(offset: number): T;
|
|
238
|
-
getSlice(offset: number, size: number): MemoryValue[];
|
|
239
|
-
getSliceAs<T>(offset: number, size: number): T[];
|
|
240
|
-
getSliceTags(offset: number, size: number): TypeTag[];
|
|
241
|
-
set(offset: number, v: MemoryValue): void;
|
|
242
|
-
setSlice(offset: number, slice: MemoryValue[]): void;
|
|
243
|
-
getTag(offset: number): TypeTag;
|
|
244
|
-
/**
|
|
245
|
-
* Check that the memory at the given offset matches the specified tag.
|
|
246
|
-
*/
|
|
247
|
-
checkTag(tag: TypeTag, offset: number): void;
|
|
248
|
-
checkIsValidMemoryOffsetTag(offset: number): void;
|
|
249
|
-
static checkIsIntegralTag(tag: TypeTag): void;
|
|
250
|
-
static checkIsValidTag(tagNumber: number): void;
|
|
251
|
-
/**
|
|
252
|
-
* Check tags for memory at all of the specified offsets.
|
|
253
|
-
*/
|
|
254
|
-
checkTags(tag: TypeTag, ...offsets: number[]): void;
|
|
255
|
-
/**
|
|
256
|
-
* Check that all tags at the given offsets are the same.
|
|
257
|
-
*/
|
|
258
|
-
checkTagsAreSame(...offsets: number[]): void;
|
|
259
|
-
/**
|
|
260
|
-
* Check tags for all memory in the specified range.
|
|
261
|
-
*/
|
|
262
|
-
checkTagsRange(tag: TypeTag, startOffset: number, size: number): void;
|
|
263
|
-
static getTag(v: MemoryValue | undefined): TypeTag;
|
|
264
|
-
static buildFromTagTruncating(v: bigint | number, tag: TypeTag): MemoryValue;
|
|
265
|
-
/** No-op. Implemented here for compatibility with the MeteredTaggedMemory. */
|
|
266
|
-
assert(_operations: Partial<MemoryOperations & {
|
|
267
|
-
addressing: Addressing;
|
|
268
|
-
}>): void;
|
|
269
|
-
}
|
|
270
|
-
/** Tagged memory wrapper with metering for each memory read and write operation. */
|
|
271
|
-
export declare class MeteredTaggedMemory implements TaggedMemoryInterface {
|
|
272
|
-
private wrapped;
|
|
273
|
-
private type;
|
|
274
|
-
private reads;
|
|
275
|
-
private writes;
|
|
276
|
-
constructor(wrapped: TaggedMemory, type?: string);
|
|
277
|
-
/** Returns the number of reads and writes tracked so far and resets them to zero. */
|
|
278
|
-
reset(): MemoryOperations;
|
|
279
|
-
/**
|
|
280
|
-
* Asserts that the exact number of memory operations have been performed.
|
|
281
|
-
* Indirect represents the flags for indirect accesses: each bit set to one counts as an extra read.
|
|
282
|
-
*/
|
|
283
|
-
assert(operations: Partial<MemoryOperations & {
|
|
284
|
-
addressing: Addressing;
|
|
285
|
-
}>): void;
|
|
286
|
-
getMaxMemorySize(): number;
|
|
287
|
-
track(type?: string): MeteredTaggedMemory;
|
|
288
|
-
get(offset: number): MemoryValue;
|
|
289
|
-
getSliceAs<T>(offset: number, size: number): T[];
|
|
290
|
-
getAs<T>(offset: number): T;
|
|
291
|
-
getSlice(offset: number, size: number): MemoryValue[];
|
|
292
|
-
set(offset: number, v: MemoryValue): void;
|
|
293
|
-
setSlice(offset: number, vs: MemoryValue[]): void;
|
|
294
|
-
getSliceTags(offset: number, size: number): TypeTag[];
|
|
295
|
-
getTag(offset: number): TypeTag;
|
|
296
|
-
checkTag(tag: TypeTag, offset: number): void;
|
|
297
|
-
checkIsValidMemoryOffsetTag(offset: number): void;
|
|
298
|
-
checkTags(tag: TypeTag, ...offsets: number[]): void;
|
|
299
|
-
checkTagsAreSame(...offsets: number[]): void;
|
|
300
|
-
checkTagsRange(tag: TypeTag, startOffset: number, size: number): void;
|
|
301
|
-
}
|
|
302
|
-
/** Tracks number of memory reads and writes. */
|
|
303
|
-
export type MemoryOperations = {
|
|
304
|
-
/** How many total reads are performed. Slice reads are count as one per element. */
|
|
305
|
-
reads: number;
|
|
306
|
-
/** How many total writes are performed. Slice writes are count as one per element. */
|
|
307
|
-
writes: number;
|
|
308
|
-
};
|
|
309
|
-
export {};
|
|
310
|
-
//# sourceMappingURL=avm_memory_types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avm_memory_types.d.ts","sourceRoot":"","sources":["../../src/avm/avm_memory_types.ts"],"names":[],"mappings":";;A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M,GAAG,OAAO,EAAE;IAIrD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAI/B,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAI5C,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIjD,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAInD,gBAAgB,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAI5C,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;CAG7E;AAED,gDAAgD;AAChD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { type AztecAddress, Fr, type GlobalVariables } from '@aztec/circuits.js';
|
|
4
|
-
import { AvmContext } from './avm_context.js';
|
|
5
|
-
import { AvmContractCallResult } from './avm_contract_call_result.js';
|
|
6
|
-
import { type Gas } from './avm_gas.js';
|
|
7
|
-
import { type AvmPersistableStateManager } from './journal/journal.js';
|
|
8
|
-
import { type InstructionSet } from './serialization/bytecode_serialization.js';
|
|
9
|
-
export declare class AvmSimulator {
|
|
10
|
-
private context;
|
|
11
|
-
private instructionSet;
|
|
12
|
-
private log;
|
|
13
|
-
private bytecode;
|
|
14
|
-
private opcodeTallies;
|
|
15
|
-
private tallyPrintFunction;
|
|
16
|
-
private tallyInstructionFunction;
|
|
17
|
-
constructor(context: AvmContext, instructionSet?: InstructionSet);
|
|
18
|
-
static build(context: AvmContext): Promise<AvmSimulator>;
|
|
19
|
-
static create(stateManager: AvmPersistableStateManager, address: AztecAddress, sender: AztecAddress, transactionFee: Fr, globals: GlobalVariables, isStaticCall: boolean, calldata: Fr[], allocatedGas: Gas): Promise<AvmSimulator>;
|
|
20
|
-
/**
|
|
21
|
-
* Fetch the bytecode and execute it in the current context.
|
|
22
|
-
*/
|
|
23
|
-
execute(): Promise<AvmContractCallResult>;
|
|
24
|
-
/**
|
|
25
|
-
* Return the bytecode used for execution, if any.
|
|
26
|
-
*/
|
|
27
|
-
getBytecode(): Buffer | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Executes the provided bytecode in the current context.
|
|
30
|
-
* This method is useful for testing and debugging.
|
|
31
|
-
*/
|
|
32
|
-
executeBytecode(bytecode: Buffer): Promise<AvmContractCallResult>;
|
|
33
|
-
private handleFailureToRetrieveBytecode;
|
|
34
|
-
private tallyInstruction;
|
|
35
|
-
private printOpcodeTallies;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=avm_simulator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avm_simulator.d.ts","sourceRoot":"","sources":["../../src/avm/avm_simulator.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,EAAE,EAAE,KAAK,eAAe,EAAoC,MAAM,oBAAoB,CAAC;AAMnH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,cAAc,CAAC;AAUxC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,2CAA2C,CAAC;AAOnD,qBAAa,YAAY;IAUX,OAAO,CAAC,OAAO;IAAc,OAAO,CAAC,cAAc;IAT/D,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,aAAa,CAAuC;IAE5D,OAAO,CAAC,kBAAkB,CAAY;IACtC,OAAO,CAAC,wBAAwB,CAA+B;gBAI3C,OAAO,EAAE,UAAU,EAAU,cAAc,GAAE,cAAkC;WAe/E,KAAK,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;WAQjD,MAAM,CACxB,YAAY,EAAE,0BAA0B,EACxC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,YAAY,EACpB,cAAc,EAAE,EAAE,EAClB,OAAO,EAAE,eAAe,EACxB,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,EAAE,EAAE,EACd,YAAY,EAAE,GAAG;IAiBnB;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAuBtD;;OAEG;IACI,WAAW,IAAI,MAAM,GAAG,SAAS;IAIxC;;;OAGG;IACU,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;YAwFhE,+BAA+B;IAoB7C,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,kBAAkB;CAS3B"}
|
package/dest/avm/avm_tree.d.ts
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import { type IndexedTreeId, MerkleTreeId, type MerkleTreeReadOperations } from '@aztec/circuit-types';
|
|
2
|
-
import { AppendOnlyTreeSnapshot, NullifierLeafPreimage, PublicDataTreeLeafPreimage } from '@aztec/circuits.js';
|
|
3
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
-
import { type IndexedTreeLeafPreimage, type TreeLeafPreimage } from '@aztec/foundation/trees';
|
|
5
|
-
/****************************************************/
|
|
6
|
-
/****** Structs Used by the AvmEphemeralForest ******/
|
|
7
|
-
/****************************************************/
|
|
8
|
-
/**
|
|
9
|
-
* The preimage and the leaf index of the Low Leaf (Low Nullifier or Low Public Data Leaf)
|
|
10
|
-
*/
|
|
11
|
-
type PreimageWitness<T extends IndexedTreeLeafPreimage> = {
|
|
12
|
-
preimage: T;
|
|
13
|
-
index: bigint;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* The result of fetching a leaf from an indexed tree. Contains the preimage and wether the leaf was already present
|
|
17
|
-
* or it's a low leaf.
|
|
18
|
-
*/
|
|
19
|
-
type GetLeafResult<T extends IndexedTreeLeafPreimage> = PreimageWitness<T> & {
|
|
20
|
-
alreadyPresent: boolean;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Contains the low sibling path and a boolean if the next index pointed to
|
|
24
|
-
* by the low leaf is an update or an insertion (i.e. exists or not).
|
|
25
|
-
*/
|
|
26
|
-
type LeafWitness<T extends IndexedTreeLeafPreimage> = PreimageWitness<T> & {
|
|
27
|
-
siblingPath: Fr[];
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* The result of an update in an indexed merkle tree (no new leaf inserted)
|
|
31
|
-
*/
|
|
32
|
-
type IndexedUpdateResult<T extends IndexedTreeLeafPreimage> = {
|
|
33
|
-
element: T;
|
|
34
|
-
lowWitness: LeafWitness<T>;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* The result of an insertion in an indexed merkle tree.
|
|
38
|
-
* This will be used to hint the circuit
|
|
39
|
-
*/
|
|
40
|
-
export type IndexedInsertResult<T extends IndexedTreeLeafPreimage> = IndexedUpdateResult<T> & {
|
|
41
|
-
leafIndex: bigint;
|
|
42
|
-
insertionPath: Fr[];
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* The result of an indexed upsert in an indexed merkle tree.
|
|
46
|
-
* This will be used to hint the circuit
|
|
47
|
-
*/
|
|
48
|
-
export type IndexedUpsertResult<T extends IndexedTreeLeafPreimage> = (IndexedUpdateResult<T> & {
|
|
49
|
-
update: true;
|
|
50
|
-
}) | (IndexedInsertResult<T> & {
|
|
51
|
-
update: false;
|
|
52
|
-
});
|
|
53
|
-
/****************************************************/
|
|
54
|
-
/****** The AvmEphemeralForest Class ****************/
|
|
55
|
-
/****************************************************/
|
|
56
|
-
/**
|
|
57
|
-
* This provides a forkable abstraction over the EphemeralAvmTree class
|
|
58
|
-
* It contains the logic to look up into a read-only MerkleTreeDb to discover
|
|
59
|
-
* the sibling paths and low witnesses that weren't inserted as part of this tx
|
|
60
|
-
*/
|
|
61
|
-
export declare class AvmEphemeralForest {
|
|
62
|
-
treeDb: MerkleTreeReadOperations;
|
|
63
|
-
treeMap: Map<MerkleTreeId, EphemeralAvmTree>;
|
|
64
|
-
indexedUpdates: Map<IndexedTreeId, Map<bigint, IndexedTreeLeafPreimage>>;
|
|
65
|
-
indexedSortedKeys: Map<IndexedTreeId, [Fr, bigint][]>;
|
|
66
|
-
constructor(treeDb: MerkleTreeReadOperations, treeMap: Map<MerkleTreeId, EphemeralAvmTree>, indexedUpdates: Map<IndexedTreeId, Map<bigint, IndexedTreeLeafPreimage>>, indexedSortedKeys: Map<IndexedTreeId, [Fr, bigint][]>);
|
|
67
|
-
static create(treeDb: MerkleTreeReadOperations): Promise<AvmEphemeralForest>;
|
|
68
|
-
fork(): AvmEphemeralForest;
|
|
69
|
-
/**
|
|
70
|
-
* Gets sibling path for a leaf - if the sibling path is not found in the tree, it is fetched from the DB
|
|
71
|
-
* @param treeId - The tree to be queried for a sibling path.
|
|
72
|
-
* @param index - The index of the leaf for which a sibling path should be returned.
|
|
73
|
-
* @returns The sibling path of the leaf.
|
|
74
|
-
*/
|
|
75
|
-
getSiblingPath(treeId: MerkleTreeId, index: bigint): Promise<Fr[]>;
|
|
76
|
-
/**
|
|
77
|
-
* This does the work of appending the new leaf and updating the low witness
|
|
78
|
-
* @param treeId - The tree to be queried for a sibling path.
|
|
79
|
-
* @param lowWitnessIndex - The index of the low leaf in the tree.
|
|
80
|
-
* @param lowWitness - The preimage of the low leaf.
|
|
81
|
-
* @param newLeafPreimage - The preimage of the new leaf to be inserted.
|
|
82
|
-
* @returns The sibling path of the new leaf (i.e. the insertion path)
|
|
83
|
-
*/
|
|
84
|
-
appendIndexedTree<ID extends IndexedTreeId, T extends IndexedTreeLeafPreimage>(treeId: ID, lowLeafIndex: bigint, lowLeafPreimage: T, newLeafPreimage: T): Promise<Fr[]>;
|
|
85
|
-
/**
|
|
86
|
-
* This writes or updates a slot in the public data tree with a value
|
|
87
|
-
* @param slot - The slot to be written to.
|
|
88
|
-
* @param newValue - The value to be written or updated to
|
|
89
|
-
* @returns The insertion result which contains the insertion path, low leaf and the new leaf index
|
|
90
|
-
*/
|
|
91
|
-
writePublicStorage(slot: Fr, newValue: Fr): Promise<IndexedUpsertResult<PublicDataTreeLeafPreimage>>;
|
|
92
|
-
private _updateSortedKeys;
|
|
93
|
-
/**
|
|
94
|
-
* This appends a nullifier to the nullifier tree, and throws if the nullifier already exists
|
|
95
|
-
* @param value - The nullifier to be appended
|
|
96
|
-
* @returns The insertion result which contains the insertion path, low leaf and the new leaf index
|
|
97
|
-
*/
|
|
98
|
-
appendNullifier(nullifier: Fr): Promise<IndexedInsertResult<NullifierLeafPreimage>>;
|
|
99
|
-
/**
|
|
100
|
-
* This appends a note hash to the note hash tree
|
|
101
|
-
* @param value - The note hash to be appended
|
|
102
|
-
* @returns The insertion result which contains the insertion path
|
|
103
|
-
*/
|
|
104
|
-
appendNoteHash(noteHash: Fr): Promise<Fr[]>;
|
|
105
|
-
/**
|
|
106
|
-
* This is wrapper around treeId to set values in the indexedUpdates map
|
|
107
|
-
*/
|
|
108
|
-
private setIndexedUpdates;
|
|
109
|
-
/**
|
|
110
|
-
* This is wrapper around treeId to get values in the indexedUpdates map.
|
|
111
|
-
* Should only be called if we know the value exists.
|
|
112
|
-
*/
|
|
113
|
-
private getIndexedUpdate;
|
|
114
|
-
/**
|
|
115
|
-
* This is wrapper around treeId to check membership (i.e. has()) of index in the indexedUpdates map
|
|
116
|
-
*/
|
|
117
|
-
private hasLocalUpdates;
|
|
118
|
-
/**
|
|
119
|
-
* Get the leaf or low leaf preimage and its index in the indexed tree given a key (slot or nullifier value).
|
|
120
|
-
* If the key is not found in the tree, it does an external lookup to the underlying merkle DB.
|
|
121
|
-
* @param treeId - The tree we are looking up in
|
|
122
|
-
* @param key - The key for which we are look up the leaf or low leaf for.
|
|
123
|
-
* @param T - The type of the preimage (PublicData or Nullifier)
|
|
124
|
-
* @returns The leaf or low leaf info (preimage & leaf index).
|
|
125
|
-
*/
|
|
126
|
-
getLeafOrLowLeafInfo<ID extends IndexedTreeId, T extends IndexedTreeLeafPreimage>(treeId: ID, key: Fr): Promise<GetLeafResult<T>>;
|
|
127
|
-
/**
|
|
128
|
-
* Internal helper to get the leaf or low leaf preimage and its index in the indexed tree given a key (slot or nullifier value).
|
|
129
|
-
* If the key is not found in the tree, it does an external lookup to the underlying merkle DB.
|
|
130
|
-
* Indicates whethe the sibling path is absent in the ephemeral tree.
|
|
131
|
-
* @param treeId - The tree we are looking up in
|
|
132
|
-
* @param key - The key for which we are look up the leaf or low leaf for.
|
|
133
|
-
* @param T - The type of the preimage (PublicData or Nullifier)
|
|
134
|
-
* @returns [
|
|
135
|
-
* getLeafResult - The leaf or low leaf info (preimage & leaf index),
|
|
136
|
-
* pathAbsentInEphemeralTree - whether its sibling path is absent in the ephemeral tree (useful during insertions)
|
|
137
|
-
* ]
|
|
138
|
-
*/
|
|
139
|
-
_getLeafOrLowLeafInfo<ID extends IndexedTreeId, T extends IndexedTreeLeafPreimage>(treeId: ID, key: Fr): Promise<[GetLeafResult<T>, /*pathAbsentInEphemeralTree=*/ boolean]>;
|
|
140
|
-
/**
|
|
141
|
-
* Helper to search for the leaf with the specified key in the indexedUpdates
|
|
142
|
-
* and return its leafIndex.
|
|
143
|
-
* If not present, return the leafIndex of the largest leaf <= the specified key
|
|
144
|
-
* (the leafIndex of the next lowest key).
|
|
145
|
-
*
|
|
146
|
-
* If no entry exists in indexedUpdates <= the specified key, return -1.
|
|
147
|
-
* @returns - The leafIndex of the leaf with the largest key <= the specified key.
|
|
148
|
-
*/
|
|
149
|
-
private _getLeafIndexOrNextLowestInIndexedUpdates;
|
|
150
|
-
/**
|
|
151
|
-
* Query the external DB to get leaf if present, low leaf if absent
|
|
152
|
-
*/
|
|
153
|
-
private _getLeafOrLowLeafWitnessInExternalDb;
|
|
154
|
-
/**
|
|
155
|
-
* This hashes the preimage to a field element
|
|
156
|
-
*/
|
|
157
|
-
hashPreimage<T extends TreeLeafPreimage>(preimage: T): Promise<Fr>;
|
|
158
|
-
getTreeSnapshot(id: MerkleTreeId): Promise<AppendOnlyTreeSnapshot>;
|
|
159
|
-
}
|
|
160
|
-
/****************************************************/
|
|
161
|
-
/****** Some useful Structs and Enums **************/
|
|
162
|
-
/****************************************************/
|
|
163
|
-
declare enum TreeType {
|
|
164
|
-
LEAF = 0,
|
|
165
|
-
NODE = 1
|
|
166
|
-
}
|
|
167
|
-
type Leaf = {
|
|
168
|
-
tag: TreeType.LEAF;
|
|
169
|
-
value: Fr;
|
|
170
|
-
};
|
|
171
|
-
type Node = {
|
|
172
|
-
tag: TreeType.NODE;
|
|
173
|
-
leftTree: Tree;
|
|
174
|
-
rightTree: Tree;
|
|
175
|
-
};
|
|
176
|
-
type Tree = Leaf | Node;
|
|
177
|
-
/****************************************************/
|
|
178
|
-
/****** Some Helpful Constructors for Trees ********/
|
|
179
|
-
/****************************************************/
|
|
180
|
-
declare const Node: (left: Tree, right: Tree) => Node;
|
|
181
|
-
declare const Leaf: (value: Fr) => Leaf;
|
|
182
|
-
/****************************************************/
|
|
183
|
-
/****** The EphemeralAvmTree Class *****************/
|
|
184
|
-
/****************************************************/
|
|
185
|
-
/**
|
|
186
|
-
* This class contains a recursively defined tree that has leaves at different heights
|
|
187
|
-
* It is seeded by an existing merkle treeDb for which it derives a frontier
|
|
188
|
-
* It is intended to be a lightweight tree that contains only the necessary information to suppport appends or updates
|
|
189
|
-
*/
|
|
190
|
-
export declare class EphemeralAvmTree {
|
|
191
|
-
private root;
|
|
192
|
-
leafCount: bigint;
|
|
193
|
-
depth: number;
|
|
194
|
-
private zeroHashes;
|
|
195
|
-
private tree;
|
|
196
|
-
frontier: Fr[];
|
|
197
|
-
private constructor();
|
|
198
|
-
static create(forkedLeafCount: bigint, depth: number, treeDb: MerkleTreeReadOperations, merkleId: MerkleTreeId): Promise<EphemeralAvmTree>;
|
|
199
|
-
/**
|
|
200
|
-
* This is a recursive function that inserts a leaf into the tree
|
|
201
|
-
* @param value - The value of the leaf to be inserted
|
|
202
|
-
*/
|
|
203
|
-
appendLeaf(value: Fr): void;
|
|
204
|
-
/**
|
|
205
|
-
* This is a recursive function that upserts a leaf into the tree at a index and depth
|
|
206
|
-
* @param value - The value of the leaf to be inserted
|
|
207
|
-
* @param index - The index of the leaf to be inserted
|
|
208
|
-
* @param depth - The depth of the leaf to be inserted (defaults to the bottom of the tree)
|
|
209
|
-
*/
|
|
210
|
-
updateLeaf(value: Fr, index: bigint, depth?: number): void;
|
|
211
|
-
/**
|
|
212
|
-
* Get the sibling path of a leaf in the tree
|
|
213
|
-
* @param index - The index of the leaf for which a sibling path should be returned.
|
|
214
|
-
* @returns The sibling path of the leaf, can fail if the path is not found
|
|
215
|
-
*/
|
|
216
|
-
getSiblingPath(index: bigint): Promise<Fr[] | undefined>;
|
|
217
|
-
/**
|
|
218
|
-
* This upserts the nodes of the sibling path into the tree
|
|
219
|
-
* @param index - The index of the leaf that the sibling path is derived from
|
|
220
|
-
* @param siblingPath - The sibling path of the index
|
|
221
|
-
*/
|
|
222
|
-
insertSiblingPath(index: bigint, siblingPath: Fr[]): void;
|
|
223
|
-
/**
|
|
224
|
-
* This is a helper function that computes the index of the frontier nodes at each depth
|
|
225
|
-
* @param leafCount - The number of leaves in the tree
|
|
226
|
-
* @returns An array of frontier indices at each depth, sorted from leaf to root
|
|
227
|
-
*/
|
|
228
|
-
static computeFrontierLeafIndices(leafCount: number): number[];
|
|
229
|
-
/**
|
|
230
|
-
* This derives the frontier and inserts them into the tree
|
|
231
|
-
* @param treeDb - The treeDb to be queried for sibling paths
|
|
232
|
-
* @param merkleId - The treeId of the tree to be queried for sibling paths
|
|
233
|
-
*/
|
|
234
|
-
initializeFrontier(treeDb: MerkleTreeReadOperations, merkleId: MerkleTreeId): Promise<void>;
|
|
235
|
-
/**
|
|
236
|
-
* Computes the root of the tree
|
|
237
|
-
*/
|
|
238
|
-
getRoot(): Promise<Fr>;
|
|
239
|
-
/**
|
|
240
|
-
* Recursively hashes the subtree
|
|
241
|
-
* @param tree - The tree to be hashed
|
|
242
|
-
* @param depth - The depth of the tree
|
|
243
|
-
*/
|
|
244
|
-
hashTree(tree: Tree, depth: number): Promise<Fr>;
|
|
245
|
-
/**
|
|
246
|
-
* Extracts the subtree from a given index and depth
|
|
247
|
-
* @param index - The index of the node to be extracted
|
|
248
|
-
* @param depth - The depth of the node to be extracted
|
|
249
|
-
* @returns The subtree rooted at the index and depth
|
|
250
|
-
*/
|
|
251
|
-
getNode(index: bigint, depth: number): Tree | undefined;
|
|
252
|
-
/**
|
|
253
|
-
* This is the recursive helper for getNode
|
|
254
|
-
*/
|
|
255
|
-
private _getNode;
|
|
256
|
-
/** Our tree traversal uses an array of 1s and 0s to represent the path to a leaf and expects them to be in LE order
|
|
257
|
-
* This helps with deriving it given an index and (optionally a depth)
|
|
258
|
-
* @param index - The index to derive a path to within the tree, does not have to terminate at a leaf
|
|
259
|
-
* @param depth - The depth to traverse, if not provided it will traverse to the bottom of the tree
|
|
260
|
-
* @returns The path to the leaf in LE order
|
|
261
|
-
*/
|
|
262
|
-
private _derivePathLE;
|
|
263
|
-
/** Sometimes we want it in BE order, to make truncating easier
|
|
264
|
-
* @param index - The index to derive a path to within the tree, does not have to terminate at a leaf
|
|
265
|
-
* @param depth - The depth to traverse, if not provided it will traverse to the bottom of the tree
|
|
266
|
-
* @returns The path to the leaf in LE order
|
|
267
|
-
*/
|
|
268
|
-
private _derivePathBE;
|
|
269
|
-
/**
|
|
270
|
-
* This is a recursive function that upserts a leaf into the tree given a path
|
|
271
|
-
* @param value - The value of the leaf to be upserted
|
|
272
|
-
* @param insertPath - The path to the leaf, this should be ordered from leaf to root (i.e. LE encoded)
|
|
273
|
-
* @param depth - The depth of the tree
|
|
274
|
-
* @param tree - The current tree
|
|
275
|
-
* @param appendMode - If true we append the relevant zeroHashes to the tree as we traverse
|
|
276
|
-
*/
|
|
277
|
-
private _insertLeaf;
|
|
278
|
-
private _getSiblingPath;
|
|
279
|
-
}
|
|
280
|
-
export {};
|
|
281
|
-
//# sourceMappingURL=avm_tree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avm_tree.d.ts","sourceRoot":"","sources":["../../src/avm/avm_tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACvG,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAE/G,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,uBAAuB,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK9F,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AAEtD;;GAEG;AACH,KAAK,eAAe,CAAC,CAAC,SAAS,uBAAuB,IAAI;IACxD,QAAQ,EAAE,CAAC,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,KAAK,aAAa,CAAC,CAAC,SAAS,uBAAuB,IAAI,eAAe,CAAC,CAAC,CAAC,GAAG;IAC3E,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,KAAK,WAAW,CAAC,CAAC,SAAS,uBAAuB,IAAI,eAAe,CAAC,CAAC,CAAC,GAAG;IACzE,WAAW,EAAE,EAAE,EAAE,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,KAAK,mBAAmB,CAAC,CAAC,SAAS,uBAAuB,IAAI;IAC5D,OAAO,EAAE,CAAC,C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;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,SAAa,GAAG,IAAI;IAK9D;;;;OAIG;IACG,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC;IAU9D;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,GAAG,IAAI;IAczD;;;;OAIG;IAEH,MAAM,CAAC,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE;IAgB9D;;;;OAIG;IACG,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAgCjG;;OAEG;IACI,OAAO,IAAI,OAAO,CAAC,EAAE,CAAC;IAI7B;;;;OAIG;IACU,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;IAc7D;;;;;OAKG;IACI,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAW9D;;OAEG;IACH,OAAO,CAAC,QAAQ;IAahB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAQrB;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;YA4BL,eAAe;CAkC9B"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
export declare function markBytecodeAsAvm(bytecode: Buffer): Buffer;
|
|
4
|
-
export declare function isAvmBytecode(bytecode: Buffer): boolean;
|
|
5
|
-
//# sourceMappingURL=bytecode_utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bytecode_utils.d.ts","sourceRoot":"","sources":["../../src/avm/bytecode_utils.ts"],"names":[],"mappings":";;AASA,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGvD"}
|