@aztec/stdlib 0.0.1-commit.96bb3f7 → 0.0.1-commit.96dac018d
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/function_call.d.ts +47 -9
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_call.js +20 -3
- 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/auth_witness/auth_witness.js +3 -3
- 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_circuit_public_inputs.d.ts +9 -9
- 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_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/revert_code.d.ts +4 -4
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/block/block_data.d.ts +52 -0
- package/dest/block/block_data.d.ts.map +1 -0
- package/dest/block/block_data.js +12 -0
- package/dest/block/block_hash.d.ts +18 -14
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +22 -20
- 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 +2 -1
- package/dest/block/checkpointed_l2_block.d.ts +20 -137
- package/dest/block/checkpointed_l2_block.d.ts.map +1 -1
- package/dest/block/checkpointed_l2_block.js +7 -45
- package/dest/block/in_block.d.ts +9 -9
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/in_block.js +5 -5
- package/dest/block/index.d.ts +2 -3
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +1 -2
- package/dest/block/l2_block.d.ts +56 -59
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +64 -110
- package/dest/block/l2_block_source.d.ts +84 -39
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +2 -1
- package/dest/block/l2_block_stream/interfaces.d.ts +9 -6
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +6 -3
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +37 -34
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +3 -3
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +2 -7
- package/dest/block/validate_block_result.d.ts +1 -1
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +5 -4
- package/dest/checkpoint/checkpoint.d.ts +43 -19
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +37 -14
- package/dest/checkpoint/checkpoint_data.d.ts +120 -0
- package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint_data.js +26 -0
- 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 +33 -16
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/published_checkpoint.js +5 -5
- 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/node-rpc-config.js +1 -1
- package/dest/config/sequencer-config.d.ts +10 -0
- package/dest/config/sequencer-config.d.ts.map +1 -0
- package/dest/config/sequencer-config.js +18 -0
- package/dest/contract/complete_address.d.ts +4 -1
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/contract_address.js +4 -4
- package/dest/contract/contract_class.d.ts +2 -3
- package/dest/contract/contract_class.d.ts.map +1 -1
- package/dest/contract/contract_class_id.d.ts +2 -2
- package/dest/contract/contract_class_id.d.ts.map +1 -1
- package/dest/contract/contract_class_id.js +6 -5
- 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/contract/interfaces/node-info.d.ts +3 -1
- package/dest/contract/interfaces/node-info.d.ts.map +1 -1
- package/dest/contract/interfaces/node-info.js +2 -1
- package/dest/contract/private_function.d.ts +1 -1
- package/dest/contract/private_function.d.ts.map +1 -1
- package/dest/contract/private_function.js +3 -4
- package/dest/contract/private_function_membership_proof.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.js +1 -1
- package/dest/database-version/database_version.d.ts +58 -0
- package/dest/database-version/database_version.d.ts.map +1 -0
- package/dest/database-version/database_version.js +69 -0
- package/dest/database-version/version_manager.d.ts +3 -49
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +1 -66
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.js +7 -10
- 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/epoch-helpers/index.d.ts +7 -1
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +9 -3
- package/dest/errors/proving_error.d.ts +2 -2
- package/dest/errors/proving_error.d.ts.map +1 -1
- package/dest/file-store/local.d.ts +3 -3
- package/dest/file-store/local.d.ts.map +1 -1
- package/dest/file-store/local.js +13 -4
- package/dest/file-store/s3.d.ts +1 -1
- package/dest/file-store/s3.d.ts.map +1 -1
- package/dest/file-store/s3.js +11 -3
- package/dest/ha-signing/config.d.ts +101 -0
- package/dest/ha-signing/config.d.ts.map +1 -0
- package/dest/ha-signing/config.js +92 -0
- package/dest/ha-signing/index.d.ts +3 -0
- package/dest/ha-signing/index.d.ts.map +1 -0
- package/dest/ha-signing/index.js +2 -0
- package/dest/ha-signing/types.d.ts +85 -0
- package/dest/ha-signing/types.d.ts.map +1 -0
- package/dest/ha-signing/types.js +32 -0
- package/dest/hash/hash.d.ts +2 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +16 -10
- package/dest/hash/map_slot.d.ts +1 -1
- package/dest/hash/map_slot.d.ts.map +1 -1
- package/dest/hash/map_slot.js +4 -3
- 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 +1 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +23 -15
- package/dest/interfaces/aztec-node-admin.d.ts +101 -28
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +12 -4
- package/dest/interfaces/aztec-node.d.ts +66 -69
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +10 -16
- package/dest/interfaces/block-builder.d.ts +22 -14
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +7 -0
- package/dest/interfaces/configs.d.ts +24 -9
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +4 -1
- package/dest/interfaces/get_logs_response.d.ts +16 -9
- package/dest/interfaces/get_logs_response.d.ts.map +1 -1
- package/dest/interfaces/l2_logs_source.d.ts +14 -5
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +2 -2
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p.d.ts +2 -2
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/prover-broker.d.ts +16 -1
- package/dest/interfaces/prover-broker.d.ts.map +1 -1
- package/dest/interfaces/prover-broker.js +4 -1
- package/dest/interfaces/prover-client.d.ts +15 -1
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-client.js +12 -1
- package/dest/interfaces/proving-job.d.ts +216 -216
- package/dest/interfaces/slasher.d.ts +9 -1
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +2 -0
- package/dest/interfaces/tx_provider.d.ts +3 -3
- package/dest/interfaces/tx_provider.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +118 -16
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +6 -3
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +3 -3
- 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 +29 -16
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +4 -4
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.js +28 -17
- package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
- package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_transient_data_hints.js +9 -3
- package/dest/kernel/hints/index.d.ts +2 -2
- package/dest/kernel/hints/index.js +2 -2
- 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_separator.d.ts +24 -0
- package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
- package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
- 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/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
- 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 +81 -8
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +16 -16
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +33 -3
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
- 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 +12 -3
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +25 -3
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +3 -3
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -7
- 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_kernel_circuit_public_inputs.d.ts +18 -3
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_validation_requests.d.ts +13 -4
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +9 -9
- package/dest/kernel/public_call_request.d.ts +22 -1
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/utils/optional_number.d.ts +7 -1
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/keys/derivation.d.ts +3 -3
- package/dest/keys/derivation.js +15 -15
- package/dest/keys/key_types.d.ts +3 -3
- package/dest/keys/key_types.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/keys/public_keys.js +2 -2
- package/dest/keys/utils.d.ts +1 -1
- package/dest/keys/utils.d.ts.map +1 -1
- package/dest/keys/utils.js +8 -4
- package/dest/l1-contracts/slash_factory.d.ts +1 -1
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.js +1 -0
- package/dest/logs/debug_log_store.d.ts +30 -0
- package/dest/logs/debug_log_store.d.ts.map +1 -0
- package/dest/logs/debug_log_store.js +30 -0
- 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 +17 -9
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/index.d.ts +2 -1
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +1 -0
- package/dest/logs/log_id.d.ts +21 -14
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_id.js +20 -17
- package/dest/logs/private_log.d.ts +2 -2
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/siloed_tag.d.ts +1 -1
- package/dest/logs/siloed_tag.d.ts.map +1 -1
- package/dest/logs/siloed_tag.js +2 -5
- 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 +3 -3
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +8 -6
- package/dest/messaging/out_hash.d.ts +41 -4
- package/dest/messaging/out_hash.d.ts.map +1 -1
- package/dest/messaging/out_hash.js +52 -26
- package/dest/note/index.d.ts +1 -2
- package/dest/note/index.d.ts.map +1 -1
- package/dest/note/index.js +0 -1
- 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 +11 -1
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +45 -0
- package/dest/p2p/block_proposal.d.ts +23 -8
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +26 -10
- package/dest/p2p/checkpoint_attestation.d.ts +6 -1
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +1 -1
- package/dest/p2p/checkpoint_proposal.d.ts +34 -9
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/checkpoint_proposal.js +46 -20
- package/dest/p2p/consensus_payload.d.ts +15 -5
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +22 -18
- package/dest/p2p/constants.d.ts +5 -0
- package/dest/p2p/constants.d.ts.map +1 -0
- package/dest/p2p/constants.js +3 -0
- package/dest/p2p/index.d.ts +2 -1
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +1 -0
- package/dest/p2p/message_validator.d.ts +18 -3
- package/dest/p2p/message_validator.d.ts.map +1 -1
- package/dest/p2p/message_validator.js +2 -1
- package/dest/p2p/signed_txs.d.ts +3 -1
- package/dest/p2p/signed_txs.d.ts.map +1 -1
- package/dest/p2p/signed_txs.js +6 -1
- package/dest/p2p/topic_type.js +2 -1
- 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 +44 -3
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +2 -2
- 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_header.d.ts +31 -4
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +23 -7
- 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 +45 -10
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +11 -7
- 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 +17 -7
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.js +7 -4
- 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/slashing/empire.d.ts +1 -1
- package/dest/slashing/empire.d.ts.map +1 -1
- package/dest/slashing/empire.js +2 -0
- package/dest/slashing/helpers.d.ts +2 -2
- package/dest/slashing/helpers.d.ts.map +1 -1
- package/dest/slashing/helpers.js +6 -0
- package/dest/slashing/tally.d.ts +2 -1
- package/dest/slashing/tally.d.ts.map +1 -1
- package/dest/slashing/tally.js +6 -2
- package/dest/slashing/types.d.ts +7 -3
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +13 -1
- package/dest/stats/stats.d.ts +1 -3
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +2 -4
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +18 -27
- package/dest/tests/jest.js +1 -1
- package/dest/tests/mocks.d.ts +24 -15
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +63 -40
- package/dest/timetable/index.d.ts +37 -0
- package/dest/timetable/index.d.ts.map +1 -0
- package/dest/timetable/index.js +39 -0
- 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/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 +17 -1
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +7 -6
- 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 +14 -2
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +6 -2
- package/dest/tx/call_context.d.ts +13 -1
- package/dest/tx/call_context.d.ts.map +1 -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_variables.d.ts +12 -4
- package/dest/tx/global_variables.d.ts.map +1 -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 +4 -4
- package/dest/tx/indexed_tx_effect.d.ts +5 -5
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +3 -2
- 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 -2
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +1 -1
- 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 +152 -29
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +47 -10
- package/dest/tx/protocol_contracts.d.ts +2 -2
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +2 -2
- 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_simulation_output.d.ts +4 -2
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +7 -3
- package/dest/tx/state_reference.d.ts +3 -1
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/tx.d.ts +24 -1
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +6 -3
- 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 +0 -7
- 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_hash.d.ts +2 -1
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_receipt.d.ts +62 -14
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +55 -16
- package/dest/tx/tx_request.d.ts +6 -1
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/tx_request.js +2 -2
- package/dest/tx/validator/empty_validator.d.ts +2 -2
- package/dest/tx/validator/empty_validator.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.d.ts +3 -2
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +3 -1
- package/dest/tx/validator/tx_validator.d.ts +2 -2
- package/dest/tx/validator/tx_validator.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 +38 -38
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +4 -3
- package/dest/validators/types.d.ts +3 -3
- package/dest/validators/types.d.ts.map +1 -1
- 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 +27 -13
- package/src/abi/function_call.ts +25 -3
- package/src/abi/utils.ts +17 -0
- package/src/auth_witness/auth_witness.ts +3 -3
- package/src/block/block_data.ts +26 -0
- package/src/block/block_hash.ts +26 -25
- package/src/block/block_parameter.ts +4 -2
- package/src/block/body.ts +2 -1
- package/src/block/checkpointed_l2_block.ts +8 -58
- package/src/block/in_block.ts +6 -6
- package/src/block/index.ts +1 -2
- package/src/block/l2_block.ts +102 -150
- package/src/block/l2_block_source.ts +93 -42
- package/src/block/l2_block_stream/interfaces.ts +8 -5
- package/src/block/l2_block_stream/l2_block_stream.ts +45 -37
- package/src/block/l2_block_stream/l2_tips_store_base.ts +2 -2
- package/src/block/test/l2_tips_store_test_suite.ts +4 -9
- package/src/block/validate_block_result.ts +5 -4
- package/src/checkpoint/checkpoint.ts +61 -21
- package/src/checkpoint/checkpoint_data.ts +51 -0
- package/src/checkpoint/index.ts +1 -0
- package/src/checkpoint/published_checkpoint.ts +7 -4
- package/src/config/index.ts +1 -0
- package/src/config/node-rpc-config.ts +1 -1
- package/src/config/sequencer-config.ts +29 -0
- package/src/contract/contract_address.ts +4 -4
- package/src/contract/contract_class.ts +3 -3
- package/src/contract/contract_class_id.ts +6 -5
- package/src/contract/index.ts +0 -2
- package/src/contract/interfaces/node-info.ts +3 -0
- package/src/contract/private_function.ts +3 -4
- package/src/contract/private_function_membership_proof.ts +1 -1
- package/src/database-version/database_version.ts +87 -0
- package/src/database-version/version_manager.ts +1 -77
- package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
- package/src/deserialization/index.ts +21 -0
- package/src/epoch-helpers/index.ts +13 -1
- package/src/file-store/local.ts +15 -5
- package/src/file-store/s3.ts +12 -3
- package/src/ha-signing/config.ts +149 -0
- package/src/ha-signing/index.ts +18 -0
- package/src/ha-signing/types.ts +112 -0
- package/src/hash/hash.ts +14 -10
- package/src/hash/map_slot.ts +3 -2
- package/src/interfaces/api_limit.ts +1 -0
- package/src/interfaces/archiver.ts +23 -24
- package/src/interfaces/aztec-node-admin.ts +26 -2
- package/src/interfaces/aztec-node.ts +86 -135
- package/src/interfaces/block-builder.ts +41 -23
- package/src/interfaces/configs.ts +13 -4
- package/src/interfaces/l2_logs_source.ts +17 -4
- package/src/interfaces/merkle_tree_operations.ts +1 -1
- package/src/interfaces/p2p.ts +1 -1
- package/src/interfaces/prover-broker.ts +22 -0
- package/src/interfaces/prover-client.ts +22 -0
- package/src/interfaces/slasher.ts +4 -0
- package/src/interfaces/tx_provider.ts +2 -2
- package/src/interfaces/validator.ts +20 -12
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +31 -24
- package/src/kernel/hints/build_nullifier_read_request_hints.ts +32 -32
- package/src/kernel/hints/build_transient_data_hints.ts +17 -2
- package/src/kernel/hints/index.ts +2 -2
- package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
- package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
- package/src/kernel/private_circuit_public_inputs.ts +14 -14
- package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_validation_requests.ts +8 -8
- package/src/keys/derivation.ts +15 -15
- package/src/keys/key_types.ts +6 -2
- package/src/keys/public_keys.ts +2 -2
- package/src/keys/utils.ts +8 -4
- package/src/l1-contracts/slash_factory.ts +1 -0
- package/src/logs/debug_log_store.ts +54 -0
- package/src/logs/index.ts +1 -0
- package/src/logs/log_id.ts +22 -18
- package/src/logs/siloed_tag.ts +2 -2
- package/src/messaging/l2_to_l1_membership.ts +8 -6
- package/src/messaging/out_hash.ts +60 -29
- package/src/note/index.ts +0 -1
- package/src/note/note_dao.ts +18 -13
- package/src/p2p/attestation_utils.ts +56 -0
- package/src/p2p/block_proposal.ts +36 -15
- package/src/p2p/checkpoint_attestation.ts +6 -1
- package/src/p2p/checkpoint_proposal.ts +74 -24
- package/src/p2p/consensus_payload.ts +25 -17
- package/src/p2p/constants.ts +6 -0
- package/src/p2p/index.ts +1 -0
- package/src/p2p/message_validator.ts +14 -2
- package/src/p2p/signed_txs.ts +6 -1
- package/src/p2p/topic_type.ts +1 -1
- 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 +2 -2
- package/src/rollup/checkpoint_header.ts +22 -2
- package/src/rollup/checkpoint_rollup_public_inputs.ts +16 -10
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
- package/src/rollup/root_rollup_public_inputs.ts +11 -8
- package/src/slashing/empire.ts +3 -1
- package/src/slashing/helpers.ts +8 -0
- package/src/slashing/tally.ts +8 -2
- package/src/slashing/types.ts +14 -0
- package/src/stats/stats.ts +0 -2
- package/src/tests/factories.ts +23 -43
- package/src/tests/jest.ts +1 -1
- package/src/tests/mocks.ts +90 -55
- package/src/timetable/index.ts +66 -0
- package/src/trees/public_data_leaf.ts +11 -5
- package/src/tx/block_header.ts +12 -4
- package/src/tx/global_variables.ts +3 -3
- package/src/tx/indexed_tx_effect.ts +3 -2
- package/src/tx/private_execution_result.ts +1 -1
- package/src/tx/profiling.ts +51 -9
- package/src/tx/protocol_contracts.ts +2 -2
- package/src/tx/public_simulation_output.ts +4 -0
- package/src/tx/tx.ts +8 -9
- package/src/tx/tx_effect.ts +0 -9
- package/src/tx/tx_receipt.ts +85 -18
- package/src/tx/tx_request.ts +2 -2
- package/src/tx/validator/empty_validator.ts +1 -1
- package/src/tx/validator/error_texts.ts +4 -1
- package/src/tx/validator/tx_validator.ts +1 -1
- package/src/validators/schemas.ts +8 -1
- package/src/validators/types.ts +5 -4
- package/src/zkpassport/index.ts +11 -12
- package/dest/block/l2_block_code_to_purge.d.ts +0 -11
- package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
- package/dest/block/l2_block_code_to_purge.js +0 -55
- package/dest/block/l2_block_header.d.ts +0 -94
- package/dest/block/l2_block_header.d.ts.map +0 -1
- package/dest/block/l2_block_header.js +0 -160
- package/dest/block/l2_block_new.d.ts +0 -134
- package/dest/block/l2_block_new.d.ts.map +0 -1
- package/dest/block/l2_block_new.js +0 -155
- 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/database-version/index.d.ts +0 -2
- package/dest/database-version/index.d.ts.map +0 -1
- package/dest/database-version/index.js +0 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -25
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
- package/dest/note/notes_filter.d.ts +0 -27
- package/dest/note/notes_filter.d.ts.map +0 -1
- package/dest/note/notes_filter.js +0 -11
- package/src/block/l2_block_code_to_purge.ts +0 -80
- package/src/block/l2_block_header.ts +0 -255
- package/src/block/l2_block_new.ts +0 -211
- package/src/contract/contract_class_metadata.ts +0 -8
- package/src/contract/contract_metadata.ts +0 -7
- package/src/database-version/index.ts +0 -1
- package/src/note/notes_filter.ts +0 -38
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
1
|
+
import { BlockNumber, IndexWithinCheckpoint, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
3
|
import { keccak256 } from '@aztec/foundation/crypto/keccak';
|
|
4
4
|
import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
|
|
5
5
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
6
6
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
7
7
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
8
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
8
|
+
import { BufferReader, serializeSignedBigInt, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
9
9
|
|
|
10
10
|
import type { L2BlockInfo } from '../block/l2_block_info.js';
|
|
11
|
+
import { MAX_TXS_PER_BLOCK } from '../deserialization/index.js';
|
|
12
|
+
import { DutyType, type SigningContext } from '../ha-signing/index.js';
|
|
11
13
|
import { CheckpointHeader } from '../rollup/checkpoint_header.js';
|
|
12
14
|
import { BlockHeader } from '../tx/block_header.js';
|
|
13
15
|
import { TxHash } from '../tx/index.js';
|
|
@@ -30,8 +32,15 @@ export class CheckpointProposalHash extends Buffer32 {
|
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export type CheckpointProposalOptions = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Whether to include the tx objects along with the block proposal.
|
|
37
|
+
* Dramatically increases size of the payload but eliminates failed reexecutions due to missing txs.
|
|
38
|
+
*/
|
|
39
|
+
publishFullTxs?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to generate an invalid checkpoint proposal for broadcasting.
|
|
42
|
+
* Use only for testing.
|
|
43
|
+
*/
|
|
35
44
|
broadcastInvalidCheckpointProposal?: boolean;
|
|
36
45
|
};
|
|
37
46
|
|
|
@@ -40,7 +49,7 @@ export type CheckpointLastBlockData = {
|
|
|
40
49
|
/** The per-block header for the last block in the checkpoint */
|
|
41
50
|
blockHeader: BlockHeader;
|
|
42
51
|
/** Index of this block within the checkpoint (should be the last index, e.g., numBlocks - 1) */
|
|
43
|
-
indexWithinCheckpoint:
|
|
52
|
+
indexWithinCheckpoint: IndexWithinCheckpoint;
|
|
44
53
|
/** The sequence of transactions in the last block */
|
|
45
54
|
txHashes: TxHash[];
|
|
46
55
|
/** The tx in the last block (optional, for DA guarantees) */
|
|
@@ -72,7 +81,10 @@ export class CheckpointProposal extends Gossipable {
|
|
|
72
81
|
/** Archive root after this checkpoint is applied */
|
|
73
82
|
public readonly archive: Fr,
|
|
74
83
|
|
|
75
|
-
/** The
|
|
84
|
+
/** The fee asset price modifier in basis points (from oracle) */
|
|
85
|
+
public readonly feeAssetPriceModifier: bigint,
|
|
86
|
+
|
|
87
|
+
/** The proposer's signature over the checkpoint payload (checkpointHeader + archive + feeAssetPriceModifier) */
|
|
76
88
|
public readonly signature: Signature,
|
|
77
89
|
|
|
78
90
|
/** Optional last block info, including its own signature for BlockProposal extraction */
|
|
@@ -139,28 +151,54 @@ export class CheckpointProposal extends Gossipable {
|
|
|
139
151
|
};
|
|
140
152
|
}
|
|
141
153
|
|
|
154
|
+
toCheckpointInfo() {
|
|
155
|
+
return {
|
|
156
|
+
slotNumber: this.slotNumber,
|
|
157
|
+
archive: this.archive,
|
|
158
|
+
lastBlockNumber: this.lastBlock?.blockHeader.getBlockNumber(),
|
|
159
|
+
lastBlockIndex: this.lastBlock?.indexWithinCheckpoint,
|
|
160
|
+
blockHeadersHash: this.checkpointHeader.blockHeadersHash,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
142
164
|
/**
|
|
143
165
|
* Get the payload to sign for this checkpoint proposal.
|
|
144
|
-
* The signature is over the checkpoint header + archive root (for consensus).
|
|
166
|
+
* The signature is over the checkpoint header + archive root + feeAssetPriceModifier (for consensus).
|
|
145
167
|
*/
|
|
146
168
|
getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer {
|
|
147
|
-
return serializeToBuffer([
|
|
169
|
+
return serializeToBuffer([
|
|
170
|
+
domainSeparator,
|
|
171
|
+
this.checkpointHeader,
|
|
172
|
+
this.archive,
|
|
173
|
+
serializeSignedBigInt(this.feeAssetPriceModifier),
|
|
174
|
+
]);
|
|
148
175
|
}
|
|
149
176
|
|
|
150
177
|
static async createProposalFromSigner(
|
|
151
178
|
checkpointHeader: CheckpointHeader,
|
|
152
179
|
archiveRoot: Fr,
|
|
180
|
+
feeAssetPriceModifier: bigint,
|
|
153
181
|
lastBlockInfo: CheckpointLastBlockData | undefined,
|
|
154
|
-
payloadSigner: (payload: Buffer32) => Promise<Signature>,
|
|
182
|
+
payloadSigner: (payload: Buffer32, context: SigningContext) => Promise<Signature>,
|
|
155
183
|
): Promise<CheckpointProposal> {
|
|
156
|
-
// Sign the checkpoint payload
|
|
157
|
-
const tempProposal = new CheckpointProposal(
|
|
158
|
-
|
|
184
|
+
// Sign the checkpoint payload with CHECKPOINT_PROPOSAL duty type
|
|
185
|
+
const tempProposal = new CheckpointProposal(
|
|
186
|
+
checkpointHeader,
|
|
187
|
+
archiveRoot,
|
|
188
|
+
feeAssetPriceModifier,
|
|
189
|
+
Signature.empty(),
|
|
190
|
+
);
|
|
159
191
|
const checkpointHash = getHashedSignaturePayload(tempProposal, SignatureDomainSeparator.checkpointProposal);
|
|
160
|
-
|
|
192
|
+
|
|
193
|
+
const checkpointContext: SigningContext = {
|
|
194
|
+
slot: checkpointHeader.slotNumber,
|
|
195
|
+
blockNumber: lastBlockInfo?.blockHeader?.globalVariables.blockNumber ?? BlockNumber(0),
|
|
196
|
+
dutyType: DutyType.CHECKPOINT_PROPOSAL,
|
|
197
|
+
};
|
|
198
|
+
const checkpointSignature = await payloadSigner(checkpointHash, checkpointContext);
|
|
161
199
|
|
|
162
200
|
if (!lastBlockInfo) {
|
|
163
|
-
return new CheckpointProposal(checkpointHeader, archiveRoot, checkpointSignature);
|
|
201
|
+
return new CheckpointProposal(checkpointHeader, archiveRoot, feeAssetPriceModifier, checkpointSignature);
|
|
164
202
|
}
|
|
165
203
|
|
|
166
204
|
const lastBlockProposal = await BlockProposal.createProposalFromSigner(
|
|
@@ -173,7 +211,7 @@ export class CheckpointProposal extends Gossipable {
|
|
|
173
211
|
payloadSigner,
|
|
174
212
|
);
|
|
175
213
|
|
|
176
|
-
return new CheckpointProposal(checkpointHeader, archiveRoot, checkpointSignature, {
|
|
214
|
+
return new CheckpointProposal(checkpointHeader, archiveRoot, feeAssetPriceModifier, checkpointSignature, {
|
|
177
215
|
blockHeader: lastBlockInfo.blockHeader,
|
|
178
216
|
indexWithinCheckpoint: lastBlockInfo.indexWithinCheckpoint,
|
|
179
217
|
txHashes: lastBlockInfo.txHashes,
|
|
@@ -213,7 +251,12 @@ export class CheckpointProposal extends Gossipable {
|
|
|
213
251
|
}
|
|
214
252
|
|
|
215
253
|
toBuffer(): Buffer {
|
|
216
|
-
const buffer: any[] = [
|
|
254
|
+
const buffer: any[] = [
|
|
255
|
+
this.checkpointHeader,
|
|
256
|
+
this.archive,
|
|
257
|
+
serializeSignedBigInt(this.feeAssetPriceModifier),
|
|
258
|
+
this.signature,
|
|
259
|
+
];
|
|
217
260
|
|
|
218
261
|
if (this.lastBlock) {
|
|
219
262
|
buffer.push(1); // hasLastBlock = true
|
|
@@ -240,15 +283,20 @@ export class CheckpointProposal extends Gossipable {
|
|
|
240
283
|
|
|
241
284
|
const checkpointHeader = reader.readObject(CheckpointHeader);
|
|
242
285
|
const archive = reader.readObject(Fr);
|
|
286
|
+
const feeAssetPriceModifier = reader.readInt256();
|
|
243
287
|
const signature = reader.readObject(Signature);
|
|
244
288
|
|
|
245
289
|
const hasLastBlock = reader.readNumber();
|
|
246
290
|
|
|
247
291
|
if (hasLastBlock) {
|
|
248
292
|
const blockHeader = reader.readObject(BlockHeader);
|
|
249
|
-
const indexWithinCheckpoint = reader.readNumber();
|
|
293
|
+
const indexWithinCheckpoint = IndexWithinCheckpoint(reader.readNumber());
|
|
250
294
|
const blockSignature = reader.readObject(Signature);
|
|
251
|
-
const
|
|
295
|
+
const txHashCount = reader.readNumber();
|
|
296
|
+
if (txHashCount > MAX_TXS_PER_BLOCK) {
|
|
297
|
+
throw new Error(`txHashes count ${txHashCount} exceeds maximum ${MAX_TXS_PER_BLOCK}`);
|
|
298
|
+
}
|
|
299
|
+
const txHashes = reader.readArray(txHashCount, TxHash);
|
|
252
300
|
|
|
253
301
|
let signedTxs: SignedTxs | undefined;
|
|
254
302
|
if (!reader.isEmpty()) {
|
|
@@ -258,7 +306,7 @@ export class CheckpointProposal extends Gossipable {
|
|
|
258
306
|
}
|
|
259
307
|
}
|
|
260
308
|
|
|
261
|
-
return new CheckpointProposal(checkpointHeader, archive, signature, {
|
|
309
|
+
return new CheckpointProposal(checkpointHeader, archive, feeAssetPriceModifier, signature, {
|
|
262
310
|
blockHeader,
|
|
263
311
|
indexWithinCheckpoint,
|
|
264
312
|
txHashes,
|
|
@@ -267,7 +315,7 @@ export class CheckpointProposal extends Gossipable {
|
|
|
267
315
|
});
|
|
268
316
|
}
|
|
269
317
|
|
|
270
|
-
return new CheckpointProposal(checkpointHeader, archive, signature);
|
|
318
|
+
return new CheckpointProposal(checkpointHeader, archive, feeAssetPriceModifier, signature);
|
|
271
319
|
}
|
|
272
320
|
|
|
273
321
|
getSize(): number {
|
|
@@ -275,6 +323,7 @@ export class CheckpointProposal extends Gossipable {
|
|
|
275
323
|
this.checkpointHeader.toBuffer().length +
|
|
276
324
|
this.archive.size +
|
|
277
325
|
this.signature.getSize() +
|
|
326
|
+
8 /* feeAssetPriceModifier */ +
|
|
278
327
|
4; /* hasLastBlock flag */
|
|
279
328
|
|
|
280
329
|
if (this.lastBlock) {
|
|
@@ -292,13 +341,13 @@ export class CheckpointProposal extends Gossipable {
|
|
|
292
341
|
}
|
|
293
342
|
|
|
294
343
|
static empty(): CheckpointProposal {
|
|
295
|
-
return new CheckpointProposal(CheckpointHeader.empty(), Fr.ZERO, Signature.empty());
|
|
344
|
+
return new CheckpointProposal(CheckpointHeader.empty(), Fr.ZERO, 0n, Signature.empty());
|
|
296
345
|
}
|
|
297
346
|
|
|
298
347
|
static random(): CheckpointProposal {
|
|
299
|
-
return new CheckpointProposal(CheckpointHeader.random(), Fr.random(), Signature.random(), {
|
|
348
|
+
return new CheckpointProposal(CheckpointHeader.random(), Fr.random(), 0n, Signature.random(), {
|
|
300
349
|
blockHeader: BlockHeader.random(),
|
|
301
|
-
indexWithinCheckpoint: Math.floor(Math.random() * 5),
|
|
350
|
+
indexWithinCheckpoint: IndexWithinCheckpoint(Math.floor(Math.random() * 5)),
|
|
302
351
|
txHashes: [TxHash.random(), TxHash.random()],
|
|
303
352
|
signature: Signature.random(),
|
|
304
353
|
});
|
|
@@ -309,6 +358,7 @@ export class CheckpointProposal extends Gossipable {
|
|
|
309
358
|
checkpointHeader: this.checkpointHeader.toInspect(),
|
|
310
359
|
archive: this.archive.toString(),
|
|
311
360
|
signature: this.signature.toString(),
|
|
361
|
+
feeAssetPriceModifier: this.feeAssetPriceModifier.toString(),
|
|
312
362
|
lastBlock: this.lastBlock
|
|
313
363
|
? {
|
|
314
364
|
blockHeader: this.lastBlock.blockHeader.toInspect(),
|
|
@@ -325,7 +375,7 @@ export class CheckpointProposal extends Gossipable {
|
|
|
325
375
|
* Used when the lastBlock has been extracted and stored separately.
|
|
326
376
|
*/
|
|
327
377
|
toCore(): CheckpointProposalCore {
|
|
328
|
-
return new CheckpointProposal(this.checkpointHeader, this.archive, this.signature);
|
|
378
|
+
return new CheckpointProposal(this.checkpointHeader, this.archive, this.feeAssetPriceModifier, this.signature);
|
|
329
379
|
}
|
|
330
380
|
}
|
|
331
381
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { schemas } from '@aztec/foundation/schemas';
|
|
3
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
+
import { BufferReader, serializeSignedBigInt, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
4
|
import { hexToBuffer } from '@aztec/foundation/string';
|
|
5
5
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
6
6
|
|
|
7
7
|
import { encodeAbiParameters, parseAbiParameters } from 'viem';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
|
|
10
|
-
import type { L2Block } from '../block/l2_block.js';
|
|
11
10
|
import type { Checkpoint } from '../checkpoint/checkpoint.js';
|
|
12
11
|
import { CheckpointHeader } from '../rollup/checkpoint_header.js';
|
|
13
12
|
import type { CheckpointProposal, CheckpointProposalCore } from './checkpoint_proposal.js';
|
|
@@ -22,6 +21,8 @@ export class ConsensusPayload implements Signable {
|
|
|
22
21
|
public readonly header: CheckpointHeader,
|
|
23
22
|
/** The archive root after the block is added */
|
|
24
23
|
public readonly archive: Fr,
|
|
24
|
+
/** The fee asset price modifier in basis points (from oracle) */
|
|
25
|
+
public readonly feeAssetPriceModifier: bigint = 0n,
|
|
25
26
|
) {}
|
|
26
27
|
|
|
27
28
|
static get schema() {
|
|
@@ -29,12 +30,13 @@ export class ConsensusPayload implements Signable {
|
|
|
29
30
|
.object({
|
|
30
31
|
header: CheckpointHeader.schema,
|
|
31
32
|
archive: schemas.Fr,
|
|
33
|
+
feeAssetPriceModifier: schemas.BigInt,
|
|
32
34
|
})
|
|
33
|
-
.transform(obj => new ConsensusPayload(obj.header, obj.archive));
|
|
35
|
+
.transform(obj => new ConsensusPayload(obj.header, obj.archive, obj.feeAssetPriceModifier));
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
static getFields(fields: FieldsOf<ConsensusPayload>) {
|
|
37
|
-
return [fields.header, fields.archive] as const;
|
|
39
|
+
return [fields.header, fields.archive, fields.feeAssetPriceModifier] as const;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer {
|
|
@@ -51,45 +53,50 @@ export class ConsensusPayload implements Signable {
|
|
|
51
53
|
const headerHash = this.header.hash().toString();
|
|
52
54
|
const encodedData = encodeAbiParameters(abi, [
|
|
53
55
|
domainSeparator,
|
|
54
|
-
[archiveRoot, [
|
|
56
|
+
[archiveRoot, [this.feeAssetPriceModifier], headerHash],
|
|
55
57
|
] as const);
|
|
56
58
|
|
|
57
59
|
return hexToBuffer(encodedData);
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
toBuffer(): Buffer {
|
|
61
|
-
return serializeToBuffer([this.header, this.archive]);
|
|
63
|
+
return serializeToBuffer([this.header, this.archive, serializeSignedBigInt(this.feeAssetPriceModifier)]);
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
public equals(other: ConsensusPayload | CheckpointProposal | CheckpointProposalCore): boolean {
|
|
65
67
|
const otherHeader = 'checkpointHeader' in other ? other.checkpointHeader : other.header;
|
|
66
|
-
|
|
68
|
+
const otherModifier = 'feeAssetPriceModifier' in other ? other.feeAssetPriceModifier : 0n;
|
|
69
|
+
return (
|
|
70
|
+
this.header.equals(otherHeader) &&
|
|
71
|
+
this.archive.equals(other.archive) &&
|
|
72
|
+
this.feeAssetPriceModifier === otherModifier
|
|
73
|
+
);
|
|
67
74
|
}
|
|
68
75
|
|
|
69
76
|
static fromBuffer(buf: Buffer | BufferReader): ConsensusPayload {
|
|
70
77
|
const reader = BufferReader.asReader(buf);
|
|
71
|
-
const payload = new ConsensusPayload(
|
|
78
|
+
const payload = new ConsensusPayload(
|
|
79
|
+
reader.readObject(CheckpointHeader),
|
|
80
|
+
reader.readObject(Fr),
|
|
81
|
+
reader.readInt256(),
|
|
82
|
+
);
|
|
72
83
|
return payload;
|
|
73
84
|
}
|
|
74
85
|
|
|
75
86
|
static fromFields(fields: FieldsOf<ConsensusPayload>): ConsensusPayload {
|
|
76
|
-
return new ConsensusPayload(fields.header, fields.archive);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
static fromBlock(block: L2Block): ConsensusPayload {
|
|
80
|
-
return new ConsensusPayload(block.header.toCheckpointHeader(), block.archive.root);
|
|
87
|
+
return new ConsensusPayload(fields.header, fields.archive, fields.feeAssetPriceModifier);
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
static fromCheckpoint(checkpoint: Checkpoint): ConsensusPayload {
|
|
84
|
-
return new ConsensusPayload(checkpoint.header, checkpoint.archive.root);
|
|
91
|
+
return new ConsensusPayload(checkpoint.header, checkpoint.archive.root, checkpoint.feeAssetPriceModifier);
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
static empty(): ConsensusPayload {
|
|
88
|
-
return new ConsensusPayload(CheckpointHeader.empty(), Fr.ZERO);
|
|
95
|
+
return new ConsensusPayload(CheckpointHeader.empty(), Fr.ZERO, 0n);
|
|
89
96
|
}
|
|
90
97
|
|
|
91
98
|
static random(): ConsensusPayload {
|
|
92
|
-
return new ConsensusPayload(CheckpointHeader.random(), Fr.random());
|
|
99
|
+
return new ConsensusPayload(CheckpointHeader.random(), Fr.random(), 0n);
|
|
93
100
|
}
|
|
94
101
|
|
|
95
102
|
/**
|
|
@@ -109,10 +116,11 @@ export class ConsensusPayload implements Signable {
|
|
|
109
116
|
return {
|
|
110
117
|
header: this.header.toInspect(),
|
|
111
118
|
archive: this.archive.toString(),
|
|
119
|
+
feeAssetPriceModifier: this.feeAssetPriceModifier.toString(),
|
|
112
120
|
};
|
|
113
121
|
}
|
|
114
122
|
|
|
115
123
|
toString() {
|
|
116
|
-
return `header: ${this.header.toString()}, archive: ${this.archive.toString()}}`;
|
|
124
|
+
return `header: ${this.header.toString()}, archive: ${this.archive.toString()}, feeAssetPriceModifier: ${this.feeAssetPriceModifier}}`;
|
|
117
125
|
}
|
|
118
126
|
}
|
package/src/p2p/index.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import type { PeerErrorSeverity } from './peer_error.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Result of validating a P2P message.
|
|
5
|
+
* - 'accept': Message is valid and should be accepted and processed
|
|
6
|
+
* - 'ignore': Message should be ignored (not propagated or processed, but sender not penalized)
|
|
7
|
+
* - 'reject': Message is invalid (rejected and sender penalized)
|
|
8
|
+
*/
|
|
9
|
+
export type ValidationResult =
|
|
10
|
+
| { result: 'accept' }
|
|
11
|
+
| { result: 'ignore' }
|
|
12
|
+
| { result: 'reject'; severity: PeerErrorSeverity };
|
|
13
|
+
|
|
3
14
|
/**
|
|
4
15
|
* P2PValidator
|
|
5
16
|
*
|
|
6
|
-
* A validator for P2P messages, which returns a
|
|
17
|
+
* A validator for P2P messages, which returns a ValidationResult indicating
|
|
18
|
+
* whether to accept, ignore, or reject the message
|
|
7
19
|
*/
|
|
8
20
|
export interface P2PValidator<T> {
|
|
9
|
-
validate(message: T): Promise<
|
|
21
|
+
validate(message: T): Promise<ValidationResult>;
|
|
10
22
|
}
|
package/src/p2p/signed_txs.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
4
4
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
5
5
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
6
|
|
|
7
|
+
import { MAX_TXS_PER_BLOCK } from '../deserialization/index.js';
|
|
7
8
|
import { Tx } from '../tx/tx.js';
|
|
8
9
|
import {
|
|
9
10
|
SignatureDomainSeparator,
|
|
@@ -64,7 +65,11 @@ export class SignedTxs {
|
|
|
64
65
|
|
|
65
66
|
static fromBuffer(buf: Buffer | BufferReader): SignedTxs {
|
|
66
67
|
const reader = BufferReader.asReader(buf);
|
|
67
|
-
const
|
|
68
|
+
const txCount = reader.readNumber();
|
|
69
|
+
if (txCount > MAX_TXS_PER_BLOCK) {
|
|
70
|
+
throw new Error(`txs count ${txCount} exceeds maximum ${MAX_TXS_PER_BLOCK}`);
|
|
71
|
+
}
|
|
72
|
+
const txs = reader.readArray(txCount, Tx);
|
|
68
73
|
const signature = reader.readObject(Signature);
|
|
69
74
|
return new SignedTxs(txs, signature);
|
|
70
75
|
}
|
package/src/p2p/topic_type.ts
CHANGED
|
@@ -31,7 +31,7 @@ export function getTopicTypeForClientType(clientType: P2PClientType) {
|
|
|
31
31
|
if (clientType === P2PClientType.Full) {
|
|
32
32
|
return [TopicType.tx, TopicType.block_proposal, TopicType.checkpoint_proposal, TopicType.checkpoint_attestation];
|
|
33
33
|
} else if (clientType === P2PClientType.Prover) {
|
|
34
|
-
return [TopicType.tx, TopicType.block_proposal];
|
|
34
|
+
return [TopicType.tx, TopicType.block_proposal, TopicType.checkpoint_proposal];
|
|
35
35
|
} else {
|
|
36
36
|
const _: never = clientType;
|
|
37
37
|
return [TopicType.tx];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CHONK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
+
import { times } from '@aztec/foundation/collection';
|
|
2
3
|
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
3
4
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
5
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
@@ -31,12 +32,15 @@ export class ChonkProof {
|
|
|
31
32
|
|
|
32
33
|
static random() {
|
|
33
34
|
// NB: Not using Fr.random here because it slows down some tests that require a large number of txs significantly.
|
|
35
|
+
// NB2: generate one fewer random bytes to not have to deal with buffers representing numbers greater than the field modulus
|
|
36
|
+
// NB3: a chonk proof can be compressed. Simulate this by filling 1/4 of the proof with zero data
|
|
34
37
|
const reducedFrSize = Fr.SIZE_IN_BYTES - 1;
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
(
|
|
39
|
-
|
|
38
|
+
const nonZeroFields = Math.floor((3 * CHONK_PROOF_LENGTH) / 4);
|
|
39
|
+
const randomFields = randomBytes(nonZeroFields * Fr.SIZE_IN_BYTES);
|
|
40
|
+
const proof = [
|
|
41
|
+
...times(nonZeroFields, i => new Fr(randomFields.subarray(i * reducedFrSize, (i + 1) * reducedFrSize))),
|
|
42
|
+
...times(CHONK_PROOF_LENGTH - nonZeroFields, () => Fr.ZERO),
|
|
43
|
+
];
|
|
40
44
|
return new ChonkProof(proof);
|
|
41
45
|
}
|
|
42
46
|
|
|
@@ -5,7 +5,7 @@ import type { BlockHeader } from '../tx/block_header.js';
|
|
|
5
5
|
|
|
6
6
|
export async function computeBlockHeadersHash(blockHeaders: BlockHeader[]): Promise<Fr> {
|
|
7
7
|
const blockHeaderHashes = await Promise.all(blockHeaders.map(header => header.hash()));
|
|
8
|
-
// Must match the implementation in merge_block_rollups.nr, with the **
|
|
8
|
+
// Must match the implementation in merge_block_rollups.nr, with the **unbalanced** rollup structure
|
|
9
9
|
// (see validate_consecutive_block_rollups.nr > assert_rollups_filled_greedily.nr).
|
|
10
10
|
const blockHeadersHash = await computeUnbalancedPoseidonRoot(blockHeaderHashes.map(hash => hash.toBuffer()));
|
|
11
11
|
return Fr.fromBuffer(blockHeadersHash);
|
|
@@ -48,8 +48,8 @@ export class BlockRollupPublicInputs {
|
|
|
48
48
|
public timestamp: UInt64,
|
|
49
49
|
/**
|
|
50
50
|
* Hash of the headers of all blocks in this block range. It will be combined with the `blockHeadersHash` from
|
|
51
|
-
* other blocks in the same checkpoint to form
|
|
52
|
-
* the checkpoint header, enabling validation of the blocks included in a checkpoint given their headers.
|
|
51
|
+
* other blocks in the same checkpoint to form an unbalanced tree. The root of that tree becomes the final hash
|
|
52
|
+
* stored in the checkpoint header, enabling validation of the blocks included in a checkpoint given their headers.
|
|
53
53
|
*/
|
|
54
54
|
public blockHeadersHash: Fr,
|
|
55
55
|
/**
|
|
@@ -19,8 +19,8 @@ import type { UInt64 } from '../types/shared.js';
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Header of a checkpoint. A checkpoint is a collection of blocks submitted to L1 all within the same slot.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* This header is verified as-is in the rollup circuits, posted to the L1 rollup contract, stored in the archiver,
|
|
23
|
+
* and exposed via the Aztec Node API. See `CheckpointData` for a struct that includes the header plus extra metadata.
|
|
24
24
|
*/
|
|
25
25
|
export class CheckpointHeader {
|
|
26
26
|
constructor(
|
|
@@ -32,6 +32,14 @@ export class CheckpointHeader {
|
|
|
32
32
|
public blobsHash: Fr,
|
|
33
33
|
/** Root of the l1 to l2 messages subtree. */
|
|
34
34
|
public inHash: Fr,
|
|
35
|
+
/**
|
|
36
|
+
* The root of the epoch out hash balanced tree. The out hash of the first checkpoint in the epoch is inserted at
|
|
37
|
+
* index 0, the second at index 1, and so on.
|
|
38
|
+
* Note: This is not necessarily the final epoch out hash. It includes only the out hashes of checkpoints up to and
|
|
39
|
+
* including the current checkpoint. Any subsequent checkpoints added to the same epoch are not reflected in this
|
|
40
|
+
* value.
|
|
41
|
+
*/
|
|
42
|
+
public epochOutHash: Fr,
|
|
35
43
|
/** Slot number of the L2 block */
|
|
36
44
|
public slotNumber: SlotNumber,
|
|
37
45
|
/** Timestamp of the L2 block. */
|
|
@@ -53,6 +61,7 @@ export class CheckpointHeader {
|
|
|
53
61
|
blockHeadersHash: schemas.Fr,
|
|
54
62
|
blobsHash: schemas.Fr,
|
|
55
63
|
inHash: schemas.Fr,
|
|
64
|
+
epochOutHash: schemas.Fr,
|
|
56
65
|
slotNumber: schemas.SlotNumber,
|
|
57
66
|
timestamp: schemas.BigInt,
|
|
58
67
|
coinbase: schemas.EthAddress,
|
|
@@ -69,6 +78,7 @@ export class CheckpointHeader {
|
|
|
69
78
|
fields.blockHeadersHash,
|
|
70
79
|
fields.blobsHash,
|
|
71
80
|
fields.inHash,
|
|
81
|
+
fields.epochOutHash,
|
|
72
82
|
fields.slotNumber,
|
|
73
83
|
fields.timestamp,
|
|
74
84
|
fields.coinbase,
|
|
@@ -90,6 +100,7 @@ export class CheckpointHeader {
|
|
|
90
100
|
reader.readObject(Fr),
|
|
91
101
|
reader.readObject(Fr),
|
|
92
102
|
reader.readObject(Fr),
|
|
103
|
+
reader.readObject(Fr),
|
|
93
104
|
SlotNumber(Fr.fromBuffer(reader).toNumber()),
|
|
94
105
|
reader.readUInt64(),
|
|
95
106
|
reader.readObject(EthAddress),
|
|
@@ -105,6 +116,7 @@ export class CheckpointHeader {
|
|
|
105
116
|
this.blockHeadersHash.equals(other.blockHeadersHash) &&
|
|
106
117
|
this.blobsHash.equals(other.blobsHash) &&
|
|
107
118
|
this.inHash.equals(other.inHash) &&
|
|
119
|
+
this.epochOutHash.equals(other.epochOutHash) &&
|
|
108
120
|
this.slotNumber === other.slotNumber &&
|
|
109
121
|
this.timestamp === other.timestamp &&
|
|
110
122
|
this.coinbase.equals(other.coinbase) &&
|
|
@@ -132,6 +144,7 @@ export class CheckpointHeader {
|
|
|
132
144
|
this.blockHeadersHash,
|
|
133
145
|
this.blobsHash,
|
|
134
146
|
this.inHash,
|
|
147
|
+
this.epochOutHash,
|
|
135
148
|
new Fr(this.slotNumber),
|
|
136
149
|
bigintToUInt64BE(this.timestamp),
|
|
137
150
|
this.coinbase,
|
|
@@ -151,6 +164,7 @@ export class CheckpointHeader {
|
|
|
151
164
|
blockHeadersHash: Fr.ZERO,
|
|
152
165
|
blobsHash: Fr.ZERO,
|
|
153
166
|
inHash: Fr.ZERO,
|
|
167
|
+
epochOutHash: Fr.ZERO,
|
|
154
168
|
slotNumber: SlotNumber.ZERO,
|
|
155
169
|
timestamp: 0n,
|
|
156
170
|
coinbase: EthAddress.ZERO,
|
|
@@ -167,6 +181,7 @@ export class CheckpointHeader {
|
|
|
167
181
|
blockHeadersHash: Fr.random(),
|
|
168
182
|
blobsHash: Fr.random(),
|
|
169
183
|
inHash: Fr.random(),
|
|
184
|
+
epochOutHash: Fr.random(),
|
|
170
185
|
slotNumber: SlotNumber(Math.floor(Math.random() * 1000) + 1),
|
|
171
186
|
timestamp: BigInt(Math.floor(Date.now() / 1000)),
|
|
172
187
|
coinbase: EthAddress.random(),
|
|
@@ -183,6 +198,7 @@ export class CheckpointHeader {
|
|
|
183
198
|
this.blockHeadersHash.isZero() &&
|
|
184
199
|
this.blobsHash.isZero() &&
|
|
185
200
|
this.inHash.isZero() &&
|
|
201
|
+
this.epochOutHash.isZero() &&
|
|
186
202
|
this.slotNumber === 0 &&
|
|
187
203
|
this.timestamp === 0n &&
|
|
188
204
|
this.coinbase.isZero() &&
|
|
@@ -210,6 +226,7 @@ export class CheckpointHeader {
|
|
|
210
226
|
Fr.fromString(header.blockHeadersHash),
|
|
211
227
|
Fr.fromString(header.blobsHash),
|
|
212
228
|
Fr.fromString(header.inHash),
|
|
229
|
+
Fr.fromString(header.outHash),
|
|
213
230
|
SlotNumber.fromBigInt(header.slotNumber),
|
|
214
231
|
header.timestamp,
|
|
215
232
|
new EthAddress(hexToBuffer(header.coinbase)),
|
|
@@ -233,6 +250,7 @@ export class CheckpointHeader {
|
|
|
233
250
|
blockHeadersHash: this.blockHeadersHash.toString(),
|
|
234
251
|
blobsHash: this.blobsHash.toString(),
|
|
235
252
|
inHash: this.inHash.toString(),
|
|
253
|
+
outHash: this.epochOutHash.toString(),
|
|
236
254
|
slotNumber: BigInt(this.slotNumber),
|
|
237
255
|
timestamp: this.timestamp,
|
|
238
256
|
coinbase: this.coinbase.toString(),
|
|
@@ -251,6 +269,7 @@ export class CheckpointHeader {
|
|
|
251
269
|
blockHeadersHash: this.blockHeadersHash.toString(),
|
|
252
270
|
blobsHash: this.blobsHash.toString(),
|
|
253
271
|
inHash: this.inHash.toString(),
|
|
272
|
+
epochOutHash: this.epochOutHash.toString(),
|
|
254
273
|
slotNumber: this.slotNumber,
|
|
255
274
|
timestamp: this.timestamp,
|
|
256
275
|
coinbase: this.coinbase.toString(),
|
|
@@ -266,6 +285,7 @@ export class CheckpointHeader {
|
|
|
266
285
|
blockHeadersHash: ${this.blockHeadersHash.toString()},
|
|
267
286
|
blobsHash: ${inspect(this.blobsHash)},
|
|
268
287
|
inHash: ${inspect(this.inHash)},
|
|
288
|
+
epochOutHash: ${inspect(this.epochOutHash)},
|
|
269
289
|
slotNumber: ${this.slotNumber},
|
|
270
290
|
timestamp: ${this.timestamp},
|
|
271
291
|
coinbase: ${this.coinbase.toString()},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlobAccumulator, FinalBlobBatchingChallenges } from '@aztec/blob-lib/types';
|
|
2
|
-
import {
|
|
2
|
+
import { MAX_CHECKPOINTS_PER_EPOCH } from '@aztec/constants';
|
|
3
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
4
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
5
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
@@ -28,17 +28,21 @@ export class CheckpointRollupPublicInputs {
|
|
|
28
28
|
*/
|
|
29
29
|
public newArchive: AppendOnlyTreeSnapshot,
|
|
30
30
|
/**
|
|
31
|
-
* The
|
|
31
|
+
* The out hash tree snapshot immediately before this checkpoint range.
|
|
32
|
+
*/
|
|
33
|
+
public previousOutHash: AppendOnlyTreeSnapshot,
|
|
34
|
+
/**
|
|
35
|
+
* The out hash tree snapshot after applying this checkpoint range.
|
|
32
36
|
*/
|
|
33
|
-
public
|
|
37
|
+
public newOutHash: AppendOnlyTreeSnapshot,
|
|
34
38
|
/**
|
|
35
|
-
* The
|
|
39
|
+
* The hashes of the headers of the constituent checkpoints.
|
|
36
40
|
*/
|
|
37
|
-
public
|
|
41
|
+
public checkpointHeaderHashes: Tuple<Fr, typeof MAX_CHECKPOINTS_PER_EPOCH>,
|
|
38
42
|
/**
|
|
39
43
|
* The summed transaction fees and recipients of the constituent checkpoints.
|
|
40
44
|
*/
|
|
41
|
-
public fees: Tuple<FeeRecipient, typeof
|
|
45
|
+
public fees: Tuple<FeeRecipient, typeof MAX_CHECKPOINTS_PER_EPOCH>,
|
|
42
46
|
/**
|
|
43
47
|
* Accumulated opening proofs for all blobs before this checkpoint range.
|
|
44
48
|
*/
|
|
@@ -59,9 +63,10 @@ export class CheckpointRollupPublicInputs {
|
|
|
59
63
|
reader.readObject(EpochConstantData),
|
|
60
64
|
reader.readObject(AppendOnlyTreeSnapshot),
|
|
61
65
|
reader.readObject(AppendOnlyTreeSnapshot),
|
|
62
|
-
reader.
|
|
63
|
-
reader.
|
|
64
|
-
reader.readArray(
|
|
66
|
+
reader.readObject(AppendOnlyTreeSnapshot),
|
|
67
|
+
reader.readObject(AppendOnlyTreeSnapshot),
|
|
68
|
+
reader.readArray(MAX_CHECKPOINTS_PER_EPOCH, Fr),
|
|
69
|
+
reader.readArray(MAX_CHECKPOINTS_PER_EPOCH, FeeRecipient),
|
|
65
70
|
reader.readObject(BlobAccumulator),
|
|
66
71
|
reader.readObject(BlobAccumulator),
|
|
67
72
|
reader.readObject(FinalBlobBatchingChallenges),
|
|
@@ -73,8 +78,9 @@ export class CheckpointRollupPublicInputs {
|
|
|
73
78
|
this.constants,
|
|
74
79
|
this.previousArchive,
|
|
75
80
|
this.newArchive,
|
|
81
|
+
this.previousOutHash,
|
|
82
|
+
this.newOutHash,
|
|
76
83
|
this.checkpointHeaderHashes,
|
|
77
|
-
this.outHashes,
|
|
78
84
|
this.fees,
|
|
79
85
|
this.startBlobAccumulator,
|
|
80
86
|
this.endBlobAccumulator,
|