@aztec/stdlib 0.0.1-commit.c7c42ec → 0.0.1-commit.f295ac2
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/contract_artifact.d.ts +2 -2
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +1 -1
- package/dest/abi/function_call.d.ts +9 -1
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/selector.js +3 -1
- package/dest/abi/utils.d.ts +7 -1
- package/dest/abi/utils.d.ts.map +1 -1
- package/dest/abi/utils.js +7 -0
- package/dest/auth_witness/auth_witness.d.ts +2 -1
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/avm/avm.d.ts +62 -62
- package/dest/avm/avm_accumulated_data.d.ts +30 -3
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +5 -2
- package/dest/avm/avm_circuit_public_inputs.d.ts +9 -9
- package/dest/avm/avm_circuit_public_inputs.js +3 -1
- package/dest/avm/avm_proving_request.d.ts +299 -299
- package/dest/avm/contract_storage_read.d.ts +13 -1
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +13 -1
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
- package/dest/avm/public_data_read.d.ts +10 -1
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.d.ts +10 -1
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.js +3 -1
- package/dest/avm/public_data_write.d.ts +7 -1
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_inner_call_request.d.ts +4 -1
- package/dest/avm/public_inner_call_request.d.ts.map +1 -1
- package/dest/avm/public_inner_call_request.js +3 -1
- package/dest/avm/revert_code.d.ts +4 -4
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +3 -1
- package/dest/aztec-address/index.js +4 -2
- package/dest/block/attestation_info.d.ts +5 -5
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +4 -4
- package/dest/block/block_hash.d.ts +7 -1
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +12 -0
- package/dest/block/block_parameter.d.ts +4 -3
- package/dest/block/block_parameter.d.ts.map +1 -1
- package/dest/block/block_parameter.js +2 -0
- package/dest/block/body.d.ts +1 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +5 -2
- package/dest/block/checkpointed_l2_block.d.ts +16 -133
- package/dest/block/checkpointed_l2_block.d.ts.map +1 -1
- package/dest/block/checkpointed_l2_block.js +5 -43
- package/dest/block/in_block.d.ts +3 -3
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/index.d.ts +1 -3
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +0 -2
- package/dest/block/l2_block_new.d.ts +20 -13
- package/dest/block/l2_block_new.d.ts.map +1 -1
- package/dest/block/l2_block_new.js +13 -7
- package/dest/block/l2_block_source.d.ts +276 -55
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +25 -6
- 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 +15 -5
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +4 -2
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +93 -30
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -16
- 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 +55 -61
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.js +179 -0
- 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 +478 -38
- package/dest/block/validate_block_result.d.ts +24 -24
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +18 -17
- package/dest/checkpoint/checkpoint.d.ts +24 -14
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +16 -3
- package/dest/checkpoint/checkpoint_info.d.ts +32 -3
- package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint_info.js +34 -1
- 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/published_checkpoint.d.ts +15 -13
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/published_checkpoint.js +4 -3
- package/dest/contract/complete_address.d.ts +4 -1
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/contract_deployment_data.d.ts +5 -5
- package/dest/contract/index.d.ts +1 -3
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +0 -2
- package/dest/contract/interfaces/contract_instance.d.ts +16 -16
- package/dest/database-version/version_manager.d.ts +4 -2
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +3 -1
- package/dest/deserialization/index.d.ts +11 -0
- package/dest/deserialization/index.d.ts.map +1 -0
- package/dest/deserialization/index.js +10 -0
- package/dest/errors/proving_error.d.ts +2 -2
- package/dest/errors/proving_error.d.ts.map +1 -1
- package/dest/gas/gas.js +3 -1
- package/dest/gas/gas_fees.js +3 -1
- package/dest/interfaces/api_limit.d.ts +2 -1
- package/dest/interfaces/api_limit.d.ts.map +1 -1
- package/dest/interfaces/api_limit.js +1 -0
- package/dest/interfaces/archiver.d.ts +6 -6
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +16 -12
- package/dest/interfaces/aztec-node-admin.d.ts +64 -31
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +2 -2
- package/dest/interfaces/aztec-node.d.ts +45 -49
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +15 -12
- package/dest/interfaces/block-builder.d.ts +19 -17
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/configs.d.ts +12 -7
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +2 -1
- package/dest/interfaces/get_logs_response.d.ts +1 -1
- package/dest/interfaces/p2p.d.ts +7 -9
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +3 -4
- package/dest/interfaces/proving-job.d.ts +184 -184
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +1 -7
- package/dest/interfaces/server_circuit_prover.d.ts +4 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +108 -18
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +5 -3
- package/dest/kernel/claimed_length_array.js +3 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +6 -5
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.js +19 -10
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.js +14 -4
- package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +2 -1
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +6 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/read_request.d.ts +7 -1
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request_hints.d.ts +7 -1
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.js +3 -1
- package/dest/kernel/log_hash.js +3 -1
- package/dest/kernel/private_accumulated_data.d.ts +23 -1
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.d.ts +25 -1
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_request.d.ts +16 -1
- package/dest/kernel/private_call_request.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +74 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +31 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_data.d.ts +7 -1
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +22 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +10 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +23 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_log_data.js +5 -2
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
- package/dest/kernel/private_to_avm_accumulated_data.js +5 -2
- package/dest/kernel/private_to_public_accumulated_data.js +3 -1
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +17 -1
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.js +3 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +16 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.d.ts +10 -1
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +3 -1
- package/dest/kernel/public_call_request.d.ts +22 -1
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +5 -2
- package/dest/kernel/utils/optional_number.d.ts +7 -1
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/keys/public_keys.d.ts +5 -1
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +3 -1
- package/dest/logs/extended_contract_class_log.d.ts +3 -1
- package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
- package/dest/logs/extended_public_log.d.ts +5 -3
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/log_id.d.ts +5 -1
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/private_log.js +3 -1
- package/dest/logs/public_log.js +3 -1
- package/dest/messaging/in_hash.d.ts +4 -2
- package/dest/messaging/in_hash.d.ts.map +1 -1
- package/dest/messaging/in_hash.js +3 -1
- package/dest/messaging/inbox_leaf.d.ts +3 -1
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/l1_actor.d.ts +7 -1
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.d.ts +6 -1
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l2_actor.d.ts +7 -1
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +88 -6
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +160 -42
- package/dest/messaging/out_hash.d.ts +41 -3
- package/dest/messaging/out_hash.d.ts.map +1 -1
- package/dest/messaging/out_hash.js +54 -19
- package/dest/note/note_dao.d.ts +36 -5
- package/dest/note/note_dao.d.ts.map +1 -1
- package/dest/note/note_dao.js +15 -12
- package/dest/p2p/attestation_utils.d.ts +3 -3
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +1 -1
- package/dest/p2p/block_proposal.d.ts +93 -21
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +140 -39
- package/dest/p2p/checkpoint_attestation.d.ts +81 -0
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
- package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +22 -19
- package/dest/p2p/checkpoint_proposal.d.ts +160 -0
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
- package/dest/p2p/checkpoint_proposal.js +229 -0
- package/dest/p2p/consensus_payload.d.ts +9 -9
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +3 -5
- package/dest/p2p/gossipable.d.ts +4 -3
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +16 -5
- package/dest/p2p/index.d.ts +4 -2
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +3 -1
- package/dest/p2p/signature_utils.d.ts +5 -3
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +3 -1
- package/dest/p2p/signed_txs.d.ts +42 -0
- package/dest/p2p/signed_txs.d.ts.map +1 -0
- package/dest/p2p/signed_txs.js +75 -0
- package/dest/p2p/topic_type.d.ts +3 -2
- package/dest/p2p/topic_type.d.ts.map +1 -1
- package/dest/p2p/topic_type.js +10 -3
- package/dest/parity/parity_base_private_inputs.d.ts +3 -1
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.d.ts +4 -1
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_root_private_inputs.d.ts +2 -1
- package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.d.ts +1 -1
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +9 -4
- package/dest/proofs/proof.d.ts +4 -1
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/recursive_proof.d.ts +10 -1
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.d.ts +34 -1
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.d.ts +12 -1
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.js +1 -1
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.d.ts +47 -11
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +8 -12
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +64 -1
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.d.ts +10 -1
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +3 -1
- package/dest/rollup/checkpoint_header.d.ts +42 -12
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +49 -19
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +41 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +10 -2
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +44 -3
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
- package/dest/rollup/epoch_constant_data.d.ts +16 -1
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/root_rollup_private_inputs.d.ts +6 -1
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +18 -3
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.js +9 -3
- package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts +29 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/schemas/schemas.d.ts +1 -1
- package/dest/tests/factories.d.ts +16 -10
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +60 -25
- package/dest/tests/jest.d.ts +4 -4
- package/dest/tests/jest.js +9 -9
- package/dest/tests/mocks.d.ts +66 -16
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +114 -54
- package/dest/trees/append_only_tree_snapshot.d.ts +13 -1
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +3 -1
- package/dest/trees/nullifier_leaf.d.ts +13 -1
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.d.ts +10 -1
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.d.ts +16 -1
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_witness.d.ts +11 -1
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/tx/block_header.d.ts +12 -1
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +6 -1
- package/dest/tx/call_context.d.ts +13 -1
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/call_context.js +3 -1
- package/dest/tx/capsule.d.ts +4 -1
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/execution_payload.d.ts +9 -1
- package/dest/tx/execution_payload.d.ts.map +1 -1
- package/dest/tx/function_data.d.ts +4 -2
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/global_variable_builder.d.ts +2 -2
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +9 -1
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +3 -1
- package/dest/tx/hashed_values.d.ts +7 -1
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/in_tx.d.ts +1 -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/partial_state_reference.d.ts +4 -1
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/private_execution_result.d.ts +23 -6
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +4 -21
- package/dest/tx/private_tx_constant_data.d.ts +16 -1
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/profiling.d.ts +149 -26
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +44 -7
- package/dest/tx/protocol_contracts.d.ts +1 -1
- package/dest/tx/public_call_request_with_calldata.d.ts +7 -1
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +3 -1
- package/dest/tx/state_reference.d.ts +3 -1
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +3 -1
- package/dest/tx/tree_snapshots.js +3 -1
- package/dest/tx/tx.d.ts +23 -1
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +3 -1
- package/dest/tx/tx_context.d.ts +2 -1
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_effect.d.ts +32 -6
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +3 -8
- package/dest/tx/tx_execution_request.d.ts +30 -1
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_execution_request.js +6 -2
- package/dest/tx/tx_hash.d.ts +2 -1
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_receipt.d.ts +7 -1
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_request.d.ts +6 -1
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/types/shared.d.ts +4 -1
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/validators/schemas.d.ts +8 -8
- package/dest/vks/verification_key.d.ts +22 -1
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/vk_data.d.ts +7 -1
- package/dest/vks/vk_data.d.ts.map +1 -1
- package/dest/zkpassport/index.d.ts +3 -4
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/dest/zkpassport/index.js +9 -9
- package/package.json +12 -10
- package/src/abi/contract_artifact.ts +10 -10
- package/src/abi/utils.ts +17 -0
- package/src/block/attestation_info.ts +9 -6
- package/src/block/block_hash.ts +22 -0
- package/src/block/block_parameter.ts +4 -2
- package/src/block/body.ts +2 -1
- package/src/block/checkpointed_l2_block.ts +5 -55
- package/src/block/in_block.ts +2 -2
- package/src/block/index.ts +0 -2
- package/src/block/l2_block_new.ts +30 -9
- package/src/block/l2_block_source.ts +100 -30
- package/src/block/l2_block_stream/index.ts +1 -0
- package/src/block/l2_block_stream/interfaces.ts +15 -4
- package/src/block/l2_block_stream/l2_block_stream.ts +111 -37
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +62 -56
- package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
- package/src/block/test/l2_tips_store_test_suite.ts +480 -36
- package/src/block/validate_block_result.ts +40 -35
- package/src/checkpoint/checkpoint.ts +28 -5
- package/src/checkpoint/checkpoint_info.ts +45 -2
- package/src/checkpoint/index.ts +1 -0
- package/src/checkpoint/published_checkpoint.ts +4 -3
- package/src/contract/index.ts +0 -2
- package/src/deserialization/index.ts +21 -0
- package/src/interfaces/api_limit.ts +1 -0
- package/src/interfaces/archiver.ts +24 -14
- package/src/interfaces/aztec-node-admin.ts +5 -2
- package/src/interfaces/aztec-node.ts +81 -69
- package/src/interfaces/block-builder.ts +33 -26
- package/src/interfaces/configs.ts +5 -0
- package/src/interfaces/p2p.ts +8 -12
- package/src/interfaces/proving-job.ts +2 -11
- package/src/interfaces/server_circuit_prover.ts +3 -2
- package/src/interfaces/validator.ts +64 -14
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +20 -12
- package/src/kernel/hints/build_nullifier_read_request_hints.ts +22 -10
- package/src/messaging/in_hash.ts +3 -1
- package/src/messaging/l2_to_l1_membership.ts +178 -52
- package/src/messaging/out_hash.ts +62 -21
- package/src/note/note_dao.ts +18 -13
- package/src/p2p/attestation_utils.ts +3 -3
- package/src/p2p/block_proposal.ts +204 -44
- package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +31 -25
- package/src/p2p/checkpoint_proposal.ts +348 -0
- package/src/p2p/consensus_payload.ts +5 -7
- package/src/p2p/gossipable.ts +14 -4
- package/src/p2p/index.ts +3 -1
- package/src/p2p/signature_utils.ts +3 -1
- package/src/p2p/signed_txs.ts +88 -0
- package/src/p2p/topic_type.ts +4 -3
- package/src/proofs/chonk_proof.ts +9 -5
- package/src/rollup/block_headers_hash.ts +1 -1
- package/src/rollup/block_rollup_public_inputs.ts +5 -11
- package/src/rollup/checkpoint_header.ts +63 -20
- package/src/rollup/checkpoint_rollup_public_inputs.ts +12 -0
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
- package/src/rollup/root_rollup_public_inputs.ts +9 -0
- package/src/tests/factories.ts +56 -40
- package/src/tests/jest.ts +9 -9
- package/src/tests/mocks.ts +198 -85
- package/src/tx/block_header.ts +5 -0
- package/src/tx/global_variable_builder.ts +1 -1
- package/src/tx/index.ts +0 -1
- package/src/tx/private_execution_result.ts +1 -16
- package/src/tx/profiling.ts +46 -4
- package/src/tx/tx.ts +2 -0
- package/src/tx/tx_effect.ts +0 -9
- package/src/tx/tx_execution_request.ts +2 -0
- package/src/zkpassport/index.ts +11 -12
- package/dest/block/l2_block.d.ts +0 -143
- package/dest/block/l2_block.d.ts.map +0 -1
- package/dest/block/l2_block.js +0 -198
- package/dest/block/l2_block_code_to_purge.d.ts +0 -12
- package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
- package/dest/block/l2_block_code_to_purge.js +0 -61
- package/dest/block/l2_block_header.d.ts +0 -98
- package/dest/block/l2_block_header.d.ts.map +0 -1
- package/dest/block/l2_block_header.js +0 -153
- package/dest/contract/contract_class_metadata.d.ts +0 -8
- package/dest/contract/contract_class_metadata.d.ts.map +0 -1
- package/dest/contract/contract_class_metadata.js +0 -1
- package/dest/contract/contract_metadata.d.ts +0 -7
- package/dest/contract/contract_metadata.d.ts.map +0 -1
- package/dest/contract/contract_metadata.js +0 -1
- package/dest/p2p/block_attestation.d.ts +0 -80
- package/dest/p2p/block_attestation.d.ts.map +0 -1
- package/dest/tx/content_commitment.d.ts +0 -49
- package/dest/tx/content_commitment.d.ts.map +0 -1
- package/dest/tx/content_commitment.js +0 -90
- package/src/block/l2_block.ts +0 -271
- package/src/block/l2_block_code_to_purge.ts +0 -88
- package/src/block/l2_block_header.ts +0 -246
- package/src/contract/contract_class_metadata.ts +0 -8
- package/src/contract/contract_metadata.ts +0 -7
- package/src/tx/content_commitment.ts +0 -113
|
@@ -10,6 +10,9 @@ import {
|
|
|
10
10
|
BlockNumber,
|
|
11
11
|
BlockNumberPositiveSchema,
|
|
12
12
|
BlockNumberSchema,
|
|
13
|
+
CheckpointNumberPositiveSchema,
|
|
14
|
+
EpochNumber,
|
|
15
|
+
EpochNumberSchema,
|
|
13
16
|
type SlotNumber,
|
|
14
17
|
} from '@aztec/foundation/branded-types';
|
|
15
18
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
@@ -21,10 +24,11 @@ import { z } from 'zod';
|
|
|
21
24
|
|
|
22
25
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
23
26
|
import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
|
|
24
|
-
import {
|
|
27
|
+
import { CheckpointedL2Block } from '../block/checkpointed_l2_block.js';
|
|
25
28
|
import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
|
|
26
|
-
import {
|
|
29
|
+
import { L2BlockNew } from '../block/l2_block_new.js';
|
|
27
30
|
import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
|
|
31
|
+
import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
|
|
28
32
|
import {
|
|
29
33
|
type ContractClassPublic,
|
|
30
34
|
ContractClassPublicSchema,
|
|
@@ -57,7 +61,7 @@ import { SingleValidatorStatsSchema, ValidatorsStatsSchema } from '../validators
|
|
|
57
61
|
import type { SingleValidatorStats, ValidatorsStats } from '../validators/types.js';
|
|
58
62
|
import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
|
|
59
63
|
import { type AllowedElement, AllowedElementSchema } from './allowed_element.js';
|
|
60
|
-
import { MAX_RPC_BLOCKS_LEN, MAX_RPC_LEN, MAX_RPC_TXS_LEN } from './api_limit.js';
|
|
64
|
+
import { MAX_RPC_BLOCKS_LEN, MAX_RPC_CHECKPOINTS_LEN, MAX_RPC_LEN, MAX_RPC_TXS_LEN } from './api_limit.js';
|
|
61
65
|
import {
|
|
62
66
|
type GetContractClassLogsResponse,
|
|
63
67
|
GetContractClassLogsResponseSchema,
|
|
@@ -71,7 +75,16 @@ import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_s
|
|
|
71
75
|
* We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
|
|
72
76
|
*/
|
|
73
77
|
export interface AztecNode
|
|
74
|
-
extends Pick<
|
|
78
|
+
extends Pick<
|
|
79
|
+
L2BlockSource,
|
|
80
|
+
| 'getBlocks'
|
|
81
|
+
| 'getL2BlocksNew'
|
|
82
|
+
| 'getPublishedBlocks'
|
|
83
|
+
| 'getPublishedCheckpoints'
|
|
84
|
+
| 'getBlockHeader'
|
|
85
|
+
| 'getL2Tips'
|
|
86
|
+
| 'getCheckpointedBlocks'
|
|
87
|
+
> {
|
|
75
88
|
/**
|
|
76
89
|
* Returns the tips of the L2 chain.
|
|
77
90
|
*/
|
|
@@ -85,72 +98,63 @@ export interface AztecNode
|
|
|
85
98
|
/**
|
|
86
99
|
* Find the indexes of the given leaves in the given tree along with a block metadata pointing to the block in which
|
|
87
100
|
* the leaves were inserted.
|
|
88
|
-
* @param
|
|
101
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
89
102
|
* @param treeId - The tree to search in.
|
|
90
103
|
* @param leafValues - The values to search for.
|
|
91
104
|
* @returns The indices of leaves and the block metadata of a block in which the leaves were inserted.
|
|
92
105
|
*/
|
|
93
106
|
findLeavesIndexes(
|
|
94
|
-
|
|
107
|
+
block: BlockParameter,
|
|
95
108
|
treeId: MerkleTreeId,
|
|
96
109
|
leafValues: Fr[],
|
|
97
110
|
): Promise<(DataInBlock<bigint> | undefined)[]>;
|
|
98
111
|
|
|
99
112
|
/**
|
|
100
113
|
* Returns a sibling path for the given index in the nullifier tree.
|
|
101
|
-
* @param
|
|
114
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
102
115
|
* @param leafIndex - The index of the leaf for which the sibling path is required.
|
|
103
116
|
* @returns The sibling path for the leaf index.
|
|
104
117
|
*/
|
|
105
|
-
getNullifierSiblingPath(
|
|
106
|
-
blockNumber: BlockParameter,
|
|
107
|
-
leafIndex: bigint,
|
|
108
|
-
): Promise<SiblingPath<typeof NULLIFIER_TREE_HEIGHT>>;
|
|
118
|
+
getNullifierSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NULLIFIER_TREE_HEIGHT>>;
|
|
109
119
|
|
|
110
120
|
/**
|
|
111
121
|
* Returns a sibling path for the given index in the note hash tree.
|
|
112
|
-
* @param
|
|
122
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
113
123
|
* @param leafIndex - The index of the leaf for which the sibling path is required.
|
|
114
124
|
* @returns The sibling path for the leaf index.
|
|
115
125
|
*/
|
|
116
|
-
getNoteHashSiblingPath(
|
|
117
|
-
blockNumber: BlockParameter,
|
|
118
|
-
leafIndex: bigint,
|
|
119
|
-
): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
|
|
126
|
+
getNoteHashSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
|
|
120
127
|
|
|
121
128
|
/**
|
|
122
129
|
* Returns a sibling path for a leaf in the committed historic blocks tree.
|
|
123
|
-
* @param
|
|
130
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
124
131
|
* @param leafIndex - Index of the leaf in the tree.
|
|
125
132
|
* @returns The sibling path.
|
|
126
133
|
*/
|
|
127
|
-
getArchiveSiblingPath(
|
|
134
|
+
getArchiveSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof ARCHIVE_HEIGHT>>;
|
|
128
135
|
|
|
129
136
|
/**
|
|
130
137
|
* Returns a sibling path for a leaf in the committed public data tree.
|
|
131
|
-
* @param
|
|
138
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
132
139
|
* @param leafIndex - Index of the leaf in the tree.
|
|
133
140
|
* @returns The sibling path.
|
|
134
141
|
*/
|
|
135
142
|
getPublicDataSiblingPath(
|
|
136
|
-
|
|
143
|
+
block: BlockParameter,
|
|
137
144
|
leafIndex: bigint,
|
|
138
145
|
): Promise<SiblingPath<typeof PUBLIC_DATA_TREE_HEIGHT>>;
|
|
139
146
|
|
|
140
147
|
/**
|
|
141
148
|
* Returns a nullifier membership witness for a given nullifier at a given block.
|
|
142
|
-
* @param
|
|
149
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
143
150
|
* @param nullifier - Nullifier we try to find witness for.
|
|
144
151
|
* @returns The nullifier membership witness (if found).
|
|
145
152
|
*/
|
|
146
|
-
getNullifierMembershipWitness(
|
|
147
|
-
blockNumber: BlockParameter,
|
|
148
|
-
nullifier: Fr,
|
|
149
|
-
): Promise<NullifierMembershipWitness | undefined>;
|
|
153
|
+
getNullifierMembershipWitness(block: BlockParameter, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
150
154
|
|
|
151
155
|
/**
|
|
152
156
|
* Returns a low nullifier membership witness for a given nullifier at a given block.
|
|
153
|
-
* @param
|
|
157
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
154
158
|
* @param nullifier - Nullifier we try to find the low nullifier witness for.
|
|
155
159
|
* @returns The low nullifier membership witness (if found).
|
|
156
160
|
* @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
|
|
@@ -158,49 +162,49 @@ export interface AztecNode
|
|
|
158
162
|
* we are trying to prove non-inclusion for.
|
|
159
163
|
*/
|
|
160
164
|
getLowNullifierMembershipWitness(
|
|
161
|
-
|
|
165
|
+
block: BlockParameter,
|
|
162
166
|
nullifier: Fr,
|
|
163
167
|
): Promise<NullifierMembershipWitness | undefined>;
|
|
164
168
|
|
|
165
169
|
/**
|
|
166
170
|
* Returns a public data tree witness for a given leaf slot at a given block.
|
|
167
|
-
* @param
|
|
171
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
168
172
|
* @param leafSlot - The leaf slot we try to find the witness for.
|
|
169
173
|
* @returns The public data witness (if found).
|
|
170
174
|
* @remarks The witness can be used to compute the current value of the public data tree leaf. If the low leaf preimage corresponds to an
|
|
171
175
|
* "in range" slot, means that the slot doesn't exist and the value is 0. If the low leaf preimage corresponds to the exact slot, the current value
|
|
172
176
|
* is contained in the leaf preimage.
|
|
173
177
|
*/
|
|
174
|
-
getPublicDataWitness(
|
|
178
|
+
getPublicDataWitness(block: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
175
179
|
|
|
176
180
|
/**
|
|
177
181
|
* Returns a membership witness for a given archive leaf at a given block.
|
|
178
|
-
* @param
|
|
182
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
179
183
|
* @param archive - The archive leaf we try to find the witness for.
|
|
180
184
|
*/
|
|
181
185
|
getArchiveMembershipWitness(
|
|
182
|
-
|
|
186
|
+
block: BlockParameter,
|
|
183
187
|
archive: Fr,
|
|
184
188
|
): Promise<MembershipWitness<typeof ARCHIVE_HEIGHT> | undefined>;
|
|
185
189
|
|
|
186
190
|
/**
|
|
187
191
|
* Returns a membership witness for a given note hash at a given block.
|
|
188
|
-
* @param
|
|
192
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
189
193
|
* @param noteHash - The note hash we try to find the witness for.
|
|
190
194
|
*/
|
|
191
195
|
getNoteHashMembershipWitness(
|
|
192
|
-
|
|
196
|
+
block: BlockParameter,
|
|
193
197
|
noteHash: Fr,
|
|
194
198
|
): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
|
|
195
199
|
|
|
196
200
|
/**
|
|
197
201
|
* Returns the index and a sibling path for a leaf in the committed l1 to l2 data tree.
|
|
198
|
-
* @param
|
|
202
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
199
203
|
* @param l1ToL2Message - The l1ToL2Message to get the index / sibling path for.
|
|
200
204
|
* @returns A tuple of the index and the sibling path of the L1ToL2Message (undefined if not found).
|
|
201
205
|
*/
|
|
202
206
|
getL1ToL2MessageMembershipWitness(
|
|
203
|
-
|
|
207
|
+
block: BlockParameter,
|
|
204
208
|
l1ToL2Message: Fr,
|
|
205
209
|
): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>] | undefined>;
|
|
206
210
|
|
|
@@ -216,32 +220,33 @@ export interface AztecNode
|
|
|
216
220
|
isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
|
|
217
221
|
|
|
218
222
|
/**
|
|
219
|
-
* Returns all the L2 to L1 messages in
|
|
220
|
-
* @param
|
|
221
|
-
* @returns
|
|
223
|
+
* Returns all the L2 to L1 messages in an epoch.
|
|
224
|
+
* @param epoch - The epoch at which to get the data.
|
|
225
|
+
* @returns A nested array of the L2 to L1 messages in each tx of each block in each checkpoint in the epoch (empty
|
|
226
|
+
* array if the epoch is not found).
|
|
222
227
|
*/
|
|
223
|
-
getL2ToL1Messages(
|
|
228
|
+
getL2ToL1Messages(epoch: EpochNumber): Promise<Fr[][][][]>;
|
|
224
229
|
|
|
225
230
|
/**
|
|
226
|
-
* Get a block specified by its number.
|
|
227
|
-
* @param number - The block number
|
|
231
|
+
* Get a block specified by its block number or 'latest'.
|
|
232
|
+
* @param number - The block number or 'latest'.
|
|
228
233
|
* @returns The requested block.
|
|
229
234
|
*/
|
|
230
|
-
getBlock(number: BlockParameter): Promise<
|
|
235
|
+
getBlock(number: BlockParameter): Promise<L2BlockNew | undefined>;
|
|
231
236
|
|
|
232
237
|
/**
|
|
233
238
|
* Get a block specified by its hash.
|
|
234
239
|
* @param blockHash - The block hash being requested.
|
|
235
240
|
* @returns The requested block.
|
|
236
241
|
*/
|
|
237
|
-
getBlockByHash(blockHash: Fr): Promise<
|
|
242
|
+
getBlockByHash(blockHash: Fr): Promise<L2BlockNew | undefined>;
|
|
238
243
|
|
|
239
244
|
/**
|
|
240
245
|
* Get a block specified by its archive root.
|
|
241
246
|
* @param archive - The archive root being requested.
|
|
242
247
|
* @returns The requested block.
|
|
243
248
|
*/
|
|
244
|
-
getBlockByArchive(archive: Fr): Promise<
|
|
249
|
+
getBlockByArchive(archive: Fr): Promise<L2BlockNew | undefined>;
|
|
245
250
|
|
|
246
251
|
/**
|
|
247
252
|
* Method to fetch the latest block number synchronized by the node.
|
|
@@ -274,13 +279,13 @@ export interface AztecNode
|
|
|
274
279
|
* @param limit - The maximum number of blocks to return.
|
|
275
280
|
* @returns The blocks requested.
|
|
276
281
|
*/
|
|
277
|
-
getBlocks(from: BlockNumber, limit: number): Promise<
|
|
282
|
+
getBlocks(from: BlockNumber, limit: number): Promise<L2BlockNew[]>;
|
|
278
283
|
|
|
279
284
|
/**
|
|
280
|
-
* Method to fetch the current
|
|
281
|
-
* @returns The current
|
|
285
|
+
* Method to fetch the current min fees.
|
|
286
|
+
* @returns The current min fees.
|
|
282
287
|
*/
|
|
283
|
-
|
|
288
|
+
getCurrentMinFees(): Promise<GasFees>;
|
|
284
289
|
|
|
285
290
|
/**
|
|
286
291
|
* Method to fetch the current max priority fee of txs in the mempool.
|
|
@@ -405,25 +410,19 @@ export interface AztecNode
|
|
|
405
410
|
* @remarks The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree.
|
|
406
411
|
* Aztec's version of `eth_getStorageAt`.
|
|
407
412
|
*
|
|
413
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
408
414
|
* @param contract - Address of the contract to query.
|
|
409
415
|
* @param slot - Slot to query.
|
|
410
|
-
* @param blockNumber - The block number at which to get the data or 'latest'.
|
|
411
416
|
* @returns Storage value at the given contract slot.
|
|
412
417
|
*/
|
|
413
|
-
getPublicStorageAt(
|
|
418
|
+
getPublicStorageAt(block: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
|
|
414
419
|
|
|
415
420
|
/**
|
|
416
|
-
* Returns the
|
|
417
|
-
* @
|
|
418
|
-
*/
|
|
419
|
-
getBlockHeader(blockNumber?: BlockParameter): Promise<BlockHeader | undefined>;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Get a block header specified by its hash.
|
|
423
|
-
* @param blockHash - The block hash being requested.
|
|
421
|
+
* Returns the block header for a given block number, block hash, or 'latest'.
|
|
422
|
+
* @param block - The block parameter (block number, block hash, or 'latest'). Defaults to 'latest'.
|
|
424
423
|
* @returns The requested block header.
|
|
425
424
|
*/
|
|
426
|
-
|
|
425
|
+
getBlockHeader(block?: BlockParameter): Promise<BlockHeader | undefined>;
|
|
427
426
|
|
|
428
427
|
/**
|
|
429
428
|
* Get a block header specified by its archive root.
|
|
@@ -552,14 +551,14 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
552
551
|
|
|
553
552
|
getL2ToL1Messages: z
|
|
554
553
|
.function()
|
|
555
|
-
.args(
|
|
556
|
-
.returns(z.array(z.array(schemas.Fr))
|
|
554
|
+
.args(EpochNumberSchema)
|
|
555
|
+
.returns(z.array(z.array(z.array(z.array(schemas.Fr))))),
|
|
557
556
|
|
|
558
|
-
getBlock: z.function().args(BlockParameterSchema).returns(
|
|
557
|
+
getBlock: z.function().args(BlockParameterSchema).returns(L2BlockNew.schema.optional()),
|
|
559
558
|
|
|
560
|
-
getBlockByHash: z.function().args(schemas.Fr).returns(
|
|
559
|
+
getBlockByHash: z.function().args(schemas.Fr).returns(L2BlockNew.schema.optional()),
|
|
561
560
|
|
|
562
|
-
getBlockByArchive: z.function().args(schemas.Fr).returns(
|
|
561
|
+
getBlockByArchive: z.function().args(schemas.Fr).returns(L2BlockNew.schema.optional()),
|
|
563
562
|
|
|
564
563
|
getBlockNumber: z.function().returns(BlockNumberSchema),
|
|
565
564
|
|
|
@@ -572,14 +571,29 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
572
571
|
getBlocks: z
|
|
573
572
|
.function()
|
|
574
573
|
.args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
|
|
575
|
-
.returns(z.array(
|
|
574
|
+
.returns(z.array(L2BlockNew.schema)),
|
|
576
575
|
|
|
577
576
|
getPublishedBlocks: z
|
|
578
577
|
.function()
|
|
579
578
|
.args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
|
|
580
|
-
.returns(z.array(
|
|
579
|
+
.returns(z.array(CheckpointedL2Block.schema)),
|
|
581
580
|
|
|
582
|
-
|
|
581
|
+
getPublishedCheckpoints: z
|
|
582
|
+
.function()
|
|
583
|
+
.args(CheckpointNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_CHECKPOINTS_LEN))
|
|
584
|
+
.returns(z.array(PublishedCheckpoint.schema)),
|
|
585
|
+
|
|
586
|
+
getL2BlocksNew: z
|
|
587
|
+
.function()
|
|
588
|
+
.args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
|
|
589
|
+
.returns(z.array(L2BlockNew.schema)),
|
|
590
|
+
|
|
591
|
+
getCheckpointedBlocks: z
|
|
592
|
+
.function()
|
|
593
|
+
.args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN), optional(z.boolean()))
|
|
594
|
+
.returns(z.array(CheckpointedL2Block.schema)),
|
|
595
|
+
|
|
596
|
+
getCurrentMinFees: z.function().returns(GasFees.schema),
|
|
583
597
|
|
|
584
598
|
getMaxPriorityFees: z.function().returns(GasFees.schema),
|
|
585
599
|
|
|
@@ -633,8 +647,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
633
647
|
|
|
634
648
|
getBlockHeader: z.function().args(optional(BlockParameterSchema)).returns(BlockHeader.schema.optional()),
|
|
635
649
|
|
|
636
|
-
getBlockHeaderByHash: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
|
|
637
|
-
|
|
638
650
|
getBlockHeaderByArchive: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
|
|
639
651
|
|
|
640
652
|
getValidatorsStats: z.function().returns(ValidatorsStatsSchema),
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
1
|
+
import type { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
-
import type { Timer } from '@aztec/foundation/timer';
|
|
4
3
|
|
|
5
|
-
import type {
|
|
4
|
+
import type { L2BlockNew } from '../block/l2_block_new.js';
|
|
6
5
|
import type { ChainConfig, SequencerConfig } from '../config/chain-config.js';
|
|
7
6
|
import type { L1RollupConstants } from '../epoch-helpers/index.js';
|
|
8
7
|
import type { Gas } from '../gas/gas.js';
|
|
9
|
-
import type { MerkleTreeWriteOperations } from '../trees/index.js';
|
|
10
8
|
import type { BlockHeader } from '../tx/block_header.js';
|
|
11
|
-
import type { GlobalVariables } from '../tx/global_variables.js';
|
|
9
|
+
import type { CheckpointGlobalVariables, GlobalVariables } from '../tx/global_variables.js';
|
|
12
10
|
import type { FailedTx, ProcessedTx } from '../tx/processed_tx.js';
|
|
13
11
|
import { Tx } from '../tx/tx.js';
|
|
14
12
|
import type { TxValidator } from '../tx/validator/tx_validator.js';
|
|
13
|
+
import type { MerkleTreeWriteOperations } from './merkle_tree_operations.js';
|
|
15
14
|
import type { ProcessedTxHandler } from './processed-tx-handler.js';
|
|
16
15
|
|
|
17
16
|
/** The interface to a block builder. Generates an L2 block out of a set of processed txs. */
|
|
@@ -32,7 +31,7 @@ export interface IBlockFactory extends ProcessedTxHandler {
|
|
|
32
31
|
/**
|
|
33
32
|
* Assembles the block and updates the archive tree.
|
|
34
33
|
*/
|
|
35
|
-
setBlockCompleted(expectedBlockHeader?: BlockHeader): Promise<
|
|
34
|
+
setBlockCompleted(expectedBlockHeader?: BlockHeader): Promise<L2BlockNew>;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
export interface PublicProcessorLimits {
|
|
@@ -47,16 +46,6 @@ export interface PublicProcessorValidator {
|
|
|
47
46
|
preprocessValidator?: TxValidator<Tx>;
|
|
48
47
|
nullifierCache?: { addNullifiers: (nullifiers: Buffer[]) => void };
|
|
49
48
|
}
|
|
50
|
-
export interface BuildBlockResult {
|
|
51
|
-
block: L2Block;
|
|
52
|
-
publicGas: Gas;
|
|
53
|
-
publicProcessorDuration: number;
|
|
54
|
-
numMsgs: number;
|
|
55
|
-
numTxs: number;
|
|
56
|
-
failedTxs: FailedTx[];
|
|
57
|
-
blockBuildingTimer: Timer;
|
|
58
|
-
usedTxs: Tx[];
|
|
59
|
-
}
|
|
60
49
|
|
|
61
50
|
export type FullNodeBlockBuilderConfig = Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration'> &
|
|
62
51
|
Pick<ChainConfig, 'l1ChainId' | 'rollupVersion'> &
|
|
@@ -72,18 +61,36 @@ export const FullNodeBlockBuilderConfigKeys: (keyof FullNodeBlockBuilderConfig)[
|
|
|
72
61
|
'fakeThrowAfterProcessingTxCount',
|
|
73
62
|
] as const;
|
|
74
63
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
64
|
+
/** Result of building a block within a checkpoint. */
|
|
65
|
+
export interface BuildBlockInCheckpointResult {
|
|
66
|
+
block: L2BlockNew;
|
|
67
|
+
publicGas: Gas;
|
|
68
|
+
publicProcessorDuration: number;
|
|
69
|
+
numTxs: number;
|
|
70
|
+
failedTxs: FailedTx[];
|
|
71
|
+
usedTxs: Tx[];
|
|
72
|
+
usedTxBlobFields: number;
|
|
73
|
+
}
|
|
79
74
|
|
|
75
|
+
/** Interface for building blocks within a checkpoint context. */
|
|
76
|
+
export interface ICheckpointBlockBuilder {
|
|
80
77
|
buildBlock(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
pendingTxs: Iterable<Tx> | AsyncIterable<Tx>,
|
|
79
|
+
blockNumber: BlockNumber,
|
|
80
|
+
timestamp: bigint,
|
|
81
|
+
opts: PublicProcessorLimits,
|
|
82
|
+
): Promise<BuildBlockInCheckpointResult>;
|
|
83
|
+
}
|
|
87
84
|
|
|
85
|
+
/** Interface for creating checkpoint builders. */
|
|
86
|
+
export interface ICheckpointsBuilder {
|
|
88
87
|
getFork(blockNumber: BlockNumber): Promise<MerkleTreeWriteOperations>;
|
|
88
|
+
|
|
89
|
+
startCheckpoint(
|
|
90
|
+
checkpointNumber: CheckpointNumber,
|
|
91
|
+
constants: CheckpointGlobalVariables,
|
|
92
|
+
l1ToL2Messages: Fr[],
|
|
93
|
+
previousCheckpointOutHashes: Fr[],
|
|
94
|
+
fork: MerkleTreeWriteOperations,
|
|
95
|
+
): Promise<ICheckpointBlockBuilder>;
|
|
89
96
|
}
|
|
@@ -67,6 +67,10 @@ export interface SequencerConfig {
|
|
|
67
67
|
blockDurationMs?: number;
|
|
68
68
|
/** Have sequencer build and publish an empty checkpoint if there are no txs */
|
|
69
69
|
buildCheckpointIfEmpty?: boolean;
|
|
70
|
+
|
|
71
|
+
// TODO(palla/mbps): Change default to false once block sync is stable
|
|
72
|
+
/** Skip pushing proposed blocks to archiver (default: true) */
|
|
73
|
+
skipPushProposedBlocksToArchiver?: boolean;
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
export const SequencerConfigSchema = zodFor<SequencerConfig>()(
|
|
@@ -100,6 +104,7 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
|
|
|
100
104
|
shuffleAttestationOrdering: z.boolean().optional(),
|
|
101
105
|
blockDurationMs: z.number().positive().optional(),
|
|
102
106
|
buildCheckpointIfEmpty: z.boolean().optional(),
|
|
107
|
+
skipPushProposedBlocksToArchiver: z.boolean().optional(),
|
|
103
108
|
}),
|
|
104
109
|
);
|
|
105
110
|
|
package/src/interfaces/p2p.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
|
|
6
6
|
import type { P2PClientType } from '../p2p/client_type.js';
|
|
7
7
|
import { type ApiSchemaFor, optional, schemas } from '../schemas/index.js';
|
|
8
8
|
import { Tx } from '../tx/tx.js';
|
|
@@ -52,21 +52,18 @@ export interface P2PApiWithoutAttestations {
|
|
|
52
52
|
|
|
53
53
|
export interface P2PApiWithAttestations extends P2PApiWithoutAttestations {
|
|
54
54
|
/**
|
|
55
|
-
* Queries the Attestation pool for attestations for the given slot
|
|
55
|
+
* Queries the Attestation pool for checkpoint attestations for the given slot
|
|
56
56
|
*
|
|
57
57
|
* @param slot - the slot to query
|
|
58
58
|
* @param proposalId - the proposal id to query, or undefined to query all proposals for the slot
|
|
59
|
-
* @returns
|
|
59
|
+
* @returns CheckpointAttestations
|
|
60
60
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/** Deletes a given attestation manually from the p2p client attestation pool. */
|
|
64
|
-
deleteAttestation(attestation: BlockAttestation): Promise<void>;
|
|
61
|
+
getCheckpointAttestationsForSlot(slot: SlotNumber, proposalId?: string): Promise<CheckpointAttestation[]>;
|
|
65
62
|
}
|
|
66
63
|
|
|
67
64
|
export interface P2PClient extends P2PApiWithAttestations {
|
|
68
|
-
/** Manually adds
|
|
69
|
-
|
|
65
|
+
/** Manually adds checkpoint attestations to the p2p client attestation pool. */
|
|
66
|
+
addCheckpointAttestations(attestations: CheckpointAttestation[]): Promise<void>;
|
|
70
67
|
}
|
|
71
68
|
|
|
72
69
|
export type P2PApi<T extends P2PClientType = P2PClientType.Full> = T extends P2PClientType.Full
|
|
@@ -78,10 +75,10 @@ export type P2PApiFull<T extends P2PClientType = P2PClientType.Full> = T extends
|
|
|
78
75
|
: P2PApiWithoutAttestations;
|
|
79
76
|
|
|
80
77
|
export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
|
|
81
|
-
|
|
78
|
+
getCheckpointAttestationsForSlot: z
|
|
82
79
|
.function()
|
|
83
80
|
.args(schemas.SlotNumber, optional(z.string()))
|
|
84
|
-
.returns(z.array(
|
|
81
|
+
.returns(z.array(CheckpointAttestation.schema)),
|
|
85
82
|
getPendingTxs: z
|
|
86
83
|
.function()
|
|
87
84
|
.args(optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)), optional(TxHash.schema))
|
|
@@ -90,5 +87,4 @@ export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
|
|
|
90
87
|
getPendingTxCount: z.function().returns(schemas.Integer),
|
|
91
88
|
getEncodedEnr: z.function().returns(z.string().optional()),
|
|
92
89
|
getPeers: z.function().args(optional(z.boolean())).returns(z.array(PeerInfoSchema)),
|
|
93
|
-
deleteAttestation: z.function().args(BlockAttestation.schema).returns(z.void()),
|
|
94
90
|
};
|
|
@@ -47,15 +47,6 @@ export type ProofAndVerificationKey<N extends number> = {
|
|
|
47
47
|
verificationKey: VerificationKeyData;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
function schemaForRecursiveProofAndVerificationKey<N extends number>(
|
|
51
|
-
proofLength: N,
|
|
52
|
-
): ZodFor<ProofAndVerificationKey<N>> {
|
|
53
|
-
return z.object({
|
|
54
|
-
proof: RecursiveProof.schemaFor(proofLength),
|
|
55
|
-
verificationKey: VerificationKeyData.schema,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
50
|
export function makeProofAndVerificationKey<N extends number>(
|
|
60
51
|
proof: RecursiveProof<N>,
|
|
61
52
|
verificationKey: VerificationKeyData,
|
|
@@ -213,7 +204,7 @@ export type ProvingJobInputsMap = {
|
|
|
213
204
|
export const ProvingJobResult = z.discriminatedUnion('type', [
|
|
214
205
|
z.object({
|
|
215
206
|
type: z.literal(ProvingRequestType.PUBLIC_VM),
|
|
216
|
-
result:
|
|
207
|
+
result: RecursiveProof.schemaFor(AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED),
|
|
217
208
|
}),
|
|
218
209
|
z.object({
|
|
219
210
|
type: z.literal(ProvingRequestType.PUBLIC_CHONK_VERIFIER),
|
|
@@ -328,7 +319,7 @@ export const ProvingJobResult = z.discriminatedUnion('type', [
|
|
|
328
319
|
]);
|
|
329
320
|
export type ProvingJobResult = z.infer<typeof ProvingJobResult>;
|
|
330
321
|
export type ProvingJobResultsMap = {
|
|
331
|
-
[ProvingRequestType.PUBLIC_VM]:
|
|
322
|
+
[ProvingRequestType.PUBLIC_VM]: RecursiveProof<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
|
|
332
323
|
[ProvingRequestType.PUBLIC_CHONK_VERIFIER]: PublicInputsAndRecursiveProof<
|
|
333
324
|
PublicChonkVerifierPublicInputs,
|
|
334
325
|
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
@@ -9,6 +9,7 @@ import type { AvmCircuitInputs } from '../avm/avm.js';
|
|
|
9
9
|
import type { ParityBasePrivateInputs } from '../parity/parity_base_private_inputs.js';
|
|
10
10
|
import type { ParityPublicInputs } from '../parity/parity_public_inputs.js';
|
|
11
11
|
import type { ParityRootPrivateInputs } from '../parity/parity_root_private_inputs.js';
|
|
12
|
+
import type { RecursiveProof } from '../proofs/recursive_proof.js';
|
|
12
13
|
import type { BlockMergeRollupPrivateInputs } from '../rollup/block_merge_rollup_private_inputs.js';
|
|
13
14
|
import type { BlockRollupPublicInputs } from '../rollup/block_rollup_public_inputs.js';
|
|
14
15
|
import type {
|
|
@@ -34,7 +35,7 @@ import type { RootRollupPublicInputs } from '../rollup/root_rollup_public_inputs
|
|
|
34
35
|
import type { TxMergeRollupPrivateInputs } from '../rollup/tx_merge_rollup_private_inputs.js';
|
|
35
36
|
import type { TxRollupPublicInputs } from '../rollup/tx_rollup_public_inputs.js';
|
|
36
37
|
import type { Tx } from '../tx/tx.js';
|
|
37
|
-
import type {
|
|
38
|
+
import type { PublicInputsAndRecursiveProof } from './proving-job.js';
|
|
38
39
|
|
|
39
40
|
/**
|
|
40
41
|
* Generates proofs for parity and rollup circuits.
|
|
@@ -188,7 +189,7 @@ export interface ServerCircuitProver {
|
|
|
188
189
|
inputs: AvmCircuitInputs,
|
|
189
190
|
signal?: AbortSignal,
|
|
190
191
|
epochNumber?: number,
|
|
191
|
-
): Promise<
|
|
192
|
+
): Promise<RecursiveProof<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>>;
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
export type IVCProofVerificationResult = {
|