@aztec/stdlib 0.0.1-commit.fce3e4f → 0.0.1-commit.ff7989d6c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/abi/abi.d.ts +603 -5
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +7 -7
- package/dest/abi/authorization_selector.d.ts +2 -2
- package/dest/abi/authorization_selector.d.ts.map +1 -1
- package/dest/abi/authorization_selector.js +2 -1
- package/dest/abi/buffer.d.ts +2 -2
- package/dest/abi/buffer.d.ts.map +1 -1
- package/dest/abi/buffer.js +1 -1
- 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/decoder.d.ts +2 -2
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/encoder.d.ts +2 -2
- package/dest/abi/encoder.d.ts.map +1 -1
- package/dest/abi/encoder.js +1 -1
- package/dest/abi/event_selector.d.ts +2 -2
- package/dest/abi/event_selector.d.ts.map +1 -1
- package/dest/abi/event_selector.js +2 -1
- package/dest/abi/function_call.d.ts +48 -10
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_call.js +20 -3
- package/dest/abi/function_selector.d.ts +3 -2
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/function_selector.js +9 -1
- package/dest/abi/note_selector.d.ts +2 -2
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/note_selector.js +2 -2
- package/dest/abi/selector.d.ts +2 -2
- package/dest/abi/selector.d.ts.map +1 -1
- package/dest/abi/selector.js +4 -2
- 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 +3 -2
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/auth_witness/auth_witness.js +5 -5
- package/dest/avm/avm.d.ts +598 -386
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +238 -22
- package/dest/avm/avm_accumulated_data.d.ts +31 -4
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +6 -3
- package/dest/avm/avm_circuit_public_inputs.d.ts +14 -12
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +4 -2
- package/dest/avm/avm_proving_request.d.ts +306 -302
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.d.ts +14 -2
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.js +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +14 -2
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.js +1 -1
- package/dest/avm/message_pack.d.ts +1 -1
- package/dest/avm/message_pack.d.ts.map +1 -1
- package/dest/avm/message_pack.js +2 -1
- package/dest/avm/public_call_stack_item_compressed.d.ts +4 -2
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
- package/dest/avm/public_call_stack_item_compressed.js +1 -1
- package/dest/avm/public_data_read.d.ts +11 -2
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_read.js +1 -1
- package/dest/avm/public_data_update_request.d.ts +11 -2
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.js +4 -2
- package/dest/avm/public_data_write.d.ts +8 -2
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_data_write.js +1 -1
- package/dest/avm/public_inner_call_request.d.ts +5 -2
- 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 +5 -5
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +4 -2
- package/dest/aztec-address/index.d.ts +3 -2
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +5 -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 +5 -5
- 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 +19 -15
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +23 -21
- package/dest/block/block_parameter.d.ts +6 -0
- package/dest/block/block_parameter.d.ts.map +1 -0
- package/dest/block/block_parameter.js +8 -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 +150 -0
- package/dest/block/checkpointed_l2_block.d.ts.map +1 -0
- package/dest/block/checkpointed_l2_block.js +46 -0
- package/dest/block/in_block.d.ts +34 -15
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/in_block.js +21 -12
- package/dest/block/index.d.ts +4 -5
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +3 -4
- package/dest/block/l2_block.d.ts +59 -59
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +69 -110
- package/dest/block/l2_block_info.d.ts +16 -11
- package/dest/block/l2_block_info.d.ts.map +1 -1
- package/dest/block/l2_block_info.js +8 -7
- package/dest/block/l2_block_source.d.ts +390 -151
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +29 -16
- 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 +13 -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 +116 -32
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -15
- 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 -59
- 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/proposal/attestations_and_signers.d.ts +2 -2
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/committee_attestation.d.ts +2 -2
- package/dest/block/proposal/committee_attestation.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 +482 -43
- 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 +74 -18
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +78 -16
- 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/checkpoint_info.d.ts +38 -0
- package/dest/checkpoint/checkpoint_info.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint_info.js +34 -0
- package/dest/checkpoint/index.d.ts +3 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +2 -0
- package/dest/checkpoint/published_checkpoint.d.ts +58 -15
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/published_checkpoint.js +16 -6
- package/dest/config/index.d.ts +2 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -0
- package/dest/config/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/artifact_hash.d.ts +2 -2
- package/dest/contract/artifact_hash.d.ts.map +1 -1
- package/dest/contract/artifact_hash.js +2 -2
- package/dest/contract/complete_address.d.ts +5 -2
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/complete_address.js +1 -1
- package/dest/contract/contract_address.d.ts +2 -2
- package/dest/contract/contract_address.d.ts.map +1 -1
- package/dest/contract/contract_address.js +6 -6
- package/dest/contract/contract_class.d.ts +3 -4
- package/dest/contract/contract_class.d.ts.map +1 -1
- package/dest/contract/contract_class.js +1 -1
- package/dest/contract/contract_class_id.d.ts +3 -3
- package/dest/contract/contract_class_id.d.ts.map +1 -1
- package/dest/contract/contract_class_id.js +8 -7
- package/dest/contract/contract_deployment_data.d.ts +5 -5
- package/dest/contract/contract_instance.d.ts +2 -2
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance.js +1 -1
- package/dest/contract/contract_instance_update.d.ts +2 -2
- package/dest/contract/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/contract_instance_update.js +1 -1
- package/dest/contract/deployment_info.d.ts +2 -2
- package/dest/contract/deployment_info.d.ts.map +1 -1
- 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_class.d.ts +19 -14
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_class.js +35 -18
- package/dest/contract/interfaces/contract_data_source.d.ts +4 -3
- package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.d.ts +40 -31
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.js +30 -5
- package/dest/contract/interfaces/contract_instance_update.d.ts +7 -8
- package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance_update.js +5 -5
- 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/partial_address.d.ts +2 -2
- package/dest/contract/partial_address.d.ts.map +1 -1
- package/dest/contract/private_function.d.ts +2 -2
- package/dest/contract/private_function.d.ts.map +1 -1
- package/dest/contract/private_function.js +5 -5
- package/dest/contract/private_function_membership_proof.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.js +3 -3
- package/dest/contract/utility_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 -64
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +3 -3
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.js +9 -12
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts +2 -2
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.js +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts +2 -2
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.js +1 -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/epoch-helpers/index.d.ts +7 -1
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +12 -6
- package/dest/errors/proving_error.d.ts +2 -2
- package/dest/errors/proving_error.d.ts.map +1 -1
- package/dest/errors/simulation_error.d.ts +2 -2
- package/dest/errors/simulation_error.d.ts.map +1 -1
- package/dest/fees/transaction_fee.d.ts +2 -2
- package/dest/fees/transaction_fee.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/gas/gas.d.ts +2 -2
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas.js +4 -2
- package/dest/gas/gas_fees.d.ts +2 -2
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +3 -1
- package/dest/gas/gas_settings.d.ts +2 -2
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +1 -1
- 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 +3 -10
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +17 -22
- package/dest/hash/map_slot.d.ts +2 -2
- package/dest/hash/map_slot.d.ts.map +1 -1
- package/dest/hash/map_slot.js +4 -3
- package/dest/interfaces/allowed_element.d.ts +8 -9
- package/dest/interfaces/allowed_element.d.ts.map +1 -1
- package/dest/interfaces/allowed_element.js +3 -3
- package/dest/interfaces/api_limit.d.ts +3 -1
- package/dest/interfaces/api_limit.d.ts.map +1 -1
- package/dest/interfaces/api_limit.js +2 -0
- package/dest/interfaces/archiver.d.ts +12 -7
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +40 -21
- package/dest/interfaces/aztec-node-admin.d.ts +140 -42
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +15 -7
- package/dest/interfaces/aztec-node.d.ts +90 -95
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +32 -33
- package/dest/interfaces/block-builder.d.ts +24 -14
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +16 -1
- package/dest/interfaces/configs.d.ts +71 -27
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +15 -6
- package/dest/interfaces/epoch-prover.d.ts +5 -5
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.d.ts +30 -6
- package/dest/interfaces/get_logs_response.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.js +5 -4
- package/dest/interfaces/l2_logs_source.d.ts +21 -15
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +5 -4
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p.d.ts +7 -9
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +3 -4
- 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 +19 -3
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-client.js +16 -4
- package/dest/interfaces/proving-job.d.ts +60 -56
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +1 -7
- package/dest/interfaces/public_state_source.d.ts +2 -2
- package/dest/interfaces/public_state_source.d.ts.map +1 -1
- package/dest/interfaces/server_circuit_prover.d.ts +4 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/slasher.d.ts +9 -1
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +5 -3
- package/dest/interfaces/validator.d.ts +162 -27
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +12 -7
- package/dest/interfaces/world_state.d.ts +23 -31
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/interfaces/world_state.js +4 -3
- package/dest/kernel/claimed_length_array.d.ts +2 -2
- package/dest/kernel/claimed_length_array.d.ts.map +1 -1
- 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 +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 +16 -8
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +1 -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 +3 -2
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_hint.js +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +5 -3
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.js +2 -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} +13 -16
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts +2 -2
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/note_hash_read_request_hints.js +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 +8 -2
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request.js +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} +9 -9
- 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/hints/scoped_value_cache.d.ts +2 -2
- package/dest/kernel/hints/scoped_value_cache.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts +2 -2
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.js +4 -2
- package/dest/kernel/hints/tree_leaf_read_request.d.ts +2 -2
- package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.js +1 -1
- package/dest/kernel/log_hash.d.ts +2 -2
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/log_hash.js +4 -2
- package/dest/kernel/note_hash.d.ts +2 -2
- package/dest/kernel/note_hash.d.ts.map +1 -1
- package/dest/kernel/note_hash.js +1 -1
- package/dest/kernel/nullifier.d.ts +2 -2
- package/dest/kernel/nullifier.d.ts.map +1 -1
- package/dest/kernel/nullifier.js +1 -1
- package/dest/kernel/padded_side_effects.d.ts +2 -2
- package/dest/kernel/padded_side_effects.d.ts.map +1 -1
- package/dest/kernel/padded_side_effects.js +1 -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 +26 -2
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.js +1 -1
- package/dest/kernel/private_call_request.d.ts +17 -2
- package/dest/kernel/private_call_request.d.ts.map +1 -1
- package/dest/kernel/private_call_request.js +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +127 -54
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +72 -72
- package/dest/kernel/private_context_inputs.d.ts +2 -2
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +34 -4
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +5 -5
- 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 +23 -2
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.js +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 +26 -4
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +8 -8
- package/dest/kernel/private_log_data.d.ts +2 -2
- package/dest/kernel/private_log_data.d.ts.map +1 -1
- package/dest/kernel/private_log_data.js +5 -2
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +4 -4
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +6 -3
- package/dest/kernel/private_to_public_accumulated_data.d.ts +2 -2
- package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data.js +4 -2
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts +2 -2
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data_builder.js +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +4 -4
- 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 +8 -8
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +18 -2
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.js +4 -2
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +19 -4
- 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 +8 -8
- 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 +12 -10
- package/dest/kernel/public_call_request.d.ts +23 -2
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +6 -3
- package/dest/kernel/utils/optional_number.d.ts +8 -2
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/keys/derivation.d.ts +7 -6
- package/dest/keys/derivation.d.ts.map +1 -1
- package/dest/keys/derivation.js +20 -17
- package/dest/keys/key_types.d.ts +3 -3
- package/dest/keys/key_types.d.ts.map +1 -1
- package/dest/keys/public_key.d.ts +2 -2
- package/dest/keys/public_key.d.ts.map +1 -1
- package/dest/keys/public_keys.d.ts +7 -2
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +5 -4
- 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 +3 -2
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.js +2 -1
- package/dest/logs/contract_class_log.d.ts +2 -2
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +5 -3
- package/dest/logs/debug_log.d.ts +2 -2
- package/dest/logs/debug_log.d.ts.map +1 -1
- package/dest/logs/debug_log.js +1 -1
- package/dest/logs/directional_app_tagging_secret.d.ts +2 -2
- package/dest/logs/directional_app_tagging_secret.d.ts.map +1 -1
- package/dest/logs/directional_app_tagging_secret.js +3 -2
- 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 +20 -4
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/index.d.ts +3 -2
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +2 -1
- package/dest/logs/log_id.d.ts +29 -11
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_id.js +27 -16
- package/dest/logs/message_context.d.ts +2 -2
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/message_context.js +1 -1
- package/dest/logs/pending_tagged_log.d.ts +2 -2
- package/dest/logs/pending_tagged_log.d.ts.map +1 -1
- package/dest/logs/pending_tagged_log.js +1 -1
- package/dest/logs/private_log.d.ts +3 -3
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +6 -3
- package/dest/logs/public_log.d.ts +3 -2
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +7 -2
- package/dest/logs/shared_secret_derivation.d.ts +2 -2
- package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
- package/dest/logs/shared_secret_derivation.js +1 -1
- package/dest/logs/siloed_tag.d.ts +23 -0
- package/dest/logs/siloed_tag.d.ts.map +1 -0
- package/dest/logs/siloed_tag.js +27 -0
- package/dest/logs/tag.d.ts +21 -0
- package/dest/logs/tag.d.ts.map +1 -0
- package/dest/logs/tag.js +30 -0
- package/dest/logs/tx_scoped_l2_log.d.ts +32 -38
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/logs/tx_scoped_l2_log.js +40 -45
- package/dest/messaging/in_hash.d.ts +5 -3
- package/dest/messaging/in_hash.d.ts.map +1 -1
- package/dest/messaging/in_hash.js +4 -2
- package/dest/messaging/inbox_leaf.d.ts +10 -7
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/inbox_leaf.js +10 -9
- package/dest/messaging/l1_actor.d.ts +8 -2
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_actor.js +2 -2
- package/dest/messaging/l1_to_l2_message.d.ts +7 -2
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.js +2 -2
- package/dest/messaging/l1_to_l2_message_source.d.ts +6 -10
- package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/messaging/l2_actor.d.ts +8 -2
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_actor.js +2 -2
- package/dest/messaging/l2_to_l1_membership.d.ts +89 -6
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +161 -43
- package/dest/messaging/l2_to_l1_message.d.ts +3 -2
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.js +4 -1
- package/dest/messaging/out_hash.d.ts +42 -4
- package/dest/messaging/out_hash.d.ts.map +1 -1
- package/dest/messaging/out_hash.js +55 -20
- 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.d.ts +2 -2
- package/dest/note/note.d.ts.map +1 -1
- package/dest/note/note.js +5 -2
- package/dest/note/note_dao.d.ts +48 -9
- package/dest/note/note_dao.d.ts.map +1 -1
- package/dest/note/note_dao.js +29 -15
- 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 +103 -24
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +140 -40
- package/dest/p2p/checkpoint_attestation.d.ts +82 -0
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
- package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +24 -20
- package/dest/p2p/checkpoint_proposal.d.ts +179 -0
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
- package/dest/p2p/checkpoint_proposal.js +243 -0
- package/dest/p2p/consensus_payload.d.ts +21 -12
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +25 -20
- 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/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 +5 -2
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +4 -1
- 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/signature_utils.d.ts +5 -3
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +5 -2
- 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 +4 -2
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_base_private_inputs.js +1 -1
- package/dest/parity/parity_public_inputs.d.ts +5 -2
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.js +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 +2 -2
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +11 -6
- package/dest/proofs/proof.d.ts +5 -2
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/proof.js +1 -1
- package/dest/proofs/proof_data.d.ts +13 -1
- package/dest/proofs/proof_data.d.ts.map +1 -1
- package/dest/proofs/proof_data.js +17 -0
- package/dest/proofs/recursive_proof.d.ts +11 -2
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/proofs/recursive_proof.js +1 -1
- package/dest/rollup/avm_proof_data.d.ts +3 -5
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +1 -9
- package/dest/rollup/base_rollup_hints.d.ts +35 -2
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +1 -1
- package/dest/rollup/block_constant_data.d.ts +13 -2
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.js +1 -1
- package/dest/rollup/block_headers_hash.d.ts +2 -2
- package/dest/rollup/block_headers_hash.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.js +2 -2
- 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 +48 -12
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +9 -13
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +65 -2
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +1 -1
- package/dest/rollup/checkpoint_constant_data.d.ts +12 -2
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +5 -2
- package/dest/rollup/checkpoint_header.d.ts +47 -13
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +55 -22
- 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 +47 -7
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +12 -4
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +46 -4
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +15 -3
- package/dest/rollup/epoch_constant_data.d.ts +17 -2
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/epoch_constant_data.js +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.js +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.js +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.js +2 -2
- 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 +22 -7
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.js +11 -5
- package/dest/rollup/tree_snapshot_diff_hints.d.ts +25 -2
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tree_snapshot_diff_hints.js +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 +30 -2
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.js +1 -1
- package/dest/schemas/schemas.d.ts +7 -4
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +2 -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 +10 -7
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +18 -6
- package/dest/snapshots/types.d.ts +1 -1
- package/dest/snapshots/types.d.ts.map +1 -1
- package/dest/snapshots/types.js +5 -5
- package/dest/stats/stats.d.ts +10 -8
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +42 -12
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +110 -43
- package/dest/tests/jest.js +1 -1
- package/dest/tests/mocks.d.ts +90 -19
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +192 -62
- 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 +14 -2
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +4 -2
- package/dest/trees/database_public_state_source.d.ts +2 -2
- package/dest/trees/database_public_state_source.d.ts.map +1 -1
- package/dest/trees/database_public_state_source.js +1 -1
- package/dest/trees/nullifier_leaf.d.ts +14 -2
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.js +1 -1
- package/dest/trees/nullifier_membership_witness.d.ts +11 -2
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.js +1 -1
- package/dest/trees/public_data_leaf.d.ts +18 -2
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +8 -7
- package/dest/trees/public_data_witness.d.ts +12 -2
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/trees/public_data_witness.js +1 -1
- package/dest/tx/block_header.d.ts +25 -12
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +16 -5
- package/dest/tx/call_context.d.ts +14 -2
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/call_context.js +3 -1
- package/dest/tx/capsule.d.ts +5 -2
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/capsule.js +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 +5 -3
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/function_data.js +1 -1
- package/dest/tx/global_variable_builder.d.ts +5 -3
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +27 -12
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +11 -9
- package/dest/tx/hashed_values.d.ts +8 -2
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/hashed_values.js +1 -1
- package/dest/tx/in_tx.d.ts +26 -0
- package/dest/tx/in_tx.d.ts.map +1 -0
- package/dest/tx/in_tx.js +14 -0
- package/dest/tx/index.d.ts +2 -2
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -1
- package/dest/tx/indexed_tx_effect.d.ts +14 -10
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +8 -6
- package/dest/tx/offchain_effect.d.ts +2 -2
- package/dest/tx/offchain_effect.d.ts.map +1 -1
- package/dest/tx/offchain_effect.js +1 -1
- package/dest/tx/partial_state_reference.d.ts +5 -2
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/private_execution_result.d.ts +27 -10
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +6 -23
- package/dest/tx/private_tx_constant_data.d.ts +17 -2
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/private_tx_constant_data.js +1 -1
- package/dest/tx/processed_tx.d.ts +5 -4
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +8 -7
- package/dest/tx/profiling.d.ts +153 -30
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +48 -11
- package/dest/tx/protocol_contracts.d.ts +3 -3
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +3 -3
- package/dest/tx/public_call_request_with_calldata.d.ts +8 -2
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +4 -2
- package/dest/tx/public_simulation_output.d.ts +5 -3
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +8 -4
- package/dest/tx/simulated_tx.d.ts +1031 -7
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/state_reference.d.ts +4 -2
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +3 -1
- package/dest/tx/tree_snapshots.d.ts +2 -2
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tree_snapshots.js +3 -1
- package/dest/tx/tx.d.ts +35 -5
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +20 -7
- package/dest/tx/tx_constant_data.d.ts +2 -2
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_constant_data.js +1 -1
- package/dest/tx/tx_context.d.ts +3 -2
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_context.js +1 -1
- package/dest/tx/tx_effect.d.ts +33 -7
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +8 -11
- package/dest/tx/tx_execution_request.d.ts +31 -2
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_execution_request.js +7 -3
- package/dest/tx/tx_hash.d.ts +3 -2
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_hash.js +1 -1
- package/dest/tx/tx_receipt.d.ts +50 -15
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +48 -16
- package/dest/tx/tx_request.d.ts +7 -2
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/tx_request.js +4 -4
- 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 -5
- package/dest/tx/validator/tx_validator.d.ts.map +1 -1
- package/dest/tx/validator/tx_validator.js +4 -4
- package/dest/types/shared.d.ts +4 -1
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/update-checker/update-checker.d.ts +2 -2
- package/dest/update-checker/update-checker.d.ts.map +1 -1
- package/dest/update-checker/update-checker.js +1 -1
- package/dest/validators/errors.d.ts +2 -2
- package/dest/validators/errors.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 +17 -16
- package/dest/validators/types.d.ts +3 -3
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/versioning/versioning.d.ts +2 -2
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/vks/verification_key.d.ts +23 -2
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +1 -1
- package/dest/vks/vk_data.d.ts +8 -2
- package/dest/vks/vk_data.d.ts.map +1 -1
- package/dest/vks/vk_data.js +1 -1
- package/dest/zkpassport/index.d.ts +4 -5
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/dest/zkpassport/index.js +11 -11
- package/package.json +33 -14
- package/src/abi/abi.ts +40 -34
- package/src/abi/authorization_selector.ts +3 -2
- package/src/abi/buffer.ts +1 -1
- package/src/abi/contract_artifact.ts +10 -10
- package/src/abi/decoder.ts +1 -1
- package/src/abi/encoder.ts +1 -1
- package/src/abi/event_selector.ts +3 -2
- package/src/abi/function_call.ts +26 -4
- package/src/abi/function_selector.ts +11 -2
- package/src/abi/note_selector.ts +2 -2
- package/src/abi/selector.ts +1 -1
- package/src/abi/utils.ts +17 -0
- package/src/auth_witness/auth_witness.ts +5 -5
- package/src/avm/avm.ts +338 -20
- package/src/avm/avm_accumulated_data.ts +1 -1
- package/src/avm/avm_circuit_public_inputs.ts +1 -1
- package/src/avm/contract_storage_read.ts +1 -1
- package/src/avm/contract_storage_update_request.ts +1 -1
- package/src/avm/message_pack.ts +2 -1
- package/src/avm/public_call_stack_item_compressed.ts +1 -1
- package/src/avm/public_data_read.ts +1 -1
- package/src/avm/public_data_update_request.ts +1 -1
- package/src/avm/public_data_write.ts +1 -1
- package/src/avm/public_inner_call_request.ts +1 -1
- package/src/avm/revert_code.ts +1 -1
- package/src/aztec-address/index.ts +2 -1
- package/src/block/attestation_info.ts +10 -7
- package/src/block/block_data.ts +26 -0
- package/src/block/block_hash.ts +27 -26
- package/src/block/block_parameter.ts +10 -0
- package/src/block/body.ts +2 -1
- package/src/block/checkpointed_l2_block.ts +70 -0
- package/src/block/in_block.ts +28 -15
- package/src/block/index.ts +3 -4
- package/src/block/l2_block.ts +107 -141
- package/src/block/l2_block_info.ts +11 -10
- package/src/block/l2_block_source.ts +218 -71
- 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 +142 -37
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +63 -54
- package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
- package/src/block/proposal/attestations_and_signers.ts +1 -1
- package/src/block/proposal/committee_attestation.ts +1 -1
- package/src/block/test/l2_tips_store_test_suite.ts +486 -36
- package/src/block/validate_block_result.ts +40 -35
- package/src/checkpoint/checkpoint.ts +115 -27
- package/src/checkpoint/checkpoint_data.ts +51 -0
- package/src/checkpoint/checkpoint_info.ts +52 -0
- package/src/checkpoint/index.ts +2 -0
- package/src/checkpoint/published_checkpoint.ts +26 -9
- 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/artifact_hash.ts +2 -2
- package/src/contract/complete_address.ts +1 -1
- package/src/contract/contract_address.ts +6 -6
- package/src/contract/contract_class.ts +5 -5
- package/src/contract/contract_class_id.ts +8 -7
- package/src/contract/contract_instance.ts +1 -1
- package/src/contract/contract_instance_update.ts +1 -1
- package/src/contract/deployment_info.ts +1 -1
- package/src/contract/index.ts +0 -2
- package/src/contract/interfaces/contract_class.ts +78 -47
- package/src/contract/interfaces/contract_data_source.ts +3 -2
- package/src/contract/interfaces/contract_instance.ts +48 -16
- package/src/contract/interfaces/contract_instance_update.ts +12 -10
- package/src/contract/interfaces/node-info.ts +3 -0
- package/src/contract/partial_address.ts +1 -1
- package/src/contract/private_function.ts +5 -5
- package/src/contract/private_function_membership_proof.ts +3 -3
- package/src/contract/utility_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 +11 -12
- package/src/delayed_public_mutable/delayed_public_mutable_values_with_hash.ts +1 -1
- package/src/delayed_public_mutable/scheduled_value_change.ts +1 -1
- package/src/deserialization/index.ts +21 -0
- package/src/epoch-helpers/index.ts +24 -10
- package/src/errors/simulation_error.ts +1 -1
- package/src/fees/transaction_fee.ts +1 -1
- package/src/file-store/local.ts +15 -5
- package/src/file-store/s3.ts +12 -3
- package/src/gas/gas.ts +1 -1
- package/src/gas/gas_fees.ts +1 -1
- package/src/gas/gas_settings.ts +1 -1
- 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 +15 -21
- package/src/hash/map_slot.ts +4 -3
- package/src/interfaces/allowed_element.ts +10 -8
- package/src/interfaces/api_limit.ts +2 -0
- package/src/interfaces/archiver.ts +54 -29
- package/src/interfaces/aztec-node-admin.ts +33 -6
- package/src/interfaces/aztec-node.ts +159 -174
- package/src/interfaces/block-builder.ts +52 -23
- package/src/interfaces/configs.ts +78 -33
- package/src/interfaces/epoch-prover.ts +4 -4
- package/src/interfaces/get_logs_response.ts +13 -9
- package/src/interfaces/l2_logs_source.ts +24 -14
- package/src/interfaces/merkle_tree_operations.ts +7 -3
- package/src/interfaces/p2p.ts +8 -12
- package/src/interfaces/prover-broker.ts +22 -0
- package/src/interfaces/prover-client.ts +35 -10
- package/src/interfaces/proving-job.ts +2 -11
- package/src/interfaces/public_state_source.ts +1 -1
- package/src/interfaces/server_circuit_prover.ts +3 -3
- package/src/interfaces/slasher.ts +28 -22
- package/src/interfaces/validator.ts +94 -32
- package/src/interfaces/world_state.ts +26 -18
- package/src/kernel/claimed_length_array.ts +1 -1
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +20 -12
- package/src/kernel/hints/build_nullifier_read_request_hints.ts +18 -15
- package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +2 -4
- package/src/kernel/hints/index.ts +2 -2
- package/src/kernel/hints/key_validation_hint.ts +1 -1
- package/src/kernel/hints/key_validation_request.ts +2 -1
- package/src/kernel/hints/key_validation_request_and_separator.ts +49 -0
- package/src/kernel/hints/note_hash_read_request_hints.ts +1 -1
- package/src/kernel/hints/read_request.ts +1 -1
- package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +11 -11
- package/src/kernel/hints/scoped_value_cache.ts +1 -1
- package/src/kernel/hints/transient_data_squashing_hint.ts +1 -1
- package/src/kernel/hints/tree_leaf_read_request.ts +1 -1
- package/src/kernel/log_hash.ts +1 -1
- package/src/kernel/note_hash.ts +1 -1
- package/src/kernel/nullifier.ts +1 -1
- package/src/kernel/padded_side_effects.ts +1 -1
- package/src/kernel/private_call_data.ts +1 -1
- package/src/kernel/private_call_request.ts +1 -1
- package/src/kernel/private_circuit_public_inputs.ts +100 -100
- package/src/kernel/private_context_inputs.ts +1 -1
- package/src/kernel/private_kernel_circuit_public_inputs.ts +3 -3
- package/src/kernel/private_kernel_init_circuit_private_inputs.ts +1 -1
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +6 -6
- package/src/kernel/private_log_data.ts +1 -1
- package/src/kernel/private_to_avm_accumulated_data.ts +1 -1
- package/src/kernel/private_to_public_accumulated_data.ts +1 -1
- package/src/kernel/private_to_public_accumulated_data_builder.ts +1 -1
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +7 -7
- package/src/kernel/private_to_rollup_accumulated_data.ts +1 -1
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +7 -7
- package/src/kernel/private_validation_requests.ts +8 -8
- package/src/kernel/public_call_request.ts +1 -1
- package/src/kernel/utils/optional_number.ts +1 -1
- package/src/keys/derivation.ts +20 -17
- package/src/keys/key_types.ts +6 -2
- package/src/keys/public_key.ts +1 -1
- package/src/keys/public_keys.ts +5 -4
- package/src/keys/utils.ts +8 -4
- package/src/l1-contracts/slash_factory.ts +4 -1
- package/src/logs/contract_class_log.ts +2 -2
- package/src/logs/debug_log.ts +1 -1
- package/src/logs/directional_app_tagging_secret.ts +4 -2
- package/src/logs/index.ts +2 -1
- package/src/logs/log_id.ts +32 -17
- package/src/logs/message_context.ts +1 -1
- package/src/logs/pending_tagged_log.ts +1 -1
- package/src/logs/private_log.ts +3 -2
- package/src/logs/public_log.ts +8 -1
- package/src/logs/shared_secret_derivation.ts +2 -2
- package/src/logs/siloed_tag.ts +44 -0
- package/src/logs/tag.ts +42 -0
- package/src/logs/tx_scoped_l2_log.ts +48 -45
- package/src/messaging/in_hash.ts +4 -2
- package/src/messaging/inbox_leaf.ts +11 -10
- package/src/messaging/l1_actor.ts +2 -2
- package/src/messaging/l1_to_l2_message.ts +3 -2
- package/src/messaging/l1_to_l2_message_source.ts +5 -10
- package/src/messaging/l2_actor.ts +2 -2
- package/src/messaging/l2_to_l1_membership.ts +179 -52
- package/src/messaging/l2_to_l1_message.ts +5 -1
- package/src/messaging/out_hash.ts +63 -22
- package/src/note/index.ts +0 -1
- package/src/note/note.ts +5 -2
- package/src/note/note_dao.ts +51 -15
- package/src/p2p/attestation_utils.ts +3 -3
- package/src/p2p/block_proposal.ts +214 -48
- package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +38 -26
- package/src/p2p/checkpoint_proposal.ts +387 -0
- package/src/p2p/consensus_payload.ts +30 -19
- package/src/p2p/constants.ts +6 -0
- package/src/p2p/gossipable.ts +14 -4
- package/src/p2p/index.ts +4 -1
- package/src/p2p/message_validator.ts +14 -2
- package/src/p2p/signature_utils.ts +5 -2
- package/src/p2p/signed_txs.ts +88 -0
- package/src/p2p/topic_type.ts +4 -3
- package/src/parity/parity_base_private_inputs.ts +1 -1
- package/src/parity/parity_public_inputs.ts +1 -1
- package/src/proofs/chonk_proof.ts +11 -7
- package/src/proofs/proof.ts +1 -1
- package/src/proofs/proof_data.ts +24 -0
- package/src/proofs/recursive_proof.ts +1 -1
- package/src/rollup/avm_proof_data.ts +2 -9
- package/src/rollup/base_rollup_hints.ts +1 -1
- package/src/rollup/block_constant_data.ts +1 -1
- package/src/rollup/block_headers_hash.ts +2 -2
- package/src/rollup/block_rollup_public_inputs.ts +6 -12
- package/src/rollup/block_root_rollup_private_inputs.ts +1 -1
- package/src/rollup/checkpoint_constant_data.ts +2 -1
- package/src/rollup/checkpoint_header.ts +69 -20
- package/src/rollup/checkpoint_rollup_public_inputs.ts +18 -6
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +16 -2
- package/src/rollup/epoch_constant_data.ts +1 -1
- package/src/rollup/public_chonk_verifier_private_inputs.ts +1 -1
- package/src/rollup/public_chonk_verifier_public_inputs.ts +1 -1
- package/src/rollup/public_tx_base_rollup_private_inputs.ts +2 -2
- package/src/rollup/root_rollup_public_inputs.ts +17 -8
- package/src/rollup/tree_snapshot_diff_hints.ts +1 -1
- package/src/rollup/tx_rollup_public_inputs.ts +1 -1
- package/src/schemas/schemas.ts +6 -1
- 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 +38 -20
- package/src/snapshots/types.ts +33 -29
- package/src/stats/stats.ts +10 -7
- package/src/tests/factories.ts +143 -61
- package/src/tests/jest.ts +1 -1
- package/src/tests/mocks.ts +295 -86
- package/src/timetable/index.ts +66 -0
- package/src/trees/append_only_tree_snapshot.ts +1 -1
- package/src/trees/database_public_state_source.ts +1 -1
- package/src/trees/nullifier_leaf.ts +1 -1
- package/src/trees/nullifier_membership_witness.ts +1 -1
- package/src/trees/public_data_leaf.ts +12 -6
- package/src/trees/public_data_witness.ts +1 -1
- package/src/tx/block_header.ts +27 -13
- package/src/tx/call_context.ts +1 -1
- package/src/tx/capsule.ts +1 -1
- package/src/tx/function_data.ts +1 -1
- package/src/tx/global_variable_builder.ts +9 -2
- package/src/tx/global_variables.ts +16 -10
- package/src/tx/hashed_values.ts +1 -1
- package/src/tx/in_tx.ts +24 -0
- package/src/tx/index.ts +1 -1
- package/src/tx/indexed_tx_effect.ts +9 -7
- package/src/tx/offchain_effect.ts +1 -1
- package/src/tx/partial_state_reference.ts +1 -1
- package/src/tx/private_execution_result.ts +6 -21
- package/src/tx/private_tx_constant_data.ts +1 -1
- package/src/tx/processed_tx.ts +19 -16
- package/src/tx/profiling.ts +52 -10
- package/src/tx/protocol_contracts.ts +4 -4
- package/src/tx/public_call_request_with_calldata.ts +1 -1
- package/src/tx/public_simulation_output.ts +5 -1
- package/src/tx/state_reference.ts +1 -1
- package/src/tx/tree_snapshots.ts +1 -1
- package/src/tx/tx.ts +22 -13
- package/src/tx/tx_constant_data.ts +1 -1
- package/src/tx/tx_context.ts +1 -1
- package/src/tx/tx_effect.ts +5 -12
- package/src/tx/tx_execution_request.ts +3 -1
- package/src/tx/tx_hash.ts +1 -1
- package/src/tx/tx_receipt.ts +78 -20
- package/src/tx/tx_request.ts +4 -4
- 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 +9 -7
- package/src/update-checker/update-checker.ts +2 -1
- package/src/validators/errors.ts +1 -1
- package/src/validators/schemas.ts +61 -48
- package/src/validators/types.ts +5 -4
- package/src/versioning/versioning.ts +1 -1
- package/src/vks/verification_key.ts +1 -1
- package/src/vks/vk_data.ts +1 -1
- package/src/zkpassport/index.ts +13 -14
- 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/block/l2_block_new.d.ts +0 -108
- package/dest/block/l2_block_new.d.ts.map +0 -1
- package/dest/block/l2_block_new.js +0 -135
- package/dest/block/l2_block_number.d.ts +0 -5
- package/dest/block/l2_block_number.d.ts.map +0 -1
- package/dest/block/l2_block_number.js +0 -6
- package/dest/block/published_l2_block.d.ts +0 -130
- package/dest/block/published_l2_block.d.ts.map +0 -1
- package/dest/block/published_l2_block.js +0 -48
- 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/logs/log_with_tx_data.d.ts +0 -19
- package/dest/logs/log_with_tx_data.d.ts.map +0 -1
- package/dest/logs/log_with_tx_data.js +0 -49
- package/dest/note/notes_filter.d.ts +0 -25
- package/dest/note/notes_filter.d.ts.map +0 -1
- package/dest/note/notes_filter.js +0 -10
- 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 -48
- package/dest/tx/content_commitment.d.ts.map +0 -1
- package/dest/tx/content_commitment.js +0 -82
- package/src/block/l2_block_code_to_purge.ts +0 -88
- package/src/block/l2_block_header.ts +0 -246
- package/src/block/l2_block_new.ts +0 -171
- package/src/block/l2_block_number.ts +0 -8
- package/src/block/published_l2_block.ts +0 -65
- 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/kernel/hints/key_validation_request_and_generator.ts +0 -52
- package/src/logs/log_with_tx_data.ts +0 -46
- package/src/note/notes_filter.ts +0 -35
- package/src/tx/content_commitment.ts +0 -104
package/src/p2p/gossipable.ts
CHANGED
|
@@ -7,23 +7,33 @@ export class P2PMessage {
|
|
|
7
7
|
constructor(
|
|
8
8
|
public readonly payload: Buffer,
|
|
9
9
|
public readonly timestamp?: Date,
|
|
10
|
+
public readonly traceContext?: string,
|
|
10
11
|
) {}
|
|
11
12
|
|
|
12
|
-
static fromGossipable(message: Gossipable, instrumentMessages = false): P2PMessage {
|
|
13
|
-
|
|
13
|
+
static fromGossipable(message: Gossipable, instrumentMessages = false, traceContext?: string): P2PMessage {
|
|
14
|
+
if (!instrumentMessages) {
|
|
15
|
+
return new P2PMessage(message.toBuffer());
|
|
16
|
+
}
|
|
17
|
+
return new P2PMessage(message.toBuffer(), new Date(), traceContext);
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
static fromMessageData(messageData: Buffer, instrumentMessages = false): P2PMessage {
|
|
17
21
|
const reader = new BufferReader(messageData);
|
|
18
|
-
|
|
22
|
+
let timestamp: Date | undefined;
|
|
23
|
+
let traceContext: string | undefined;
|
|
24
|
+
if (instrumentMessages) {
|
|
25
|
+
timestamp = new Date(Number(reader.readUInt64()));
|
|
26
|
+
traceContext = reader.readString();
|
|
27
|
+
}
|
|
19
28
|
const payload = reader.readBuffer();
|
|
20
|
-
return new P2PMessage(payload, timestamp);
|
|
29
|
+
return new P2PMessage(payload, timestamp, traceContext);
|
|
21
30
|
}
|
|
22
31
|
|
|
23
32
|
toMessageData(): Buffer {
|
|
24
33
|
const arr: Buffer[] = [];
|
|
25
34
|
if (this.timestamp) {
|
|
26
35
|
arr.push(bigintToUInt64BE(BigInt(this.timestamp.getTime())));
|
|
36
|
+
arr.push(serializeToBuffer(this.traceContext ?? ''));
|
|
27
37
|
}
|
|
28
38
|
arr.push(serializeToBuffer(this.payload.length, this.payload));
|
|
29
39
|
return serializeToBuffer(arr);
|
package/src/p2p/index.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export * from './attestation_utils.js';
|
|
2
|
-
export * from './block_attestation.js';
|
|
3
2
|
export * from './block_proposal.js';
|
|
3
|
+
export * from './checkpoint_attestation.js';
|
|
4
|
+
export * from './checkpoint_proposal.js';
|
|
4
5
|
export * from './consensus_payload.js';
|
|
5
6
|
export * from './gossipable.js';
|
|
6
7
|
export * from './interface.js';
|
|
7
8
|
export * from './signature_utils.js';
|
|
9
|
+
export * from './signed_txs.js';
|
|
8
10
|
export * from './topic_type.js';
|
|
9
11
|
export * from './client_type.js';
|
|
10
12
|
export * from './message_validator.js';
|
|
11
13
|
export * from './peer_error.js';
|
|
14
|
+
export * from './constants.js';
|
|
@@ -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
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
|
-
import { keccak256
|
|
2
|
+
import { keccak256 } from '@aztec/foundation/crypto/keccak';
|
|
3
|
+
import { makeEthSignDigest } from '@aztec/foundation/crypto/secp256k1-signer';
|
|
3
4
|
|
|
4
5
|
export enum SignatureDomainSeparator {
|
|
5
6
|
blockProposal = 0,
|
|
6
|
-
|
|
7
|
+
checkpointAttestation = 1,
|
|
7
8
|
attestationsAndSigners = 2,
|
|
9
|
+
checkpointProposal = 3,
|
|
10
|
+
signedTxs = 4,
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
export interface Signable {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
|
+
import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
|
|
3
|
+
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
5
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
|
+
|
|
7
|
+
import { MAX_TXS_PER_BLOCK } from '../deserialization/index.js';
|
|
8
|
+
import { Tx } from '../tx/tx.js';
|
|
9
|
+
import {
|
|
10
|
+
SignatureDomainSeparator,
|
|
11
|
+
getHashedSignaturePayload,
|
|
12
|
+
getHashedSignaturePayloadEthSignedMessage,
|
|
13
|
+
} from './signature_utils.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A signed collection of transactions.
|
|
17
|
+
* The signature is over the transaction objects themselves, providing
|
|
18
|
+
* data availability guarantees beyond just the transaction hashes.
|
|
19
|
+
*/
|
|
20
|
+
export class SignedTxs {
|
|
21
|
+
private sender: EthAddress | undefined;
|
|
22
|
+
|
|
23
|
+
constructor(
|
|
24
|
+
/** The transactions */
|
|
25
|
+
public readonly txs: Tx[],
|
|
26
|
+
/** The proposer's signature over the transactions */
|
|
27
|
+
public readonly signature: Signature,
|
|
28
|
+
) {}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Get the payload to sign for this signed txs.
|
|
32
|
+
*/
|
|
33
|
+
getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer {
|
|
34
|
+
return serializeToBuffer([domainSeparator, this.txs.length, this.txs]);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Lazily evaluate the sender of the signed txs; result is cached
|
|
39
|
+
* @returns The sender address, or undefined if signature recovery fails
|
|
40
|
+
*/
|
|
41
|
+
getSender(): EthAddress | undefined {
|
|
42
|
+
if (!this.sender) {
|
|
43
|
+
const hashed = getHashedSignaturePayloadEthSignedMessage(this, SignatureDomainSeparator.signedTxs);
|
|
44
|
+
this.sender = tryRecoverAddress(hashed, this.signature);
|
|
45
|
+
}
|
|
46
|
+
return this.sender;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Create SignedTxs from a signer function
|
|
51
|
+
*/
|
|
52
|
+
static async createFromSigner(
|
|
53
|
+
txs: Tx[],
|
|
54
|
+
payloadSigner: (payload: Buffer32) => Promise<Signature>,
|
|
55
|
+
): Promise<SignedTxs> {
|
|
56
|
+
const tempSignedTxs = new SignedTxs(txs, Signature.empty());
|
|
57
|
+
const hashed = getHashedSignaturePayload(tempSignedTxs, SignatureDomainSeparator.signedTxs);
|
|
58
|
+
const signature = await payloadSigner(hashed);
|
|
59
|
+
return new SignedTxs(txs, signature);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
toBuffer(): Buffer {
|
|
63
|
+
return serializeToBuffer([this.txs.length, this.txs, this.signature]);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static fromBuffer(buf: Buffer | BufferReader): SignedTxs {
|
|
67
|
+
const reader = BufferReader.asReader(buf);
|
|
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);
|
|
73
|
+
const signature = reader.readObject(Signature);
|
|
74
|
+
return new SignedTxs(txs, signature);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
getSize(): number {
|
|
78
|
+
return 4 /* txs.length */ + this.txs.reduce((acc, tx) => acc + tx.getSize(), 0) + this.signature.getSize();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
static empty(): SignedTxs {
|
|
82
|
+
return new SignedTxs([], Signature.empty());
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
static random(): SignedTxs {
|
|
86
|
+
return new SignedTxs([Tx.random(), Tx.random()], Signature.random());
|
|
87
|
+
}
|
|
88
|
+
}
|
package/src/p2p/topic_type.ts
CHANGED
|
@@ -23,14 +23,15 @@ export function getTopicFromString(topicStr: string): TopicType | undefined {
|
|
|
23
23
|
export enum TopicType {
|
|
24
24
|
tx = 'tx',
|
|
25
25
|
block_proposal = 'block_proposal',
|
|
26
|
-
|
|
26
|
+
checkpoint_proposal = 'checkpoint_proposal',
|
|
27
|
+
checkpoint_attestation = 'checkpoint_attestation',
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export function getTopicTypeForClientType(clientType: P2PClientType) {
|
|
30
31
|
if (clientType === P2PClientType.Full) {
|
|
31
|
-
return
|
|
32
|
+
return [TopicType.tx, TopicType.block_proposal, TopicType.checkpoint_proposal, TopicType.checkpoint_attestation];
|
|
32
33
|
} else if (clientType === P2PClientType.Prover) {
|
|
33
|
-
return [TopicType.tx, TopicType.block_proposal];
|
|
34
|
+
return [TopicType.tx, TopicType.block_proposal, TopicType.checkpoint_proposal];
|
|
34
35
|
} else {
|
|
35
36
|
const _: never = clientType;
|
|
36
37
|
return [TopicType.tx];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, NUM_MSGS_PER_BASE_PARITY } from '@aztec/constants';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
4
4
|
import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
5
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
3
3
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
4
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CHONK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { times } from '@aztec/foundation/collection';
|
|
3
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
4
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
5
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
5
6
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
7
|
|
|
@@ -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
|
|
package/src/proofs/proof.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PAIRING_POINTS_SIZE } from '@aztec/constants';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
4
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
5
5
|
|
package/src/proofs/proof_data.ts
CHANGED
|
@@ -29,6 +29,30 @@ export class ProofData<T extends Bufferable, PROOF_LENGTH extends number> {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Represents the data of a recursive proof for a circuit with a fixed verification key.
|
|
34
|
+
*/
|
|
35
|
+
export class ProofDataForFixedVk<T extends Bufferable, PROOF_LENGTH extends number> {
|
|
36
|
+
constructor(
|
|
37
|
+
public publicInputs: T,
|
|
38
|
+
public proof: RecursiveProof<PROOF_LENGTH>,
|
|
39
|
+
) {}
|
|
40
|
+
|
|
41
|
+
public toBuffer(): Buffer {
|
|
42
|
+
return serializeToBuffer(this.publicInputs, this.proof);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public static fromBuffer<T extends Bufferable, PROOF_LENGTH extends number>(
|
|
46
|
+
buffer: Buffer | BufferReader,
|
|
47
|
+
publicInputs: {
|
|
48
|
+
fromBuffer: (reader: BufferReader) => T;
|
|
49
|
+
},
|
|
50
|
+
): ProofDataForFixedVk<T, PROOF_LENGTH> {
|
|
51
|
+
const reader = BufferReader.asReader(buffer);
|
|
52
|
+
return new ProofDataForFixedVk(reader.readObject(publicInputs), RecursiveProof.fromBuffer(reader));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
32
56
|
export type ChonkProofData<T extends Bufferable> = ProofData<T, typeof CHONK_PROOF_LENGTH>;
|
|
33
57
|
|
|
34
58
|
export type UltraHonkProofData<T extends Bufferable> = ProofData<T, typeof RECURSIVE_PROOF_LENGTH>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeTuple } from '@aztec/foundation/array';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { schemas } from '@aztec/foundation/schemas';
|
|
4
4
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
5
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED } from '@aztec/constants';
|
|
2
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
3
2
|
|
|
4
3
|
import { AvmCircuitPublicInputs } from '../avm/avm_circuit_public_inputs.js';
|
|
5
|
-
import type {
|
|
4
|
+
import type { ProofDataForFixedVk } from '../proofs/proof_data.js';
|
|
6
5
|
|
|
7
|
-
export type AvmProofData =
|
|
8
|
-
|
|
9
|
-
// TODO(#14234)[Unconditional PIs validation]: remove this function.
|
|
10
|
-
export function enhanceProofWithPiValidationFlag(proof: Fr[], skipPublicInputsValidation: boolean): Fr[] {
|
|
11
|
-
const skipPublicInputsField = skipPublicInputsValidation ? new Fr(1) : new Fr(0);
|
|
12
|
-
return [skipPublicInputsField].concat(proof).slice(0, AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED);
|
|
13
|
-
}
|
|
6
|
+
export type AvmProofData = ProofDataForFixedVk<AvmCircuitPublicInputs, typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SpongeBlob } from '@aztec/blob-lib/types';
|
|
2
2
|
import { ARCHIVE_HEIGHT, MAX_CONTRACT_CLASS_LOGS_PER_TX } from '@aztec/constants';
|
|
3
3
|
import { makeTuple } from '@aztec/foundation/array';
|
|
4
|
-
import { Fr } from '@aztec/foundation/
|
|
4
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
5
|
import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
6
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
7
7
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { computeUnbalancedPoseidonRoot } from '@aztec/foundation/trees';
|
|
3
3
|
|
|
4
4
|
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);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpongeBlob } from '@aztec/blob-lib/types';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
4
4
|
import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
5
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
@@ -43,17 +43,13 @@ export class BlockRollupPublicInputs {
|
|
|
43
43
|
*/
|
|
44
44
|
public endSpongeBlob: SpongeBlob,
|
|
45
45
|
/**
|
|
46
|
-
* Timestamp of the
|
|
46
|
+
* Timestamp of the blocks in this block range.
|
|
47
47
|
*/
|
|
48
|
-
public
|
|
49
|
-
/**
|
|
50
|
-
* Timestamp of the last block in this block range.
|
|
51
|
-
*/
|
|
52
|
-
public endTimestamp: UInt64,
|
|
48
|
+
public timestamp: UInt64,
|
|
53
49
|
/**
|
|
54
50
|
* Hash of the headers of all blocks in this block range. It will be combined with the `blockHeadersHash` from
|
|
55
|
-
* other blocks in the same checkpoint to form
|
|
56
|
-
* 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.
|
|
57
53
|
*/
|
|
58
54
|
public blockHeadersHash: Fr,
|
|
59
55
|
/**
|
|
@@ -85,7 +81,6 @@ export class BlockRollupPublicInputs {
|
|
|
85
81
|
reader.readObject(SpongeBlob),
|
|
86
82
|
reader.readObject(SpongeBlob),
|
|
87
83
|
reader.readUInt64(),
|
|
88
|
-
reader.readUInt64(),
|
|
89
84
|
Fr.fromBuffer(reader),
|
|
90
85
|
Fr.fromBuffer(reader),
|
|
91
86
|
Fr.fromBuffer(reader),
|
|
@@ -103,8 +98,7 @@ export class BlockRollupPublicInputs {
|
|
|
103
98
|
this.endState,
|
|
104
99
|
this.startSpongeBlob,
|
|
105
100
|
this.endSpongeBlob,
|
|
106
|
-
bigintToUInt64BE(this.
|
|
107
|
-
bigintToUInt64BE(this.endTimestamp),
|
|
101
|
+
bigintToUInt64BE(this.timestamp),
|
|
108
102
|
this.blockHeadersHash,
|
|
109
103
|
this.inHash,
|
|
110
104
|
this.outHash,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH } from '@aztec/constants';
|
|
2
|
-
import { Fr } from '@aztec/foundation/
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
4
4
|
import { BufferReader, type Tuple, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
5
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
5
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
6
6
|
|
|
@@ -11,6 +11,7 @@ import { GasFees } from '../gas/gas_fees.js';
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Constants that are the same for the entire checkpoint.
|
|
14
|
+
* Used in circuits during rollup proving.
|
|
14
15
|
*/
|
|
15
16
|
export class CheckpointConstantData {
|
|
16
17
|
constructor(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ViemHeader } from '@aztec/ethereum';
|
|
1
|
+
import type { ViemHeader } from '@aztec/ethereum/contracts';
|
|
2
2
|
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import { sha256ToField } from '@aztec/foundation/crypto';
|
|
3
|
+
import { sha256ToField } from '@aztec/foundation/crypto/sha256';
|
|
4
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
6
6
|
import type { ZodFor } from '@aztec/foundation/schemas';
|
|
7
7
|
import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
8
8
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
@@ -14,17 +14,32 @@ import { z } from 'zod';
|
|
|
14
14
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
15
15
|
import { GasFees } from '../gas/index.js';
|
|
16
16
|
import { schemas } from '../schemas/index.js';
|
|
17
|
-
import {
|
|
17
|
+
import type { GlobalVariables } from '../tx/global_variables.js';
|
|
18
18
|
import type { UInt64 } from '../types/shared.js';
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Header of a checkpoint. A checkpoint is a collection of blocks submitted to L1 all within the same slot.
|
|
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
|
+
*/
|
|
20
25
|
export class CheckpointHeader {
|
|
21
26
|
constructor(
|
|
22
27
|
/** Root of the archive tree before this block is added. */
|
|
23
28
|
public lastArchiveRoot: Fr,
|
|
24
29
|
/** Hash of the headers of all blocks in this checkpoint. */
|
|
25
30
|
public blockHeadersHash: Fr,
|
|
26
|
-
/**
|
|
27
|
-
public
|
|
31
|
+
/** Hash of the blobs in the checkpoint. */
|
|
32
|
+
public blobsHash: Fr,
|
|
33
|
+
/** Root of the l1 to l2 messages subtree. */
|
|
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,
|
|
28
43
|
/** Slot number of the L2 block */
|
|
29
44
|
public slotNumber: SlotNumber,
|
|
30
45
|
/** Timestamp of the L2 block. */
|
|
@@ -44,7 +59,9 @@ export class CheckpointHeader {
|
|
|
44
59
|
.object({
|
|
45
60
|
lastArchiveRoot: schemas.Fr,
|
|
46
61
|
blockHeadersHash: schemas.Fr,
|
|
47
|
-
|
|
62
|
+
blobsHash: schemas.Fr,
|
|
63
|
+
inHash: schemas.Fr,
|
|
64
|
+
epochOutHash: schemas.Fr,
|
|
48
65
|
slotNumber: schemas.SlotNumber,
|
|
49
66
|
timestamp: schemas.BigInt,
|
|
50
67
|
coinbase: schemas.EthAddress,
|
|
@@ -59,7 +76,9 @@ export class CheckpointHeader {
|
|
|
59
76
|
return [
|
|
60
77
|
fields.lastArchiveRoot,
|
|
61
78
|
fields.blockHeadersHash,
|
|
62
|
-
fields.
|
|
79
|
+
fields.blobsHash,
|
|
80
|
+
fields.inHash,
|
|
81
|
+
fields.epochOutHash,
|
|
63
82
|
fields.slotNumber,
|
|
64
83
|
fields.timestamp,
|
|
65
84
|
fields.coinbase,
|
|
@@ -79,7 +98,9 @@ export class CheckpointHeader {
|
|
|
79
98
|
return new CheckpointHeader(
|
|
80
99
|
reader.readObject(Fr),
|
|
81
100
|
reader.readObject(Fr),
|
|
82
|
-
reader.readObject(
|
|
101
|
+
reader.readObject(Fr),
|
|
102
|
+
reader.readObject(Fr),
|
|
103
|
+
reader.readObject(Fr),
|
|
83
104
|
SlotNumber(Fr.fromBuffer(reader).toNumber()),
|
|
84
105
|
reader.readUInt64(),
|
|
85
106
|
reader.readObject(EthAddress),
|
|
@@ -93,7 +114,9 @@ export class CheckpointHeader {
|
|
|
93
114
|
return (
|
|
94
115
|
this.lastArchiveRoot.equals(other.lastArchiveRoot) &&
|
|
95
116
|
this.blockHeadersHash.equals(other.blockHeadersHash) &&
|
|
96
|
-
this.
|
|
117
|
+
this.blobsHash.equals(other.blobsHash) &&
|
|
118
|
+
this.inHash.equals(other.inHash) &&
|
|
119
|
+
this.epochOutHash.equals(other.epochOutHash) &&
|
|
97
120
|
this.slotNumber === other.slotNumber &&
|
|
98
121
|
this.timestamp === other.timestamp &&
|
|
99
122
|
this.coinbase.equals(other.coinbase) &&
|
|
@@ -103,12 +126,25 @@ export class CheckpointHeader {
|
|
|
103
126
|
);
|
|
104
127
|
}
|
|
105
128
|
|
|
129
|
+
/** Returns true if the global variables match those in the checkpoint header. */
|
|
130
|
+
matchesGlobalVariables(other: GlobalVariables) {
|
|
131
|
+
return (
|
|
132
|
+
this.coinbase.equals(other.coinbase) &&
|
|
133
|
+
this.feeRecipient.equals(other.feeRecipient) &&
|
|
134
|
+
this.gasFees.equals(other.gasFees) &&
|
|
135
|
+
this.slotNumber === other.slotNumber &&
|
|
136
|
+
this.timestamp === other.timestamp
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
106
140
|
toBuffer() {
|
|
107
141
|
// Note: The order here must match the order in the ProposedHeaderLib solidity library.
|
|
108
142
|
return serializeToBuffer([
|
|
109
143
|
this.lastArchiveRoot,
|
|
110
144
|
this.blockHeadersHash,
|
|
111
|
-
this.
|
|
145
|
+
this.blobsHash,
|
|
146
|
+
this.inHash,
|
|
147
|
+
this.epochOutHash,
|
|
112
148
|
new Fr(this.slotNumber),
|
|
113
149
|
bigintToUInt64BE(this.timestamp),
|
|
114
150
|
this.coinbase,
|
|
@@ -126,7 +162,9 @@ export class CheckpointHeader {
|
|
|
126
162
|
return CheckpointHeader.from({
|
|
127
163
|
lastArchiveRoot: Fr.ZERO,
|
|
128
164
|
blockHeadersHash: Fr.ZERO,
|
|
129
|
-
|
|
165
|
+
blobsHash: Fr.ZERO,
|
|
166
|
+
inHash: Fr.ZERO,
|
|
167
|
+
epochOutHash: Fr.ZERO,
|
|
130
168
|
slotNumber: SlotNumber.ZERO,
|
|
131
169
|
timestamp: 0n,
|
|
132
170
|
coinbase: EthAddress.ZERO,
|
|
@@ -141,7 +179,9 @@ export class CheckpointHeader {
|
|
|
141
179
|
return CheckpointHeader.from({
|
|
142
180
|
lastArchiveRoot: Fr.random(),
|
|
143
181
|
blockHeadersHash: Fr.random(),
|
|
144
|
-
|
|
182
|
+
blobsHash: Fr.random(),
|
|
183
|
+
inHash: Fr.random(),
|
|
184
|
+
epochOutHash: Fr.random(),
|
|
145
185
|
slotNumber: SlotNumber(Math.floor(Math.random() * 1000) + 1),
|
|
146
186
|
timestamp: BigInt(Math.floor(Date.now() / 1000)),
|
|
147
187
|
coinbase: EthAddress.random(),
|
|
@@ -156,7 +196,9 @@ export class CheckpointHeader {
|
|
|
156
196
|
return (
|
|
157
197
|
this.lastArchiveRoot.isZero() &&
|
|
158
198
|
this.blockHeadersHash.isZero() &&
|
|
159
|
-
this.
|
|
199
|
+
this.blobsHash.isZero() &&
|
|
200
|
+
this.inHash.isZero() &&
|
|
201
|
+
this.epochOutHash.isZero() &&
|
|
160
202
|
this.slotNumber === 0 &&
|
|
161
203
|
this.timestamp === 0n &&
|
|
162
204
|
this.coinbase.isZero() &&
|
|
@@ -182,7 +224,9 @@ export class CheckpointHeader {
|
|
|
182
224
|
return new CheckpointHeader(
|
|
183
225
|
Fr.fromString(header.lastArchiveRoot),
|
|
184
226
|
Fr.fromString(header.blockHeadersHash),
|
|
185
|
-
|
|
227
|
+
Fr.fromString(header.blobsHash),
|
|
228
|
+
Fr.fromString(header.inHash),
|
|
229
|
+
Fr.fromString(header.outHash),
|
|
186
230
|
SlotNumber.fromBigInt(header.slotNumber),
|
|
187
231
|
header.timestamp,
|
|
188
232
|
new EthAddress(hexToBuffer(header.coinbase)),
|
|
@@ -204,7 +248,9 @@ export class CheckpointHeader {
|
|
|
204
248
|
return {
|
|
205
249
|
lastArchiveRoot: this.lastArchiveRoot.toString(),
|
|
206
250
|
blockHeadersHash: this.blockHeadersHash.toString(),
|
|
207
|
-
|
|
251
|
+
blobsHash: this.blobsHash.toString(),
|
|
252
|
+
inHash: this.inHash.toString(),
|
|
253
|
+
outHash: this.epochOutHash.toString(),
|
|
208
254
|
slotNumber: BigInt(this.slotNumber),
|
|
209
255
|
timestamp: this.timestamp,
|
|
210
256
|
coinbase: this.coinbase.toString(),
|
|
@@ -221,7 +267,9 @@ export class CheckpointHeader {
|
|
|
221
267
|
return {
|
|
222
268
|
lastArchive: this.lastArchiveRoot.toString(),
|
|
223
269
|
blockHeadersHash: this.blockHeadersHash.toString(),
|
|
224
|
-
|
|
270
|
+
blobsHash: this.blobsHash.toString(),
|
|
271
|
+
inHash: this.inHash.toString(),
|
|
272
|
+
epochOutHash: this.epochOutHash.toString(),
|
|
225
273
|
slotNumber: this.slotNumber,
|
|
226
274
|
timestamp: this.timestamp,
|
|
227
275
|
coinbase: this.coinbase.toString(),
|
|
@@ -232,16 +280,17 @@ export class CheckpointHeader {
|
|
|
232
280
|
}
|
|
233
281
|
|
|
234
282
|
[inspect.custom]() {
|
|
235
|
-
const gasfees = `da:${this.gasFees.feePerDaGas}, l2:${this.gasFees.feePerL2Gas}`;
|
|
236
283
|
return `Header {
|
|
237
284
|
lastArchiveRoot: ${this.lastArchiveRoot.toString()},
|
|
238
285
|
blockHeadersHash: ${this.blockHeadersHash.toString()},
|
|
239
|
-
|
|
286
|
+
blobsHash: ${inspect(this.blobsHash)},
|
|
287
|
+
inHash: ${inspect(this.inHash)},
|
|
288
|
+
epochOutHash: ${inspect(this.epochOutHash)},
|
|
240
289
|
slotNumber: ${this.slotNumber},
|
|
241
290
|
timestamp: ${this.timestamp},
|
|
242
291
|
coinbase: ${this.coinbase.toString()},
|
|
243
292
|
feeRecipient: ${this.feeRecipient.toString()},
|
|
244
|
-
gasFees:
|
|
293
|
+
gasFees: { da:${this.gasFees.feePerDaGas}, l2:${this.gasFees.feePerL2Gas} },
|
|
245
294
|
totalManaUsed: ${this.totalManaUsed.toBigInt()},
|
|
246
295
|
}`;
|
|
247
296
|
}
|