@aztec/stdlib 0.0.1-commit.2f68f620 → 0.0.1-commit.3100065
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/abi/buffer.d.ts +6 -2
- package/dest/abi/buffer.d.ts.map +1 -1
- package/dest/abi/buffer.js +13 -1
- package/dest/abi/contract_artifact.d.ts +14 -1
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +17 -0
- package/dest/avm/avm.js +1 -1
- package/dest/avm/avm_proving_request.d.ts +70 -70
- package/dest/avm/contract_storage_read.d.ts +58 -0
- package/dest/avm/contract_storage_read.d.ts.map +1 -0
- package/dest/avm/contract_storage_read.js +65 -0
- package/dest/avm/contract_storage_update_request.d.ts +65 -0
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -0
- package/dest/avm/contract_storage_update_request.js +80 -0
- package/dest/avm/index.d.ts +6 -1
- package/dest/avm/index.d.ts.map +1 -1
- package/dest/avm/index.js +5 -0
- package/dest/avm/public_call_stack_item_compressed.d.ts +43 -0
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -0
- package/dest/avm/public_call_stack_item_compressed.js +70 -0
- package/dest/avm/public_data_update_request.d.ts +62 -0
- package/dest/avm/public_data_update_request.d.ts.map +1 -0
- package/dest/avm/public_data_update_request.js +67 -0
- package/dest/avm/public_inner_call_request.d.ts +50 -0
- package/dest/avm/public_inner_call_request.d.ts.map +1 -0
- package/dest/avm/public_inner_call_request.js +74 -0
- package/dest/aztec-address/index.d.ts +35 -5
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +32 -8
- package/dest/block/attestation_info.d.ts +1 -1
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +7 -4
- package/dest/block/l2_block_source.d.ts +46 -23
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +15 -1
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts +39 -0
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts.map +1 -0
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.js +165 -0
- package/dest/block/l2_block_stream/index.d.ts +2 -1
- package/dest/block/l2_block_stream/index.d.ts.map +1 -1
- package/dest/block/l2_block_stream/index.js +1 -0
- package/dest/block/l2_block_stream/interfaces.d.ts +81 -11
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/interfaces.js +25 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +23 -15
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +149 -152
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +6 -12
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.js +8 -32
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +17 -18
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_store_base.js +70 -58
- package/dest/block/proposal/attestations_and_signers.d.ts +19 -1
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.js +47 -7
- package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +296 -37
- package/dest/block/validate_block_result.d.ts +16 -1
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +18 -3
- package/dest/checkpoint/checkpoint.js +2 -2
- package/dest/checkpoint/index.d.ts +2 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +1 -0
- package/dest/checkpoint/simulation_overrides.d.ts +61 -0
- package/dest/checkpoint/simulation_overrides.d.ts.map +1 -0
- package/dest/checkpoint/simulation_overrides.js +98 -0
- package/dest/checkpoint/validate.d.ts +11 -3
- package/dest/checkpoint/validate.d.ts.map +1 -1
- package/dest/checkpoint/validate.js +9 -6
- package/dest/config/index.d.ts +2 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -0
- package/dest/config/network-consensus-config.d.ts +72 -0
- package/dest/config/network-consensus-config.d.ts.map +1 -0
- package/dest/config/network-consensus-config.js +223 -0
- package/dest/config/sequencer-config.d.ts +4 -2
- package/dest/config/sequencer-config.d.ts.map +1 -1
- package/dest/config/sequencer-config.js +22 -3
- package/dest/contract/contract_address.d.ts +5 -4
- package/dest/contract/contract_address.d.ts.map +1 -1
- package/dest/contract/contract_instance.d.ts +16 -2
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance.js +45 -0
- package/dest/contract/deployment_info.d.ts +24 -0
- package/dest/contract/deployment_info.d.ts.map +1 -0
- package/dest/contract/deployment_info.js +3 -0
- package/dest/contract/index.d.ts +2 -1
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +1 -0
- package/dest/contract/interfaces/contract_data_source.d.ts +3 -5
- package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.d.ts +71 -10
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.js +7 -2
- package/dest/contract/interfaces/node-info.d.ts +11 -1
- package/dest/contract/interfaces/node-info.d.ts.map +1 -1
- package/dest/contract/interfaces/node-info.js +7 -1
- package/dest/contract/partial_address.d.ts +9 -3
- package/dest/contract/partial_address.d.ts.map +1 -1
- package/dest/contract/partial_address.js +8 -2
- package/dest/database-version/version_manager.d.ts +18 -4
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +76 -6
- package/dest/deserialization/index.d.ts +35 -3
- package/dest/deserialization/index.d.ts.map +1 -1
- package/dest/deserialization/index.js +32 -1
- package/dest/file-store/factory.d.ts +1 -1
- package/dest/file-store/factory.d.ts.map +1 -1
- package/dest/file-store/factory.js +7 -0
- package/dest/file-store/index.d.ts +2 -1
- package/dest/file-store/index.d.ts.map +1 -1
- package/dest/file-store/index.js +1 -0
- package/dest/file-store/memory.d.ts +24 -0
- package/dest/file-store/memory.d.ts.map +1 -0
- package/dest/file-store/memory.js +80 -0
- package/dest/gas/gas_settings.d.ts +7 -13
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +9 -16
- package/dest/gas/index.d.ts +2 -1
- package/dest/gas/index.d.ts.map +1 -1
- package/dest/gas/index.js +1 -0
- package/dest/gas/tx_gas_limits.d.ts +72 -0
- package/dest/gas/tx_gas_limits.d.ts.map +1 -0
- package/dest/gas/tx_gas_limits.js +85 -0
- package/dest/ha-signing/config.d.ts +19 -5
- package/dest/ha-signing/config.d.ts.map +1 -1
- package/dest/ha-signing/config.js +9 -3
- package/dest/ha-signing/local_config.d.ts +10 -2
- package/dest/ha-signing/local_config.d.ts.map +1 -1
- package/dest/ha-signing/local_config.js +8 -2
- package/dest/hash/hash.d.ts +1 -2
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +0 -7
- package/dest/interfaces/archiver.d.ts +12 -7
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +4 -2
- package/dest/interfaces/aztec-node-admin.d.ts +24 -17
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +1 -1
- package/dest/interfaces/aztec-node-debug.d.ts +40 -2
- package/dest/interfaces/aztec-node-debug.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-debug.js +29 -1
- package/dest/interfaces/aztec-node.d.ts +69 -28
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +56 -20
- package/dest/interfaces/block-builder.d.ts +3 -1
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/chain_tips.d.ts +8 -47
- package/dest/interfaces/chain_tips.d.ts.map +1 -1
- package/dest/interfaces/chain_tips.js +1 -6
- package/dest/interfaces/checkpoint_parameter.d.ts +3 -3
- package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -1
- package/dest/interfaces/checkpoint_parameter.js +3 -3
- package/dest/interfaces/client.d.ts +2 -1
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/configs.d.ts +27 -6
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +5 -1
- package/dest/interfaces/get_tx_by_hash_options.d.ts +9 -0
- package/dest/interfaces/get_tx_by_hash_options.d.ts.map +1 -0
- package/dest/interfaces/get_tx_by_hash_options.js +4 -0
- package/dest/interfaces/merkle_tree_operations.d.ts +3 -9
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p.d.ts +38 -9
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +14 -2
- package/dest/interfaces/private_kernel_prover.d.ts +9 -11
- package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
- package/dest/interfaces/prover-client.d.ts +2 -3
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-coordination.d.ts +15 -0
- package/dest/interfaces/prover-coordination.d.ts.map +1 -0
- package/dest/interfaces/prover-coordination.js +1 -0
- package/dest/interfaces/prover-node.d.ts +12 -8
- package/dest/interfaces/prover-node.d.ts.map +1 -1
- package/dest/interfaces/prover-node.js +24 -17
- package/dest/interfaces/proving-job.d.ts +87 -74
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +13 -4
- package/dest/interfaces/server.d.ts +2 -2
- package/dest/interfaces/server.d.ts.map +1 -1
- package/dest/interfaces/server.js +1 -1
- package/dest/interfaces/server_circuit_prover.d.ts +3 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +15 -4
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +3 -1
- package/dest/interfaces/world_state.d.ts +14 -1
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +8 -2
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +12 -74
- package/dest/kernel/hints/index.d.ts +2 -1
- package/dest/kernel/hints/index.d.ts.map +1 -1
- package/dest/kernel/hints/index.js +1 -0
- package/dest/kernel/hints/read_request.js +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts +14 -0
- package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -0
- package/dest/kernel/hints/tree_leaf_read_request.js +33 -0
- package/dest/kernel/index.d.ts +2 -2
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +1 -1
- package/dest/kernel/log_hash.d.ts +1 -1
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/log_hash.js +2 -2
- package/dest/kernel/note_hash.js +1 -1
- package/dest/kernel/nullifier.js +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +13 -3
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +14 -7
- package/dest/kernel/private_context_inputs.d.ts +4 -3
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_context_inputs.js +7 -3
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +7 -0
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +2 -3
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +3 -5
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +2 -3
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +3 -5
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +1 -9
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.js +2 -6
- package/dest/kernel/private_kernel_reset_dimensions.d.ts +7 -8
- package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts +29 -0
- package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.js +36 -0
- package/dest/kernel/private_kernel_simulated_output.d.ts +7 -1
- package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_simulated_output.js +1 -2
- package/dest/kernel/private_log_data.d.ts +1 -1
- package/dest/kernel/private_log_data.d.ts.map +1 -1
- package/dest/kernel/private_log_data.js +1 -1
- package/dest/kernel/utils/index.d.ts +2 -1
- package/dest/kernel/utils/index.d.ts.map +1 -1
- package/dest/kernel/utils/index.js +1 -0
- package/dest/kernel/utils/optional_number.d.ts +31 -0
- package/dest/kernel/utils/optional_number.d.ts.map +1 -0
- package/dest/kernel/utils/optional_number.js +42 -0
- package/dest/keys/derivation.d.ts +41 -6
- package/dest/keys/derivation.d.ts.map +1 -1
- package/dest/keys/derivation.js +49 -26
- package/dest/logs/app_tagging_secret.d.ts +30 -7
- package/dest/logs/app_tagging_secret.d.ts.map +1 -1
- package/dest/logs/app_tagging_secret.js +46 -39
- package/dest/logs/app_tagging_secret_kind.js +1 -1
- package/dest/logs/contract_class_log.d.ts +1 -2
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +0 -4
- package/dest/logs/index.d.ts +1 -3
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +0 -2
- package/dest/logs/shared_secret_derivation.d.ts +19 -6
- package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
- package/dest/logs/shared_secret_derivation.js +26 -11
- package/dest/messaging/l1_to_l2_message.d.ts +23 -2
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.js +36 -11
- package/dest/p2p/attestation_utils.d.ts +1 -1
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +8 -1
- package/dest/p2p/checkpoint_attestation.d.ts +10 -1
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +10 -0
- package/dest/p2p/checkpoint_proposal.d.ts +2 -1
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.d.ts +2 -1
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/index.d.ts +2 -1
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +1 -0
- package/dest/p2p/interface.d.ts +5 -0
- package/dest/p2p/interface.d.ts.map +1 -0
- package/dest/p2p/interface.js +1 -0
- package/dest/p2p/signature_utils.d.ts +10 -1
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +9 -1
- package/dest/rollup/avm_proof_data.d.ts +3 -3
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.d.ts +8 -3
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +20 -10
- package/dest/stats/stats.d.ts +2 -2
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +27 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +40 -15
- package/dest/tests/mocks.d.ts +1 -1
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +3 -2
- package/dest/timetable/budgets.d.ts +57 -0
- package/dest/timetable/budgets.d.ts.map +1 -0
- package/dest/timetable/budgets.js +56 -0
- package/dest/timetable/build_proposer_timetable.d.ts +21 -0
- package/dest/timetable/build_proposer_timetable.d.ts.map +1 -0
- package/dest/timetable/build_proposer_timetable.js +17 -0
- package/dest/timetable/consensus_timetable.d.ts +70 -0
- package/dest/timetable/consensus_timetable.d.ts.map +1 -0
- package/dest/timetable/consensus_timetable.js +89 -0
- package/dest/timetable/index.d.ts +5 -84
- package/dest/timetable/index.d.ts.map +1 -1
- package/dest/timetable/index.js +4 -209
- package/dest/timetable/proposer_timetable.d.ts +106 -0
- package/dest/timetable/proposer_timetable.d.ts.map +1 -0
- package/dest/timetable/proposer_timetable.js +132 -0
- package/dest/trees/nullifier_membership_witness.d.ts +5 -8
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.js +0 -9
- package/dest/trees/public_data_witness.d.ts +7 -17
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/trees/public_data_witness.js +0 -27
- package/dest/tx/execution_payload.d.ts +1 -1
- package/dest/tx/execution_payload.d.ts.map +1 -1
- package/dest/tx/execution_payload.js +1 -1
- package/dest/tx/fee_provider.d.ts +2 -2
- package/dest/tx/fee_provider.d.ts.map +1 -1
- package/dest/tx/global_variable_builder.d.ts +2 -12
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.js +2 -2
- package/dest/tx/index.d.ts +2 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -0
- package/dest/tx/private_tx_constant_data.d.ts +18 -2
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/private_tx_constant_data.js +13 -4
- package/dest/tx/simulated_tx.d.ts +10 -6
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/tx.d.ts +9 -1
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +15 -0
- package/dest/tx/validator/empty_validator.d.ts +5 -0
- package/dest/tx/validator/empty_validator.d.ts.map +1 -0
- package/dest/tx/validator/empty_validator.js +7 -0
- package/dest/tx/validator/error_texts.d.ts +2 -2
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +1 -1
- package/dest/world-state/genesis_data.d.ts +9 -1
- package/dest/world-state/genesis_data.d.ts.map +1 -1
- package/dest/world-state/genesis_data.js +1 -0
- package/dest/world-state/world_state_revision.d.ts +18 -1
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +20 -0
- package/package.json +8 -8
- package/src/abi/buffer.ts +13 -1
- package/src/abi/contract_artifact.ts +19 -0
- package/src/avm/avm.ts +1 -1
- package/src/avm/contract_storage_read.ts +77 -0
- package/src/avm/contract_storage_update_request.ts +93 -0
- package/src/avm/index.ts +5 -0
- package/src/avm/public_call_stack_item_compressed.ts +113 -0
- package/src/avm/public_data_update_request.ts +106 -0
- package/src/avm/public_inner_call_request.ts +85 -0
- package/src/aztec-address/index.ts +36 -6
- package/src/block/attestation_info.ts +7 -2
- package/src/block/l2_block_source.ts +67 -13
- package/src/block/l2_block_stream/event_driven_l2_block_stream.ts +207 -0
- package/src/block/l2_block_stream/index.ts +1 -0
- package/src/block/l2_block_stream/interfaces.ts +96 -10
- package/src/block/l2_block_stream/l2_block_stream.ts +216 -175
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +12 -41
- package/src/block/l2_block_stream/l2_tips_store_base.ts +84 -93
- package/src/block/proposal/attestations_and_signers.ts +53 -7
- package/src/block/test/l2_tips_store_test_suite.ts +270 -28
- package/src/block/validate_block_result.ts +48 -2
- package/src/checkpoint/checkpoint.ts +2 -2
- package/src/checkpoint/index.ts +1 -0
- package/src/checkpoint/simulation_overrides.ts +171 -0
- package/src/checkpoint/validate.ts +16 -6
- package/src/config/index.ts +1 -0
- package/src/config/network-consensus-config.ts +291 -0
- package/src/config/sequencer-config.ts +36 -5
- package/src/contract/contract_address.ts +4 -3
- package/src/contract/contract_instance.ts +62 -1
- package/src/contract/deployment_info.ts +25 -0
- package/src/contract/index.ts +1 -0
- package/src/contract/interfaces/contract_data_source.ts +2 -4
- package/src/contract/interfaces/contract_instance.ts +26 -8
- package/src/contract/interfaces/node-info.ts +11 -0
- package/src/contract/partial_address.ts +8 -2
- package/src/database-version/version_manager.ts +96 -6
- package/src/deserialization/index.ts +35 -2
- package/src/file-store/factory.ts +7 -0
- package/src/file-store/index.ts +1 -0
- package/src/file-store/memory.ts +94 -0
- package/src/gas/README.md +92 -0
- package/src/gas/gas_settings.ts +11 -21
- package/src/gas/index.ts +1 -0
- package/src/gas/tx_gas_limits.ts +123 -0
- package/src/ha-signing/config.ts +23 -5
- package/src/ha-signing/local_config.ts +20 -1
- package/src/hash/hash.ts +0 -8
- package/src/interfaces/archiver.ts +14 -7
- package/src/interfaces/aztec-node-admin.ts +1 -1
- package/src/interfaces/aztec-node-debug.ts +54 -2
- package/src/interfaces/aztec-node.ts +121 -43
- package/src/interfaces/block-builder.ts +2 -0
- package/src/interfaces/chain_tips.ts +8 -16
- package/src/interfaces/checkpoint_parameter.ts +3 -3
- package/src/interfaces/client.ts +1 -0
- package/src/interfaces/configs.ts +27 -6
- package/src/interfaces/get_tx_by_hash_options.ts +14 -0
- package/src/interfaces/merkle_tree_operations.ts +2 -9
- package/src/interfaces/p2p.ts +29 -9
- package/src/interfaces/private_kernel_prover.ts +10 -12
- package/src/interfaces/prover-client.ts +1 -3
- package/src/interfaces/prover-coordination.ts +17 -0
- package/src/interfaces/prover-node.ts +32 -17
- package/src/interfaces/proving-job.ts +15 -3
- package/src/interfaces/server.ts +1 -1
- package/src/interfaces/server_circuit_prover.ts +2 -2
- package/src/interfaces/validator.ts +11 -0
- package/src/interfaces/world_state.ts +14 -0
- package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +22 -112
- package/src/kernel/hints/index.ts +1 -0
- package/src/kernel/hints/read_request.ts +1 -1
- package/src/kernel/hints/tree_leaf_read_request.ts +35 -0
- package/src/kernel/index.ts +1 -1
- package/src/kernel/log_hash.ts +5 -2
- package/src/kernel/note_hash.ts +1 -1
- package/src/kernel/nullifier.ts +1 -1
- package/src/kernel/private_circuit_public_inputs.ts +12 -1
- package/src/kernel/private_context_inputs.ts +10 -3
- package/src/kernel/private_kernel_circuit_public_inputs.ts +9 -0
- package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +0 -3
- package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +0 -3
- package/src/kernel/private_kernel_init_circuit_private_inputs.ts +0 -6
- package/src/kernel/private_kernel_reset_dimensions.ts +15 -5
- package/src/kernel/private_kernel_reset_tail_circuit_private_inputs.ts +69 -0
- package/src/kernel/private_kernel_simulated_output.ts +7 -0
- package/src/kernel/private_log_data.ts +4 -1
- package/src/kernel/utils/index.ts +1 -0
- package/src/kernel/utils/optional_number.ts +50 -0
- package/src/keys/derivation.ts +69 -24
- package/src/logs/app_tagging_secret.ts +62 -39
- package/src/logs/app_tagging_secret_kind.ts +1 -1
- package/src/logs/contract_class_log.ts +0 -9
- package/src/logs/index.ts +0 -2
- package/src/logs/shared_secret_derivation.ts +31 -15
- package/src/messaging/l1_to_l2_message.ts +51 -13
- package/src/p2p/attestation_utils.ts +8 -1
- package/src/p2p/checkpoint_attestation.ts +12 -0
- package/src/p2p/index.ts +1 -0
- package/src/p2p/interface.ts +4 -0
- package/src/p2p/signature_utils.ts +9 -0
- package/src/rollup/avm_proof_data.ts +2 -2
- package/src/rollup/checkpoint_header.ts +16 -2
- package/src/stats/stats.ts +2 -2
- package/src/tests/factories.ts +51 -13
- package/src/tests/mocks.ts +7 -2
- package/src/timetable/README.md +609 -0
- package/src/timetable/budgets.ts +87 -0
- package/src/timetable/build_proposer_timetable.ts +42 -0
- package/src/timetable/consensus_timetable.ts +126 -0
- package/src/timetable/index.ts +4 -304
- package/src/timetable/proposer_timetable.ts +190 -0
- package/src/timetable/timetable-example.svg +108 -0
- package/src/trees/nullifier_membership_witness.ts +0 -11
- package/src/trees/public_data_witness.ts +0 -31
- package/src/tx/execution_payload.ts +2 -1
- package/src/tx/fee_provider.ts +1 -1
- package/src/tx/global_variable_builder.ts +1 -17
- package/src/tx/global_variables.ts +2 -2
- package/src/tx/index.ts +1 -0
- package/src/tx/private_tx_constant_data.ts +25 -2
- package/src/tx/tx.ts +17 -0
- package/src/tx/validator/empty_validator.ts +7 -0
- package/src/tx/validator/error_texts.ts +2 -1
- package/src/world-state/genesis_data.ts +10 -0
- package/src/world-state/world_state_revision.ts +33 -0
- package/dest/interfaces/epoch-prover.d.ts +0 -57
- package/dest/interfaces/epoch-prover.d.ts.map +0 -1
- package/dest/interfaces/epoch-prover.js +0 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +0 -47
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +0 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +0 -38
- package/dest/logs/message_context.d.ts +0 -27
- package/dest/logs/message_context.d.ts.map +0 -1
- package/dest/logs/message_context.js +0 -74
- package/dest/logs/pending_tagged_log.d.ts +0 -13
- package/dest/logs/pending_tagged_log.d.ts.map +0 -1
- package/dest/logs/pending_tagged_log.js +0 -34
- package/src/interfaces/epoch-prover.ts +0 -72
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +0 -58
- package/src/logs/message_context.ts +0 -76
- package/src/logs/pending_tagged_log.ts +0 -39
package/dest/abi/buffer.d.ts
CHANGED
|
@@ -20,7 +20,11 @@ export declare function bufferAsFields(input: Buffer, targetLength: number): Fr[
|
|
|
20
20
|
* bytecode commitment computations to diverge from what the circuit produced.
|
|
21
21
|
*
|
|
22
22
|
* @param fields - An output from bufferAsFields: [byteLength, ...payloadFields].
|
|
23
|
+
* @param maxByteLength - Optional upper bound on the declared byte length. When the field array comes
|
|
24
|
+
* from untrusted input (e.g. a gossiped contract-class log), pass the payload capacity so an
|
|
25
|
+
* attacker-declared length cannot force a large `Buffer.alloc` before the value is otherwise
|
|
26
|
+
* rejected. Throws if the declared length exceeds it, before allocating.
|
|
23
27
|
* @returns A buffer of exactly `byteLength` bytes.
|
|
24
28
|
*/
|
|
25
|
-
export declare function bufferFromFields(fields: Fr[]): Buffer;
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
export declare function bufferFromFields(fields: Fr[], maxByteLength?: number): Buffer;
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVmZmVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYWJpL2J1ZmZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFJcEQ7Ozs7OztHQU1HO0FBQ0gsd0JBQWdCLGNBQWMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLEdBQUcsRUFBRSxFQUFFLENBY3hFO0FBRUQ7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQWtCRztBQUNILHdCQUFnQixnQkFBZ0IsQ0FBQyxNQUFNLEVBQUUsRUFBRSxFQUFFLEVBQUUsYUFBYSxDQUFDLEVBQUUsTUFBTSxHQUFHLE1BQU0sQ0FzQjdFIn0=
|
package/dest/abi/buffer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../src/abi/buffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAIpD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,EAAE,EAAE,CAcxE;AAED
|
|
1
|
+
{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../src/abi/buffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAIpD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,EAAE,EAAE,CAcxE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAsB7E"}
|
package/dest/abi/buffer.js
CHANGED
|
@@ -37,10 +37,22 @@ import chunk from 'lodash.chunk';
|
|
|
37
37
|
* bytecode commitment computations to diverge from what the circuit produced.
|
|
38
38
|
*
|
|
39
39
|
* @param fields - An output from bufferAsFields: [byteLength, ...payloadFields].
|
|
40
|
+
* @param maxByteLength - Optional upper bound on the declared byte length. When the field array comes
|
|
41
|
+
* from untrusted input (e.g. a gossiped contract-class log), pass the payload capacity so an
|
|
42
|
+
* attacker-declared length cannot force a large `Buffer.alloc` before the value is otherwise
|
|
43
|
+
* rejected. Throws if the declared length exceeds it, before allocating.
|
|
40
44
|
* @returns A buffer of exactly `byteLength` bytes.
|
|
41
|
-
*/ export function bufferFromFields(fields) {
|
|
45
|
+
*/ export function bufferFromFields(fields, maxByteLength) {
|
|
46
|
+
// A valid bufferAsFields output always has at least the leading byte-length field, so an empty
|
|
47
|
+
// input encodes no data. Guard so `length` (the destructured head) is never undefined.
|
|
48
|
+
if (fields.length === 0) {
|
|
49
|
+
return Buffer.alloc(0);
|
|
50
|
+
}
|
|
42
51
|
const [length, ...payload] = fields;
|
|
43
52
|
const byteLength = length.toNumber();
|
|
53
|
+
if (maxByteLength !== undefined && byteLength > maxByteLength) {
|
|
54
|
+
throw new Error(`Declared byte length ${byteLength} exceeds maximum ${maxByteLength}`);
|
|
55
|
+
}
|
|
44
56
|
const raw = Buffer.concat(payload.map((f)=>f.toBuffer().subarray(1)));
|
|
45
57
|
if (raw.length >= byteLength) {
|
|
46
58
|
return raw.subarray(0, byteLength);
|
|
@@ -19,6 +19,19 @@ export declare function contractArtifactFromBuffer(buffer: Buffer): ContractArti
|
|
|
19
19
|
* @returns A valid contract artifact instance.
|
|
20
20
|
*/
|
|
21
21
|
export declare function loadContractArtifact(input: NoirCompiledContract): ContractArtifact;
|
|
22
|
+
/**
|
|
23
|
+
* Like {@link loadContractArtifact}, but fully validates an already-processed artifact against the
|
|
24
|
+
* contract artifact schema before returning it. Use when loading an artifact from untrusted or
|
|
25
|
+
* external JSON (e.g. a file path passed to the CLI), so a malformed artifact is rejected up-front
|
|
26
|
+
* with a clear schema error instead of surfacing as an opaque failure later during deployment.
|
|
27
|
+
*
|
|
28
|
+
* `loadContractArtifact` only runs the shallow `isContractArtifact` shape check on already-processed
|
|
29
|
+
* artifacts; raw nargo output is validated via `generateContractArtifact` regardless. The returned
|
|
30
|
+
* object is identical to `loadContractArtifact`'s; the schema parse is used purely for validation.
|
|
31
|
+
* @param input - Input object as generated by nargo compile, or an already-processed artifact.
|
|
32
|
+
* @returns A valid contract artifact instance.
|
|
33
|
+
*/
|
|
34
|
+
export declare function loadContractArtifactWithValidation(input: NoirCompiledContract): ContractArtifact;
|
|
22
35
|
/**
|
|
23
36
|
* Gets nargo build output and returns a valid contract artifact instance.
|
|
24
37
|
* Differs from loadContractArtifact() by retaining all bytecode.
|
|
@@ -33,4 +46,4 @@ type NoirCompiledContractFunction = NoirCompiledContract['functions'][number];
|
|
|
33
46
|
*/
|
|
34
47
|
export declare function retainBytecode(input: NoirCompiledContractFunction | FunctionArtifact): boolean;
|
|
35
48
|
export {};
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfYXJ0aWZhY3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hYmkvY29udHJhY3RfYXJ0aWZhY3QudHMi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,EAAE,oBAAoB,GAAG,gBAAgB,CAE3F;AA+DD,yDAAyD;AACzD,KAAK,4BAA4B,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,4BAA4B,GAAG,gBAAgB,GAAG,OAAO,CAI9F"}
|
|
@@ -33,6 +33,23 @@ import { ARTIFACT_VERSION_BEFORE_INJECTION, ContractArtifactSchema, FunctionType
|
|
|
33
33
|
}
|
|
34
34
|
return generateContractArtifact(input);
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Like {@link loadContractArtifact}, but fully validates an already-processed artifact against the
|
|
38
|
+
* contract artifact schema before returning it. Use when loading an artifact from untrusted or
|
|
39
|
+
* external JSON (e.g. a file path passed to the CLI), so a malformed artifact is rejected up-front
|
|
40
|
+
* with a clear schema error instead of surfacing as an opaque failure later during deployment.
|
|
41
|
+
*
|
|
42
|
+
* `loadContractArtifact` only runs the shallow `isContractArtifact` shape check on already-processed
|
|
43
|
+
* artifacts; raw nargo output is validated via `generateContractArtifact` regardless. The returned
|
|
44
|
+
* object is identical to `loadContractArtifact`'s; the schema parse is used purely for validation.
|
|
45
|
+
* @param input - Input object as generated by nargo compile, or an already-processed artifact.
|
|
46
|
+
* @returns A valid contract artifact instance.
|
|
47
|
+
*/ export function loadContractArtifactWithValidation(input) {
|
|
48
|
+
if (isContractArtifact(input)) {
|
|
49
|
+
ContractArtifactSchema.parse(input);
|
|
50
|
+
}
|
|
51
|
+
return loadContractArtifact(input);
|
|
52
|
+
}
|
|
36
53
|
/**
|
|
37
54
|
* Gets nargo build output and returns a valid contract artifact instance.
|
|
38
55
|
* Differs from loadContractArtifact() by retaining all bytecode.
|
package/dest/avm/avm.js
CHANGED
|
@@ -807,7 +807,7 @@ export class CallStackMetadata {
|
|
|
807
807
|
}
|
|
808
808
|
const { stack, leaf } = failingCall;
|
|
809
809
|
const aztecCallStack = stack.map((call)=>({
|
|
810
|
-
contractAddress: AztecAddress.
|
|
810
|
+
contractAddress: AztecAddress.fromFieldUnsafe(call.contractAddress),
|
|
811
811
|
functionSelector: call.calldata.length > 0 ? FunctionSelector.fromFieldOrUndefined(call.calldata[0]) : undefined
|
|
812
812
|
}));
|
|
813
813
|
// The Noir call stack is the internal call stack at exit of the failing call
|
|
@@ -384,28 +384,28 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
384
384
|
index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
385
385
|
leafPreimage: z.ZodPipe<z.ZodObject<{
|
|
386
386
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
slot: import("@aztec/foundation/schemas").Fr;
|
|
391
|
-
value: import("@aztec/foundation/schemas").Fr;
|
|
387
|
+
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
388
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
389
|
+
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
392
390
|
}>>;
|
|
393
391
|
nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
394
392
|
nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
395
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/
|
|
396
|
-
leaf: import("../trees/
|
|
393
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
|
|
394
|
+
leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
|
|
397
395
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
398
396
|
nextIndex: bigint;
|
|
399
397
|
}>> | z.ZodPipe<z.ZodObject<{
|
|
400
398
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
399
|
+
slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
400
|
+
value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
401
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/public_data_leaf.js").PublicDataTreeLeaf, {
|
|
402
|
+
slot: import("@aztec/foundation/schemas").Fr;
|
|
403
|
+
value: import("@aztec/foundation/schemas").Fr;
|
|
404
404
|
}>>;
|
|
405
405
|
nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
406
406
|
nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
407
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/
|
|
408
|
-
leaf: import("../trees/
|
|
407
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/public_data_leaf.js").PublicDataTreeLeafPreimage, {
|
|
408
|
+
leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
|
|
409
409
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
410
410
|
nextIndex: bigint;
|
|
411
411
|
}>>;
|
|
@@ -429,28 +429,28 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
429
429
|
index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
430
430
|
leafPreimage: z.ZodPipe<z.ZodObject<{
|
|
431
431
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
slot: import("@aztec/foundation/schemas").Fr;
|
|
436
|
-
value: import("@aztec/foundation/schemas").Fr;
|
|
432
|
+
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
433
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
434
|
+
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
437
435
|
}>>;
|
|
438
436
|
nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
439
437
|
nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
440
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/
|
|
441
|
-
leaf: import("../trees/
|
|
438
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
|
|
439
|
+
leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
|
|
442
440
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
443
441
|
nextIndex: bigint;
|
|
444
442
|
}>> | z.ZodPipe<z.ZodObject<{
|
|
445
443
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
444
|
+
slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
445
|
+
value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
446
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/public_data_leaf.js").PublicDataTreeLeaf, {
|
|
447
|
+
slot: import("@aztec/foundation/schemas").Fr;
|
|
448
|
+
value: import("@aztec/foundation/schemas").Fr;
|
|
449
449
|
}>>;
|
|
450
450
|
nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
451
451
|
nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
452
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/
|
|
453
|
-
leaf: import("../trees/
|
|
452
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/public_data_leaf.js").PublicDataTreeLeafPreimage, {
|
|
453
|
+
leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
|
|
454
454
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
455
455
|
nextIndex: bigint;
|
|
456
456
|
}>>;
|
|
@@ -497,18 +497,30 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
497
497
|
}>>;
|
|
498
498
|
treeId: z.ZodNumber;
|
|
499
499
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
500
|
+
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
501
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
502
|
+
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
503
|
+
}>> | z.ZodPipe<z.ZodObject<{
|
|
500
504
|
slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
501
505
|
value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
502
506
|
}, z.core.$strip>, z.ZodTransform<import("../trees/public_data_leaf.js").PublicDataTreeLeaf, {
|
|
503
507
|
slot: import("@aztec/foundation/schemas").Fr;
|
|
504
508
|
value: import("@aztec/foundation/schemas").Fr;
|
|
505
|
-
}>> | z.ZodPipe<z.ZodObject<{
|
|
506
|
-
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
507
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
508
|
-
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
509
509
|
}>>;
|
|
510
510
|
lowLeavesWitnessData: z.ZodObject<{
|
|
511
511
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
512
|
+
leaf: z.ZodPipe<z.ZodObject<{
|
|
513
|
+
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
514
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
515
|
+
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
516
|
+
}>>;
|
|
517
|
+
nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
518
|
+
nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
519
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
|
|
520
|
+
leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
|
|
521
|
+
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
522
|
+
nextIndex: bigint;
|
|
523
|
+
}>> | z.ZodPipe<z.ZodObject<{
|
|
512
524
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
513
525
|
slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
514
526
|
value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
@@ -522,7 +534,12 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
522
534
|
leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
|
|
523
535
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
524
536
|
nextIndex: bigint;
|
|
525
|
-
}
|
|
537
|
+
}>>;
|
|
538
|
+
index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
539
|
+
path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
|
|
540
|
+
}, z.core.$strip>;
|
|
541
|
+
insertionWitnessData: z.ZodObject<{
|
|
542
|
+
leaf: z.ZodPipe<z.ZodObject<{
|
|
526
543
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
527
544
|
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
528
545
|
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
@@ -534,12 +551,7 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
534
551
|
leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
|
|
535
552
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
536
553
|
nextIndex: bigint;
|
|
537
|
-
}
|
|
538
|
-
index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
539
|
-
path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
|
|
540
|
-
}, z.core.$strip>;
|
|
541
|
-
insertionWitnessData: z.ZodObject<{
|
|
542
|
-
leaf: z.ZodPipe<z.ZodObject<{
|
|
554
|
+
}>> | z.ZodPipe<z.ZodObject<{
|
|
543
555
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
544
556
|
slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
545
557
|
value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
@@ -553,18 +565,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
553
565
|
leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
|
|
554
566
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
555
567
|
nextIndex: bigint;
|
|
556
|
-
}>> | z.ZodPipe<z.ZodObject<{
|
|
557
|
-
leaf: z.ZodPipe<z.ZodObject<{
|
|
558
|
-
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
559
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
560
|
-
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
561
|
-
}>>;
|
|
562
|
-
nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
563
|
-
nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
564
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
|
|
565
|
-
leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
|
|
566
|
-
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
567
|
-
nextIndex: bigint;
|
|
568
568
|
}>>;
|
|
569
569
|
index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
570
570
|
path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
|
|
@@ -617,18 +617,30 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
617
617
|
}>>;
|
|
618
618
|
treeId: z.ZodNumber;
|
|
619
619
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
620
|
+
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
621
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
622
|
+
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
623
|
+
}>> | z.ZodPipe<z.ZodObject<{
|
|
620
624
|
slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
621
625
|
value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
622
626
|
}, z.core.$strip>, z.ZodTransform<import("../trees/public_data_leaf.js").PublicDataTreeLeaf, {
|
|
623
627
|
slot: import("@aztec/foundation/schemas").Fr;
|
|
624
628
|
value: import("@aztec/foundation/schemas").Fr;
|
|
625
|
-
}>> | z.ZodPipe<z.ZodObject<{
|
|
626
|
-
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
627
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
628
|
-
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
629
629
|
}>>;
|
|
630
630
|
lowLeavesWitnessData: z.ZodObject<{
|
|
631
631
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
632
|
+
leaf: z.ZodPipe<z.ZodObject<{
|
|
633
|
+
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
634
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
635
|
+
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
636
|
+
}>>;
|
|
637
|
+
nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
638
|
+
nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
639
|
+
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
|
|
640
|
+
leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
|
|
641
|
+
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
642
|
+
nextIndex: bigint;
|
|
643
|
+
}>> | z.ZodPipe<z.ZodObject<{
|
|
632
644
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
633
645
|
slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
634
646
|
value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
@@ -642,7 +654,12 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
642
654
|
leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
|
|
643
655
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
644
656
|
nextIndex: bigint;
|
|
645
|
-
}
|
|
657
|
+
}>>;
|
|
658
|
+
index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
659
|
+
path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
|
|
660
|
+
}, z.core.$strip>;
|
|
661
|
+
insertionWitnessData: z.ZodObject<{
|
|
662
|
+
leaf: z.ZodPipe<z.ZodObject<{
|
|
646
663
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
647
664
|
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
648
665
|
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
@@ -654,12 +671,7 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
654
671
|
leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
|
|
655
672
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
656
673
|
nextIndex: bigint;
|
|
657
|
-
}
|
|
658
|
-
index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
659
|
-
path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
|
|
660
|
-
}, z.core.$strip>;
|
|
661
|
-
insertionWitnessData: z.ZodObject<{
|
|
662
|
-
leaf: z.ZodPipe<z.ZodObject<{
|
|
674
|
+
}>> | z.ZodPipe<z.ZodObject<{
|
|
663
675
|
leaf: z.ZodPipe<z.ZodObject<{
|
|
664
676
|
slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
665
677
|
value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
@@ -673,18 +685,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
|
|
|
673
685
|
leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
|
|
674
686
|
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
675
687
|
nextIndex: bigint;
|
|
676
|
-
}>> | z.ZodPipe<z.ZodObject<{
|
|
677
|
-
leaf: z.ZodPipe<z.ZodObject<{
|
|
678
|
-
nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
679
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
|
|
680
|
-
nullifier: import("@aztec/foundation/schemas").Fr;
|
|
681
|
-
}>>;
|
|
682
|
-
nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
|
|
683
|
-
nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
684
|
-
}, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
|
|
685
|
-
leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
|
|
686
|
-
nextKey: import("@aztec/foundation/schemas").Fr;
|
|
687
|
-
nextIndex: bigint;
|
|
688
688
|
}>>;
|
|
689
689
|
index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
|
|
690
690
|
path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
3
|
+
import type { AztecAddress } from '../aztec-address/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Contract storage read operation on a specific contract.
|
|
6
|
+
*
|
|
7
|
+
* Note: Similar to `PublicDataRead` but it's from the POV of contract storage so we are not working with public data
|
|
8
|
+
* tree leaf index but storage slot index.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ContractStorageRead {
|
|
11
|
+
/**
|
|
12
|
+
* Storage slot we are reading from.
|
|
13
|
+
*/
|
|
14
|
+
readonly storageSlot: Fr;
|
|
15
|
+
/**
|
|
16
|
+
* Value read from the storage slot.
|
|
17
|
+
*/
|
|
18
|
+
readonly currentValue: Fr;
|
|
19
|
+
/**
|
|
20
|
+
* Side effect counter tracking position of this event in tx execution.
|
|
21
|
+
*/
|
|
22
|
+
readonly counter: number;
|
|
23
|
+
/**
|
|
24
|
+
* Contract address whose storage is being read.
|
|
25
|
+
*/
|
|
26
|
+
contractAddress?: AztecAddress | undefined;
|
|
27
|
+
constructor(
|
|
28
|
+
/**
|
|
29
|
+
* Storage slot we are reading from.
|
|
30
|
+
*/
|
|
31
|
+
storageSlot: Fr,
|
|
32
|
+
/**
|
|
33
|
+
* Value read from the storage slot.
|
|
34
|
+
*/
|
|
35
|
+
currentValue: Fr,
|
|
36
|
+
/**
|
|
37
|
+
* Side effect counter tracking position of this event in tx execution.
|
|
38
|
+
*/
|
|
39
|
+
counter: number,
|
|
40
|
+
/**
|
|
41
|
+
* Contract address whose storage is being read.
|
|
42
|
+
*/
|
|
43
|
+
contractAddress?: AztecAddress | undefined);
|
|
44
|
+
static from(args: {
|
|
45
|
+
storageSlot: Fr;
|
|
46
|
+
currentValue: Fr;
|
|
47
|
+
counter: number;
|
|
48
|
+
contractAddress?: AztecAddress;
|
|
49
|
+
}): ContractStorageRead;
|
|
50
|
+
toBuffer(): Buffer<ArrayBufferLike>;
|
|
51
|
+
static fromBuffer(buffer: Buffer | BufferReader): ContractStorageRead;
|
|
52
|
+
static empty(): ContractStorageRead;
|
|
53
|
+
isEmpty(): boolean;
|
|
54
|
+
toFriendlyJSON(): string;
|
|
55
|
+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Q,4BAEP;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,uBAG9C;IAED,MAAM,CAAC,KAAK,wBAEX;IAED,OAAO,YAEN;IAED,cAAc,WAEb;IAED,QAAQ,IAAI,EAAE,EAAE,CAQf;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,mBAAmB,CAQjE;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { CONTRACT_STORAGE_READ_LENGTH } from '@aztec/constants';
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
+
/**
|
|
5
|
+
* Contract storage read operation on a specific contract.
|
|
6
|
+
*
|
|
7
|
+
* Note: Similar to `PublicDataRead` but it's from the POV of contract storage so we are not working with public data
|
|
8
|
+
* tree leaf index but storage slot index.
|
|
9
|
+
*/ export class ContractStorageRead {
|
|
10
|
+
storageSlot;
|
|
11
|
+
currentValue;
|
|
12
|
+
counter;
|
|
13
|
+
contractAddress;
|
|
14
|
+
constructor(/**
|
|
15
|
+
* Storage slot we are reading from.
|
|
16
|
+
*/ storageSlot, /**
|
|
17
|
+
* Value read from the storage slot.
|
|
18
|
+
*/ currentValue, /**
|
|
19
|
+
* Side effect counter tracking position of this event in tx execution.
|
|
20
|
+
*/ counter, /**
|
|
21
|
+
* Contract address whose storage is being read.
|
|
22
|
+
*/ contractAddress){
|
|
23
|
+
this.storageSlot = storageSlot;
|
|
24
|
+
this.currentValue = currentValue;
|
|
25
|
+
this.counter = counter;
|
|
26
|
+
this.contractAddress = contractAddress;
|
|
27
|
+
}
|
|
28
|
+
static from(args) {
|
|
29
|
+
return new ContractStorageRead(args.storageSlot, args.currentValue, args.counter, args.contractAddress);
|
|
30
|
+
}
|
|
31
|
+
toBuffer() {
|
|
32
|
+
return serializeToBuffer(this.storageSlot, this.currentValue, new Fr(this.counter));
|
|
33
|
+
}
|
|
34
|
+
static fromBuffer(buffer) {
|
|
35
|
+
const reader = BufferReader.asReader(buffer);
|
|
36
|
+
return new ContractStorageRead(Fr.fromBuffer(reader), Fr.fromBuffer(reader), Fr.fromBuffer(reader).toNumber());
|
|
37
|
+
}
|
|
38
|
+
static empty() {
|
|
39
|
+
return new ContractStorageRead(Fr.ZERO, Fr.ZERO, 0);
|
|
40
|
+
}
|
|
41
|
+
isEmpty() {
|
|
42
|
+
return this.storageSlot.isZero() && this.currentValue.isZero() && this.counter == 0;
|
|
43
|
+
}
|
|
44
|
+
toFriendlyJSON() {
|
|
45
|
+
return `Slot=${this.storageSlot.toFriendlyJSON()}: ${this.currentValue.toFriendlyJSON()}`;
|
|
46
|
+
}
|
|
47
|
+
toFields() {
|
|
48
|
+
const fields = [
|
|
49
|
+
this.storageSlot,
|
|
50
|
+
this.currentValue,
|
|
51
|
+
new Fr(this.counter)
|
|
52
|
+
];
|
|
53
|
+
if (fields.length !== CONTRACT_STORAGE_READ_LENGTH) {
|
|
54
|
+
throw new Error(`Invalid number of fields for ContractStorageRead. Expected ${CONTRACT_STORAGE_READ_LENGTH}, got ${fields.length}`);
|
|
55
|
+
}
|
|
56
|
+
return fields;
|
|
57
|
+
}
|
|
58
|
+
static fromFields(fields) {
|
|
59
|
+
const reader = FieldReader.asReader(fields);
|
|
60
|
+
const storageSlot = reader.readField();
|
|
61
|
+
const currentValue = reader.readField();
|
|
62
|
+
const counter = reader.readField().toNumber();
|
|
63
|
+
return new ContractStorageRead(storageSlot, currentValue, counter);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
3
|
+
import type { FieldsOf } from '@aztec/foundation/types';
|
|
4
|
+
import type { AztecAddress } from '../aztec-address/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Contract storage update request for a slot on a specific contract.
|
|
7
|
+
*
|
|
8
|
+
* Note: Similar to `PublicDataUpdateRequest` but it's from the POV of contract storage so we are not working with
|
|
9
|
+
* public data tree leaf index but storage slot index.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ContractStorageUpdateRequest {
|
|
12
|
+
/**
|
|
13
|
+
* Storage slot we are updating.
|
|
14
|
+
*/
|
|
15
|
+
readonly storageSlot: Fr;
|
|
16
|
+
/**
|
|
17
|
+
* New value of the storage slot.
|
|
18
|
+
*/
|
|
19
|
+
readonly newValue: Fr;
|
|
20
|
+
/**
|
|
21
|
+
* Side effect counter tracking position of this event in tx execution.
|
|
22
|
+
*/
|
|
23
|
+
readonly counter: number;
|
|
24
|
+
/**
|
|
25
|
+
* Contract address whose storage is being read.
|
|
26
|
+
*/
|
|
27
|
+
contractAddress?: AztecAddress | undefined;
|
|
28
|
+
constructor(
|
|
29
|
+
/**
|
|
30
|
+
* Storage slot we are updating.
|
|
31
|
+
*/
|
|
32
|
+
storageSlot: Fr,
|
|
33
|
+
/**
|
|
34
|
+
* New value of the storage slot.
|
|
35
|
+
*/
|
|
36
|
+
newValue: Fr,
|
|
37
|
+
/**
|
|
38
|
+
* Side effect counter tracking position of this event in tx execution.
|
|
39
|
+
*/
|
|
40
|
+
counter: number,
|
|
41
|
+
/**
|
|
42
|
+
* Contract address whose storage is being read.
|
|
43
|
+
*/
|
|
44
|
+
contractAddress?: AztecAddress | undefined);
|
|
45
|
+
toBuffer(): Buffer<ArrayBufferLike>;
|
|
46
|
+
static fromBuffer(buffer: Buffer | BufferReader): ContractStorageUpdateRequest;
|
|
47
|
+
/**
|
|
48
|
+
* Create ContractStorageUpdateRequest from a fields dictionary.
|
|
49
|
+
* @param fields - The dictionary.
|
|
50
|
+
* @returns A ContractStorageUpdateRequest object.
|
|
51
|
+
*/
|
|
52
|
+
static from(fields: FieldsOf<ContractStorageUpdateRequest>): ContractStorageUpdateRequest;
|
|
53
|
+
/**
|
|
54
|
+
* Serialize into a field array. Low-level utility.
|
|
55
|
+
* @param fields - Object with fields.
|
|
56
|
+
* @returns The array.
|
|
57
|
+
*/
|
|
58
|
+
static getFields(fields: FieldsOf<ContractStorageUpdateRequest>): readonly [Fr, Fr, number, AztecAddress | undefined];
|
|
59
|
+
static empty(): ContractStorageUpdateRequest;
|
|
60
|
+
isEmpty(): boolean;
|
|
61
|
+
toFriendlyJSON(): string;
|
|
62
|
+
toFields(): Fr[];
|
|
63
|
+
static fromFields(fields: Fr[] | FieldReader): ContractStorageUpdateRequest;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3Rfc3RvcmFnZV91cGRhdGVfcmVxdWVzdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2F2bS9jb250cmFjdF9zdG9yYWdlX3VwZGF0ZV9yZXF1ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsWUFBWSxFQUFFLFdBQVcsRUFBcUIsTUFBTSw2QkFBNkIsQ0FBQztBQUMzRixPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUV4RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUU5RDs7Ozs7R0FLRztBQUNILHFCQUFhLDRCQUE0QjtJQUVyQzs7T0FFRzthQUNhLFdBQVcsRUFBRSxFQUFFO0lBQy9COztPQUVHO2FBQ2EsUUFBUSxFQUFFLEVBQUU7SUFDNUI7O09BRUc7YUFDYSxPQUFPLEVBQUUsTUFBTTtJQUMvQjs7T0FFRztJQUNJLGVBQWUsQ0FBQztJQWhCekI7SUFDRTs7T0FFRztJQUNhLFdBQ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WAAW,EAAE,EAAE;IAC/B;;OAEG;aACa,QAAQ,EAAE,EAAE;IAC5B;;OAEG;aACa,OAAO,EAAE,MAAM;IAC/B;;OAEG;IACI,eAAe,CAAC;IAhBzB;IACE;;OAEG;IACa,WAAW,EAAE,EAAE;IAC/B;;OAEG;IACa,QAAQ,EAAE,EAAE;IAC5B;;OAEG;IACa,OAAO,EAAE,MAAM;IAC/B;;OAEG;IACI,eAAe,CAAC,0BAAc,EACnC;IAEJ,QAAQ,4BAEP;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,gCAG9C;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,4BAA4B,CAAC,GAAG,4BAA4B,CAExF;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,4BAA4B,CAAC,uDAE9D;IAED,MAAM,CAAC,KAAK,iCAEX;IAED,OAAO,YAEN;IAED,cAAc,WAIb;IAED,QAAQ,IAAI,EAAE,EAAE,CAQf;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,4BAA4B,CAO1E;CACF"}
|