@aztec/stdlib 0.0.1-commit.993d240 → 0.0.1-commit.9a89641
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 +32 -7
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +11 -2
- 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 +1 -1
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +35 -19
- package/dest/abi/decoder.d.ts +12 -5
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +18 -21
- package/dest/abi/function_call.d.ts +17 -8
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_call.js +28 -9
- package/dest/avm/avm.d.ts +212 -211
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +4 -2
- package/dest/avm/index.d.ts +1 -6
- package/dest/avm/index.d.ts.map +1 -1
- package/dest/avm/index.js +0 -5
- 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 +57 -28
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +20 -2
- 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 +83 -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 +24 -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 +175 -151
- 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 +301 -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 -2
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -1
- 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/node-rpc-config.d.ts +1 -1
- package/dest/config/node-rpc-config.d.ts.map +1 -1
- package/dest/config/node-rpc-config.js +1 -1
- 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/artifact_hash.d.ts +2 -2
- package/dest/contract/artifact_hash.d.ts.map +1 -1
- package/dest/contract/artifact_hash.js +10 -2
- package/dest/contract/contract_address.d.ts +5 -4
- package/dest/contract/contract_address.d.ts.map +1 -1
- package/dest/contract/contract_class.d.ts +1 -1
- package/dest/contract/contract_class.d.ts.map +1 -1
- package/dest/contract/contract_class.js +3 -2
- 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/index.d.ts +1 -2
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +0 -1
- 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/api_limit.d.ts +6 -1
- package/dest/interfaces/api_limit.d.ts.map +1 -1
- package/dest/interfaces/api_limit.js +3 -0
- package/dest/interfaces/archiver.d.ts +12 -7
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +13 -6
- package/dest/interfaces/aztec-node-admin.d.ts +25 -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 +100 -33
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +72 -23
- package/dest/interfaces/block-builder.d.ts +9 -2
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block_response.d.ts +5 -5
- package/dest/interfaces/block_response.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/checkpoint_response.d.ts +5 -5
- package/dest/interfaces/checkpoint_response.d.ts.map +1 -1
- package/dest/interfaces/client.d.ts +2 -1
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/configs.d.ts +33 -6
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +6 -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 +8 -3
- 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 +71 -12
- 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-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 +17 -4
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +13 -4
- package/dest/interfaces/server.d.ts +1 -3
- package/dest/interfaces/server.d.ts.map +1 -1
- package/dest/interfaces/server.js +0 -2
- package/dest/interfaces/server_circuit_prover.d.ts +3 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/tx_provider.d.ts +5 -1
- package/dest/interfaces/tx_provider.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 +1 -2
- package/dest/kernel/hints/index.d.ts.map +1 -1
- package/dest/kernel/hints/index.js +0 -1
- package/dest/kernel/hints/read_request.js +1 -1
- package/dest/kernel/index.d.ts +6 -2
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +5 -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 -9
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +10 -7
- 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_4_circuit_private_inputs.d.ts +24 -0
- package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_init_4_circuit_private_inputs.js +37 -0
- package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts +25 -0
- package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_init_5_circuit_private_inputs.js +39 -0
- 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_inner_4_circuit_private_inputs.d.ts +18 -0
- package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.js +27 -0
- package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts +19 -0
- package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.js +29 -0
- package/dest/kernel/private_kernel_prover_output.d.ts +4 -1
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_prover_output.js +4 -1
- 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 +1 -7
- package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_simulated_output.js +2 -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_log_data.js +1 -1
- package/dest/kernel/utils/index.d.ts +1 -2
- package/dest/kernel/utils/index.d.ts.map +1 -1
- package/dest/kernel/utils/index.js +0 -1
- 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.d.ts +2 -1
- package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -1
- package/dest/logs/app_tagging_secret_kind.js +13 -0
- 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/log_result.d.ts +3 -3
- package/dest/logs/log_result.d.ts.map +1 -1
- package/dest/logs/logs_query.d.ts +2 -2
- package/dest/logs/message_context.d.ts +4 -13
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/message_context.js +1 -62
- package/dest/logs/pending_tagged_log.d.ts +6 -8
- package/dest/logs/pending_tagged_log.d.ts.map +1 -1
- package/dest/logs/pending_tagged_log.js +1 -31
- package/dest/logs/shared_secret_derivation.d.ts +29 -6
- package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
- package/dest/logs/shared_secret_derivation.js +44 -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/messaging/l2_to_l1_membership.d.ts +11 -4
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +22 -7
- package/dest/noir/index.d.ts +3 -3
- package/dest/noir/index.d.ts.map +1 -1
- 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 +1 -2
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +0 -1
- 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 +1 -27
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +10 -45
- 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 -87
- package/dest/timetable/index.d.ts.map +1 -1
- package/dest/timetable/index.js +4 -243
- 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/hashed_values.d.ts +7 -1
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/hashed_values.js +9 -1
- package/dest/tx/index.d.ts +1 -2
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +0 -1
- package/dest/tx/indexed_tx_effect.d.ts +5 -2
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +8 -4
- package/dest/tx/offchain_effect.js +1 -1
- 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/profiling.d.ts +1 -1
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +2 -0
- package/dest/tx/simulated_tx.d.ts +10 -6
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +7 -2
- package/dest/tx/tx.d.ts +23 -1
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +32 -3
- package/dest/tx/tx_receipt.d.ts +143 -60
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +141 -45
- 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/validators/errors.d.ts +16 -1
- package/dest/validators/errors.d.ts.map +1 -1
- package/dest/validators/errors.js +12 -0
- 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 +1 -18
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +0 -20
- package/package.json +8 -8
- package/src/abi/abi.ts +32 -4
- package/src/abi/buffer.ts +13 -1
- package/src/abi/contract_artifact.ts +40 -16
- package/src/abi/decoder.ts +20 -24
- package/src/abi/function_call.ts +19 -7
- package/src/avm/avm.ts +5 -2
- package/src/avm/index.ts +0 -5
- package/src/aztec-address/index.ts +36 -6
- package/src/block/attestation_info.ts +7 -2
- package/src/block/l2_block_source.ts +95 -19
- 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 +98 -10
- package/src/block/l2_block_stream/l2_block_stream.ts +255 -177
- 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 +275 -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 -1
- package/src/config/network-consensus-config.ts +291 -0
- package/src/config/node-rpc-config.ts +2 -1
- package/src/config/sequencer-config.ts +36 -5
- package/src/contract/artifact_hash.ts +15 -3
- package/src/contract/contract_address.ts +4 -3
- package/src/contract/contract_class.ts +3 -2
- package/src/contract/contract_instance.ts +62 -1
- package/src/contract/index.ts +0 -1
- 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 +199 -35
- 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/api_limit.ts +5 -0
- package/src/interfaces/archiver.ts +22 -9
- package/src/interfaces/aztec-node-admin.ts +1 -1
- package/src/interfaces/aztec-node-debug.ts +54 -2
- package/src/interfaces/aztec-node.ts +175 -49
- package/src/interfaces/block-builder.ts +8 -1
- package/src/interfaces/block_response.ts +4 -4
- package/src/interfaces/chain_tips.ts +8 -16
- package/src/interfaces/checkpoint_parameter.ts +3 -3
- package/src/interfaces/checkpoint_response.ts +4 -4
- package/src/interfaces/client.ts +1 -0
- package/src/interfaces/configs.ts +33 -6
- package/src/interfaces/get_tx_by_hash_options.ts +14 -0
- package/src/interfaces/merkle_tree_operations.ts +8 -2
- package/src/interfaces/p2p.ts +29 -9
- package/src/interfaces/private_kernel_prover.ts +104 -13
- package/src/interfaces/prover-client.ts +1 -3
- package/src/interfaces/prover-node.ts +32 -17
- package/src/interfaces/proving-job.ts +15 -3
- package/src/interfaces/server.ts +0 -2
- package/src/interfaces/server_circuit_prover.ts +2 -2
- package/src/interfaces/tx_provider.ts +4 -0
- 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 +0 -1
- package/src/kernel/hints/read_request.ts +1 -1
- package/src/kernel/index.ts +5 -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 -7
- 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_4_circuit_private_inputs.ts +52 -0
- package/src/kernel/private_kernel_init_5_circuit_private_inputs.ts +55 -0
- package/src/kernel/private_kernel_init_circuit_private_inputs.ts +0 -6
- package/src/kernel/private_kernel_inner_4_circuit_private_inputs.ts +39 -0
- package/src/kernel/private_kernel_inner_5_circuit_private_inputs.ts +42 -0
- package/src/kernel/private_kernel_prover_output.ts +4 -0
- package/src/kernel/private_kernel_reset_dimensions.ts +16 -6
- package/src/kernel/private_kernel_reset_tail_circuit_private_inputs.ts +69 -0
- package/src/kernel/private_kernel_simulated_output.ts +0 -7
- package/src/kernel/private_log_data.ts +4 -1
- package/src/kernel/utils/index.ts +0 -1
- package/src/keys/derivation.ts +69 -24
- package/src/logs/app_tagging_secret.ts +62 -39
- package/src/logs/app_tagging_secret_kind.ts +15 -0
- package/src/logs/contract_class_log.ts +0 -9
- package/src/logs/log_result.ts +2 -2
- package/src/logs/logs_query.ts +2 -2
- package/src/logs/message_context.ts +6 -60
- package/src/logs/pending_tagged_log.ts +6 -33
- package/src/logs/shared_secret_derivation.ts +47 -14
- package/src/messaging/l1_to_l2_message.ts +51 -13
- package/src/messaging/l2_to_l1_membership.ts +28 -11
- package/src/noir/index.ts +2 -1
- package/src/p2p/attestation_utils.ts +8 -1
- package/src/p2p/checkpoint_attestation.ts +12 -0
- package/src/p2p/index.ts +0 -1
- 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 +6 -2
- package/src/tests/factories.ts +13 -51
- 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 -361
- 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/hashed_values.ts +11 -6
- package/src/tx/index.ts +0 -1
- package/src/tx/indexed_tx_effect.ts +17 -4
- package/src/tx/offchain_effect.ts +1 -1
- package/src/tx/private_tx_constant_data.ts +25 -2
- package/src/tx/profiling.ts +2 -0
- package/src/tx/simulated_tx.ts +13 -2
- package/src/tx/tx.ts +46 -3
- package/src/tx/tx_receipt.ts +263 -71
- package/src/tx/validator/error_texts.ts +2 -1
- package/src/validators/errors.ts +17 -0
- package/src/world-state/genesis_data.ts +10 -0
- package/src/world-state/world_state_revision.ts +0 -33
- package/dest/avm/contract_storage_read.d.ts +0 -58
- package/dest/avm/contract_storage_read.d.ts.map +0 -1
- package/dest/avm/contract_storage_read.js +0 -65
- package/dest/avm/contract_storage_update_request.d.ts +0 -65
- package/dest/avm/contract_storage_update_request.d.ts.map +0 -1
- package/dest/avm/contract_storage_update_request.js +0 -80
- package/dest/avm/public_call_stack_item_compressed.d.ts +0 -43
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +0 -1
- package/dest/avm/public_call_stack_item_compressed.js +0 -70
- package/dest/avm/public_data_update_request.d.ts +0 -62
- package/dest/avm/public_data_update_request.d.ts.map +0 -1
- package/dest/avm/public_data_update_request.js +0 -67
- package/dest/avm/public_inner_call_request.d.ts +0 -50
- package/dest/avm/public_inner_call_request.d.ts.map +0 -1
- package/dest/avm/public_inner_call_request.js +0 -74
- package/dest/config/pipelining-config.d.ts +0 -15
- package/dest/config/pipelining-config.d.ts.map +0 -1
- package/dest/config/pipelining-config.js +0 -18
- package/dest/contract/deployment_info.d.ts +0 -24
- package/dest/contract/deployment_info.d.ts.map +0 -1
- package/dest/contract/deployment_info.js +0 -3
- 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/interfaces/prover-coordination.d.ts +0 -15
- package/dest/interfaces/prover-coordination.d.ts.map +0 -1
- package/dest/interfaces/prover-coordination.js +0 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts +0 -14
- package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +0 -1
- package/dest/kernel/hints/tree_leaf_read_request.js +0 -33
- 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/kernel/utils/optional_number.d.ts +0 -31
- package/dest/kernel/utils/optional_number.d.ts.map +0 -1
- package/dest/kernel/utils/optional_number.js +0 -42
- package/dest/p2p/interface.d.ts +0 -5
- package/dest/p2p/interface.d.ts.map +0 -1
- package/dest/p2p/interface.js +0 -1
- package/dest/tx/validator/empty_validator.d.ts +0 -5
- package/dest/tx/validator/empty_validator.d.ts.map +0 -1
- package/dest/tx/validator/empty_validator.js +0 -7
- package/src/avm/contract_storage_read.ts +0 -77
- package/src/avm/contract_storage_update_request.ts +0 -93
- package/src/avm/public_call_stack_item_compressed.ts +0 -113
- package/src/avm/public_data_update_request.ts +0 -106
- package/src/avm/public_inner_call_request.ts +0 -85
- package/src/config/pipelining-config.ts +0 -31
- package/src/contract/deployment_info.ts +0 -25
- package/src/interfaces/epoch-prover.ts +0 -72
- package/src/interfaces/prover-coordination.ts +0 -17
- package/src/kernel/hints/tree_leaf_read_request.ts +0 -35
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +0 -58
- package/src/kernel/utils/optional_number.ts +0 -50
- package/src/p2p/interface.ts +0 -4
- package/src/tx/validator/empty_validator.ts +0 -7
|
@@ -26,10 +26,10 @@ import { L1RollupConstantsSchema } from '../epoch-helpers/index.js';
|
|
|
26
26
|
import { LogResultSchema } from '../logs/log_result.js';
|
|
27
27
|
import { PrivateLogsQuerySchema, PublicLogsQuerySchema } from '../logs/logs_query.js';
|
|
28
28
|
import type { L1ToL2MessageSource } from '../messaging/l1_to_l2_message_source.js';
|
|
29
|
+
import { L2ToL1MembershipWitnessSchema } from '../messaging/l2_to_l1_membership.js';
|
|
29
30
|
import { optional, schemas } from '../schemas/schemas.js';
|
|
30
31
|
import { indexedTxSchema } from '../tx/indexed_tx_effect.js';
|
|
31
32
|
import { TxHash } from '../tx/tx_hash.js';
|
|
32
|
-
import { TxReceipt } from '../tx/tx_receipt.js';
|
|
33
33
|
import type { L2LogsSource } from './l2_logs_source.js';
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -63,13 +63,18 @@ export type ArchiverSpecificConfig = {
|
|
|
63
63
|
/** Skip promoting proposed checkpoints during L1 sync (for testing purposes only) */
|
|
64
64
|
skipPromoteProposedCheckpointDuringL1Sync?: boolean;
|
|
65
65
|
|
|
66
|
+
/** Local tolerance in seconds before pruning an orphan block when no checkpoint proposal was received. */
|
|
67
|
+
orphanPruneNoProposalTolerance?: number;
|
|
68
|
+
|
|
69
|
+
/** Skip pruning orphan proposed blocks that have no matching proposed checkpoint. */
|
|
70
|
+
skipOrphanProposedBlockPruning?: boolean;
|
|
71
|
+
|
|
66
72
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* execution time.
|
|
73
|
+
* Preload the standard contracts (AuthRegistry, PublicChecks, HandshakeRegistry) into the contract store at block 0.
|
|
74
|
+
* For test environments only: it must only be set when genesis also seeds the matching registration/deployment
|
|
75
|
+
* nullifiers, otherwise a later on-chain publish of a preloaded class would collide with the block-0 preload.
|
|
71
76
|
*/
|
|
72
|
-
|
|
77
|
+
testPreloadStandardContracts?: boolean;
|
|
73
78
|
};
|
|
74
79
|
|
|
75
80
|
export const ArchiverSpecificConfigSchema = z.object({
|
|
@@ -82,7 +87,9 @@ export const ArchiverSpecificConfigSchema = z.object({
|
|
|
82
87
|
archiverSkipHistoricalLogsCheck: z.boolean().optional(),
|
|
83
88
|
skipValidateCheckpointAttestations: z.boolean().optional(),
|
|
84
89
|
skipPromoteProposedCheckpointDuringL1Sync: z.boolean().optional(),
|
|
85
|
-
|
|
90
|
+
orphanPruneNoProposalTolerance: schemas.Integer.optional(),
|
|
91
|
+
skipOrphanProposedBlockPruning: z.boolean().optional(),
|
|
92
|
+
testPreloadStandardContracts: z.boolean().optional(),
|
|
86
93
|
});
|
|
87
94
|
|
|
88
95
|
export type ArchiverApi = Omit<
|
|
@@ -100,7 +107,13 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
100
107
|
getCheckpointData: z.function({ input: z.tuple([CheckpointQuerySchema]), output: CheckpointDataSchema.optional() }),
|
|
101
108
|
getCheckpointsData: z.function({ input: z.tuple([CheckpointsQuerySchema]), output: z.array(CheckpointDataSchema) }),
|
|
102
109
|
getTxEffect: z.function({ input: z.tuple([TxHash.schema]), output: indexedTxSchema().optional() }),
|
|
103
|
-
|
|
110
|
+
// Reads Outbox roots lazily, pinned to the node's synced L1 block. Caveat: cached roots that are
|
|
111
|
+
// sealed and L1-finalized are not re-validated, so a reorg deeper than L1 finality could leave the
|
|
112
|
+
// node serving a witness against a no-longer-canonical root.
|
|
113
|
+
getL2ToL1MembershipWitness: z.function({
|
|
114
|
+
input: z.tuple([TxHash.schema, schemas.Fr, optional(schemas.Integer)]),
|
|
115
|
+
output: L2ToL1MembershipWitnessSchema.optional(),
|
|
116
|
+
}),
|
|
104
117
|
getSyncedL2SlotNumber: z.function({ input: z.tuple([]), output: schemas.SlotNumber.optional() }),
|
|
105
118
|
getSyncedL2EpochNumber: z.function({ input: z.tuple([]), output: EpochNumberSchema.optional() }),
|
|
106
119
|
getBlocksForSlot: z.function({ input: z.tuple([schemas.SlotNumber]), output: z.array(L2Block.schema) }),
|
|
@@ -117,7 +130,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
117
130
|
getContractClass: z.function({ input: z.tuple([schemas.Fr]), output: ContractClassPublicSchema.optional() }),
|
|
118
131
|
getBytecodeCommitment: z.function({ input: z.tuple([schemas.Fr]), output: schemas.Fr }),
|
|
119
132
|
getContract: z.function({
|
|
120
|
-
input: z.tuple([schemas.AztecAddress,
|
|
133
|
+
input: z.tuple([schemas.AztecAddress, schemas.BigInt]),
|
|
121
134
|
output: ContractInstanceWithAddressSchema.optional(),
|
|
122
135
|
}),
|
|
123
136
|
getContractClassIds: z.function({ input: z.tuple([]), output: z.array(schemas.Fr) }),
|
|
@@ -133,7 +133,7 @@ export function createAztecNodeAdminClient(
|
|
|
133
133
|
apiKey?: string,
|
|
134
134
|
): AztecNodeAdmin {
|
|
135
135
|
return createSafeJsonRpcClient<AztecNodeAdmin>(url, AztecNodeAdminApiSchema, {
|
|
136
|
-
namespaceMethods: '
|
|
136
|
+
namespaceMethods: 'aztecAdmin',
|
|
137
137
|
fetch,
|
|
138
138
|
onResponse: getVersioningResponseHandler(versions),
|
|
139
139
|
...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { type CheckpointNumber, CheckpointNumberSchema } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { createSafeJsonRpcClient, defaultFetch } from '@aztec/foundation/json-rpc/client';
|
|
2
3
|
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
|
|
5
|
-
import type
|
|
6
|
+
import { type ApiSchemaFor, optional } from '../schemas/schemas.js';
|
|
6
7
|
import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
|
|
7
8
|
|
|
9
|
+
const MAX_SIGNATURES_PER_REGISTER_CALL = 100;
|
|
10
|
+
const MAX_SIGNATURE_LEN = 10000;
|
|
11
|
+
|
|
8
12
|
/**
|
|
9
13
|
* Debug interface for Aztec node available in sandbox/local-network mode.
|
|
10
14
|
*/
|
|
@@ -19,10 +23,58 @@ export interface AztecNodeDebug {
|
|
|
19
23
|
* @throws If no sequencer is running.
|
|
20
24
|
*/
|
|
21
25
|
mineBlock(): Promise<void>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Synthetically proves the L2 chain up to the given checkpoint (default: the latest checkpointed
|
|
29
|
+
* checkpoint), writing epoch out hashes into the L1 Outbox so L2-to-L1 messages become consumable
|
|
30
|
+
* and advancing the rollup's proven tip. There is no real proof — this is the local-network
|
|
31
|
+
* equivalent of an epoch proof landing on L1. The target is clamped to the latest checkpointed
|
|
32
|
+
* checkpoint and the call no-ops when it is already proven.
|
|
33
|
+
*
|
|
34
|
+
* @param upToCheckpoint - Checkpoint to prove up to; defaults to the latest checkpointed checkpoint.
|
|
35
|
+
* @returns The proven checkpoint number after the call.
|
|
36
|
+
* @throws If no automine sequencer is running (only the automine sequencer supports synthetic proving).
|
|
37
|
+
*/
|
|
38
|
+
prove(upToCheckpoint?: CheckpointNumber): Promise<CheckpointNumber>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Warps L1 time forward to at least `targetTimestamp` and builds an empty L2 checkpoint at the next slot boundary,
|
|
42
|
+
* advancing the L2 timestamp to at least the target. The warp is serialized with block building, so it never
|
|
43
|
+
* interleaves with an in-flight build. A no-op when `targetTimestamp` is already at or behind the current L1 time.
|
|
44
|
+
*
|
|
45
|
+
* @param targetTimestamp - Target L1 timestamp, in seconds.
|
|
46
|
+
* @throws If no automine sequencer is running (only the automine sequencer supports time warps).
|
|
47
|
+
*/
|
|
48
|
+
warpL2TimeAtLeastTo(targetTimestamp: number): Promise<void>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Warps L1 time forward by at least `duration` seconds from the current L1 time and builds an empty L2 checkpoint
|
|
52
|
+
* at the next slot boundary. The warp is serialized with block building, so it never interleaves with an in-flight
|
|
53
|
+
* build.
|
|
54
|
+
*
|
|
55
|
+
* @param duration - Number of seconds to advance; must be positive.
|
|
56
|
+
* @throws If no automine sequencer is running, or if `duration` is not positive.
|
|
57
|
+
*/
|
|
58
|
+
warpL2TimeAtLeastBy(duration: number): Promise<void>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Registers public function signatures so the node can resolve selectors to names in public-execution stack
|
|
62
|
+
* traces. The mapping lives only in unpersisted node memory, is not gossiped, and is exposed here (rather than on
|
|
63
|
+
* the main node API) because it is a debug-only, unauthenticated write that should not be reachable on prod nodes.
|
|
64
|
+
* @param functionSignatures - Decoded `name(paramTypes)` signatures to register by selector.
|
|
65
|
+
*/
|
|
66
|
+
registerContractFunctionSignatures(functionSignatures: string[]): Promise<void>;
|
|
22
67
|
}
|
|
23
68
|
|
|
24
69
|
export const AztecNodeDebugApiSchema: ApiSchemaFor<AztecNodeDebug> = {
|
|
25
70
|
mineBlock: z.function({ input: z.tuple([]), output: z.void() }),
|
|
71
|
+
prove: z.function({ input: z.tuple([optional(CheckpointNumberSchema)]), output: CheckpointNumberSchema }),
|
|
72
|
+
warpL2TimeAtLeastTo: z.function({ input: z.tuple([z.number()]), output: z.void() }),
|
|
73
|
+
warpL2TimeAtLeastBy: z.function({ input: z.tuple([z.number()]), output: z.void() }),
|
|
74
|
+
registerContractFunctionSignatures: z.function({
|
|
75
|
+
input: z.tuple([z.array(z.string().max(MAX_SIGNATURE_LEN)).max(MAX_SIGNATURES_PER_REGISTER_CALL)]),
|
|
76
|
+
output: z.void(),
|
|
77
|
+
}),
|
|
26
78
|
};
|
|
27
79
|
|
|
28
80
|
export function createAztecNodeDebugClient(
|
|
@@ -32,7 +84,7 @@ export function createAztecNodeDebugClient(
|
|
|
32
84
|
apiKey?: string,
|
|
33
85
|
): AztecNodeDebug {
|
|
34
86
|
return createSafeJsonRpcClient<AztecNodeDebug>(url, AztecNodeDebugApiSchema, {
|
|
35
|
-
namespaceMethods: '
|
|
87
|
+
namespaceMethods: 'aztecDebug',
|
|
36
88
|
fetch,
|
|
37
89
|
onResponse: getVersioningResponseHandler(versions),
|
|
38
90
|
...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),
|
|
@@ -7,9 +7,11 @@ import {
|
|
|
7
7
|
type CheckpointNumber,
|
|
8
8
|
CheckpointNumberPositiveSchema,
|
|
9
9
|
CheckpointNumberSchema,
|
|
10
|
+
type CheckpointProposalHash,
|
|
10
11
|
type EpochNumber,
|
|
11
12
|
EpochNumberSchema,
|
|
12
13
|
type SlotNumber,
|
|
14
|
+
SlotNumberSchema,
|
|
13
15
|
} from '@aztec/foundation/branded-types';
|
|
14
16
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
15
17
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
@@ -21,9 +23,15 @@ import { z } from 'zod';
|
|
|
21
23
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
22
24
|
import { type BlockData, BlockDataSchema } from '../block/block_data.js';
|
|
23
25
|
import { BlockHash } from '../block/block_hash.js';
|
|
24
|
-
import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
|
|
26
|
+
import { type BlockParameter, BlockParameterSchema, BlockTagWithoutLatestSchema } from '../block/block_parameter.js';
|
|
25
27
|
import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
|
|
26
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
type CheckpointsQuery,
|
|
30
|
+
CheckpointsQuerySchema,
|
|
31
|
+
type L2BlockTag,
|
|
32
|
+
type L2Tips,
|
|
33
|
+
L2TipsSchema,
|
|
34
|
+
} from '../block/l2_block_source.js';
|
|
27
35
|
import { type CheckpointData, CheckpointDataSchema } from '../checkpoint/checkpoint_data.js';
|
|
28
36
|
import {
|
|
29
37
|
type ContractClassPublic,
|
|
@@ -35,6 +43,7 @@ import {
|
|
|
35
43
|
type ProtocolContractAddresses,
|
|
36
44
|
ProtocolContractAddressesSchema,
|
|
37
45
|
} from '../contract/index.js';
|
|
46
|
+
import { type L1RollupConstants, L1RollupConstantsSchema } from '../epoch-helpers/index.js';
|
|
38
47
|
import { ManaUsageEstimate } from '../gas/fee_math.js';
|
|
39
48
|
import { GasFees } from '../gas/gas_fees.js';
|
|
40
49
|
import { type LogResult, LogResultSchema } from '../logs/log_result.js';
|
|
@@ -44,17 +53,22 @@ import {
|
|
|
44
53
|
type PublicLogsQuery,
|
|
45
54
|
PublicLogsQuerySchema,
|
|
46
55
|
} from '../logs/logs_query.js';
|
|
56
|
+
import { type L2ToL1MembershipWitness, L2ToL1MembershipWitnessSchema } from '../messaging/l2_to_l1_membership.js';
|
|
57
|
+
import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
|
|
47
58
|
import { type ApiSchemaFor, optional, schemas } from '../schemas/schemas.js';
|
|
48
59
|
import { MerkleTreeId } from '../trees/merkle_tree_id.js';
|
|
49
60
|
import { NullifierMembershipWitness } from '../trees/nullifier_membership_witness.js';
|
|
50
61
|
import { PublicDataWitness } from '../trees/public_data_witness.js';
|
|
51
62
|
import {
|
|
63
|
+
type GetTxReceiptOptions,
|
|
64
|
+
GetTxReceiptOptionsSchema,
|
|
52
65
|
type IndexedTxEffect,
|
|
53
66
|
PublicSimulationOutput,
|
|
54
67
|
SimulationOverrides,
|
|
55
68
|
Tx,
|
|
56
69
|
TxHash,
|
|
57
|
-
TxReceipt,
|
|
70
|
+
type TxReceipt,
|
|
71
|
+
TxReceiptSchema,
|
|
58
72
|
type TxValidationResult,
|
|
59
73
|
TxValidationResultSchema,
|
|
60
74
|
indexedTxSchema,
|
|
@@ -72,7 +86,7 @@ import {
|
|
|
72
86
|
type BlocksIncludeOptions,
|
|
73
87
|
BlocksIncludeOptionsSchema,
|
|
74
88
|
} from './block_response.js';
|
|
75
|
-
import { type
|
|
89
|
+
import { type CheckpointTag, CheckpointTagSchema } from './chain_tips.js';
|
|
76
90
|
import { type CheckpointParameter, CheckpointParameterSchema } from './checkpoint_parameter.js';
|
|
77
91
|
import {
|
|
78
92
|
type CheckpointIncludeOptions,
|
|
@@ -80,8 +94,13 @@ import {
|
|
|
80
94
|
type CheckpointResponse,
|
|
81
95
|
CheckpointResponseSchema,
|
|
82
96
|
} from './checkpoint_response.js';
|
|
97
|
+
import { type GetTxByHashOptions, GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
|
|
98
|
+
import { type PeerInfo, PeerInfoSchema, type ProposalsForSlot, ProposalsForSlotSchema } from './p2p.js';
|
|
83
99
|
import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_state.js';
|
|
84
100
|
|
|
101
|
+
export type { GetTxByHashOptions } from './get_tx_by_hash_options.js';
|
|
102
|
+
export { GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
|
|
103
|
+
|
|
85
104
|
/**
|
|
86
105
|
* The aztec node.
|
|
87
106
|
* We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
|
|
@@ -186,6 +205,9 @@ export interface AztecNode {
|
|
|
186
205
|
|
|
187
206
|
/**
|
|
188
207
|
* Returns all the L2 to L1 messages in an epoch.
|
|
208
|
+
*
|
|
209
|
+
* @deprecated Use {@link getL2ToL1MembershipWitness} to get an L2-to-L1 message witness directly.
|
|
210
|
+
*
|
|
189
211
|
* @param epoch - The epoch at which to get the data.
|
|
190
212
|
* @returns A nested array of the L2 to L1 messages in each tx of each block in each checkpoint in the epoch (empty
|
|
191
213
|
* array if the epoch is not found).
|
|
@@ -193,23 +215,59 @@ export interface AztecNode {
|
|
|
193
215
|
getL2ToL1Messages(epoch: EpochNumber): Promise<Fr[][][][]>;
|
|
194
216
|
|
|
195
217
|
/**
|
|
196
|
-
* Returns the
|
|
197
|
-
*
|
|
218
|
+
* Returns the L2-to-L1 membership witness for `message` emitted by tx `txHash`. The node selects
|
|
219
|
+
* the smallest partial-proof root on the Outbox that covers the tx's checkpoint and builds the
|
|
220
|
+
* witness against it.
|
|
221
|
+
*
|
|
222
|
+
* The node reads the Outbox roots lazily, pinned to its synced L1 block, so the witness reflects
|
|
223
|
+
* the node's synced view. Returns `undefined` if the tx isn't yet in a block/epoch or no covering
|
|
224
|
+
* root has landed on L1 as of the synced block.
|
|
225
|
+
*
|
|
226
|
+
* Caveat: cached roots that are sealed and L1-finalized are not re-validated. A reorg deeper than
|
|
227
|
+
* L1 finality could leave the node serving a witness against a no-longer-canonical root.
|
|
228
|
+
*
|
|
229
|
+
* @param txHash - The tx whose L2-to-L1 message we want a witness for.
|
|
230
|
+
* @param message - The message hash to prove inclusion of.
|
|
231
|
+
* @param messageIndexInTx - Optional index of the message within the tx's L2-to-L1 messages; pass
|
|
232
|
+
* this when the same message hash appears multiple times in the tx.
|
|
198
233
|
*/
|
|
199
|
-
|
|
234
|
+
getL2ToL1MembershipWitness(
|
|
235
|
+
txHash: TxHash,
|
|
236
|
+
message: Fr,
|
|
237
|
+
messageIndexInTx?: number,
|
|
238
|
+
): Promise<L2ToL1MembershipWitness | undefined>;
|
|
200
239
|
|
|
201
240
|
/**
|
|
202
|
-
* Returns the
|
|
241
|
+
* Returns the block number at a given block tag, or the latest proposed block number when
|
|
203
242
|
* `tip` is omitted.
|
|
204
|
-
*
|
|
205
|
-
* @remarks **Semantic foot-gun**: block-side `'proposed'` means "latest proposed block" (chain
|
|
206
|
-
* head), but checkpoint-side `'proposed'` means "latest confirmed checkpoint" — pre-L1-confirm
|
|
207
|
-
* checkpoints are not exposed over RPC. `'checkpointed'` on the checkpoint side is equivalent.
|
|
208
243
|
*/
|
|
209
|
-
|
|
244
|
+
getBlockNumber(tip?: L2BlockTag): Promise<BlockNumber>;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Returns the checkpoint number at a given checkpoint tag, or the latest checkpointed number when
|
|
248
|
+
* `tip` is omitted. The proposed-but-unconfirmed checkpoint frontier is archiver-internal and not
|
|
249
|
+
* exposed over RPC, so `'proposed'` is not a valid checkpoint tag (see {@link CheckpointTag}).
|
|
250
|
+
*/
|
|
251
|
+
getCheckpointNumber(tip?: CheckpointTag): Promise<CheckpointNumber>;
|
|
210
252
|
|
|
211
253
|
/** Returns the tips of the L2 chain. */
|
|
212
|
-
getChainTips(): Promise<
|
|
254
|
+
getChainTips(): Promise<L2Tips>;
|
|
255
|
+
|
|
256
|
+
/** Returns the rollup constants for the current chain. */
|
|
257
|
+
getL1Constants(): Promise<L1RollupConstants>;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Returns the last L2 slot number for which the node has all L1 data needed to build the next checkpoint.
|
|
261
|
+
*/
|
|
262
|
+
getSyncedL2SlotNumber(): Promise<SlotNumber | undefined>;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Returns the last L2 epoch number that has been fully synchronized from L1.
|
|
266
|
+
*/
|
|
267
|
+
getSyncedL2EpochNumber(): Promise<EpochNumber | undefined>;
|
|
268
|
+
|
|
269
|
+
/** Returns the latest L1 timestamp according to the archiver's synced L1 view. */
|
|
270
|
+
getSyncedL1Timestamp(): Promise<bigint | undefined>;
|
|
213
271
|
|
|
214
272
|
/**
|
|
215
273
|
* Gets lightweight checkpoint metadata for a contiguous range or for an entire epoch.
|
|
@@ -288,7 +346,7 @@ export interface AztecNode {
|
|
|
288
346
|
* Each entry accounts for the L1 gas oracle transition and congestion growth based on the
|
|
289
347
|
* given mana usage estimate. Defaults to target usage (steady state).
|
|
290
348
|
* @param manaUsage - Expected mana usage per checkpoint (none, target, or limit).
|
|
291
|
-
* @returns An array of GasFees,
|
|
349
|
+
* @returns An array of GasFees with current min fees first, followed by one entry per predicted slot.
|
|
292
350
|
*/
|
|
293
351
|
getPredictedMinFees(manaUsage?: ManaUsageEstimate): Promise<GasFees[]>;
|
|
294
352
|
|
|
@@ -327,12 +385,6 @@ export interface AztecNode {
|
|
|
327
385
|
*/
|
|
328
386
|
getProtocolContractAddresses(): Promise<ProtocolContractAddresses>;
|
|
329
387
|
|
|
330
|
-
/**
|
|
331
|
-
* Registers contract function signatures for debugging purposes.
|
|
332
|
-
* @param functionSignatures - An array of function signatures to register by selector.
|
|
333
|
-
*/
|
|
334
|
-
registerContractFunctionSignatures(functionSignatures: string[]): Promise<void>;
|
|
335
|
-
|
|
336
388
|
/**
|
|
337
389
|
* Gets private logs matching the given tags. Returns one inner array per element of `query.tags`, in
|
|
338
390
|
* input order. An empty inner array means no logs matched that tag. Set `query.includeEffects` to also
|
|
@@ -362,27 +414,37 @@ export interface AztecNode {
|
|
|
362
414
|
sendTx(tx: Tx): Promise<void>;
|
|
363
415
|
|
|
364
416
|
/**
|
|
365
|
-
* Fetches a transaction receipt for a given transaction hash.
|
|
366
|
-
*
|
|
367
|
-
*
|
|
417
|
+
* Fetches a transaction receipt for a given transaction hash. Always resolves to one of the lifecycle variants of
|
|
418
|
+
* the {@link TxReceipt} union: a {@link MinedTxReceipt} if the tx was included in a block, a {@link PendingTxReceipt}
|
|
419
|
+
* if it's still in the mempool of the connected Aztec node, or a {@link DroppedTxReceipt} if not found.
|
|
368
420
|
*
|
|
369
421
|
* @param txHash - The transaction hash.
|
|
422
|
+
* @param options - Optional flags controlling which extra data is attached: `includeTxEffect` attaches the full
|
|
423
|
+
* {@link TxEffect} to a mined receipt, `includePendingTx` attaches the pending {@link Tx} to a pending receipt, and
|
|
424
|
+
* `includeProof` keeps the proof on that attached pending tx (only meaningful with `includePendingTx`).
|
|
370
425
|
* @returns A receipt of the transaction.
|
|
371
426
|
*/
|
|
372
|
-
getTxReceipt
|
|
427
|
+
getTxReceipt<TGetTxReceiptOptions extends GetTxReceiptOptions = {}>(
|
|
428
|
+
txHash: TxHash,
|
|
429
|
+
options?: TGetTxReceiptOptions,
|
|
430
|
+
): Promise<TxReceipt<TGetTxReceiptOptions>>;
|
|
373
431
|
|
|
374
432
|
/**
|
|
375
433
|
* Gets a tx effect.
|
|
376
434
|
* @param txHash - The hash of the tx corresponding to the tx effect.
|
|
377
435
|
* @returns The requested tx effect with block info (or undefined if not found).
|
|
436
|
+
* @deprecated Use `getTxReceipt(txHash, { includeTxEffect: true })` and read the `.txEffect` field instead.
|
|
378
437
|
*/
|
|
379
438
|
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
380
439
|
|
|
381
440
|
/**
|
|
382
|
-
* Method to retrieve pending txs.
|
|
441
|
+
* Method to retrieve pending txs. The txs' proofs are stripped unless `includeProof` is set.
|
|
442
|
+
* @param limit - The number of items to return.
|
|
443
|
+
* @param after - The last known pending tx. Used for pagination.
|
|
444
|
+
* @param options - Options for the returned txs (eg whether to include their proofs).
|
|
383
445
|
* @returns The pending txs.
|
|
384
446
|
*/
|
|
385
|
-
getPendingTxs(limit?: number, after?: TxHash): Promise<Tx[]>;
|
|
447
|
+
getPendingTxs(limit?: number, after?: TxHash, options?: GetTxByHashOptions): Promise<Tx[]>;
|
|
386
448
|
|
|
387
449
|
/**
|
|
388
450
|
* Retrieves the number of pending txs
|
|
@@ -391,18 +453,20 @@ export interface AztecNode {
|
|
|
391
453
|
getPendingTxCount(): Promise<number>;
|
|
392
454
|
|
|
393
455
|
/**
|
|
394
|
-
* Method to retrieve a single pending tx.
|
|
456
|
+
* Method to retrieve a single pending tx. The tx's proof is stripped unless `includeProof` is set.
|
|
395
457
|
* @param txHash - The transaction hash to return.
|
|
458
|
+
* @param options - Options for the returned tx (eg whether to include its proof).
|
|
396
459
|
* @returns The pending tx if it exists.
|
|
397
460
|
*/
|
|
398
|
-
getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
|
|
461
|
+
getTxByHash(txHash: TxHash, options?: GetTxByHashOptions): Promise<Tx | undefined>;
|
|
399
462
|
|
|
400
463
|
/**
|
|
401
|
-
* Method to retrieve multiple pending txs.
|
|
464
|
+
* Method to retrieve multiple pending txs. The txs' proofs are stripped unless `includeProof` is set.
|
|
402
465
|
* @param txHash - The transaction hashes to return.
|
|
466
|
+
* @param options - Options for the returned txs (eg whether to include their proofs).
|
|
403
467
|
* @returns The pending txs if exist.
|
|
404
468
|
*/
|
|
405
|
-
getTxsByHash(txHashes: TxHash[]): Promise<Tx[]>;
|
|
469
|
+
getTxsByHash(txHashes: TxHash[], options?: GetTxByHashOptions): Promise<Tx[]>;
|
|
406
470
|
|
|
407
471
|
/**
|
|
408
472
|
* Gets the storage value at the given contract storage slot.
|
|
@@ -458,10 +522,18 @@ export interface AztecNode {
|
|
|
458
522
|
getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
|
|
459
523
|
|
|
460
524
|
/**
|
|
461
|
-
* Returns a publicly deployed contract instance given its address.
|
|
525
|
+
* Returns a publicly deployed contract instance given its address. Its current class id is resolved as of the given
|
|
526
|
+
* reference block.
|
|
527
|
+
*
|
|
528
|
+
* Returns `undefined` if the instance has not been published (i.e. `publish_for_public_execution` was never called
|
|
529
|
+
* on the `ContractInstanceRegistry`). A contract whose class has been updated will never return `undefined`:
|
|
530
|
+
* scheduling an update requires the contract's deployment nullifier, which is only emitted by publishing, so any
|
|
531
|
+
* updatable contract has necessarily been published.
|
|
462
532
|
* @param address - Address of the deployed contract.
|
|
533
|
+
* @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
534
|
+
* Defaults to 'latest'.
|
|
463
535
|
*/
|
|
464
|
-
getContract(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
|
|
536
|
+
getContract(address: AztecAddress, referenceBlock?: BlockParameter): Promise<ContractInstanceWithAddress | undefined>;
|
|
465
537
|
|
|
466
538
|
/**
|
|
467
539
|
* Returns the ENR of this node for peer discovery, if available.
|
|
@@ -473,10 +545,31 @@ export interface AztecNode {
|
|
|
473
545
|
* @returns The list of allowed elements.
|
|
474
546
|
*/
|
|
475
547
|
getAllowedPublicSetup(): Promise<AllowedElement[]>;
|
|
476
|
-
}
|
|
477
548
|
|
|
478
|
-
|
|
479
|
-
|
|
549
|
+
/**
|
|
550
|
+
* Returns info for all connected, dialing, and cached peers. Only available when P2P is enabled.
|
|
551
|
+
* @param includePending - If true, also include peers in the pending state.
|
|
552
|
+
*/
|
|
553
|
+
getPeers(includePending?: boolean): Promise<PeerInfo[]>;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Queries the attestation pool for checkpoint attestations for the given slot.
|
|
557
|
+
* @param slot - The slot to query.
|
|
558
|
+
* @param proposalPayloadHash - Hex-encoded keccak256 of the target proposal's signed payload hash.
|
|
559
|
+
* When provided, only attestations whose payload hash matches are returned.
|
|
560
|
+
* When omitted, all attestations for the slot are returned.
|
|
561
|
+
*/
|
|
562
|
+
getCheckpointAttestationsForSlot(
|
|
563
|
+
slot: SlotNumber,
|
|
564
|
+
proposalPayloadHash?: CheckpointProposalHash,
|
|
565
|
+
): Promise<CheckpointAttestation[]>;
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Returns block and checkpoint proposals retained in the attestation pool for the given slot.
|
|
569
|
+
* Only available when P2P is enabled.
|
|
570
|
+
*/
|
|
571
|
+
getProposalsForSlot(slot: SlotNumber): Promise<ProposalsForSlot>;
|
|
572
|
+
}
|
|
480
573
|
|
|
481
574
|
export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
482
575
|
getWorldStateSyncStatus: z.function({ input: z.tuple([]), output: WorldStateSyncStatusSchema }),
|
|
@@ -523,11 +616,27 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
523
616
|
output: z.array(z.array(z.array(z.array(schemas.Fr)))),
|
|
524
617
|
}),
|
|
525
618
|
|
|
526
|
-
|
|
619
|
+
// Reads Outbox roots lazily, pinned to the node's synced L1 block. Caveat: cached roots that are
|
|
620
|
+
// sealed and L1-finalized are not re-validated, so a reorg deeper than L1 finality could leave the
|
|
621
|
+
// node serving a witness against a no-longer-canonical root.
|
|
622
|
+
getL2ToL1MembershipWitness: z.function({
|
|
623
|
+
input: z.tuple([TxHash.schema, schemas.Fr, optional(schemas.Integer)]),
|
|
624
|
+
output: L2ToL1MembershipWitnessSchema.optional(),
|
|
625
|
+
}),
|
|
626
|
+
|
|
627
|
+
getBlockNumber: z.function({ input: z.tuple([optional(BlockTagWithoutLatestSchema)]), output: BlockNumberSchema }),
|
|
628
|
+
|
|
629
|
+
getCheckpointNumber: z.function({ input: z.tuple([optional(CheckpointTagSchema)]), output: CheckpointNumberSchema }),
|
|
630
|
+
|
|
631
|
+
getChainTips: z.function({ input: z.tuple([]), output: L2TipsSchema }),
|
|
527
632
|
|
|
528
|
-
|
|
633
|
+
getL1Constants: z.function({ input: z.tuple([]), output: L1RollupConstantsSchema }),
|
|
529
634
|
|
|
530
|
-
|
|
635
|
+
getSyncedL2SlotNumber: z.function({ input: z.tuple([]), output: SlotNumberSchema.optional() }),
|
|
636
|
+
|
|
637
|
+
getSyncedL2EpochNumber: z.function({ input: z.tuple([]), output: EpochNumberSchema.optional() }),
|
|
638
|
+
|
|
639
|
+
getSyncedL1Timestamp: z.function({ input: z.tuple([]), output: schemas.BigInt.optional() }),
|
|
531
640
|
|
|
532
641
|
getCheckpointsData: z.function({ input: z.tuple([CheckpointsQuerySchema]), output: z.array(CheckpointDataSchema) }),
|
|
533
642
|
|
|
@@ -584,11 +693,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
584
693
|
|
|
585
694
|
getProtocolContractAddresses: z.function({ input: z.tuple([]), output: ProtocolContractAddressesSchema }),
|
|
586
695
|
|
|
587
|
-
registerContractFunctionSignatures: z.function({
|
|
588
|
-
input: z.tuple([z.array(z.string().max(MAX_SIGNATURE_LEN)).max(MAX_SIGNATURES_PER_REGISTER_CALL)]),
|
|
589
|
-
output: z.void(),
|
|
590
|
-
}),
|
|
591
|
-
|
|
592
696
|
getPrivateLogsByTags: z.function({
|
|
593
697
|
input: z.tuple([PrivateLogsQuerySchema]),
|
|
594
698
|
output: z.array(z.array(LogResultSchema)),
|
|
@@ -601,7 +705,10 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
601
705
|
|
|
602
706
|
sendTx: z.function({ input: z.tuple([Tx.schema]), output: z.void() }),
|
|
603
707
|
|
|
604
|
-
getTxReceipt: z.function({
|
|
708
|
+
getTxReceipt: z.function({
|
|
709
|
+
input: z.tuple([TxHash.schema, optional(GetTxReceiptOptionsSchema)]),
|
|
710
|
+
output: TxReceiptSchema,
|
|
711
|
+
}),
|
|
605
712
|
|
|
606
713
|
getTxEffect: z.function({ input: z.tuple([TxHash.schema]), output: indexedTxSchema().optional() }),
|
|
607
714
|
|
|
@@ -609,16 +716,20 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
609
716
|
input: z.tuple([
|
|
610
717
|
optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)),
|
|
611
718
|
optional(TxHash.schema),
|
|
719
|
+
optional(GetTxByHashOptionsSchema),
|
|
612
720
|
]),
|
|
613
721
|
output: z.array(Tx.schema),
|
|
614
722
|
}),
|
|
615
723
|
|
|
616
724
|
getPendingTxCount: z.function({ input: z.tuple([]), output: z.number() }),
|
|
617
725
|
|
|
618
|
-
getTxByHash: z.function({
|
|
726
|
+
getTxByHash: z.function({
|
|
727
|
+
input: z.tuple([TxHash.schema, optional(GetTxByHashOptionsSchema)]),
|
|
728
|
+
output: Tx.schema.optional(),
|
|
729
|
+
}),
|
|
619
730
|
|
|
620
731
|
getTxsByHash: z.function({
|
|
621
|
-
input: z.tuple([z.array(TxHash.schema).max(MAX_RPC_TXS_LEN)]),
|
|
732
|
+
input: z.tuple([z.array(TxHash.schema).max(MAX_RPC_TXS_LEN), optional(GetTxByHashOptionsSchema)]),
|
|
622
733
|
output: z.array(Tx.schema),
|
|
623
734
|
}),
|
|
624
735
|
|
|
@@ -655,13 +766,28 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
655
766
|
getContractClass: z.function({ input: z.tuple([schemas.Fr]), output: ContractClassPublicSchema.optional() }),
|
|
656
767
|
|
|
657
768
|
getContract: z.function({
|
|
658
|
-
input: z.tuple([schemas.AztecAddress]),
|
|
769
|
+
input: z.tuple([schemas.AztecAddress, optional(BlockParameterSchema)]),
|
|
659
770
|
output: ContractInstanceWithAddressSchema.optional(),
|
|
660
771
|
}),
|
|
661
772
|
|
|
662
773
|
getEncodedEnr: z.function({ input: z.tuple([]), output: z.string().optional() }),
|
|
663
774
|
|
|
664
775
|
getAllowedPublicSetup: z.function({ input: z.tuple([]), output: z.array(AllowedElementSchema) }),
|
|
776
|
+
|
|
777
|
+
getPeers: z.function({ input: z.tuple([optional(z.boolean())]), output: z.array(PeerInfoSchema) }),
|
|
778
|
+
|
|
779
|
+
getCheckpointAttestationsForSlot: z.function({
|
|
780
|
+
input: z.tuple([
|
|
781
|
+
schemas.SlotNumber,
|
|
782
|
+
optional(z.string().regex(/^0x[0-9a-fA-F]+$/) as unknown as z.ZodType<CheckpointProposalHash>),
|
|
783
|
+
]),
|
|
784
|
+
output: z.array(CheckpointAttestation.schema),
|
|
785
|
+
}),
|
|
786
|
+
|
|
787
|
+
getProposalsForSlot: z.function({
|
|
788
|
+
input: z.tuple([schemas.SlotNumber]),
|
|
789
|
+
output: ProposalsForSlotSchema,
|
|
790
|
+
}),
|
|
665
791
|
};
|
|
666
792
|
|
|
667
793
|
export function createAztecNodeClient(
|
|
@@ -671,7 +797,7 @@ export function createAztecNodeClient(
|
|
|
671
797
|
batchWindowMS = 0,
|
|
672
798
|
): AztecNode {
|
|
673
799
|
return createSafeJsonRpcClient<AztecNode>(url, AztecNodeApiSchema, {
|
|
674
|
-
namespaceMethods: '
|
|
800
|
+
namespaceMethods: 'aztec',
|
|
675
801
|
fetch,
|
|
676
802
|
batchWindowMS,
|
|
677
803
|
onResponse: getVersioningResponseHandler(versions),
|
|
@@ -2,6 +2,7 @@ import type { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-ty
|
|
|
2
2
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import type { LoggerBindings } from '@aztec/foundation/log';
|
|
4
4
|
|
|
5
|
+
import type { BlockHash } from '../block/block_hash.js';
|
|
5
6
|
import type { L2Block } from '../block/l2_block.js';
|
|
6
7
|
import type { ChainConfig, SequencerConfig } from '../config/chain-config.js';
|
|
7
8
|
import type { L1RollupConstants } from '../epoch-helpers/index.js';
|
|
@@ -64,6 +65,8 @@ type ProposerBlockBuilderOptions = BlockBuilderOptionsBase & {
|
|
|
64
65
|
maxBlocksPerCheckpoint: number;
|
|
65
66
|
/** Per-block gas budget multiplier. Budget = (remaining / remainingBlocks) * multiplier. */
|
|
66
67
|
perBlockAllocationMultiplier: number;
|
|
68
|
+
/** Per-block budget multiplier for DA gas and blob fields. Falls back to perBlockAllocationMultiplier when unset. */
|
|
69
|
+
perBlockDAAllocationMultiplier?: number;
|
|
67
70
|
};
|
|
68
71
|
|
|
69
72
|
/** Validator mode: no redistribution params needed. */
|
|
@@ -141,7 +144,11 @@ export interface ICheckpointBlockBuilder {
|
|
|
141
144
|
|
|
142
145
|
/** Interface for creating checkpoint builders. */
|
|
143
146
|
export interface ICheckpointsBuilder {
|
|
144
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Syncs world state to `blockNumber` and returns a fork of it at that block. When `blockHash` is
|
|
149
|
+
* provided it is verified against the synced block, triggering a resync on mismatch (reorg detection).
|
|
150
|
+
*/
|
|
151
|
+
getFork(blockNumber: BlockNumber, blockHash?: BlockHash): Promise<MerkleTreeWriteOperations>;
|
|
145
152
|
|
|
146
153
|
startCheckpoint(
|
|
147
154
|
checkpointNumber: CheckpointNumber,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
IndexWithinCheckpointSchema,
|
|
5
5
|
} from '@aztec/foundation/branded-types';
|
|
6
6
|
import type { BlockNumber, CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
|
|
7
|
-
import type {
|
|
7
|
+
import type { PickIfFlag, Prettify } from '@aztec/foundation/types';
|
|
8
8
|
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
|
|
@@ -73,9 +73,9 @@ export type BlockResponseBase = {
|
|
|
73
73
|
*/
|
|
74
74
|
export type BlockResponse<Opts extends BlockIncludeOptions = BlockIncludeOptions> = Prettify<
|
|
75
75
|
BlockResponseBase &
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
PickIfFlag<BlockIncludeOptions, Opts, 'includeTransactions', { body: Body }> &
|
|
77
|
+
PickIfFlag<BlockIncludeOptions, Opts, 'includeL1PublishInfo', { l1: L1PublishInfo }> &
|
|
78
|
+
PickIfFlag<BlockIncludeOptions, Opts, 'includeAttestations', { attestations: CommitteeAttestation[] }>
|
|
79
79
|
>;
|
|
80
80
|
|
|
81
81
|
/** Zod schema for the widest {@link BlockResponse} shape (all include-gated fields optional). */
|