@aztec/stdlib 0.0.1-commit.b655e406 → 0.0.1-commit.d3ec352c
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/abi.d.ts +92 -107
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +2 -2
- package/dest/abi/authorization_selector.d.ts +1 -1
- package/dest/abi/authorization_selector.d.ts.map +1 -1
- package/dest/abi/buffer.d.ts +1 -1
- package/dest/abi/contract_artifact.d.ts +1 -1
- package/dest/abi/contract_artifact.js +3 -3
- package/dest/abi/decoder.d.ts +1 -1
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/encoder.d.ts +1 -1
- package/dest/abi/event_metadata_definition.d.ts +1 -1
- package/dest/abi/event_selector.d.ts +1 -1
- package/dest/abi/event_selector.d.ts.map +1 -1
- package/dest/abi/function_call.d.ts +1 -9
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_selector.d.ts +1 -1
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/index.d.ts +1 -1
- package/dest/abi/mocked_keys.d.ts +1 -1
- package/dest/abi/note_selector.d.ts +1 -1
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/selector.d.ts +1 -1
- package/dest/abi/selector.d.ts.map +1 -1
- package/dest/abi/utils.d.ts +1 -1
- package/dest/auth_witness/auth_witness.d.ts +1 -2
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/auth_witness/index.d.ts +1 -1
- package/dest/avm/avm.d.ts +4356 -2061
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +529 -16
- package/dest/avm/avm_accumulated_data.d.ts +25 -36
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +18 -0
- package/dest/avm/avm_circuit_public_inputs.d.ts +160 -148
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +9 -0
- package/dest/avm/avm_proving_request.d.ts +2031 -1507
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.d.ts +1 -13
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +1 -13
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/index.d.ts +1 -1
- package/dest/avm/message_pack.d.ts +2 -2
- package/dest/avm/message_pack.d.ts.map +1 -1
- package/dest/avm/message_pack.js +3 -0
- package/dest/avm/public_call_stack_item_compressed.d.ts +1 -3
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
- package/dest/avm/public_data_read.d.ts +1 -10
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.d.ts +1 -10
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_write.d.ts +13 -11
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_data_write.js +9 -0
- package/dest/avm/public_inner_call_request.d.ts +1 -4
- package/dest/avm/public_inner_call_request.d.ts.map +1 -1
- package/dest/avm/revert_code.d.ts +16 -7
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +24 -8
- package/dest/aztec-address/index.d.ts +10 -1
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +24 -2
- package/dest/block/attestation_info.d.ts +3 -1
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +4 -1
- package/dest/block/block_hash.d.ts +1 -1
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_parameter.d.ts +5 -0
- package/dest/block/block_parameter.d.ts.map +1 -0
- package/dest/block/block_parameter.js +6 -0
- package/dest/block/body.d.ts +8 -8
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +11 -27
- package/dest/block/in_block.d.ts +14 -19
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/in_block.js +3 -3
- package/dest/block/index.d.ts +3 -2
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +2 -1
- package/dest/block/l2_block.d.ts +18 -10
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +56 -5
- package/dest/block/l2_block_code_to_purge.d.ts +1 -1
- package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
- package/dest/block/l2_block_code_to_purge.js +6 -5
- package/dest/block/l2_block_header.d.ts +12 -14
- package/dest/block/l2_block_header.d.ts.map +1 -1
- package/dest/block/l2_block_header.js +18 -11
- package/dest/block/l2_block_info.d.ts +21 -16
- package/dest/block/l2_block_info.d.ts.map +1 -1
- package/dest/block/l2_block_info.js +7 -6
- package/dest/block/l2_block_new.d.ts +110 -0
- package/dest/block/l2_block_new.d.ts.map +1 -0
- package/dest/block/l2_block_new.js +138 -0
- package/dest/block/l2_block_source.d.ts +71 -104
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +5 -11
- package/dest/block/l2_block_stream/index.d.ts +1 -1
- package/dest/block/l2_block_stream/interfaces.d.ts +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +1 -6
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +4 -3
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +3 -2
- 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 +4 -2
- package/dest/block/proposal/attestations_and_signers.d.ts +16 -5
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.js +14 -0
- package/dest/block/proposal/committee_attestation.d.ts +1 -1
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
- package/dest/block/proposal/index.d.ts +1 -1
- package/dest/block/published_l2_block.d.ts +15 -28
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +12 -27
- package/dest/block/test/index.d.ts +1 -1
- 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 +6 -4
- package/dest/block/validate_block_result.d.ts +6 -178
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +4 -3
- package/dest/checkpoint/checkpoint.d.ts +124 -0
- package/dest/checkpoint/checkpoint.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint.js +62 -0
- package/dest/checkpoint/index.d.ts +3 -2
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +2 -1
- package/dest/checkpoint/published_checkpoint.d.ts +214 -0
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -0
- package/dest/checkpoint/published_checkpoint.js +71 -0
- package/dest/config/chain-config.d.ts +1 -1
- package/dest/config/index.d.ts +1 -1
- package/dest/config/node-rpc-config.d.ts +1 -1
- package/dest/contract/artifact_hash.d.ts +2 -2
- package/dest/contract/artifact_hash.d.ts.map +1 -1
- package/dest/contract/complete_address.d.ts +1 -4
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/contract_address.d.ts +1 -1
- package/dest/contract/contract_class.d.ts +1 -1
- package/dest/contract/contract_class_id.d.ts +1 -1
- package/dest/contract/contract_class_metadata.d.ts +1 -1
- package/dest/contract/contract_deployment_data.d.ts +119 -0
- package/dest/contract/contract_deployment_data.d.ts.map +1 -0
- package/dest/contract/contract_deployment_data.js +99 -0
- package/dest/contract/contract_function_dao.d.ts +1 -1
- package/dest/contract/contract_instance.d.ts +1 -1
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance_update.d.ts +1 -1
- package/dest/contract/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/contract_metadata.d.ts +1 -1
- package/dest/contract/deployment_info.d.ts +1 -1
- 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_class.d.ts +41 -122
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_data_source.d.ts +3 -2
- package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.d.ts +11 -11
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance_update.d.ts +3 -3
- package/dest/contract/interfaces/index.d.ts +1 -1
- package/dest/contract/interfaces/node-info.d.ts +1 -1
- package/dest/contract/interfaces/protocol_contract_addresses.d.ts +1 -1
- package/dest/contract/partial_address.d.ts +1 -1
- package/dest/contract/private_function.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.d.ts +2 -2
- package/dest/contract/private_function_membership_proof.js +1 -1
- package/dest/contract/utility_function_membership_proof.d.ts +1 -1
- package/dest/database-version/index.d.ts +1 -1
- package/dest/database-version/version_manager.d.ts +6 -8
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -1
- package/dest/delayed_public_mutable/index.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_delay_change.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_delay_change.d.ts.map +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -1
- package/dest/epoch-helpers/index.d.ts +12 -11
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +10 -9
- package/dest/errors/index.d.ts +1 -1
- package/dest/errors/proving_error.d.ts +2 -2
- package/dest/errors/proving_error.d.ts.map +1 -1
- package/dest/errors/simulation_error.d.ts +1 -1
- package/dest/errors/simulation_error.d.ts.map +1 -1
- package/dest/fees/index.d.ts +1 -1
- package/dest/fees/transaction_fee.d.ts +1 -1
- package/dest/file-store/factory.d.ts +1 -1
- package/dest/file-store/gcs.d.ts +1 -1
- package/dest/file-store/gcs.d.ts.map +1 -1
- package/dest/file-store/http.d.ts +1 -1
- package/dest/file-store/http.d.ts.map +1 -1
- package/dest/file-store/http.js +8 -3
- package/dest/file-store/index.d.ts +1 -1
- package/dest/file-store/interface.d.ts +1 -1
- package/dest/file-store/local.d.ts +1 -1
- package/dest/file-store/local.d.ts.map +1 -1
- package/dest/file-store/s3.d.ts +1 -1
- package/dest/file-store/s3.d.ts.map +1 -1
- package/dest/file-store/s3.js +3 -7
- package/dest/gas/gas.d.ts +9 -1
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas.js +12 -0
- package/dest/gas/gas_fees.d.ts +9 -1
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +12 -0
- package/dest/gas/gas_settings.d.ts +9 -1
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +12 -0
- package/dest/gas/gas_used.d.ts +13 -2
- package/dest/gas/gas_used.d.ts.map +1 -1
- package/dest/gas/gas_used.js +19 -1
- package/dest/gas/index.d.ts +1 -1
- package/dest/hash/hash.d.ts +11 -3
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +11 -1
- package/dest/hash/index.d.ts +1 -1
- package/dest/hash/map_slot.d.ts +1 -1
- package/dest/interfaces/allowed_element.d.ts +5 -5
- package/dest/interfaces/api_limit.d.ts +1 -1
- package/dest/interfaces/archiver.d.ts +6 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +22 -14
- package/dest/interfaces/aztec-node-admin.d.ts +92 -85
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.d.ts +30 -24
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +26 -24
- package/dest/interfaces/block-builder.d.ts +3 -2
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/client.d.ts +1 -1
- package/dest/interfaces/configs.d.ts +31 -21
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +3 -1
- package/dest/interfaces/epoch-prover.d.ts +7 -7
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.d.ts +6 -4
- package/dest/interfaces/get_logs_response.d.ts.map +1 -1
- package/dest/interfaces/l2_logs_source.d.ts +4 -3
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +5 -4
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p-bootstrap.d.ts +1 -1
- package/dest/interfaces/p2p.d.ts +3 -2
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +1 -1
- package/dest/interfaces/private_kernel_prover.d.ts +1 -1
- package/dest/interfaces/processed-tx-handler.d.ts +1 -1
- package/dest/interfaces/prover-agent.d.ts +1 -1
- package/dest/interfaces/prover-broker.d.ts +1 -1
- package/dest/interfaces/prover-client.d.ts +5 -5
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-coordination.d.ts +1 -1
- package/dest/interfaces/prover-node.d.ts +1 -1
- package/dest/interfaces/proving-job-source.d.ts +1 -1
- package/dest/interfaces/proving-job.d.ts +1680 -1163
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +3 -2
- package/dest/interfaces/public_state_source.d.ts +1 -1
- package/dest/interfaces/server.d.ts +1 -1
- package/dest/interfaces/server_circuit_prover.d.ts +2 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/service.d.ts +1 -1
- package/dest/interfaces/slasher.d.ts +3 -3
- package/dest/interfaces/tx_provider.d.ts +3 -3
- package/dest/interfaces/tx_provider.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +27 -19
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -1
- package/dest/interfaces/world_state.d.ts +9 -26
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/interfaces/world_state.js +4 -3
- package/dest/kernel/claimed_length_array.d.ts +1 -1
- package/dest/kernel/claimed_length_array.d.ts.map +1 -1
- package/dest/kernel/hiding_kernel_private_inputs.d.ts +1 -1
- package/dest/kernel/hiding_kernel_private_inputs.d.ts.map +1 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/build_transient_data_hints.d.ts +2 -2
- package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_transient_data_hints.js +2 -2
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/hints/index.d.ts +1 -1
- package/dest/kernel/hints/key_validation_hint.d.ts +1 -2
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +1 -2
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +1 -6
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +1 -1
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +2 -24
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.js +4 -9
- package/dest/kernel/hints/read_request.d.ts +1 -7
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request_hints.d.ts +1 -7
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts +1 -1
- package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts.map +1 -1
- package/dest/kernel/hints/scoped_value_cache.d.ts +1 -1
- package/dest/kernel/hints/scoped_value_cache.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
- package/dest/kernel/index.d.ts +1 -1
- package/dest/kernel/log_hash.d.ts +1 -1
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/note_hash.d.ts +1 -1
- package/dest/kernel/note_hash.d.ts.map +1 -1
- package/dest/kernel/nullifier.d.ts +1 -1
- package/dest/kernel/nullifier.d.ts.map +1 -1
- package/dest/kernel/padded_side_effects.d.ts +1 -1
- package/dest/kernel/padded_side_effects.d.ts.map +1 -1
- package/dest/kernel/private_accumulated_data.d.ts +1 -23
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.d.ts +1 -25
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_request.d.ts +1 -16
- package/dest/kernel/private_call_request.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +17 -74
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +17 -5
- package/dest/kernel/private_context_inputs.d.ts +1 -1
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -29
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +8 -4
- package/dest/kernel/private_kernel_data.d.ts +1 -7
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_data.js +0 -2
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +7 -20
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.js +7 -3
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +1 -7
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_prover_output.d.ts +10 -10
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +1 -4
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/private_kernel_simulated_output.d.ts +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +1 -10
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +1 -23
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- 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_to_avm_accumulated_data.d.ts +17 -1
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +18 -0
- package/dest/kernel/private_to_public_accumulated_data.d.ts +1 -1
- package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts +1 -1
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +1 -17
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +1 -16
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.d.ts +2 -24
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +5 -13
- package/dest/kernel/public_call_request.d.ts +22 -27
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +18 -0
- package/dest/kernel/utils/index.d.ts +1 -1
- package/dest/kernel/utils/interfaces.d.ts +1 -1
- package/dest/kernel/utils/optional_number.d.ts +1 -7
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/kernel/utils/order_and_comparison.d.ts +1 -1
- package/dest/keys/derivation.d.ts +1 -1
- package/dest/keys/index.d.ts +1 -1
- package/dest/keys/key_types.d.ts +1 -1
- package/dest/keys/public_key.d.ts +1 -1
- package/dest/keys/public_keys.d.ts +9 -5
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +12 -0
- package/dest/keys/utils.d.ts +1 -1
- package/dest/l1-contracts/index.d.ts +1 -1
- package/dest/l1-contracts/slash_factory.d.ts +3 -3
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/logs/contract_class_log.d.ts +20 -4
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +24 -0
- package/dest/logs/debug_log.d.ts +10 -2
- package/dest/logs/debug_log.d.ts.map +1 -1
- package/dest/logs/debug_log.js +13 -0
- package/dest/logs/directional_app_tagging_secret.d.ts +1 -1
- package/dest/logs/directional_app_tagging_secret.d.ts.map +1 -1
- package/dest/logs/extended_contract_class_log.d.ts +1 -3
- package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
- package/dest/logs/extended_public_log.d.ts +7 -7
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/index.d.ts +1 -1
- package/dest/logs/log_filter.d.ts +1 -1
- package/dest/logs/log_id.d.ts +8 -8
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_id.js +5 -4
- package/dest/logs/log_with_tx_data.d.ts +1 -1
- package/dest/logs/log_with_tx_data.d.ts.map +1 -1
- package/dest/logs/message_context.d.ts +1 -1
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/pending_tagged_log.d.ts +1 -1
- package/dest/logs/pending_tagged_log.d.ts.map +1 -1
- package/dest/logs/pre_tag.d.ts +1 -1
- package/dest/logs/private_log.d.ts +10 -2
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +14 -5
- package/dest/logs/public_log.d.ts +9 -1
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +9 -0
- package/dest/logs/shared_secret_derivation.d.ts +1 -1
- package/dest/logs/tx_scoped_l2_log.d.ts +14 -11
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/logs/tx_scoped_l2_log.js +4 -3
- package/dest/messaging/in_hash.d.ts +4 -0
- package/dest/messaging/in_hash.d.ts.map +1 -0
- package/dest/messaging/in_hash.js +8 -0
- package/dest/messaging/inbox_leaf.d.ts +1 -3
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/index.d.ts +3 -1
- package/dest/messaging/index.d.ts.map +1 -1
- package/dest/messaging/index.js +2 -0
- package/dest/messaging/l1_actor.d.ts +1 -7
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.d.ts +1 -6
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message_source.d.ts +10 -3
- package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/messaging/l2_actor.d.ts +1 -7
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +4 -3
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +2 -2
- package/dest/messaging/l2_to_l1_message.d.ts +17 -1
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.js +18 -0
- package/dest/messaging/out_hash.d.ts +5 -0
- package/dest/messaging/out_hash.d.ts.map +1 -0
- package/dest/messaging/out_hash.js +28 -0
- package/dest/noir/index.d.ts +7 -7
- package/dest/noir/index.d.ts.map +1 -1
- package/dest/noir/index.js +6 -6
- package/dest/note/comparator.d.ts +1 -1
- package/dest/note/index.d.ts +2 -2
- package/dest/note/index.d.ts.map +1 -1
- package/dest/note/index.js +1 -1
- package/dest/note/note.d.ts +2 -17
- package/dest/note/note.d.ts.map +1 -1
- package/dest/note/note_dao.d.ts +75 -0
- package/dest/note/note_dao.d.ts.map +1 -0
- package/dest/note/note_dao.js +106 -0
- package/dest/note/note_status.d.ts +1 -1
- package/dest/note/notes_filter.d.ts +3 -1
- package/dest/note/notes_filter.d.ts.map +1 -1
- package/dest/note/notes_filter.js +1 -0
- package/dest/p2p/attestation_utils.d.ts +1 -1
- package/dest/p2p/block_attestation.d.ts +5 -12
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_proposal.d.ts +3 -6
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +1 -1
- package/dest/p2p/client_type.d.ts +1 -1
- package/dest/p2p/consensus_payload.d.ts +10 -188
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +16 -23
- package/dest/p2p/gossipable.d.ts +6 -5
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +16 -10
- package/dest/p2p/index.d.ts +1 -1
- package/dest/p2p/interface.d.ts +1 -1
- package/dest/p2p/message_validator.d.ts +1 -1
- package/dest/p2p/peer_error.d.ts +1 -1
- package/dest/p2p/signature_utils.d.ts +1 -1
- package/dest/p2p/topic_type.d.ts +1 -1
- package/dest/parity/index.d.ts +1 -1
- package/dest/parity/parity_base_private_inputs.d.ts +1 -3
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.d.ts +1 -4
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_root_private_inputs.d.ts +1 -2
- package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.d.ts +1 -1
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/index.d.ts +1 -1
- package/dest/proofs/proof.d.ts +1 -4
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/proof_data.d.ts +1 -1
- package/dest/proofs/proof_data.d.ts.map +1 -1
- package/dest/proofs/proving_request_type.d.ts +1 -1
- package/dest/proofs/recursive_proof.d.ts +2 -26
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.d.ts +1 -1
- package/dest/rollup/base_rollup_hints.d.ts +1 -34
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.d.ts +1 -12
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.d.ts +4 -0
- package/dest/rollup/block_headers_hash.d.ts.map +1 -0
- package/dest/rollup/block_headers_hash.js +9 -0
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.d.ts +8 -40
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +8 -2
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +2 -76
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +1 -9
- package/dest/rollup/checkpoint_constant_data.d.ts +26 -13
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +27 -3
- package/dest/rollup/checkpoint_header.d.ts +16 -14
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +40 -13
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +1 -25
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +5 -29
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +4 -4
- package/dest/rollup/epoch_constant_data.d.ts +1 -16
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/index.d.ts +2 -1
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +1 -0
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_private_inputs.d.ts +1 -6
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +1 -3
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tree_snapshot_diff_hints.d.ts +1 -24
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts +1 -29
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/schemas/index.d.ts +1 -1
- package/dest/schemas/schemas.d.ts +86 -15
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +12 -1
- package/dest/slashing/empire.d.ts +1 -1
- package/dest/slashing/empire.d.ts.map +1 -1
- package/dest/slashing/empire.js +5 -4
- package/dest/slashing/helpers.d.ts +7 -6
- package/dest/slashing/helpers.d.ts.map +1 -1
- package/dest/slashing/helpers.js +8 -6
- package/dest/slashing/index.d.ts +1 -1
- package/dest/slashing/interfaces.d.ts +3 -2
- package/dest/slashing/interfaces.d.ts.map +1 -1
- package/dest/slashing/serialization.d.ts +1 -1
- package/dest/slashing/tally.d.ts +1 -1
- package/dest/slashing/types.d.ts +10 -10
- package/dest/snapshots/download.d.ts +1 -1
- package/dest/snapshots/index.d.ts +1 -1
- package/dest/snapshots/types.d.ts +18 -18
- package/dest/snapshots/upload.d.ts +1 -1
- package/dest/stats/index.d.ts +1 -1
- package/dest/stats/stats.d.ts +1 -1
- package/dest/tests/factories.d.ts +34 -29
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +76 -151
- package/dest/tests/fixtures.d.ts +1 -1
- package/dest/tests/index.d.ts +1 -1
- package/dest/tests/jest.d.ts +1 -1
- package/dest/tests/mocks.d.ts +54 -23
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +135 -34
- package/dest/trees/append_only_tree_snapshot.d.ts +9 -16
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +9 -9
- package/dest/trees/database_public_state_source.d.ts +1 -1
- package/dest/trees/database_public_state_source.d.ts.map +1 -1
- package/dest/trees/index.d.ts +1 -1
- package/dest/trees/merkle_tree_id.d.ts +5 -5
- package/dest/trees/merkle_tree_id.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.d.ts +17 -13
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.js +24 -0
- package/dest/trees/nullifier_membership_witness.d.ts +4 -37
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.d.ts +28 -27
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +24 -0
- package/dest/trees/public_data_witness.d.ts +11 -45
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/tx/block_header.d.ts +7 -14
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +13 -2
- package/dest/tx/call_context.d.ts +6 -18
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/capsule.d.ts +1 -4
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/content_commitment.d.ts +3 -2
- package/dest/tx/content_commitment.d.ts.map +1 -1
- package/dest/tx/content_commitment.js +10 -2
- package/dest/tx/execution_payload.d.ts +37 -0
- package/dest/tx/execution_payload.d.ts.map +1 -0
- package/dest/tx/execution_payload.js +40 -0
- package/dest/tx/function_data.d.ts +4 -6
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/global_variable_builder.d.ts +3 -2
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +52 -31
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +50 -10
- package/dest/tx/hashed_values.d.ts +1 -7
- package/dest/tx/hashed_values.d.ts.map +1 -1
- 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/indexed_tx_effect.d.ts +9 -6
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +5 -2
- package/dest/tx/offchain_effect.d.ts +1 -1
- package/dest/tx/partial_state_reference.d.ts +4 -7
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +10 -10
- package/dest/tx/private_execution_result.d.ts +16 -51
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +6 -3
- package/dest/tx/private_tx_constant_data.d.ts +1 -16
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/processed_tx.d.ts +2 -2
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +4 -1
- package/dest/tx/profiling.d.ts +38 -38
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +5 -4
- package/dest/tx/protocol_contracts.d.ts +10 -2
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +9 -0
- package/dest/tx/proven_tx.d.ts +18 -18
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.d.ts +9 -7
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +12 -0
- package/dest/tx/public_simulation_output.d.ts +3 -1
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +8 -1
- package/dest/tx/simulated_tx.d.ts +21 -21
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/state_reference.d.ts +10 -12
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +9 -9
- package/dest/tx/tree_snapshots.d.ts +15 -7
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tree_snapshots.js +9 -0
- package/dest/tx/tx.d.ts +4 -18
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +6 -4
- package/dest/tx/tx_constant_data.d.ts +1 -1
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_context.d.ts +1 -2
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_effect.d.ts +20 -42
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +54 -59
- package/dest/tx/tx_execution_request.d.ts +1 -30
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_hash.d.ts +1 -2
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_receipt.d.ts +4 -9
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +2 -1
- package/dest/tx/tx_request.d.ts +1 -6
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/validator/empty_validator.d.ts +1 -1
- package/dest/tx/validator/empty_validator.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.d.ts +1 -1
- package/dest/tx/validator/tx_validator.d.ts +5 -5
- package/dest/types/index.d.ts +1 -1
- package/dest/types/shared.d.ts +1 -4
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/update-checker/index.d.ts +1 -1
- package/dest/update-checker/update-checker.d.ts +2 -3
- package/dest/update-checker/update-checker.d.ts.map +1 -1
- package/dest/validators/errors.d.ts +6 -7
- package/dest/validators/errors.d.ts.map +1 -1
- package/dest/validators/errors.js +2 -4
- package/dest/validators/index.d.ts +1 -1
- package/dest/validators/schemas.d.ts +266 -208
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +7 -7
- package/dest/validators/types.d.ts +10 -9
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/versioning/index.d.ts +1 -1
- package/dest/versioning/versioning.d.ts +1 -1
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/vks/index.d.ts +1 -1
- package/dest/vks/verification_key.d.ts +10 -22
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +20 -0
- package/dest/vks/vk_data.d.ts +1 -7
- package/dest/vks/vk_data.d.ts.map +1 -1
- package/dest/world-state/index.d.ts +1 -1
- package/dest/world-state/world_state_revision.d.ts +34 -2
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +24 -1
- package/dest/zkpassport/index.d.ts +1 -1
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/package.json +12 -11
- package/src/abi/abi.ts +4 -4
- package/src/abi/contract_artifact.ts +3 -3
- package/src/avm/avm.ts +777 -6
- package/src/avm/avm_accumulated_data.ts +40 -0
- package/src/avm/avm_circuit_public_inputs.ts +40 -0
- package/src/avm/message_pack.ts +4 -1
- package/src/avm/public_data_write.ts +12 -1
- package/src/avm/revert_code.ts +29 -9
- package/src/aztec-address/index.ts +26 -2
- package/src/block/attestation_info.ts +8 -1
- package/src/block/block_parameter.ts +8 -0
- package/src/block/body.ts +16 -39
- package/src/block/in_block.ts +13 -9
- package/src/block/index.ts +2 -1
- package/src/block/l2_block.ts +70 -7
- package/src/block/l2_block_code_to_purge.ts +6 -4
- package/src/block/l2_block_header.ts +19 -5
- package/src/block/l2_block_info.ts +10 -9
- package/src/block/l2_block_new.ts +176 -0
- package/src/block/l2_block_source.ts +48 -29
- package/src/block/l2_block_stream/l2_block_stream.ts +10 -5
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +5 -2
- package/src/block/proposal/attestations_and_signers.ts +20 -1
- package/src/block/published_l2_block.ts +14 -31
- package/src/block/test/l2_tips_store_test_suite.ts +8 -3
- package/src/block/validate_block_result.ts +9 -7
- package/src/checkpoint/checkpoint.ts +88 -0
- package/src/checkpoint/index.ts +2 -1
- package/src/checkpoint/published_checkpoint.ts +91 -0
- package/src/contract/contract_deployment_data.ts +125 -0
- package/src/contract/index.ts +1 -0
- package/src/contract/interfaces/contract_data_source.ts +2 -1
- package/src/contract/private_function_membership_proof.ts +1 -1
- package/src/epoch-helpers/index.ts +28 -21
- package/src/file-store/http.ts +6 -3
- package/src/file-store/s3.ts +3 -7
- package/src/gas/gas.ts +14 -0
- package/src/gas/gas_fees.ts +14 -0
- package/src/gas/gas_settings.ts +19 -0
- package/src/gas/gas_used.ts +22 -1
- package/src/hash/hash.ts +13 -2
- package/src/interfaces/archiver.ts +27 -13
- package/src/interfaces/aztec-node.ts +64 -48
- package/src/interfaces/block-builder.ts +2 -1
- package/src/interfaces/configs.ts +6 -0
- package/src/interfaces/epoch-prover.ts +5 -6
- package/src/interfaces/l2_logs_source.ts +3 -2
- package/src/interfaces/merkle_tree_operations.ts +4 -3
- package/src/interfaces/p2p.ts +4 -2
- package/src/interfaces/proving-job.ts +14 -5
- package/src/interfaces/tx_provider.ts +2 -2
- package/src/interfaces/validator.ts +5 -2
- package/src/interfaces/world_state.ts +12 -11
- package/src/kernel/hints/build_transient_data_hints.ts +2 -2
- package/src/kernel/hints/private_kernel_reset_hints.ts +0 -8
- package/src/kernel/private_circuit_public_inputs.ts +29 -9
- package/src/kernel/private_kernel_circuit_public_inputs.ts +7 -0
- package/src/kernel/private_kernel_data.ts +0 -2
- package/src/kernel/private_kernel_init_circuit_private_inputs.ts +6 -0
- package/src/kernel/private_to_avm_accumulated_data.ts +35 -0
- package/src/kernel/private_validation_requests.ts +1 -13
- package/src/kernel/public_call_request.ts +27 -0
- package/src/keys/public_keys.ts +19 -0
- package/src/logs/contract_class_log.ts +32 -0
- package/src/logs/debug_log.ts +20 -1
- package/src/logs/log_id.ts +6 -5
- package/src/logs/private_log.ts +19 -3
- package/src/logs/public_log.ts +14 -0
- package/src/logs/tx_scoped_l2_log.ts +5 -4
- package/src/messaging/in_hash.ts +10 -0
- package/src/messaging/index.ts +2 -0
- package/src/messaging/l1_to_l2_message_source.ts +10 -2
- package/src/messaging/l2_to_l1_membership.ts +5 -4
- package/src/messaging/l2_to_l1_message.ts +25 -0
- package/src/messaging/out_hash.ts +36 -0
- package/src/noir/index.ts +6 -6
- package/src/note/index.ts +1 -1
- package/src/note/note_dao.ts +161 -0
- package/src/note/notes_filter.ts +3 -0
- package/src/p2p/block_attestation.ts +2 -1
- package/src/p2p/block_proposal.ts +3 -2
- package/src/p2p/consensus_payload.ts +16 -26
- package/src/p2p/gossipable.ts +17 -8
- package/src/rollup/block_headers_hash.ts +12 -0
- package/src/rollup/block_rollup_public_inputs.ts +8 -0
- package/src/rollup/block_root_rollup_private_inputs.ts +0 -9
- package/src/rollup/checkpoint_constant_data.ts +43 -4
- package/src/rollup/checkpoint_header.ts +48 -22
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +5 -5
- package/src/rollup/index.ts +1 -0
- package/src/schemas/schemas.ts +18 -0
- package/src/slashing/empire.ts +6 -4
- package/src/slashing/helpers.ts +17 -12
- package/src/slashing/interfaces.ts +3 -1
- package/src/tests/factories.ts +213 -229
- package/src/tests/mocks.ts +230 -51
- package/src/trees/append_only_tree_snapshot.ts +11 -12
- package/src/trees/nullifier_leaf.ts +32 -0
- package/src/trees/public_data_leaf.ts +32 -0
- package/src/tx/block_header.ts +17 -4
- package/src/tx/content_commitment.ts +11 -2
- package/src/tx/execution_payload.ts +60 -0
- package/src/tx/global_variable_builder.ts +2 -1
- package/src/tx/global_variables.ts +69 -15
- package/src/tx/index.ts +1 -0
- package/src/tx/indexed_tx_effect.ts +5 -4
- package/src/tx/partial_state_reference.ts +9 -17
- package/src/tx/private_execution_result.ts +7 -4
- package/src/tx/processed_tx.ts +8 -2
- package/src/tx/profiling.ts +4 -6
- package/src/tx/protocol_contracts.ts +16 -0
- package/src/tx/public_call_request_with_calldata.ts +17 -0
- package/src/tx/public_simulation_output.ts +18 -1
- package/src/tx/state_reference.ts +9 -15
- package/src/tx/tree_snapshots.ts +16 -0
- package/src/tx/tx.ts +7 -6
- package/src/tx/tx_effect.ts +84 -90
- package/src/tx/tx_receipt.ts +3 -2
- package/src/validators/errors.ts +3 -4
- package/src/validators/schemas.ts +7 -7
- package/src/validators/types.ts +9 -8
- package/src/vks/verification_key.ts +25 -0
- package/src/world-state/world_state_revision.ts +47 -5
- package/dest/block/l2_block_number.d.ts +0 -5
- package/dest/block/l2_block_number.d.ts.map +0 -1
- package/dest/block/l2_block_number.js +0 -6
- package/dest/checkpoint/checkpoint_body.d.ts +0 -4
- package/dest/checkpoint/checkpoint_body.d.ts.map +0 -1
- package/dest/checkpoint/checkpoint_body.js +0 -9
- package/dest/note/unique_note.d.ts +0 -43
- package/dest/note/unique_note.d.ts.map +0 -1
- package/dest/note/unique_note.js +0 -67
- package/src/block/l2_block_number.ts +0 -8
- package/src/checkpoint/checkpoint_body.ts +0 -10
- package/src/note/unique_note.ts +0 -88
package/src/avm/avm.ts
CHANGED
|
@@ -1,35 +1,46 @@
|
|
|
1
|
+
import { DEFAULT_MAX_DEBUG_LOG_MEMORY_READS } from '@aztec/constants';
|
|
1
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
3
|
import { jsonParseWithSchema, jsonStringify } from '@aztec/foundation/json-rpc';
|
|
3
|
-
import { schemas } from '@aztec/foundation/schemas';
|
|
4
4
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
|
+
import { FunctionSelector } from '../abi/index.js';
|
|
7
8
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
9
|
+
import { AllContractDeploymentData, ContractDeploymentData } from '../contract/index.js';
|
|
10
|
+
import { SimulationError } from '../errors/simulation_error.js';
|
|
8
11
|
import { computeEffectiveGasFees } from '../fees/transaction_fee.js';
|
|
9
12
|
import { Gas } from '../gas/gas.js';
|
|
10
13
|
import { GasFees } from '../gas/gas_fees.js';
|
|
11
14
|
import { GasSettings } from '../gas/gas_settings.js';
|
|
15
|
+
import { GasUsed } from '../gas/gas_used.js';
|
|
12
16
|
import { PublicKeys } from '../keys/public_keys.js';
|
|
17
|
+
import { DebugLog } from '../logs/debug_log.js';
|
|
13
18
|
import { ScopedL2ToL1Message } from '../messaging/l2_to_l1_message.js';
|
|
19
|
+
import { NullishToUndefined, type ZodFor, schemas } from '../schemas/schemas.js';
|
|
14
20
|
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
15
21
|
import { MerkleTreeId } from '../trees/merkle_tree_id.js';
|
|
16
|
-
import { NullifierLeafPreimage } from '../trees/nullifier_leaf.js';
|
|
17
|
-
import { PublicDataTreeLeafPreimage } from '../trees/public_data_leaf.js';
|
|
22
|
+
import { NullifierLeaf, NullifierLeafPreimage } from '../trees/nullifier_leaf.js';
|
|
23
|
+
import { PublicDataTreeLeaf, PublicDataTreeLeafPreimage } from '../trees/public_data_leaf.js';
|
|
18
24
|
import {
|
|
19
25
|
GlobalVariables,
|
|
26
|
+
NestedProcessReturnValues,
|
|
20
27
|
ProtocolContracts,
|
|
21
28
|
PublicCallRequestWithCalldata,
|
|
22
29
|
TreeSnapshots,
|
|
23
30
|
type Tx,
|
|
24
31
|
} from '../tx/index.js';
|
|
32
|
+
import { TxExecutionPhase } from '../tx/processed_tx.js';
|
|
33
|
+
import { WorldStateRevision } from '../world-state/world_state_revision.js';
|
|
25
34
|
import { AvmCircuitPublicInputs } from './avm_circuit_public_inputs.js';
|
|
26
35
|
import { serializeWithMessagePack } from './message_pack.js';
|
|
36
|
+
import { RevertCode } from './revert_code.js';
|
|
27
37
|
|
|
28
38
|
////////////////////////////////////////////////////////////////////////////
|
|
29
39
|
// Hints (contracts)
|
|
30
40
|
////////////////////////////////////////////////////////////////////////////
|
|
31
41
|
export class AvmContractClassHint {
|
|
32
42
|
constructor(
|
|
43
|
+
public readonly hintKey: number,
|
|
33
44
|
public readonly classId: Fr,
|
|
34
45
|
public readonly artifactHash: Fr,
|
|
35
46
|
public readonly privateFunctionsRoot: Fr,
|
|
@@ -39,20 +50,42 @@ export class AvmContractClassHint {
|
|
|
39
50
|
static get schema() {
|
|
40
51
|
return z
|
|
41
52
|
.object({
|
|
53
|
+
hintKey: z.number().int().nonnegative(),
|
|
42
54
|
classId: schemas.Fr,
|
|
43
55
|
artifactHash: schemas.Fr,
|
|
44
56
|
privateFunctionsRoot: schemas.Fr,
|
|
45
57
|
packedBytecode: schemas.Buffer,
|
|
46
58
|
})
|
|
47
59
|
.transform(
|
|
48
|
-
({ classId, artifactHash, privateFunctionsRoot, packedBytecode }) =>
|
|
49
|
-
new AvmContractClassHint(classId, artifactHash, privateFunctionsRoot, packedBytecode),
|
|
60
|
+
({ hintKey, classId, artifactHash, privateFunctionsRoot, packedBytecode }) =>
|
|
61
|
+
new AvmContractClassHint(hintKey, classId, artifactHash, privateFunctionsRoot, packedBytecode),
|
|
50
62
|
);
|
|
51
63
|
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates an AvmContractClassHint from a plain object without Zod validation.
|
|
67
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
68
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
69
|
+
* @param obj - Plain object containing AvmContractClassHint fields
|
|
70
|
+
* @returns An AvmContractClassHint instance
|
|
71
|
+
*/
|
|
72
|
+
static fromPlainObject(obj: any): AvmContractClassHint {
|
|
73
|
+
if (obj instanceof AvmContractClassHint) {
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
return new AvmContractClassHint(
|
|
77
|
+
obj.hintKey,
|
|
78
|
+
Fr.fromPlainObject(obj.classId),
|
|
79
|
+
Fr.fromPlainObject(obj.artifactHash),
|
|
80
|
+
Fr.fromPlainObject(obj.privateFunctionsRoot),
|
|
81
|
+
obj.packedBytecode instanceof Buffer ? obj.packedBytecode : Buffer.from(obj.packedBytecode),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
52
84
|
}
|
|
53
85
|
|
|
54
86
|
export class AvmBytecodeCommitmentHint {
|
|
55
87
|
constructor(
|
|
88
|
+
public readonly hintKey: number,
|
|
56
89
|
public readonly classId: Fr,
|
|
57
90
|
public readonly commitment: Fr,
|
|
58
91
|
) {}
|
|
@@ -60,15 +93,35 @@ export class AvmBytecodeCommitmentHint {
|
|
|
60
93
|
static get schema() {
|
|
61
94
|
return z
|
|
62
95
|
.object({
|
|
96
|
+
hintKey: z.number().int().nonnegative(),
|
|
63
97
|
classId: schemas.Fr,
|
|
64
98
|
commitment: schemas.Fr,
|
|
65
99
|
})
|
|
66
|
-
.transform(({ classId, commitment }) => new AvmBytecodeCommitmentHint(classId, commitment));
|
|
100
|
+
.transform(({ hintKey, classId, commitment }) => new AvmBytecodeCommitmentHint(hintKey, classId, commitment));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Creates an AvmBytecodeCommitmentHint from a plain object without Zod validation.
|
|
105
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
106
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
107
|
+
* @param obj - Plain object containing AvmBytecodeCommitmentHint fields
|
|
108
|
+
* @returns An AvmBytecodeCommitmentHint instance
|
|
109
|
+
*/
|
|
110
|
+
static fromPlainObject(obj: any): AvmBytecodeCommitmentHint {
|
|
111
|
+
if (obj instanceof AvmBytecodeCommitmentHint) {
|
|
112
|
+
return obj;
|
|
113
|
+
}
|
|
114
|
+
return new AvmBytecodeCommitmentHint(
|
|
115
|
+
obj.hintKey,
|
|
116
|
+
Fr.fromPlainObject(obj.classId),
|
|
117
|
+
Fr.fromPlainObject(obj.commitment),
|
|
118
|
+
);
|
|
67
119
|
}
|
|
68
120
|
}
|
|
69
121
|
|
|
70
122
|
export class AvmContractInstanceHint {
|
|
71
123
|
constructor(
|
|
124
|
+
public readonly hintKey: number,
|
|
72
125
|
public readonly address: AztecAddress,
|
|
73
126
|
public readonly salt: Fr,
|
|
74
127
|
public readonly deployer: AztecAddress,
|
|
@@ -81,6 +134,7 @@ export class AvmContractInstanceHint {
|
|
|
81
134
|
static get schema() {
|
|
82
135
|
return z
|
|
83
136
|
.object({
|
|
137
|
+
hintKey: z.number().int().nonnegative(),
|
|
84
138
|
address: AztecAddress.schema,
|
|
85
139
|
salt: schemas.Fr,
|
|
86
140
|
deployer: AztecAddress.schema,
|
|
@@ -91,6 +145,7 @@ export class AvmContractInstanceHint {
|
|
|
91
145
|
})
|
|
92
146
|
.transform(
|
|
93
147
|
({
|
|
148
|
+
hintKey,
|
|
94
149
|
address,
|
|
95
150
|
salt,
|
|
96
151
|
deployer,
|
|
@@ -100,6 +155,7 @@ export class AvmContractInstanceHint {
|
|
|
100
155
|
publicKeys,
|
|
101
156
|
}) =>
|
|
102
157
|
new AvmContractInstanceHint(
|
|
158
|
+
hintKey,
|
|
103
159
|
address,
|
|
104
160
|
salt,
|
|
105
161
|
deployer,
|
|
@@ -110,6 +166,65 @@ export class AvmContractInstanceHint {
|
|
|
110
166
|
),
|
|
111
167
|
);
|
|
112
168
|
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Creates an AvmContractInstanceHint from a plain object without Zod validation.
|
|
172
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
173
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
174
|
+
* @param obj - Plain object containing AvmContractInstanceHint fields
|
|
175
|
+
* @returns An AvmContractInstanceHint instance
|
|
176
|
+
*/
|
|
177
|
+
static fromPlainObject(obj: any): AvmContractInstanceHint {
|
|
178
|
+
if (obj instanceof AvmContractInstanceHint) {
|
|
179
|
+
return obj;
|
|
180
|
+
}
|
|
181
|
+
return new AvmContractInstanceHint(
|
|
182
|
+
obj.hintKey,
|
|
183
|
+
AztecAddress.fromPlainObject(obj.address),
|
|
184
|
+
Fr.fromPlainObject(obj.salt),
|
|
185
|
+
AztecAddress.fromPlainObject(obj.deployer),
|
|
186
|
+
Fr.fromPlainObject(obj.currentContractClassId),
|
|
187
|
+
Fr.fromPlainObject(obj.originalContractClassId),
|
|
188
|
+
Fr.fromPlainObject(obj.initializationHash),
|
|
189
|
+
PublicKeys.fromPlainObject(obj.publicKeys),
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export class AvmDebugFunctionNameHint {
|
|
195
|
+
constructor(
|
|
196
|
+
public readonly address: AztecAddress,
|
|
197
|
+
public readonly selector: Fr,
|
|
198
|
+
public readonly name: string,
|
|
199
|
+
) {}
|
|
200
|
+
|
|
201
|
+
static get schema() {
|
|
202
|
+
return z
|
|
203
|
+
.object({
|
|
204
|
+
address: AztecAddress.schema,
|
|
205
|
+
selector: schemas.Fr,
|
|
206
|
+
name: z.string(),
|
|
207
|
+
})
|
|
208
|
+
.transform(({ address, selector, name }) => new AvmDebugFunctionNameHint(address, selector, name));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Creates an AvmDebugFunctionNameHint from a plain object without Zod validation.
|
|
213
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
214
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
215
|
+
* @param obj - Plain object containing AvmDebugFunctionNameHint fields
|
|
216
|
+
* @returns An AvmDebugFunctionNameHint instance
|
|
217
|
+
*/
|
|
218
|
+
static fromPlainObject(obj: any): AvmDebugFunctionNameHint {
|
|
219
|
+
if (obj instanceof AvmDebugFunctionNameHint) {
|
|
220
|
+
return obj;
|
|
221
|
+
}
|
|
222
|
+
return new AvmDebugFunctionNameHint(
|
|
223
|
+
AztecAddress.fromPlainObject(obj.address),
|
|
224
|
+
Fr.fromPlainObject(obj.selector),
|
|
225
|
+
obj.name,
|
|
226
|
+
);
|
|
227
|
+
}
|
|
113
228
|
}
|
|
114
229
|
|
|
115
230
|
////////////////////////////////////////////////////////////////////////////
|
|
@@ -136,6 +251,25 @@ export class AvmGetSiblingPathHint {
|
|
|
136
251
|
})
|
|
137
252
|
.transform(({ hintKey, treeId, index, path }) => new AvmGetSiblingPathHint(hintKey, treeId, index, path));
|
|
138
253
|
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Creates an AvmGetSiblingPathHint from a plain object without Zod validation.
|
|
257
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
258
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
259
|
+
* @param obj - Plain object containing AvmGetSiblingPathHint fields
|
|
260
|
+
* @returns An AvmGetSiblingPathHint instance
|
|
261
|
+
*/
|
|
262
|
+
static fromPlainObject(obj: any): AvmGetSiblingPathHint {
|
|
263
|
+
if (obj instanceof AvmGetSiblingPathHint) {
|
|
264
|
+
return obj;
|
|
265
|
+
}
|
|
266
|
+
return new AvmGetSiblingPathHint(
|
|
267
|
+
AppendOnlyTreeSnapshot.fromPlainObject(obj.hintKey),
|
|
268
|
+
obj.treeId,
|
|
269
|
+
typeof obj.index === 'bigint' ? obj.index : BigInt(obj.index),
|
|
270
|
+
obj.path.map((p: any) => Fr.fromPlainObject(p)),
|
|
271
|
+
);
|
|
272
|
+
}
|
|
139
273
|
}
|
|
140
274
|
|
|
141
275
|
// Hint for MerkleTreeDB.getPreviousValueIndex.
|
|
@@ -164,6 +298,26 @@ export class AvmGetPreviousValueIndexHint {
|
|
|
164
298
|
new AvmGetPreviousValueIndexHint(hintKey, treeId, value, index, alreadyPresent),
|
|
165
299
|
);
|
|
166
300
|
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Creates an AvmGetPreviousValueIndexHint from a plain object without Zod validation.
|
|
304
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
305
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
306
|
+
* @param obj - Plain object containing AvmGetPreviousValueIndexHint fields
|
|
307
|
+
* @returns An AvmGetPreviousValueIndexHint instance
|
|
308
|
+
*/
|
|
309
|
+
static fromPlainObject(obj: any): AvmGetPreviousValueIndexHint {
|
|
310
|
+
if (obj instanceof AvmGetPreviousValueIndexHint) {
|
|
311
|
+
return obj;
|
|
312
|
+
}
|
|
313
|
+
return new AvmGetPreviousValueIndexHint(
|
|
314
|
+
AppendOnlyTreeSnapshot.fromPlainObject(obj.hintKey),
|
|
315
|
+
obj.treeId,
|
|
316
|
+
Fr.fromPlainObject(obj.value),
|
|
317
|
+
typeof obj.index === 'bigint' ? obj.index : BigInt(obj.index),
|
|
318
|
+
obj.alreadyPresent,
|
|
319
|
+
);
|
|
320
|
+
}
|
|
167
321
|
}
|
|
168
322
|
|
|
169
323
|
type IndexedTreeLeafPreimages = NullifierLeafPreimage | PublicDataTreeLeafPreimage;
|
|
@@ -191,6 +345,24 @@ function AvmGetLeafPreimageHintFactory(klass: IndexedTreeLeafPreimagesClasses) {
|
|
|
191
345
|
})
|
|
192
346
|
.transform(({ hintKey, index, leafPreimage }) => new this(hintKey, index, leafPreimage));
|
|
193
347
|
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Creates an instance from a plain object without Zod validation.
|
|
351
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
352
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
353
|
+
* @param obj - Plain object containing hint fields
|
|
354
|
+
* @returns An instance
|
|
355
|
+
*/
|
|
356
|
+
static fromPlainObject(obj: any): any {
|
|
357
|
+
if (obj instanceof this) {
|
|
358
|
+
return obj;
|
|
359
|
+
}
|
|
360
|
+
return new this(
|
|
361
|
+
AppendOnlyTreeSnapshot.fromPlainObject(obj.hintKey),
|
|
362
|
+
typeof obj.index === 'bigint' ? obj.index : BigInt(obj.index),
|
|
363
|
+
klass.fromPlainObject(obj.leafPreimage),
|
|
364
|
+
);
|
|
365
|
+
}
|
|
194
366
|
};
|
|
195
367
|
}
|
|
196
368
|
|
|
@@ -220,6 +392,25 @@ export class AvmGetLeafValueHint {
|
|
|
220
392
|
})
|
|
221
393
|
.transform(({ hintKey, treeId, index, value }) => new AvmGetLeafValueHint(hintKey, treeId, index, value));
|
|
222
394
|
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Creates an AvmGetLeafValueHint from a plain object without Zod validation.
|
|
398
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
399
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
400
|
+
* @param obj - Plain object containing AvmGetLeafValueHint fields
|
|
401
|
+
* @returns An AvmGetLeafValueHint instance
|
|
402
|
+
*/
|
|
403
|
+
static fromPlainObject(obj: any): AvmGetLeafValueHint {
|
|
404
|
+
if (obj instanceof AvmGetLeafValueHint) {
|
|
405
|
+
return obj;
|
|
406
|
+
}
|
|
407
|
+
return new AvmGetLeafValueHint(
|
|
408
|
+
AppendOnlyTreeSnapshot.fromPlainObject(obj.hintKey),
|
|
409
|
+
obj.treeId,
|
|
410
|
+
typeof obj.index === 'bigint' ? obj.index : BigInt(obj.index),
|
|
411
|
+
Fr.fromPlainObject(obj.value),
|
|
412
|
+
);
|
|
413
|
+
}
|
|
223
414
|
}
|
|
224
415
|
|
|
225
416
|
// Hint for MerkleTreeDB.sequentialInsert.
|
|
@@ -269,6 +460,43 @@ function AvmSequentialInsertHintFactory(klass: IndexedTreeLeafPreimagesClasses)
|
|
|
269
460
|
new this(hintKey, stateAfter, treeId, leaf, lowLeavesWitnessData, insertionWitnessData),
|
|
270
461
|
);
|
|
271
462
|
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Creates an instance from a plain object without Zod validation.
|
|
466
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
467
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
468
|
+
* @param obj - Plain object containing hint fields
|
|
469
|
+
* @returns An instance
|
|
470
|
+
*/
|
|
471
|
+
static fromPlainObject(obj: any): any {
|
|
472
|
+
if (obj instanceof this) {
|
|
473
|
+
return obj;
|
|
474
|
+
}
|
|
475
|
+
// Determine the leaf class based on the klass parameter
|
|
476
|
+
const LeafClass = klass === PublicDataTreeLeafPreimage ? PublicDataTreeLeaf : NullifierLeaf;
|
|
477
|
+
return new this(
|
|
478
|
+
AppendOnlyTreeSnapshot.fromPlainObject(obj.hintKey),
|
|
479
|
+
AppendOnlyTreeSnapshot.fromPlainObject(obj.stateAfter),
|
|
480
|
+
obj.treeId,
|
|
481
|
+
LeafClass.fromPlainObject(obj.leaf),
|
|
482
|
+
{
|
|
483
|
+
leaf: klass.fromPlainObject(obj.lowLeavesWitnessData.leaf),
|
|
484
|
+
index:
|
|
485
|
+
typeof obj.lowLeavesWitnessData.index === 'bigint'
|
|
486
|
+
? obj.lowLeavesWitnessData.index
|
|
487
|
+
: BigInt(obj.lowLeavesWitnessData.index),
|
|
488
|
+
path: obj.lowLeavesWitnessData.path.map((p: any) => Fr.fromPlainObject(p)),
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
leaf: klass.fromPlainObject(obj.insertionWitnessData.leaf),
|
|
492
|
+
index:
|
|
493
|
+
typeof obj.insertionWitnessData.index === 'bigint'
|
|
494
|
+
? obj.insertionWitnessData.index
|
|
495
|
+
: BigInt(obj.insertionWitnessData.index),
|
|
496
|
+
path: obj.insertionWitnessData.path.map((p: any) => Fr.fromPlainObject(p)),
|
|
497
|
+
},
|
|
498
|
+
);
|
|
499
|
+
}
|
|
272
500
|
};
|
|
273
501
|
}
|
|
274
502
|
|
|
@@ -299,6 +527,25 @@ export class AvmAppendLeavesHint {
|
|
|
299
527
|
({ hintKey, stateAfter, treeId, leaves }) => new AvmAppendLeavesHint(hintKey, stateAfter, treeId, leaves),
|
|
300
528
|
);
|
|
301
529
|
}
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Creates an AvmAppendLeavesHint from a plain object without Zod validation.
|
|
533
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
534
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
535
|
+
* @param obj - Plain object containing AvmAppendLeavesHint fields
|
|
536
|
+
* @returns An AvmAppendLeavesHint instance
|
|
537
|
+
*/
|
|
538
|
+
static fromPlainObject(obj: any): AvmAppendLeavesHint {
|
|
539
|
+
if (obj instanceof AvmAppendLeavesHint) {
|
|
540
|
+
return obj;
|
|
541
|
+
}
|
|
542
|
+
return new AvmAppendLeavesHint(
|
|
543
|
+
AppendOnlyTreeSnapshot.fromPlainObject(obj.hintKey),
|
|
544
|
+
AppendOnlyTreeSnapshot.fromPlainObject(obj.stateAfter),
|
|
545
|
+
obj.treeId,
|
|
546
|
+
obj.leaves.map((l: any) => Fr.fromPlainObject(l)),
|
|
547
|
+
);
|
|
548
|
+
}
|
|
302
549
|
}
|
|
303
550
|
|
|
304
551
|
// Hint for checkpoint actions that don't change the state.
|
|
@@ -323,6 +570,20 @@ class AvmCheckpointActionNoStateChangeHint {
|
|
|
323
570
|
new this(actionCounter, oldCheckpointId, newCheckpointId),
|
|
324
571
|
);
|
|
325
572
|
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Creates an instance from a plain object without Zod validation.
|
|
576
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
577
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
578
|
+
* @param obj - Plain object containing hint fields
|
|
579
|
+
* @returns An instance
|
|
580
|
+
*/
|
|
581
|
+
static fromPlainObject(obj: any): any {
|
|
582
|
+
if (obj instanceof this) {
|
|
583
|
+
return obj;
|
|
584
|
+
}
|
|
585
|
+
return new this(obj.actionCounter, obj.oldCheckpointId, obj.newCheckpointId);
|
|
586
|
+
}
|
|
326
587
|
}
|
|
327
588
|
|
|
328
589
|
// Hint for MerkleTreeDB.createCheckpoint.
|
|
@@ -385,8 +646,32 @@ export class AvmRevertCheckpointHint {
|
|
|
385
646
|
new AvmRevertCheckpointHint(actionCounter, oldCheckpointId, newCheckpointId, stateBefore, stateAfter),
|
|
386
647
|
);
|
|
387
648
|
}
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Creates an AvmRevertCheckpointHint from a plain object without Zod validation.
|
|
652
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
653
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
654
|
+
* @param obj - Plain object containing AvmRevertCheckpointHint fields
|
|
655
|
+
* @returns An AvmRevertCheckpointHint instance
|
|
656
|
+
*/
|
|
657
|
+
static fromPlainObject(obj: any): AvmRevertCheckpointHint {
|
|
658
|
+
if (obj instanceof AvmRevertCheckpointHint) {
|
|
659
|
+
return obj;
|
|
660
|
+
}
|
|
661
|
+
return new AvmRevertCheckpointHint(
|
|
662
|
+
obj.actionCounter,
|
|
663
|
+
obj.oldCheckpointId,
|
|
664
|
+
obj.newCheckpointId,
|
|
665
|
+
TreeSnapshots.fromPlainObject(obj.stateBefore),
|
|
666
|
+
TreeSnapshots.fromPlainObject(obj.stateAfter),
|
|
667
|
+
);
|
|
668
|
+
}
|
|
388
669
|
}
|
|
389
670
|
|
|
671
|
+
export class AvmContractDbCreateCheckpointHint extends AvmCheckpointActionNoStateChangeHint {}
|
|
672
|
+
export class AvmContractDbCommitCheckpointHint extends AvmCheckpointActionNoStateChangeHint {}
|
|
673
|
+
export class AvmContractDbRevertCheckpointHint extends AvmCheckpointActionNoStateChangeHint {}
|
|
674
|
+
|
|
390
675
|
////////////////////////////////////////////////////////////////////////////
|
|
391
676
|
// Hints (other)
|
|
392
677
|
////////////////////////////////////////////////////////////////////////////
|
|
@@ -395,6 +680,8 @@ export class AvmTxHint {
|
|
|
395
680
|
public readonly hash: string,
|
|
396
681
|
public readonly gasSettings: GasSettings,
|
|
397
682
|
public readonly effectiveGasFees: GasFees,
|
|
683
|
+
public readonly nonRevertibleContractDeploymentData: ContractDeploymentData,
|
|
684
|
+
public readonly revertibleContractDeploymentData: ContractDeploymentData,
|
|
398
685
|
public readonly nonRevertibleAccumulatedData: {
|
|
399
686
|
noteHashes: Fr[];
|
|
400
687
|
nullifiers: Fr[];
|
|
@@ -420,6 +707,7 @@ export class AvmTxHint {
|
|
|
420
707
|
const teardownCallRequest = tx.getTeardownPublicCallRequestWithCalldata();
|
|
421
708
|
const gasSettings = tx.data.constants.txContext.gasSettings;
|
|
422
709
|
const effectiveGasFees = computeEffectiveGasFees(gasFees, gasSettings);
|
|
710
|
+
const allContractDeploymentData = AllContractDeploymentData.fromTx(tx);
|
|
423
711
|
|
|
424
712
|
// For informational purposes. Assumed quick because it should be cached.
|
|
425
713
|
const txHash = tx.getTxHash();
|
|
@@ -428,6 +716,8 @@ export class AvmTxHint {
|
|
|
428
716
|
txHash.hash.toString(),
|
|
429
717
|
gasSettings,
|
|
430
718
|
effectiveGasFees,
|
|
719
|
+
allContractDeploymentData.getNonRevertibleContractDeploymentData(),
|
|
720
|
+
allContractDeploymentData.getRevertibleContractDeploymentData(),
|
|
431
721
|
{
|
|
432
722
|
noteHashes: tx.data.forPublic!.nonRevertibleAccumulatedData.noteHashes.filter(x => !x.isZero()),
|
|
433
723
|
nullifiers: tx.data.forPublic!.nonRevertibleAccumulatedData.nullifiers.filter(x => !x.isZero()),
|
|
@@ -451,6 +741,8 @@ export class AvmTxHint {
|
|
|
451
741
|
'',
|
|
452
742
|
GasSettings.empty(),
|
|
453
743
|
GasFees.empty(),
|
|
744
|
+
ContractDeploymentData.empty(),
|
|
745
|
+
ContractDeploymentData.empty(),
|
|
454
746
|
{ noteHashes: [], nullifiers: [], l2ToL1Messages: [] },
|
|
455
747
|
{ noteHashes: [], nullifiers: [], l2ToL1Messages: [] },
|
|
456
748
|
[],
|
|
@@ -461,12 +753,53 @@ export class AvmTxHint {
|
|
|
461
753
|
);
|
|
462
754
|
}
|
|
463
755
|
|
|
756
|
+
/**
|
|
757
|
+
* Creates an AvmTxHint from a plain object without Zod validation.
|
|
758
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
759
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
760
|
+
* @param obj - Plain object containing AvmTxHint fields
|
|
761
|
+
* @returns An AvmTxHint instance
|
|
762
|
+
*/
|
|
763
|
+
static fromPlainObject(obj: any): AvmTxHint {
|
|
764
|
+
if (obj instanceof AvmTxHint) {
|
|
765
|
+
return obj;
|
|
766
|
+
}
|
|
767
|
+
return new AvmTxHint(
|
|
768
|
+
obj.hash,
|
|
769
|
+
GasSettings.fromPlainObject(obj.gasSettings),
|
|
770
|
+
GasFees.fromPlainObject(obj.effectiveGasFees),
|
|
771
|
+
ContractDeploymentData.fromPlainObject(obj.nonRevertibleContractDeploymentData),
|
|
772
|
+
ContractDeploymentData.fromPlainObject(obj.revertibleContractDeploymentData),
|
|
773
|
+
{
|
|
774
|
+
noteHashes: obj.nonRevertibleAccumulatedData.noteHashes.map((h: any) => Fr.fromPlainObject(h)),
|
|
775
|
+
nullifiers: obj.nonRevertibleAccumulatedData.nullifiers.map((n: any) => Fr.fromPlainObject(n)),
|
|
776
|
+
l2ToL1Messages: obj.nonRevertibleAccumulatedData.l2ToL1Messages.map((m: any) =>
|
|
777
|
+
ScopedL2ToL1Message.fromPlainObject(m),
|
|
778
|
+
),
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
noteHashes: obj.revertibleAccumulatedData.noteHashes.map((h: any) => Fr.fromPlainObject(h)),
|
|
782
|
+
nullifiers: obj.revertibleAccumulatedData.nullifiers.map((n: any) => Fr.fromPlainObject(n)),
|
|
783
|
+
l2ToL1Messages: obj.revertibleAccumulatedData.l2ToL1Messages.map((m: any) =>
|
|
784
|
+
ScopedL2ToL1Message.fromPlainObject(m),
|
|
785
|
+
),
|
|
786
|
+
},
|
|
787
|
+
obj.setupEnqueuedCalls.map((c: any) => PublicCallRequestWithCalldata.fromPlainObject(c)),
|
|
788
|
+
obj.appLogicEnqueuedCalls.map((c: any) => PublicCallRequestWithCalldata.fromPlainObject(c)),
|
|
789
|
+
obj.teardownEnqueuedCall ? PublicCallRequestWithCalldata.fromPlainObject(obj.teardownEnqueuedCall) : null,
|
|
790
|
+
Gas.fromPlainObject(obj.gasUsedByPrivate),
|
|
791
|
+
AztecAddress.fromPlainObject(obj.feePayer),
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
|
|
464
795
|
static get schema() {
|
|
465
796
|
return z
|
|
466
797
|
.object({
|
|
467
798
|
hash: z.string(),
|
|
468
799
|
gasSettings: GasSettings.schema,
|
|
469
800
|
effectiveGasFees: GasFees.schema,
|
|
801
|
+
nonRevertibleContractDeploymentData: ContractDeploymentData.schema,
|
|
802
|
+
revertibleContractDeploymentData: ContractDeploymentData.schema,
|
|
470
803
|
nonRevertibleAccumulatedData: z.object({
|
|
471
804
|
noteHashes: schemas.Fr.array(),
|
|
472
805
|
nullifiers: schemas.Fr.array(),
|
|
@@ -488,6 +821,8 @@ export class AvmTxHint {
|
|
|
488
821
|
hash,
|
|
489
822
|
gasSettings,
|
|
490
823
|
effectiveGasFees,
|
|
824
|
+
nonRevertibleContractDeploymentData,
|
|
825
|
+
revertibleContractDeploymentData,
|
|
491
826
|
nonRevertibleAccumulatedData,
|
|
492
827
|
revertibleAccumulatedData,
|
|
493
828
|
setupEnqueuedCalls,
|
|
@@ -500,6 +835,8 @@ export class AvmTxHint {
|
|
|
500
835
|
hash,
|
|
501
836
|
gasSettings,
|
|
502
837
|
effectiveGasFees,
|
|
838
|
+
nonRevertibleContractDeploymentData,
|
|
839
|
+
revertibleContractDeploymentData,
|
|
503
840
|
nonRevertibleAccumulatedData,
|
|
504
841
|
revertibleAccumulatedData,
|
|
505
842
|
setupEnqueuedCalls,
|
|
@@ -522,6 +859,10 @@ export class AvmExecutionHints {
|
|
|
522
859
|
public readonly contractInstances: AvmContractInstanceHint[] = [],
|
|
523
860
|
public readonly contractClasses: AvmContractClassHint[] = [],
|
|
524
861
|
public readonly bytecodeCommitments: AvmBytecodeCommitmentHint[] = [],
|
|
862
|
+
public readonly debugFunctionNames: AvmDebugFunctionNameHint[] = [],
|
|
863
|
+
public readonly contractDbCreateCheckpointHints: AvmContractDbCreateCheckpointHint[] = [],
|
|
864
|
+
public readonly contractDbCommitCheckpointHints: AvmContractDbCommitCheckpointHint[] = [],
|
|
865
|
+
public readonly contractDbRevertCheckpointHints: AvmContractDbRevertCheckpointHint[] = [],
|
|
525
866
|
// Merkle DB hints.
|
|
526
867
|
public startingTreeRoots: TreeSnapshots = TreeSnapshots.empty(),
|
|
527
868
|
public readonly getSiblingPathHints: AvmGetSiblingPathHint[] = [],
|
|
@@ -537,6 +878,50 @@ export class AvmExecutionHints {
|
|
|
537
878
|
public readonly revertCheckpointHints: AvmRevertCheckpointHint[] = [],
|
|
538
879
|
) {}
|
|
539
880
|
|
|
881
|
+
/**
|
|
882
|
+
* Creates an AvmExecutionHints from a plain object without Zod validation.
|
|
883
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
884
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
885
|
+
* @param obj - Plain object containing AvmExecutionHints fields
|
|
886
|
+
* @returns An AvmExecutionHints instance
|
|
887
|
+
*/
|
|
888
|
+
static fromPlainObject(obj: any): AvmExecutionHints {
|
|
889
|
+
if (obj instanceof AvmExecutionHints) {
|
|
890
|
+
return obj;
|
|
891
|
+
}
|
|
892
|
+
return new AvmExecutionHints(
|
|
893
|
+
GlobalVariables.fromPlainObject(obj.globalVariables),
|
|
894
|
+
AvmTxHint.fromPlainObject(obj.tx),
|
|
895
|
+
ProtocolContracts.fromPlainObject(obj.protocolContracts),
|
|
896
|
+
obj.contractInstances?.map((i: any) => AvmContractInstanceHint.fromPlainObject(i)) || [],
|
|
897
|
+
obj.contractClasses?.map((c: any) => AvmContractClassHint.fromPlainObject(c)) || [],
|
|
898
|
+
obj.bytecodeCommitments?.map((b: any) => AvmBytecodeCommitmentHint.fromPlainObject(b)) || [],
|
|
899
|
+
obj.debugFunctionNames?.map((d: any) => AvmDebugFunctionNameHint.fromPlainObject(d)) || [],
|
|
900
|
+
obj.contractDbCreateCheckpointHints?.map((h: any) => AvmContractDbCreateCheckpointHint.fromPlainObject(h)) || [],
|
|
901
|
+
obj.contractDbCommitCheckpointHints?.map((h: any) => AvmContractDbCommitCheckpointHint.fromPlainObject(h)) || [],
|
|
902
|
+
obj.contractDbRevertCheckpointHints?.map((h: any) => AvmContractDbRevertCheckpointHint.fromPlainObject(h)) || [],
|
|
903
|
+
obj.startingTreeRoots ? TreeSnapshots.fromPlainObject(obj.startingTreeRoots) : TreeSnapshots.empty(),
|
|
904
|
+
obj.getSiblingPathHints?.map((h: any) => AvmGetSiblingPathHint.fromPlainObject(h)) || [],
|
|
905
|
+
obj.getPreviousValueIndexHints?.map((h: any) => AvmGetPreviousValueIndexHint.fromPlainObject(h)) || [],
|
|
906
|
+
obj.getLeafPreimageHintsPublicDataTree?.map((h: any) =>
|
|
907
|
+
AvmGetLeafPreimageHintPublicDataTree.fromPlainObject(h),
|
|
908
|
+
) || [],
|
|
909
|
+
obj.getLeafPreimageHintsNullifierTree?.map((h: any) => AvmGetLeafPreimageHintNullifierTree.fromPlainObject(h)) ||
|
|
910
|
+
[],
|
|
911
|
+
obj.getLeafValueHints?.map((h: any) => AvmGetLeafValueHint.fromPlainObject(h)) || [],
|
|
912
|
+
obj.sequentialInsertHintsPublicDataTree?.map((h: any) =>
|
|
913
|
+
AvmSequentialInsertHintPublicDataTree.fromPlainObject(h),
|
|
914
|
+
) || [],
|
|
915
|
+
obj.sequentialInsertHintsNullifierTree?.map((h: any) =>
|
|
916
|
+
AvmSequentialInsertHintNullifierTree.fromPlainObject(h),
|
|
917
|
+
) || [],
|
|
918
|
+
obj.appendLeavesHints?.map((h: any) => AvmAppendLeavesHint.fromPlainObject(h)) || [],
|
|
919
|
+
obj.createCheckpointHints?.map((h: any) => AvmCreateCheckpointHint.fromPlainObject(h)) || [],
|
|
920
|
+
obj.commitCheckpointHints?.map((h: any) => AvmCommitCheckpointHint.fromPlainObject(h)) || [],
|
|
921
|
+
obj.revertCheckpointHints?.map((h: any) => AvmRevertCheckpointHint.fromPlainObject(h)) || [],
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
|
|
540
925
|
static empty() {
|
|
541
926
|
return new AvmExecutionHints(GlobalVariables.empty(), AvmTxHint.empty(), ProtocolContracts.empty());
|
|
542
927
|
}
|
|
@@ -550,6 +935,10 @@ export class AvmExecutionHints {
|
|
|
550
935
|
contractInstances: AvmContractInstanceHint.schema.array(),
|
|
551
936
|
contractClasses: AvmContractClassHint.schema.array(),
|
|
552
937
|
bytecodeCommitments: AvmBytecodeCommitmentHint.schema.array(),
|
|
938
|
+
debugFunctionNames: AvmDebugFunctionNameHint.schema.array(),
|
|
939
|
+
contractDbCreateCheckpointHints: AvmContractDbCreateCheckpointHint.schema.array(),
|
|
940
|
+
contractDbCommitCheckpointHints: AvmContractDbCommitCheckpointHint.schema.array(),
|
|
941
|
+
contractDbRevertCheckpointHints: AvmContractDbRevertCheckpointHint.schema.array(),
|
|
553
942
|
startingTreeRoots: TreeSnapshots.schema,
|
|
554
943
|
getSiblingPathHints: AvmGetSiblingPathHint.schema.array(),
|
|
555
944
|
getPreviousValueIndexHints: AvmGetPreviousValueIndexHint.schema.array(),
|
|
@@ -571,6 +960,10 @@ export class AvmExecutionHints {
|
|
|
571
960
|
contractInstances,
|
|
572
961
|
contractClasses,
|
|
573
962
|
bytecodeCommitments,
|
|
963
|
+
debugFunctionNames,
|
|
964
|
+
contractDbCreateCheckpointHints,
|
|
965
|
+
contractDbCommitCheckpointHints,
|
|
966
|
+
contractDbRevertCheckpointHints,
|
|
574
967
|
startingTreeRoots,
|
|
575
968
|
getSiblingPathHints,
|
|
576
969
|
getPreviousValueIndexHints,
|
|
@@ -591,6 +984,10 @@ export class AvmExecutionHints {
|
|
|
591
984
|
contractInstances,
|
|
592
985
|
contractClasses,
|
|
593
986
|
bytecodeCommitments,
|
|
987
|
+
debugFunctionNames,
|
|
988
|
+
contractDbCreateCheckpointHints,
|
|
989
|
+
contractDbCommitCheckpointHints,
|
|
990
|
+
contractDbRevertCheckpointHints,
|
|
594
991
|
startingTreeRoots,
|
|
595
992
|
getSiblingPathHints,
|
|
596
993
|
getPreviousValueIndexHints,
|
|
@@ -618,6 +1015,13 @@ export class AvmCircuitInputs {
|
|
|
618
1015
|
return new AvmCircuitInputs(AvmExecutionHints.empty(), AvmCircuitPublicInputs.empty());
|
|
619
1016
|
}
|
|
620
1017
|
|
|
1018
|
+
static fromPlainObject(obj: any): AvmCircuitInputs {
|
|
1019
|
+
return new AvmCircuitInputs(
|
|
1020
|
+
AvmExecutionHints.fromPlainObject(obj.hints),
|
|
1021
|
+
AvmCircuitPublicInputs.fromPlainObject(obj.publicInputs),
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
1024
|
+
|
|
621
1025
|
static get schema() {
|
|
622
1026
|
return z
|
|
623
1027
|
.object({
|
|
@@ -639,3 +1043,370 @@ export class AvmCircuitInputs {
|
|
|
639
1043
|
return jsonParseWithSchema(buf.toString(), this.schema);
|
|
640
1044
|
}
|
|
641
1045
|
}
|
|
1046
|
+
|
|
1047
|
+
// Metadata about a given (enqueued or external) call.
|
|
1048
|
+
export class CallStackMetadata {
|
|
1049
|
+
constructor(
|
|
1050
|
+
public phase: TxExecutionPhase,
|
|
1051
|
+
public contractAddress: Fr,
|
|
1052
|
+
public callerPc: number,
|
|
1053
|
+
public calldata: Fr[],
|
|
1054
|
+
public isStaticCall: boolean,
|
|
1055
|
+
public gasLimit: Gas,
|
|
1056
|
+
public output: Fr[], // returndata or revertdata.
|
|
1057
|
+
public internalCallStackAtExit: number[], // At return/revert time. Last one is exit PC.
|
|
1058
|
+
public haltingMessage: string | undefined,
|
|
1059
|
+
public reverted: boolean,
|
|
1060
|
+
public nested: CallStackMetadata[],
|
|
1061
|
+
public numNestedCalls: number, // This will be different from the size of the nested vector if we went past some limit.
|
|
1062
|
+
) {}
|
|
1063
|
+
|
|
1064
|
+
static get schema(): ZodFor<CallStackMetadata> {
|
|
1065
|
+
return z
|
|
1066
|
+
.object({
|
|
1067
|
+
phase: z.nativeEnum(TxExecutionPhase),
|
|
1068
|
+
contractAddress: Fr.schema,
|
|
1069
|
+
callerPc: z.number(),
|
|
1070
|
+
calldata: Fr.schema.array(),
|
|
1071
|
+
isStaticCall: z.boolean(),
|
|
1072
|
+
gasLimit: Gas.schema,
|
|
1073
|
+
output: Fr.schema.array(),
|
|
1074
|
+
internalCallStackAtExit: z.number().array(),
|
|
1075
|
+
haltingMessage: NullishToUndefined(z.string()),
|
|
1076
|
+
reverted: z.boolean(),
|
|
1077
|
+
nested: CallStackMetadata.schema.array(),
|
|
1078
|
+
numNestedCalls: z.number(),
|
|
1079
|
+
})
|
|
1080
|
+
.transform(
|
|
1081
|
+
({
|
|
1082
|
+
phase,
|
|
1083
|
+
contractAddress,
|
|
1084
|
+
callerPc,
|
|
1085
|
+
calldata,
|
|
1086
|
+
isStaticCall,
|
|
1087
|
+
gasLimit,
|
|
1088
|
+
output,
|
|
1089
|
+
internalCallStackAtExit,
|
|
1090
|
+
haltingMessage,
|
|
1091
|
+
reverted,
|
|
1092
|
+
nested,
|
|
1093
|
+
numNestedCalls,
|
|
1094
|
+
}) =>
|
|
1095
|
+
new CallStackMetadata(
|
|
1096
|
+
phase,
|
|
1097
|
+
contractAddress,
|
|
1098
|
+
callerPc,
|
|
1099
|
+
calldata,
|
|
1100
|
+
isStaticCall,
|
|
1101
|
+
gasLimit,
|
|
1102
|
+
output,
|
|
1103
|
+
internalCallStackAtExit,
|
|
1104
|
+
haltingMessage,
|
|
1105
|
+
reverted,
|
|
1106
|
+
nested,
|
|
1107
|
+
numNestedCalls,
|
|
1108
|
+
),
|
|
1109
|
+
);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Creates a CallStackMetadata from a plain object without Zod validation.
|
|
1114
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
1115
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
1116
|
+
* @param obj - Plain object containing CallStackMetadata fields
|
|
1117
|
+
* @returns A CallStackMetadata instance
|
|
1118
|
+
*/
|
|
1119
|
+
static fromPlainObject(obj: any): CallStackMetadata {
|
|
1120
|
+
if (obj instanceof CallStackMetadata) {
|
|
1121
|
+
return obj;
|
|
1122
|
+
}
|
|
1123
|
+
return new CallStackMetadata(
|
|
1124
|
+
obj.phase,
|
|
1125
|
+
Fr.fromPlainObject(obj.contractAddress),
|
|
1126
|
+
obj.callerPc,
|
|
1127
|
+
obj.calldata.map((f: any) => Fr.fromPlainObject(f)),
|
|
1128
|
+
obj.isStaticCall,
|
|
1129
|
+
Gas.fromPlainObject(obj.gasLimit),
|
|
1130
|
+
obj.output.map((f: any) => Fr.fromPlainObject(f)),
|
|
1131
|
+
obj.internalCallStackAtExit.map((p: any) => Number(p)),
|
|
1132
|
+
obj.haltingMessage,
|
|
1133
|
+
obj.reverted,
|
|
1134
|
+
obj.nested.map((n: any) => CallStackMetadata.fromPlainObject(n)),
|
|
1135
|
+
obj.numNestedCalls,
|
|
1136
|
+
);
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
public getRevertReason(): SimulationError | undefined {
|
|
1140
|
+
const failingCall = this.findDeepestRevert([this]);
|
|
1141
|
+
|
|
1142
|
+
if (!failingCall) {
|
|
1143
|
+
return undefined;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
const { stack, leaf } = failingCall;
|
|
1147
|
+
const aztecCallStack = stack.map(call => ({
|
|
1148
|
+
contractAddress: AztecAddress.fromField(call.contractAddress),
|
|
1149
|
+
functionSelector: call.calldata.length > 0 ? FunctionSelector.fromField(call.calldata[0]) : undefined,
|
|
1150
|
+
}));
|
|
1151
|
+
|
|
1152
|
+
// The Noir call stack is the internal call stack at exit of the failing call
|
|
1153
|
+
const noirCallStack = leaf.internalCallStackAtExit.map(pc => `0.${pc}`);
|
|
1154
|
+
|
|
1155
|
+
return new SimulationError(
|
|
1156
|
+
leaf.haltingMessage ?? 'Transaction reverted',
|
|
1157
|
+
aztecCallStack,
|
|
1158
|
+
leaf.output,
|
|
1159
|
+
noirCallStack,
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
private findDeepestRevert(
|
|
1164
|
+
calls: CallStackMetadata[],
|
|
1165
|
+
parentStack: CallStackMetadata[] = [],
|
|
1166
|
+
): { stack: CallStackMetadata[]; leaf: CallStackMetadata } | undefined {
|
|
1167
|
+
for (const call of calls) {
|
|
1168
|
+
if (call.reverted) {
|
|
1169
|
+
const nested = this.findDeepestRevert(call.nested, [...parentStack, call]);
|
|
1170
|
+
return nested || { stack: [...parentStack, call], leaf: call };
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
return undefined;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
export class PublicTxResult {
|
|
1178
|
+
constructor(
|
|
1179
|
+
// Simulation result.
|
|
1180
|
+
public gasUsed: GasUsed,
|
|
1181
|
+
public revertCode: RevertCode,
|
|
1182
|
+
// These are only guaranteed to be present if the simulator is configured to collect them.
|
|
1183
|
+
// TODO(fcarreiro): Remove NestedProcessReturnValues[] once we migrate to the C++ simulator.
|
|
1184
|
+
public callStackMetadata:
|
|
1185
|
+
| CallStackMetadata[] // One per enqueued call. All phases.
|
|
1186
|
+
| NestedProcessReturnValues[], // One per enqueued call. App logic only.
|
|
1187
|
+
public logs: DebugLog[] | undefined,
|
|
1188
|
+
// For the proving request.
|
|
1189
|
+
public hints: AvmExecutionHints | undefined,
|
|
1190
|
+
public publicInputs: AvmCircuitPublicInputs,
|
|
1191
|
+
) {}
|
|
1192
|
+
|
|
1193
|
+
static empty() {
|
|
1194
|
+
return new PublicTxResult(
|
|
1195
|
+
{
|
|
1196
|
+
totalGas: Gas.empty(),
|
|
1197
|
+
teardownGas: Gas.empty(),
|
|
1198
|
+
publicGas: Gas.empty(),
|
|
1199
|
+
billedGas: Gas.empty(),
|
|
1200
|
+
},
|
|
1201
|
+
RevertCode.OK,
|
|
1202
|
+
/*callStackMetadata=*/ [] as CallStackMetadata[],
|
|
1203
|
+
/*logs=*/ [],
|
|
1204
|
+
/*hints=*/ AvmExecutionHints.empty(),
|
|
1205
|
+
/*publicInputs=*/ AvmCircuitPublicInputs.empty(),
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
static get schema(): ZodFor<PublicTxResult> {
|
|
1210
|
+
return z
|
|
1211
|
+
.object({
|
|
1212
|
+
gasUsed: schemas.GasUsed,
|
|
1213
|
+
revertCode: RevertCode.schema,
|
|
1214
|
+
revertReason: NullishToUndefined(SimulationError.schema),
|
|
1215
|
+
callStackMetadata: z.union([CallStackMetadata.schema.array(), NestedProcessReturnValues.schema.array()]),
|
|
1216
|
+
logs: NullishToUndefined(DebugLog.schema.array()),
|
|
1217
|
+
// For the proving request.
|
|
1218
|
+
publicInputs: AvmCircuitPublicInputs.schema,
|
|
1219
|
+
hints: NullishToUndefined(AvmExecutionHints.schema),
|
|
1220
|
+
})
|
|
1221
|
+
.transform(
|
|
1222
|
+
({ gasUsed, revertCode, callStackMetadata, logs, hints, publicInputs }) =>
|
|
1223
|
+
new PublicTxResult(gasUsed, revertCode as RevertCode, callStackMetadata, logs, hints, publicInputs),
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Creates a PublicTxResult from a plain object without Zod validation.
|
|
1229
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
1230
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
1231
|
+
* @param obj - Plain object containing PublicTxResult fields
|
|
1232
|
+
* @returns A PublicTxResult instance
|
|
1233
|
+
*/
|
|
1234
|
+
static fromPlainObject(obj: any): PublicTxResult {
|
|
1235
|
+
return new PublicTxResult(
|
|
1236
|
+
GasUsed.fromPlainObject(obj.gasUsed),
|
|
1237
|
+
RevertCode.fromPlainObject(obj.revertCode),
|
|
1238
|
+
obj.callStackMetadata.map(CallStackMetadata.fromPlainObject), // Always CallStackMetadata[] from MessagePack.
|
|
1239
|
+
obj.logs?.map(DebugLog.fromPlainObject),
|
|
1240
|
+
obj.hints ? AvmExecutionHints.fromPlainObject(obj.hints) : undefined,
|
|
1241
|
+
AvmCircuitPublicInputs.fromPlainObject(obj.publicInputs),
|
|
1242
|
+
);
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/** Returns one level of return values for the app logic phase, one per enqueued call. */
|
|
1246
|
+
public getAppLogicReturnValues(): NestedProcessReturnValues[] {
|
|
1247
|
+
if (this.callStackMetadata.every(metadata => metadata instanceof CallStackMetadata)) {
|
|
1248
|
+
return this.callStackMetadata
|
|
1249
|
+
.filter(metadata => metadata.phase === TxExecutionPhase.APP_LOGIC)
|
|
1250
|
+
.map(metadata => new NestedProcessReturnValues(metadata.output));
|
|
1251
|
+
} else {
|
|
1252
|
+
return (this.callStackMetadata as NestedProcessReturnValues[]).map(
|
|
1253
|
+
metadata => new NestedProcessReturnValues(metadata.values, metadata.nested),
|
|
1254
|
+
);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
public findRevertReason(): SimulationError | undefined {
|
|
1259
|
+
if (this.revertCode.isOK()) {
|
|
1260
|
+
return undefined;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
const callStackMetadata = this.callStackMetadata;
|
|
1264
|
+
// TODO(fcarreiro): Remove this after migration to the C++ simulator.
|
|
1265
|
+
// If the "stack" comes from TS, it will have this field.
|
|
1266
|
+
if ((callStackMetadata as any).revertReason !== undefined) {
|
|
1267
|
+
return (callStackMetadata as any).revertReason;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
// Handle CallStackMetadata[].
|
|
1271
|
+
let revertReason: SimulationError | undefined = undefined;
|
|
1272
|
+
for (const call of callStackMetadata) {
|
|
1273
|
+
revertReason = (call as CallStackMetadata).getRevertReason();
|
|
1274
|
+
if (revertReason) {
|
|
1275
|
+
break;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
return revertReason;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
export class CollectionLimitsConfig {
|
|
1283
|
+
constructor(
|
|
1284
|
+
public readonly maxDebugLogMemoryReads: number,
|
|
1285
|
+
public readonly maxCalldataSizeInFields: number,
|
|
1286
|
+
public readonly maxReturndataSizeInFields: number,
|
|
1287
|
+
public readonly maxCallStackDepth: number,
|
|
1288
|
+
public readonly maxCallStackItems: number,
|
|
1289
|
+
) {}
|
|
1290
|
+
|
|
1291
|
+
static from(obj: Partial<CollectionLimitsConfig>): CollectionLimitsConfig {
|
|
1292
|
+
return new CollectionLimitsConfig(
|
|
1293
|
+
obj.maxDebugLogMemoryReads ?? DEFAULT_MAX_DEBUG_LOG_MEMORY_READS,
|
|
1294
|
+
obj.maxCalldataSizeInFields ?? 300,
|
|
1295
|
+
obj.maxReturndataSizeInFields ?? 300,
|
|
1296
|
+
obj.maxCallStackDepth ?? 5,
|
|
1297
|
+
obj.maxCallStackItems ?? 100,
|
|
1298
|
+
);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
static empty() {
|
|
1302
|
+
return CollectionLimitsConfig.from({});
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
static get schema() {
|
|
1306
|
+
return z
|
|
1307
|
+
.object({
|
|
1308
|
+
maxDebugLogMemoryReads: z.number(),
|
|
1309
|
+
maxCalldataSizeInFields: z.number(),
|
|
1310
|
+
maxReturndataSizeInFields: z.number(),
|
|
1311
|
+
maxCallStackDepth: z.number(),
|
|
1312
|
+
maxCallStackItems: z.number(),
|
|
1313
|
+
})
|
|
1314
|
+
.transform(
|
|
1315
|
+
({
|
|
1316
|
+
maxDebugLogMemoryReads,
|
|
1317
|
+
maxCalldataSizeInFields,
|
|
1318
|
+
maxReturndataSizeInFields,
|
|
1319
|
+
maxCallStackDepth,
|
|
1320
|
+
maxCallStackItems,
|
|
1321
|
+
}) =>
|
|
1322
|
+
new CollectionLimitsConfig(
|
|
1323
|
+
maxDebugLogMemoryReads,
|
|
1324
|
+
maxCalldataSizeInFields,
|
|
1325
|
+
maxReturndataSizeInFields,
|
|
1326
|
+
maxCallStackDepth,
|
|
1327
|
+
maxCallStackItems,
|
|
1328
|
+
),
|
|
1329
|
+
);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
export class PublicSimulatorConfig {
|
|
1334
|
+
constructor(
|
|
1335
|
+
public readonly proverId: Fr,
|
|
1336
|
+
public readonly skipFeeEnforcement: boolean,
|
|
1337
|
+
public readonly collectCallMetadata: boolean, // appLogicReturnValues.
|
|
1338
|
+
public readonly collectHints: boolean, // hints.
|
|
1339
|
+
public readonly collectDebugLogs: boolean, // logs.
|
|
1340
|
+
public readonly collectStatistics: boolean, // timings etc.
|
|
1341
|
+
public readonly collectionLimits: CollectionLimitsConfig,
|
|
1342
|
+
) {}
|
|
1343
|
+
|
|
1344
|
+
static from(obj: Partial<PublicSimulatorConfig>): PublicSimulatorConfig {
|
|
1345
|
+
return new PublicSimulatorConfig(
|
|
1346
|
+
obj.proverId ?? Fr.ZERO,
|
|
1347
|
+
obj.skipFeeEnforcement ?? false,
|
|
1348
|
+
obj.collectCallMetadata ?? false,
|
|
1349
|
+
obj.collectHints ?? false,
|
|
1350
|
+
obj.collectDebugLogs ?? false,
|
|
1351
|
+
obj.collectStatistics ?? false,
|
|
1352
|
+
obj.collectionLimits ?? CollectionLimitsConfig.empty(),
|
|
1353
|
+
);
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
static empty() {
|
|
1357
|
+
return PublicSimulatorConfig.from({});
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
static get schema() {
|
|
1361
|
+
return z
|
|
1362
|
+
.object({
|
|
1363
|
+
proverId: Fr.schema,
|
|
1364
|
+
skipFeeEnforcement: z.boolean(),
|
|
1365
|
+
collectCallMetadata: z.boolean(),
|
|
1366
|
+
collectHints: z.boolean(),
|
|
1367
|
+
collectDebugLogs: z.boolean(),
|
|
1368
|
+
collectStatistics: z.boolean(),
|
|
1369
|
+
collectionLimits: CollectionLimitsConfig.schema,
|
|
1370
|
+
})
|
|
1371
|
+
.transform(PublicSimulatorConfig.from);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
export class AvmFastSimulationInputs {
|
|
1376
|
+
constructor(
|
|
1377
|
+
public readonly wsRevision: WorldStateRevision,
|
|
1378
|
+
public readonly config: PublicSimulatorConfig,
|
|
1379
|
+
public tx: AvmTxHint,
|
|
1380
|
+
public globalVariables: GlobalVariables,
|
|
1381
|
+
public protocolContracts: ProtocolContracts,
|
|
1382
|
+
) {}
|
|
1383
|
+
|
|
1384
|
+
static empty() {
|
|
1385
|
+
return new AvmFastSimulationInputs(
|
|
1386
|
+
WorldStateRevision.empty(),
|
|
1387
|
+
PublicSimulatorConfig.empty(),
|
|
1388
|
+
AvmTxHint.empty(),
|
|
1389
|
+
GlobalVariables.empty(),
|
|
1390
|
+
ProtocolContracts.empty(),
|
|
1391
|
+
);
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
static get schema() {
|
|
1395
|
+
return z
|
|
1396
|
+
.object({
|
|
1397
|
+
wsRevision: WorldStateRevision.schema,
|
|
1398
|
+
config: PublicSimulatorConfig.schema,
|
|
1399
|
+
tx: AvmTxHint.schema,
|
|
1400
|
+
globalVariables: GlobalVariables.schema,
|
|
1401
|
+
protocolContracts: ProtocolContracts.schema,
|
|
1402
|
+
})
|
|
1403
|
+
.transform(
|
|
1404
|
+
({ wsRevision, config, tx, globalVariables, protocolContracts }) =>
|
|
1405
|
+
new AvmFastSimulationInputs(wsRevision, config, tx, globalVariables, protocolContracts),
|
|
1406
|
+
);
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
public serializeWithMessagePack(): Buffer {
|
|
1410
|
+
return serializeWithMessagePack(this);
|
|
1411
|
+
}
|
|
1412
|
+
}
|