@aztec/stdlib 6.0.0-nightly.20260605 → 6.0.0-nightly.20260721
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/abi/buffer.d.ts +6 -2
- package/dest/abi/buffer.d.ts.map +1 -1
- package/dest/abi/buffer.js +13 -1
- package/dest/avm/avm.js +1 -1
- package/dest/avm/avm_proving_request.d.ts +70 -70
- 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 +46 -23
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +15 -1
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts +39 -0
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts.map +1 -0
- package/dest/block/l2_block_stream/event_driven_l2_block_stream.js +165 -0
- package/dest/block/l2_block_stream/index.d.ts +2 -1
- package/dest/block/l2_block_stream/index.d.ts.map +1 -1
- package/dest/block/l2_block_stream/index.js +1 -0
- package/dest/block/l2_block_stream/interfaces.d.ts +81 -11
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/interfaces.js +25 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +23 -15
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +149 -152
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +6 -12
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.js +8 -32
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +17 -18
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_store_base.js +70 -58
- package/dest/block/proposal/attestations_and_signers.d.ts +19 -1
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.js +47 -7
- package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +296 -37
- package/dest/block/validate_block_result.d.ts +16 -1
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +18 -3
- package/dest/checkpoint/checkpoint.js +2 -2
- package/dest/checkpoint/index.d.ts +2 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +1 -0
- package/dest/checkpoint/simulation_overrides.d.ts +61 -0
- package/dest/checkpoint/simulation_overrides.d.ts.map +1 -0
- package/dest/checkpoint/simulation_overrides.js +98 -0
- package/dest/checkpoint/validate.d.ts +11 -3
- package/dest/checkpoint/validate.d.ts.map +1 -1
- package/dest/checkpoint/validate.js +9 -6
- package/dest/config/index.d.ts +2 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -0
- package/dest/config/network-consensus-config.d.ts +72 -0
- package/dest/config/network-consensus-config.d.ts.map +1 -0
- package/dest/config/network-consensus-config.js +223 -0
- package/dest/config/sequencer-config.d.ts +4 -2
- package/dest/config/sequencer-config.d.ts.map +1 -1
- package/dest/config/sequencer-config.js +22 -3
- package/dest/contract/contract_address.d.ts +5 -4
- package/dest/contract/contract_address.d.ts.map +1 -1
- package/dest/contract/contract_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/interfaces/archiver.d.ts +7 -9
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +3 -2
- package/dest/interfaces/aztec-node-admin.d.ts +24 -17
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +1 -1
- package/dest/interfaces/aztec-node-debug.d.ts +40 -2
- package/dest/interfaces/aztec-node-debug.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-debug.js +29 -1
- package/dest/interfaces/aztec-node.d.ts +69 -28
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +56 -20
- package/dest/interfaces/block-builder.d.ts +3 -1
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/chain_tips.d.ts +8 -47
- package/dest/interfaces/chain_tips.d.ts.map +1 -1
- package/dest/interfaces/chain_tips.js +1 -6
- package/dest/interfaces/checkpoint_parameter.d.ts +3 -3
- package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -1
- package/dest/interfaces/checkpoint_parameter.js +3 -3
- package/dest/interfaces/client.d.ts +2 -1
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/configs.d.ts +27 -6
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +5 -1
- package/dest/interfaces/get_tx_by_hash_options.d.ts +9 -0
- package/dest/interfaces/get_tx_by_hash_options.d.ts.map +1 -0
- package/dest/interfaces/get_tx_by_hash_options.js +4 -0
- package/dest/interfaces/merkle_tree_operations.d.ts +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 +4 -4
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +2 -2
- 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/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 -5
- package/dest/keys/derivation.d.ts.map +1 -1
- package/dest/keys/derivation.js +53 -23
- 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 +44 -28
- package/dest/logs/app_tagging_secret_kind.js +1 -1
- package/dest/logs/contract_class_log.d.ts +1 -2
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +0 -4
- package/dest/logs/message_context.d.ts +5 -15
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/message_context.js +1 -66
- 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 +19 -6
- package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
- package/dest/logs/shared_secret_derivation.js +26 -11
- package/dest/p2p/attestation_utils.d.ts +1 -1
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +8 -1
- package/dest/p2p/checkpoint_attestation.d.ts +10 -1
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +10 -0
- package/dest/p2p/checkpoint_proposal.d.ts +2 -1
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.d.ts +2 -1
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/index.d.ts +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 -84
- package/dest/timetable/index.d.ts.map +1 -1
- package/dest/timetable/index.js +4 -209
- package/dest/timetable/proposer_timetable.d.ts +106 -0
- package/dest/timetable/proposer_timetable.d.ts.map +1 -0
- package/dest/timetable/proposer_timetable.js +132 -0
- package/dest/trees/nullifier_membership_witness.d.ts +5 -8
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.js +0 -9
- package/dest/trees/public_data_witness.d.ts +7 -17
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/trees/public_data_witness.js +0 -27
- package/dest/tx/execution_payload.d.ts +1 -1
- package/dest/tx/execution_payload.d.ts.map +1 -1
- package/dest/tx/execution_payload.js +1 -1
- package/dest/tx/fee_provider.d.ts +2 -2
- package/dest/tx/fee_provider.d.ts.map +1 -1
- package/dest/tx/global_variable_builder.d.ts +2 -12
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.js +2 -2
- package/dest/tx/index.d.ts +1 -2
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +0 -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/tx.d.ts +9 -1
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +15 -0
- package/dest/tx/validator/error_texts.d.ts +2 -2
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +1 -1
- package/dest/world-state/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/buffer.ts +13 -1
- package/src/avm/avm.ts +1 -1
- 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 +67 -13
- package/src/block/l2_block_stream/event_driven_l2_block_stream.ts +207 -0
- package/src/block/l2_block_stream/index.ts +1 -0
- package/src/block/l2_block_stream/interfaces.ts +96 -10
- package/src/block/l2_block_stream/l2_block_stream.ts +216 -175
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +12 -41
- package/src/block/l2_block_stream/l2_tips_store_base.ts +84 -93
- package/src/block/proposal/attestations_and_signers.ts +53 -7
- package/src/block/test/l2_tips_store_test_suite.ts +270 -28
- package/src/block/validate_block_result.ts +48 -2
- package/src/checkpoint/checkpoint.ts +2 -2
- package/src/checkpoint/index.ts +1 -0
- package/src/checkpoint/simulation_overrides.ts +171 -0
- package/src/checkpoint/validate.ts +16 -6
- package/src/config/index.ts +1 -0
- package/src/config/network-consensus-config.ts +291 -0
- package/src/config/sequencer-config.ts +36 -5
- package/src/contract/contract_address.ts +4 -3
- package/src/contract/contract_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 +92 -0
- package/src/gas/gas_settings.ts +11 -21
- package/src/gas/index.ts +1 -0
- package/src/gas/tx_gas_limits.ts +123 -0
- package/src/ha-signing/config.ts +23 -5
- package/src/ha-signing/local_config.ts +20 -1
- package/src/interfaces/archiver.ts +8 -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 +121 -43
- package/src/interfaces/block-builder.ts +2 -0
- package/src/interfaces/chain_tips.ts +8 -16
- package/src/interfaces/checkpoint_parameter.ts +3 -3
- package/src/interfaces/client.ts +1 -0
- package/src/interfaces/configs.ts +27 -6
- package/src/interfaces/get_tx_by_hash_options.ts +14 -0
- package/src/interfaces/merkle_tree_operations.ts +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 +3 -3
- package/src/interfaces/server.ts +0 -2
- package/src/interfaces/server_circuit_prover.ts +2 -2
- package/src/interfaces/validator.ts +11 -0
- package/src/interfaces/world_state.ts +14 -0
- package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +22 -112
- package/src/kernel/hints/index.ts +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 +15 -5
- 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 +71 -21
- package/src/logs/app_tagging_secret.ts +56 -24
- package/src/logs/app_tagging_secret_kind.ts +1 -1
- package/src/logs/contract_class_log.ts +0 -9
- package/src/logs/message_context.ts +7 -65
- package/src/logs/pending_tagged_log.ts +6 -33
- package/src/logs/shared_secret_derivation.ts +31 -15
- 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 -304
- package/src/timetable/proposer_timetable.ts +190 -0
- package/src/timetable/timetable-example.svg +108 -0
- package/src/trees/nullifier_membership_witness.ts +0 -11
- package/src/trees/public_data_witness.ts +0 -31
- package/src/tx/execution_payload.ts +2 -1
- package/src/tx/fee_provider.ts +1 -1
- package/src/tx/global_variable_builder.ts +1 -17
- package/src/tx/global_variables.ts +2 -2
- package/src/tx/index.ts +0 -1
- package/src/tx/private_tx_constant_data.ts +25 -2
- package/src/tx/profiling.ts +2 -0
- package/src/tx/tx.ts +17 -0
- package/src/tx/validator/error_texts.ts +2 -1
- 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/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/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
|
@@ -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';
|
|
@@ -45,6 +54,7 @@ import {
|
|
|
45
54
|
PublicLogsQuerySchema,
|
|
46
55
|
} from '../logs/logs_query.js';
|
|
47
56
|
import { type L2ToL1MembershipWitness, L2ToL1MembershipWitnessSchema } from '../messaging/l2_to_l1_membership.js';
|
|
57
|
+
import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
|
|
48
58
|
import { type ApiSchemaFor, optional, schemas } from '../schemas/schemas.js';
|
|
49
59
|
import { MerkleTreeId } from '../trees/merkle_tree_id.js';
|
|
50
60
|
import { NullifierMembershipWitness } from '../trees/nullifier_membership_witness.js';
|
|
@@ -76,7 +86,7 @@ import {
|
|
|
76
86
|
type BlocksIncludeOptions,
|
|
77
87
|
BlocksIncludeOptionsSchema,
|
|
78
88
|
} from './block_response.js';
|
|
79
|
-
import { type
|
|
89
|
+
import { type CheckpointTag, CheckpointTagSchema } from './chain_tips.js';
|
|
80
90
|
import { type CheckpointParameter, CheckpointParameterSchema } from './checkpoint_parameter.js';
|
|
81
91
|
import {
|
|
82
92
|
type CheckpointIncludeOptions,
|
|
@@ -84,8 +94,13 @@ import {
|
|
|
84
94
|
type CheckpointResponse,
|
|
85
95
|
CheckpointResponseSchema,
|
|
86
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';
|
|
87
99
|
import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_state.js';
|
|
88
100
|
|
|
101
|
+
export type { GetTxByHashOptions } from './get_tx_by_hash_options.js';
|
|
102
|
+
export { GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
|
|
103
|
+
|
|
89
104
|
/**
|
|
90
105
|
* The aztec node.
|
|
91
106
|
* We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
|
|
@@ -223,23 +238,36 @@ export interface AztecNode {
|
|
|
223
238
|
): Promise<L2ToL1MembershipWitness | undefined>;
|
|
224
239
|
|
|
225
240
|
/**
|
|
226
|
-
* Returns the block number at a given
|
|
241
|
+
* Returns the block number at a given block tag, or the latest proposed block number when
|
|
227
242
|
* `tip` is omitted.
|
|
228
243
|
*/
|
|
229
|
-
getBlockNumber(tip?:
|
|
244
|
+
getBlockNumber(tip?: L2BlockTag): Promise<BlockNumber>;
|
|
230
245
|
|
|
231
246
|
/**
|
|
232
|
-
* Returns the checkpoint number at a given
|
|
233
|
-
* `tip` is omitted.
|
|
234
|
-
*
|
|
235
|
-
* @remarks **Semantic foot-gun**: block-side `'proposed'` means "latest proposed block" (chain
|
|
236
|
-
* head), but checkpoint-side `'proposed'` means "latest confirmed checkpoint" — pre-L1-confirm
|
|
237
|
-
* checkpoints are not exposed over RPC. `'checkpointed'` on the checkpoint side is equivalent.
|
|
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}).
|
|
238
250
|
*/
|
|
239
|
-
getCheckpointNumber(tip?:
|
|
251
|
+
getCheckpointNumber(tip?: CheckpointTag): Promise<CheckpointNumber>;
|
|
240
252
|
|
|
241
253
|
/** Returns the tips of the L2 chain. */
|
|
242
|
-
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>;
|
|
243
271
|
|
|
244
272
|
/**
|
|
245
273
|
* Gets lightweight checkpoint metadata for a contiguous range or for an entire epoch.
|
|
@@ -318,7 +346,7 @@ export interface AztecNode {
|
|
|
318
346
|
* Each entry accounts for the L1 gas oracle transition and congestion growth based on the
|
|
319
347
|
* given mana usage estimate. Defaults to target usage (steady state).
|
|
320
348
|
* @param manaUsage - Expected mana usage per checkpoint (none, target, or limit).
|
|
321
|
-
* @returns An array of GasFees,
|
|
349
|
+
* @returns An array of GasFees with current min fees first, followed by one entry per predicted slot.
|
|
322
350
|
*/
|
|
323
351
|
getPredictedMinFees(manaUsage?: ManaUsageEstimate): Promise<GasFees[]>;
|
|
324
352
|
|
|
@@ -357,12 +385,6 @@ export interface AztecNode {
|
|
|
357
385
|
*/
|
|
358
386
|
getProtocolContractAddresses(): Promise<ProtocolContractAddresses>;
|
|
359
387
|
|
|
360
|
-
/**
|
|
361
|
-
* Registers contract function signatures for debugging purposes.
|
|
362
|
-
* @param functionSignatures - An array of function signatures to register by selector.
|
|
363
|
-
*/
|
|
364
|
-
registerContractFunctionSignatures(functionSignatures: string[]): Promise<void>;
|
|
365
|
-
|
|
366
388
|
/**
|
|
367
389
|
* Gets private logs matching the given tags. Returns one inner array per element of `query.tags`, in
|
|
368
390
|
* input order. An empty inner array means no logs matched that tag. Set `query.includeEffects` to also
|
|
@@ -416,10 +438,13 @@ export interface AztecNode {
|
|
|
416
438
|
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
417
439
|
|
|
418
440
|
/**
|
|
419
|
-
* 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).
|
|
420
445
|
* @returns The pending txs.
|
|
421
446
|
*/
|
|
422
|
-
getPendingTxs(limit?: number, after?: TxHash): Promise<Tx[]>;
|
|
447
|
+
getPendingTxs(limit?: number, after?: TxHash, options?: GetTxByHashOptions): Promise<Tx[]>;
|
|
423
448
|
|
|
424
449
|
/**
|
|
425
450
|
* Retrieves the number of pending txs
|
|
@@ -428,18 +453,20 @@ export interface AztecNode {
|
|
|
428
453
|
getPendingTxCount(): Promise<number>;
|
|
429
454
|
|
|
430
455
|
/**
|
|
431
|
-
* 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.
|
|
432
457
|
* @param txHash - The transaction hash to return.
|
|
458
|
+
* @param options - Options for the returned tx (eg whether to include its proof).
|
|
433
459
|
* @returns The pending tx if it exists.
|
|
434
460
|
*/
|
|
435
|
-
getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
|
|
461
|
+
getTxByHash(txHash: TxHash, options?: GetTxByHashOptions): Promise<Tx | undefined>;
|
|
436
462
|
|
|
437
463
|
/**
|
|
438
|
-
* Method to retrieve multiple pending txs.
|
|
464
|
+
* Method to retrieve multiple pending txs. The txs' proofs are stripped unless `includeProof` is set.
|
|
439
465
|
* @param txHash - The transaction hashes to return.
|
|
466
|
+
* @param options - Options for the returned txs (eg whether to include their proofs).
|
|
440
467
|
* @returns The pending txs if exist.
|
|
441
468
|
*/
|
|
442
|
-
getTxsByHash(txHashes: TxHash[]): Promise<Tx[]>;
|
|
469
|
+
getTxsByHash(txHashes: TxHash[], options?: GetTxByHashOptions): Promise<Tx[]>;
|
|
443
470
|
|
|
444
471
|
/**
|
|
445
472
|
* Gets the storage value at the given contract storage slot.
|
|
@@ -495,10 +522,18 @@ export interface AztecNode {
|
|
|
495
522
|
getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
|
|
496
523
|
|
|
497
524
|
/**
|
|
498
|
-
* 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.
|
|
499
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'.
|
|
500
535
|
*/
|
|
501
|
-
getContract(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
|
|
536
|
+
getContract(address: AztecAddress, referenceBlock?: BlockParameter): Promise<ContractInstanceWithAddress | undefined>;
|
|
502
537
|
|
|
503
538
|
/**
|
|
504
539
|
* Returns the ENR of this node for peer discovery, if available.
|
|
@@ -510,10 +545,31 @@ export interface AztecNode {
|
|
|
510
545
|
* @returns The list of allowed elements.
|
|
511
546
|
*/
|
|
512
547
|
getAllowedPublicSetup(): Promise<AllowedElement[]>;
|
|
513
|
-
}
|
|
514
548
|
|
|
515
|
-
|
|
516
|
-
|
|
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
|
+
}
|
|
517
573
|
|
|
518
574
|
export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
519
575
|
getWorldStateSyncStatus: z.function({ input: z.tuple([]), output: WorldStateSyncStatusSchema }),
|
|
@@ -568,11 +624,19 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
568
624
|
output: L2ToL1MembershipWitnessSchema.optional(),
|
|
569
625
|
}),
|
|
570
626
|
|
|
571
|
-
getBlockNumber: z.function({ input: z.tuple([optional(
|
|
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 }),
|
|
632
|
+
|
|
633
|
+
getL1Constants: z.function({ input: z.tuple([]), output: L1RollupConstantsSchema }),
|
|
634
|
+
|
|
635
|
+
getSyncedL2SlotNumber: z.function({ input: z.tuple([]), output: SlotNumberSchema.optional() }),
|
|
572
636
|
|
|
573
|
-
|
|
637
|
+
getSyncedL2EpochNumber: z.function({ input: z.tuple([]), output: EpochNumberSchema.optional() }),
|
|
574
638
|
|
|
575
|
-
|
|
639
|
+
getSyncedL1Timestamp: z.function({ input: z.tuple([]), output: schemas.BigInt.optional() }),
|
|
576
640
|
|
|
577
641
|
getCheckpointsData: z.function({ input: z.tuple([CheckpointsQuerySchema]), output: z.array(CheckpointDataSchema) }),
|
|
578
642
|
|
|
@@ -629,11 +693,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
629
693
|
|
|
630
694
|
getProtocolContractAddresses: z.function({ input: z.tuple([]), output: ProtocolContractAddressesSchema }),
|
|
631
695
|
|
|
632
|
-
registerContractFunctionSignatures: z.function({
|
|
633
|
-
input: z.tuple([z.array(z.string().max(MAX_SIGNATURE_LEN)).max(MAX_SIGNATURES_PER_REGISTER_CALL)]),
|
|
634
|
-
output: z.void(),
|
|
635
|
-
}),
|
|
636
|
-
|
|
637
696
|
getPrivateLogsByTags: z.function({
|
|
638
697
|
input: z.tuple([PrivateLogsQuerySchema]),
|
|
639
698
|
output: z.array(z.array(LogResultSchema)),
|
|
@@ -657,16 +716,20 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
657
716
|
input: z.tuple([
|
|
658
717
|
optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)),
|
|
659
718
|
optional(TxHash.schema),
|
|
719
|
+
optional(GetTxByHashOptionsSchema),
|
|
660
720
|
]),
|
|
661
721
|
output: z.array(Tx.schema),
|
|
662
722
|
}),
|
|
663
723
|
|
|
664
724
|
getPendingTxCount: z.function({ input: z.tuple([]), output: z.number() }),
|
|
665
725
|
|
|
666
|
-
getTxByHash: z.function({
|
|
726
|
+
getTxByHash: z.function({
|
|
727
|
+
input: z.tuple([TxHash.schema, optional(GetTxByHashOptionsSchema)]),
|
|
728
|
+
output: Tx.schema.optional(),
|
|
729
|
+
}),
|
|
667
730
|
|
|
668
731
|
getTxsByHash: z.function({
|
|
669
|
-
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)]),
|
|
670
733
|
output: z.array(Tx.schema),
|
|
671
734
|
}),
|
|
672
735
|
|
|
@@ -703,13 +766,28 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
703
766
|
getContractClass: z.function({ input: z.tuple([schemas.Fr]), output: ContractClassPublicSchema.optional() }),
|
|
704
767
|
|
|
705
768
|
getContract: z.function({
|
|
706
|
-
input: z.tuple([schemas.AztecAddress]),
|
|
769
|
+
input: z.tuple([schemas.AztecAddress, optional(BlockParameterSchema)]),
|
|
707
770
|
output: ContractInstanceWithAddressSchema.optional(),
|
|
708
771
|
}),
|
|
709
772
|
|
|
710
773
|
getEncodedEnr: z.function({ input: z.tuple([]), output: z.string().optional() }),
|
|
711
774
|
|
|
712
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
|
+
}),
|
|
713
791
|
};
|
|
714
792
|
|
|
715
793
|
export function createAztecNodeClient(
|
|
@@ -719,7 +797,7 @@ export function createAztecNodeClient(
|
|
|
719
797
|
batchWindowMS = 0,
|
|
720
798
|
): AztecNode {
|
|
721
799
|
return createSafeJsonRpcClient<AztecNode>(url, AztecNodeApiSchema, {
|
|
722
|
-
namespaceMethods: '
|
|
800
|
+
namespaceMethods: 'aztec',
|
|
723
801
|
fetch,
|
|
724
802
|
batchWindowMS,
|
|
725
803
|
onResponse: getVersioningResponseHandler(versions),
|
|
@@ -64,6 +64,8 @@ type ProposerBlockBuilderOptions = BlockBuilderOptionsBase & {
|
|
|
64
64
|
maxBlocksPerCheckpoint: number;
|
|
65
65
|
/** Per-block gas budget multiplier. Budget = (remaining / remainingBlocks) * multiplier. */
|
|
66
66
|
perBlockAllocationMultiplier: number;
|
|
67
|
+
/** Per-block budget multiplier for DA gas and blob fields. Falls back to perBlockAllocationMultiplier when unset. */
|
|
68
|
+
perBlockDAAllocationMultiplier?: number;
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
/** Validator mode: no redistribution params needed. */
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
import { type L2BlockTag, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
|
-
* Public
|
|
7
|
-
*
|
|
4
|
+
* Public checkpoint-tip selectors usable in RPC requests.
|
|
5
|
+
*
|
|
6
|
+
* `'proposed'` is intentionally excluded: the proposed-but-unconfirmed checkpoint frontier is an
|
|
7
|
+
* archiver-internal pipelining concept, not part of the public chain-tip surface. Select the
|
|
8
|
+
* proposed *block* tip with a block tag (`L2BlockTag`) instead.
|
|
8
9
|
*/
|
|
9
|
-
export type
|
|
10
|
+
export type CheckpointTag = 'checkpointed' | 'proven' | 'finalized';
|
|
10
11
|
|
|
11
|
-
export const
|
|
12
|
-
z.literal('proposed'),
|
|
12
|
+
export const CheckpointTagSchema = z.union([
|
|
13
13
|
z.literal('checkpointed'),
|
|
14
14
|
z.literal('proven'),
|
|
15
15
|
z.literal('finalized'),
|
|
16
|
-
]) satisfies z.ZodType<
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Tips of the L2 chain.
|
|
20
|
-
* Omits the sequencer-internal `proposedCheckpoint` from the public RPC surface.
|
|
21
|
-
*/
|
|
22
|
-
export type ChainTips = Omit<L2Tips, 'proposedCheckpoint'>;
|
|
23
|
-
|
|
24
|
-
export const ChainTipsSchema = L2TipsSchema.omit({ proposedCheckpoint: true });
|
|
16
|
+
]) satisfies z.ZodType<CheckpointTag>;
|
|
@@ -2,18 +2,18 @@ import { CheckpointNumberSchema, SlotNumberSchema } from '@aztec/foundation/bran
|
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { CheckpointTagSchema } from './chain_tips.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Selector for a checkpoint in RPC calls.
|
|
9
9
|
*
|
|
10
10
|
* Accepts a numeric checkpoint number (or `{ number }`), a slot number (`{ slot }`),
|
|
11
|
-
* or a
|
|
11
|
+
* or a checkpoint-tip name (e.g. `'checkpointed'`, `'proven'`, `'finalized'`).
|
|
12
12
|
*/
|
|
13
13
|
export const CheckpointParameterSchema = z.union([
|
|
14
14
|
z.object({ number: CheckpointNumberSchema }).strict(),
|
|
15
15
|
z.object({ slot: SlotNumberSchema }).strict(),
|
|
16
|
-
|
|
16
|
+
CheckpointTagSchema,
|
|
17
17
|
CheckpointNumberSchema,
|
|
18
18
|
]);
|
|
19
19
|
|
package/src/interfaces/client.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './aztec-node.js';
|
|
2
2
|
export * from './aztec-node-admin.js';
|
|
3
3
|
export * from './aztec-node-debug.js';
|
|
4
|
+
export { type PeerInfo, type ProposalsForSlot } from './p2p.js';
|
|
4
5
|
export * from './block_response.js';
|
|
5
6
|
export * from './chain_tips.js';
|
|
6
7
|
export * from './checkpoint_parameter.js';
|
|
@@ -30,6 +30,11 @@ export interface SequencerConfig {
|
|
|
30
30
|
maxDABlockGas?: number;
|
|
31
31
|
/** Per-block gas budget multiplier for both L2 and DA gas. Budget = (checkpointLimit / maxBlocks) * multiplier. */
|
|
32
32
|
perBlockAllocationMultiplier?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Per-block budget multiplier applied to DA gas and blob fields in place of `perBlockAllocationMultiplier`.
|
|
35
|
+
* Defaults higher than the general multiplier so the largest contract class deploy fits a single block.
|
|
36
|
+
*/
|
|
37
|
+
perBlockDAAllocationMultiplier?: number;
|
|
33
38
|
/** Redistribute remaining checkpoint budget evenly across remaining blocks instead of allowing a single block to consume the entire remaining budget. */
|
|
34
39
|
redistributeCheckpointBudget?: boolean;
|
|
35
40
|
/** Recipient of block reward. */
|
|
@@ -44,8 +49,16 @@ export interface SequencerConfig {
|
|
|
44
49
|
txPublicSetupAllowListExtend?: AllowedElement[];
|
|
45
50
|
/** Payload address to vote for */
|
|
46
51
|
governanceProposerPayload?: EthAddress;
|
|
47
|
-
/**
|
|
48
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Minimum block-building time (`min_block_duration`) still worth allocating if the proposer starts
|
|
54
|
+
* late, in seconds.
|
|
55
|
+
*/
|
|
56
|
+
minBlockDuration?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Local time (`checkpoint_proposal_prepare_time`) between the last block build finishing and the
|
|
59
|
+
* checkpoint proposal being ready for p2p send, in seconds.
|
|
60
|
+
*/
|
|
61
|
+
checkpointProposalPrepareTime?: number;
|
|
49
62
|
/** How much time (in seconds) we allow in the slot for publishing the L1 tx. */
|
|
50
63
|
l1PublishingTime?: number;
|
|
51
64
|
/** Used for testing to introduce a fake delay after processing each tx */
|
|
@@ -83,12 +96,16 @@ export interface SequencerConfig {
|
|
|
83
96
|
injectHighSValueAttestation?: boolean;
|
|
84
97
|
/** Inject an attestation with an unrecoverable signature (for testing only) */
|
|
85
98
|
injectUnrecoverableSignatureAttestation?: boolean;
|
|
99
|
+
/** Inject a non-proposer attestation slot in yParity (v ∈ {0, 1}) form in the packed L1 tuple (for testing only) */
|
|
100
|
+
injectYParityAttestation?: boolean;
|
|
86
101
|
/** Whether to run in fisherman mode: builds blocks on every slot for validation without publishing */
|
|
87
102
|
fishermanMode?: boolean;
|
|
88
103
|
/** Shuffle attestation ordering to create invalid ordering (for testing only) */
|
|
89
104
|
shuffleAttestationOrdering?: boolean;
|
|
90
|
-
/** Duration per block in milliseconds
|
|
105
|
+
/** Duration per block in milliseconds, used to derive how many blocks fit in a slot (defaults to 3000 ms). */
|
|
91
106
|
blockDurationMs?: number;
|
|
107
|
+
/** Consensus grace in seconds for a received checkpoint proposal to materialize into local proposed state. */
|
|
108
|
+
checkpointProposalSyncGraceSeconds?: number;
|
|
92
109
|
/** Expected number of block proposals per slot for P2P peer scoring. 0 disables scoring, undefined falls back to blocksPerSlot - 1. */
|
|
93
110
|
expectedBlockProposalsPerSlot?: number;
|
|
94
111
|
/** Have sequencer build and publish an empty checkpoint if there are no txs */
|
|
@@ -125,6 +142,7 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
|
|
|
125
142
|
publishTxsWithProposals: z.boolean().optional(),
|
|
126
143
|
maxDABlockGas: z.number().optional(),
|
|
127
144
|
perBlockAllocationMultiplier: z.number().optional(),
|
|
145
|
+
perBlockDAAllocationMultiplier: z.number().optional(),
|
|
128
146
|
redistributeCheckpointBudget: z.boolean().optional(),
|
|
129
147
|
coinbase: schemas.EthAddress.optional(),
|
|
130
148
|
feeRecipient: schemas.AztecAddress.optional(),
|
|
@@ -132,8 +150,9 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
|
|
|
132
150
|
acvmBinaryPath: z.string().optional(),
|
|
133
151
|
txPublicSetupAllowListExtend: z.array(AllowedElementSchema).optional(),
|
|
134
152
|
governanceProposerPayload: schemas.EthAddress.optional(),
|
|
153
|
+
minBlockDuration: z.number().positive().optional(),
|
|
154
|
+
checkpointProposalPrepareTime: z.number().nonnegative().optional(),
|
|
135
155
|
l1PublishingTime: z.number().optional(),
|
|
136
|
-
enforceTimeTable: z.boolean().optional(),
|
|
137
156
|
fakeProcessingDelayPerTxMs: z.number().optional(),
|
|
138
157
|
fakeThrowAfterProcessingTxCount: z.number().optional(),
|
|
139
158
|
attestationPropagationTime: z.number().optional(),
|
|
@@ -148,9 +167,11 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
|
|
|
148
167
|
injectFakeAttestation: z.boolean().optional(),
|
|
149
168
|
injectHighSValueAttestation: z.boolean().optional(),
|
|
150
169
|
injectUnrecoverableSignatureAttestation: z.boolean().optional(),
|
|
170
|
+
injectYParityAttestation: z.boolean().optional(),
|
|
151
171
|
fishermanMode: z.boolean().optional(),
|
|
152
172
|
shuffleAttestationOrdering: z.boolean().optional(),
|
|
153
173
|
blockDurationMs: z.number().positive().optional(),
|
|
174
|
+
checkpointProposalSyncGraceSeconds: z.number().nonnegative().optional(),
|
|
154
175
|
expectedBlockProposalsPerSlot: z.number().nonnegative().optional(),
|
|
155
176
|
buildCheckpointIfEmpty: z.boolean().optional(),
|
|
156
177
|
skipPushProposedBlocksToArchiver: z.boolean().optional(),
|
|
@@ -164,7 +185,6 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
|
|
|
164
185
|
|
|
165
186
|
type SequencerConfigOptionalKeys =
|
|
166
187
|
| 'governanceProposerPayload'
|
|
167
|
-
| 'blockDurationMs'
|
|
168
188
|
| 'expectedBlockProposalsPerSlot'
|
|
169
189
|
| 'coinbase'
|
|
170
190
|
| 'feeRecipient'
|
|
@@ -172,7 +192,8 @@ type SequencerConfigOptionalKeys =
|
|
|
172
192
|
| 'acvmBinaryPath'
|
|
173
193
|
| 'fakeProcessingDelayPerTxMs'
|
|
174
194
|
| 'fakeThrowAfterProcessingTxCount'
|
|
175
|
-
| '
|
|
195
|
+
| 'minBlockDuration'
|
|
196
|
+
| 'checkpointProposalPrepareTime'
|
|
176
197
|
| 'txPublicSetupAllowListExtend'
|
|
177
198
|
| 'invalidBlockProposalIndexWithinCheckpoint'
|
|
178
199
|
| 'minValidTxsPerBlock'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import type { ZodFor } from '../schemas/schemas.js';
|
|
4
|
+
|
|
5
|
+
/** Options for retrieving txs via {@link AztecNode.getTxByHash} and {@link AztecNode.getTxsByHash}. */
|
|
6
|
+
export type GetTxByHashOptions = {
|
|
7
|
+
/** Keep the proof on the returned tx; stripped by default. */
|
|
8
|
+
includeProof?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** Zod schema for {@link GetTxByHashOptions}. */
|
|
12
|
+
export const GetTxByHashOptionsSchema: ZodFor<GetTxByHashOptions> = z.object({
|
|
13
|
+
includeProof: z.boolean().optional(),
|
|
14
|
+
});
|
|
@@ -9,7 +9,7 @@ import type { NullifierLeaf } from '../trees/nullifier_leaf.js';
|
|
|
9
9
|
import type { PublicDataTreeLeaf } from '../trees/public_data_leaf.js';
|
|
10
10
|
import type { BlockHeader } from '../tx/block_header.js';
|
|
11
11
|
import type { StateReference } from '../tx/state_reference.js';
|
|
12
|
-
import type { WorldStateRevision
|
|
12
|
+
import type { WorldStateRevision } from '../world-state/world_state_revision.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Type alias for the nullifier tree ID.
|
|
@@ -138,7 +138,13 @@ export interface MerkleTreeReadOperations {
|
|
|
138
138
|
/**
|
|
139
139
|
* Gets the current revision.
|
|
140
140
|
*/
|
|
141
|
-
getRevision(): WorldStateRevision
|
|
141
|
+
getRevision(): WorldStateRevision;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Returns the IPC path of the underlying aztec-wsdb process. External AVM simulators use this to
|
|
145
|
+
* connect to the same world state instance that the TS layer is using.
|
|
146
|
+
*/
|
|
147
|
+
getIpcPath(): string;
|
|
142
148
|
|
|
143
149
|
/**
|
|
144
150
|
* Gets sibling path for a leaf.
|
package/src/interfaces/p2p.ts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import type { CheckpointProposalHash, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
2
3
|
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
|
|
5
|
-
import
|
|
6
|
+
import { BlockProposal } from '../p2p/block_proposal.js';
|
|
6
7
|
import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
|
|
7
|
-
import type
|
|
8
|
+
import { CheckpointProposal, type CheckpointProposalCore } from '../p2p/checkpoint_proposal.js';
|
|
8
9
|
import { type ApiSchemaFor, optional, schemas } from '../schemas/index.js';
|
|
9
10
|
import { Tx } from '../tx/tx.js';
|
|
10
11
|
import { TxHash } from '../tx/tx_hash.js';
|
|
11
12
|
import { MAX_RPC_TXS_LEN } from './api_limit.js';
|
|
13
|
+
import { type GetTxByHashOptions, GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
|
|
12
14
|
|
|
13
15
|
export type PeerInfo =
|
|
14
16
|
| { status: 'connected'; score: number; id: string }
|
|
15
17
|
| { status: 'dialing'; dialStatus: string; id: string; addresses: string[] }
|
|
16
18
|
| { status: 'cached'; id: string; addresses: string[]; enr: string; dialAttempts: number };
|
|
17
19
|
|
|
18
|
-
const PeerInfoSchema = z.discriminatedUnion('status', [
|
|
20
|
+
export const PeerInfoSchema = z.discriminatedUnion('status', [
|
|
19
21
|
z.object({ status: z.literal('connected'), score: z.number(), id: z.string() }),
|
|
20
22
|
z.object({ status: z.literal('dialing'), dialStatus: z.string(), id: z.string(), addresses: z.array(z.string()) }),
|
|
21
23
|
z.object({
|
|
@@ -30,12 +32,14 @@ const PeerInfoSchema = z.discriminatedUnion('status', [
|
|
|
30
32
|
/** Exposed API to the P2P module. */
|
|
31
33
|
export interface P2PApi {
|
|
32
34
|
/**
|
|
33
|
-
* Returns all pending transactions in the transaction pool.
|
|
35
|
+
* Returns all pending transactions in the transaction pool. The txs' proofs are stripped unless
|
|
36
|
+
* `includeProof` is set.
|
|
34
37
|
* @param limit - The number of items to returns
|
|
35
38
|
* @param after - The last known pending tx. Used for pagination
|
|
39
|
+
* @param options - Options for the returned txs (eg whether to include their proofs).
|
|
36
40
|
* @returns An array of Txs.
|
|
37
41
|
*/
|
|
38
|
-
getPendingTxs(limit?: number, after?: TxHash): Promise<Tx[]>;
|
|
42
|
+
getPendingTxs(limit?: number, after?: TxHash, options?: GetTxByHashOptions): Promise<Tx[]>;
|
|
39
43
|
|
|
40
44
|
/** Returns the number of pending txs in the p2p tx pool. */
|
|
41
45
|
getPendingTxCount(): Promise<number>;
|
|
@@ -66,17 +70,32 @@ export interface P2PApi {
|
|
|
66
70
|
): Promise<CheckpointAttestation[]>;
|
|
67
71
|
}
|
|
68
72
|
|
|
73
|
+
export type ProposalsForSlot = {
|
|
74
|
+
blockProposals: BlockProposal[];
|
|
75
|
+
checkpointProposals: CheckpointProposalCore[];
|
|
76
|
+
};
|
|
77
|
+
|
|
69
78
|
export interface P2PClient extends P2PApi {
|
|
70
79
|
/** Manually adds checkpoint attestations to the p2p client attestation pool. */
|
|
71
80
|
addOwnCheckpointAttestations(attestations: CheckpointAttestation[]): Promise<void>;
|
|
72
81
|
|
|
73
82
|
/** Returns retained signed proposals for a slot. */
|
|
74
|
-
getProposalsForSlot(slot: SlotNumber): Promise<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
getProposalsForSlot(slot: SlotNumber): Promise<ProposalsForSlot>;
|
|
84
|
+
|
|
85
|
+
/** Returns whether a checkpoint proposal was retained for a slot. */
|
|
86
|
+
hasCheckpointProposalForSlot(slot: SlotNumber): Promise<boolean>;
|
|
78
87
|
}
|
|
79
88
|
|
|
89
|
+
const MAX_PROPOSALS_FOR_SLOT_RPC_LEN = 256;
|
|
90
|
+
|
|
91
|
+
export const BlockProposalSchema = bufferSchemaFor(BlockProposal);
|
|
92
|
+
export const CheckpointProposalSchema = bufferSchemaFor(CheckpointProposal);
|
|
93
|
+
|
|
94
|
+
export const ProposalsForSlotSchema = z.object({
|
|
95
|
+
blockProposals: z.array(BlockProposalSchema).max(MAX_PROPOSALS_FOR_SLOT_RPC_LEN),
|
|
96
|
+
checkpointProposals: z.array(CheckpointProposalSchema).max(MAX_PROPOSALS_FOR_SLOT_RPC_LEN),
|
|
97
|
+
});
|
|
98
|
+
|
|
80
99
|
export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
|
|
81
100
|
getCheckpointAttestationsForSlot: z.function({
|
|
82
101
|
input: z.tuple([
|
|
@@ -89,6 +108,7 @@ export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
|
|
|
89
108
|
input: z.tuple([
|
|
90
109
|
optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)),
|
|
91
110
|
optional(TxHash.schema),
|
|
111
|
+
optional(GetTxByHashOptionsSchema),
|
|
92
112
|
]),
|
|
93
113
|
output: z.array(Tx.schema),
|
|
94
114
|
}),
|