@aztec/stdlib 0.0.1-commit.b2a5d0dd1 → 0.0.1-commit.b3d3157a
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 +121 -1197
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +31 -16
- package/dest/abi/authorization_selector.d.ts +2 -2
- package/dest/abi/authorization_selector.d.ts.map +1 -1
- package/dest/abi/contract_artifact.d.ts +1 -1
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +14 -7
- package/dest/abi/event_selector.d.ts +2 -2
- package/dest/abi/event_selector.d.ts.map +1 -1
- package/dest/abi/function_call.d.ts +7 -25
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/note_selector.d.ts +2 -2
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/utils.d.ts +1 -1
- package/dest/abi/utils.d.ts.map +1 -1
- package/dest/abi/utils.js +1 -1
- package/dest/auth_witness/auth_witness.d.ts +2 -2
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/avm/avm.d.ts +1756 -10463
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +6 -3
- package/dest/avm/avm_accumulated_data.d.ts +22 -86
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.d.ts +180 -932
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_proving_request.d.ts +653 -5446
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/message_pack.js +12 -3
- package/dest/avm/public_data_write.d.ts +6 -12
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/revert_code.d.ts +1 -7
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +0 -3
- package/dest/aztec-address/index.d.ts +6 -3
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +7 -2
- package/dest/block/attestation_info.d.ts +3 -2
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +7 -5
- package/dest/block/block_data.d.ts +9 -34
- package/dest/block/block_data.d.ts.map +1 -1
- package/dest/block/block_parameter.d.ts +37 -4
- package/dest/block/block_parameter.d.ts.map +1 -1
- package/dest/block/block_parameter.js +53 -2
- package/dest/block/in_block.d.ts +5 -24
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/index.d.ts +1 -2
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +0 -1
- package/dest/block/l2_block.d.ts +13 -41
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block_info.d.ts +7 -27
- package/dest/block/l2_block_info.d.ts.map +1 -1
- package/dest/block/l2_block_source.d.ts +199 -425
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +66 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +2 -2
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +44 -17
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +3 -1
- 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 +3 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +4 -1
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_store_base.js +26 -7
- package/dest/block/proposal/attestations_and_signers.d.ts +19 -30
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.js +26 -18
- package/dest/block/proposal/committee_attestation.d.ts +6 -12
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +1 -1
- package/dest/checkpoint/checkpoint.d.ts +24 -96
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint_data.d.ts +40 -129
- package/dest/checkpoint/checkpoint_data.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint_data.js +2 -0
- package/dest/checkpoint/checkpoint_info.d.ts +7 -23
- package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts +60 -0
- package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint_reexecution_tracker.js +108 -0
- package/dest/checkpoint/digest.d.ts +18 -0
- package/dest/checkpoint/digest.d.ts.map +1 -0
- package/dest/checkpoint/digest.js +12 -0
- package/dest/checkpoint/index.d.ts +4 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +3 -0
- package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts +33 -0
- package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts.map +1 -0
- package/dest/checkpoint/previous_checkpoint_out_hashes.js +45 -0
- package/dest/checkpoint/published_checkpoint.d.ts +42 -194
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
- package/dest/config/chain-config.d.ts +4 -9
- package/dest/config/chain-config.d.ts.map +1 -1
- package/dest/config/chain-config.js +6 -11
- package/dest/config/index.d.ts +1 -2
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +0 -1
- package/dest/config/sequencer-config.d.ts +5 -3
- package/dest/config/sequencer-config.d.ts.map +1 -1
- package/dest/config/sequencer-config.js +13 -6
- package/dest/contract/complete_address.d.ts +3 -2
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/complete_address.js +6 -2
- package/dest/contract/contract_address.d.ts +5 -5
- package/dest/contract/contract_address.d.ts.map +1 -1
- package/dest/contract/contract_address.js +5 -4
- package/dest/contract/contract_deployment_data.d.ts +15 -61
- package/dest/contract/contract_deployment_data.d.ts.map +1 -1
- package/dest/contract/contract_instance.d.ts +4 -2
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance.js +10 -3
- package/dest/contract/interfaces/contract_class.d.ts +15 -86
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.d.ts +41 -95
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.js +4 -2
- package/dest/contract/interfaces/contract_instance_update.d.ts +6 -26
- package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/interfaces/protocol_contract_addresses.d.ts +2 -12
- package/dest/contract/interfaces/protocol_contract_addresses.d.ts.map +1 -1
- package/dest/database-version/database_version.d.ts +5 -11
- package/dest/database-version/database_version.d.ts.map +1 -1
- package/dest/database-version/version_manager.d.ts +6 -2
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +12 -1
- package/dest/epoch-helpers/index.d.ts +4 -22
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/gas/gas.d.ts +9 -14
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas.js +6 -3
- package/dest/gas/gas_fees.d.ts +9 -14
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +7 -3
- package/dest/gas/gas_settings.d.ts +27 -84
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +6 -3
- package/dest/ha-signing/config.d.ts +9 -73
- package/dest/ha-signing/config.d.ts.map +1 -1
- package/dest/ha-signing/config.js +5 -15
- package/dest/ha-signing/local_config.d.ts +3 -34
- package/dest/ha-signing/local_config.d.ts.map +1 -1
- package/dest/ha-signing/local_config.js +2 -2
- package/dest/hash/hash.d.ts +1 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +2 -2
- package/dest/interfaces/allowed_element.d.ts +4 -28
- package/dest/interfaces/allowed_element.d.ts.map +1 -1
- package/dest/interfaces/api_limit.d.ts +1 -1
- package/dest/interfaces/api_limit.js +1 -1
- package/dest/interfaces/archiver.d.ts +16 -36
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +211 -71
- package/dest/interfaces/aztec-node-admin.d.ts +62 -292
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +57 -14
- package/dest/interfaces/aztec-node-debug.js +4 -1
- package/dest/interfaces/aztec-node.d.ts +100 -106
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +308 -70
- package/dest/interfaces/block-builder.d.ts +3 -1
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block_response.d.ts +90 -0
- package/dest/interfaces/block_response.d.ts.map +1 -0
- package/dest/interfaces/block_response.js +30 -0
- package/dest/interfaces/chain_tips.d.ts +50 -0
- package/dest/interfaces/chain_tips.d.ts.map +1 -0
- package/dest/interfaces/chain_tips.js +11 -0
- package/dest/interfaces/checkpoint_parameter.d.ts +14 -0
- package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
- package/dest/interfaces/checkpoint_parameter.js +18 -0
- package/dest/interfaces/checkpoint_response.d.ts +122 -0
- package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
- package/dest/interfaces/checkpoint_response.js +26 -0
- package/dest/interfaces/client.d.ts +7 -2
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/client.js +6 -1
- package/dest/interfaces/configs.d.ts +41 -130
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +9 -1
- package/dest/interfaces/l1_publish_info.d.ts +29 -0
- package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
- package/dest/interfaces/l1_publish_info.js +26 -0
- package/dest/interfaces/l2_logs_source.d.ts +14 -36
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/interfaces/l2_logs_source.js +5 -0
- package/dest/interfaces/merkle_tree_operations.d.ts +9 -3
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p-bootstrap.js +8 -2
- package/dest/interfaces/p2p.d.ts +15 -5
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +28 -5
- package/dest/interfaces/private_kernel_prover.d.ts +62 -2
- package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
- package/dest/interfaces/prover-agent.d.ts +5 -23
- package/dest/interfaces/prover-agent.d.ts.map +1 -1
- package/dest/interfaces/prover-agent.js +4 -1
- package/dest/interfaces/prover-client.d.ts +6 -27
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-node.js +22 -8
- package/dest/interfaces/proving-job-source.js +24 -4
- package/dest/interfaces/proving-job.d.ts +725 -5776
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +1 -1
- package/dest/interfaces/public_storage_override.d.ts +22 -0
- package/dest/interfaces/public_storage_override.d.ts.map +1 -0
- package/dest/interfaces/public_storage_override.js +7 -0
- package/dest/interfaces/server.d.ts +6 -1
- package/dest/interfaces/server.d.ts.map +1 -1
- package/dest/interfaces/server.js +5 -0
- package/dest/interfaces/slasher.d.ts +25 -56
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +8 -2
- package/dest/interfaces/tx_provider.d.ts +6 -1
- package/dest/interfaces/tx_provider.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +40 -229
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +5 -0
- package/dest/interfaces/world_state.d.ts +2 -2
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +12 -8
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.js +20 -18
- package/dest/kernel/index.d.ts +5 -1
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +4 -0
- package/dest/kernel/log_hash.d.ts +6 -2
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/log_hash.js +21 -9
- package/dest/kernel/private_circuit_public_inputs.d.ts +2 -2
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +2 -2
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +23 -0
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +35 -0
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +24 -0
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +37 -0
- package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts +16 -0
- package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.js +23 -0
- package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts +17 -0
- package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts.map +1 -0
- package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.js +25 -0
- package/dest/kernel/private_kernel_prover_output.d.ts +3 -29
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +9 -6
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +22 -7
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +25 -69
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +11 -5
- package/dest/kernel/private_to_public_accumulated_data.d.ts +4 -3
- package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data.js +6 -3
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +5 -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 +7 -3
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +5 -4
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.js +6 -3
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +5 -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 +7 -3
- package/dest/kernel/public_call_request.d.ts +15 -30
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +16 -7
- package/dest/keys/derivation.d.ts +6 -2
- package/dest/keys/derivation.d.ts.map +1 -1
- package/dest/keys/derivation.js +16 -6
- package/dest/keys/public_key.d.ts +22 -3
- package/dest/keys/public_key.d.ts.map +1 -1
- package/dest/keys/public_key.js +20 -1
- package/dest/keys/public_keys.d.ts +55 -82
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +102 -74
- package/dest/kv-store/config.d.ts +3 -6
- package/dest/kv-store/config.d.ts.map +1 -1
- package/dest/kv-store/config.js +2 -7
- package/dest/logs/app_tagging_secret.d.ts +46 -0
- package/dest/logs/app_tagging_secret.d.ts.map +1 -0
- package/dest/logs/{extended_directional_app_tagging_secret.js → app_tagging_secret.js} +51 -21
- package/dest/logs/app_tagging_secret_kind.d.ts +7 -0
- package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -0
- package/dest/logs/app_tagging_secret_kind.js +17 -0
- package/dest/logs/contract_class_log.d.ts +16 -34
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +11 -9
- package/dest/logs/index.d.ts +7 -7
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +6 -6
- package/dest/logs/log_cursor.d.ts +51 -0
- package/dest/logs/log_cursor.d.ts.map +1 -0
- package/dest/logs/log_cursor.js +82 -0
- package/dest/logs/log_result.d.ts +54 -0
- package/dest/logs/log_result.d.ts.map +1 -0
- package/dest/logs/log_result.js +56 -0
- package/dest/logs/logs_query.d.ts +82 -0
- package/dest/logs/logs_query.d.ts.map +1 -0
- package/dest/logs/logs_query.js +50 -0
- package/dest/logs/message_context.d.ts +3 -2
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/message_context.js +4 -0
- package/dest/logs/pre_tag.d.ts +11 -24
- package/dest/logs/pre_tag.d.ts.map +1 -1
- package/dest/logs/pre_tag.js +2 -2
- package/dest/logs/private_log.d.ts +7 -12
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +6 -3
- package/dest/logs/query_all_logs_by_tags.d.ts +24 -0
- package/dest/logs/query_all_logs_by_tags.d.ts.map +1 -0
- package/dest/logs/query_all_logs_by_tags.js +64 -0
- 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 +3 -1
- package/dest/logs/tagging_index_range.d.ts +13 -31
- package/dest/logs/tagging_index_range.d.ts.map +1 -1
- package/dest/logs/tagging_index_range.js +2 -2
- package/dest/messaging/append_l1_to_l2_messages.d.ts +9 -0
- package/dest/messaging/append_l1_to_l2_messages.d.ts.map +1 -0
- package/dest/messaging/append_l1_to_l2_messages.js +12 -0
- package/dest/messaging/index.d.ts +2 -1
- package/dest/messaging/index.d.ts.map +1 -1
- package/dest/messaging/index.js +1 -0
- package/dest/messaging/l2_to_l1_membership.d.ts +43 -6
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +72 -12
- package/dest/messaging/l2_to_l1_message.d.ts +38 -112
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.js +21 -12
- package/dest/noir/index.d.ts +3 -1
- package/dest/noir/index.d.ts.map +1 -1
- package/dest/note/note.d.ts +2 -2
- package/dest/note/note.d.ts.map +1 -1
- package/dest/p2p/block_proposal.d.ts +29 -10
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +56 -33
- package/dest/p2p/checkpoint_attestation.d.ts +14 -6
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +24 -20
- package/dest/p2p/checkpoint_proposal.d.ts +31 -10
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/checkpoint_proposal.js +58 -31
- package/dest/p2p/consensus_payload.d.ts +26 -20
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +38 -19
- package/dest/p2p/signature_utils.d.ts +28 -19
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +118 -21
- package/dest/p2p/signed_txs.d.ts +15 -13
- package/dest/p2p/signed_txs.d.ts.map +1 -1
- package/dest/p2p/signed_txs.js +26 -24
- package/dest/parity/parity_base_private_inputs.d.ts +8 -4
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_base_private_inputs.js +7 -5
- package/dest/parity/parity_public_inputs.d.ts +8 -4
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.js +6 -3
- package/dest/parity/parity_root_private_inputs.d.ts +2 -2
- package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.d.ts +17 -11
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +44 -22
- package/dest/proofs/recursive_proof.d.ts +2 -2
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts +2 -2
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.d.ts +12 -2
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +12 -0
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +6 -6
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +2 -2
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +9 -2
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +9 -0
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +5 -5
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +2 -2
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +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_public_inputs.d.ts +2 -2
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +2 -2
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_private_inputs.d.ts +2 -2
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +2 -2
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +2 -2
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts +2 -2
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/schemas/schemas.d.ts +32 -78
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +2 -2
- package/dest/slashing/helpers.d.ts +2 -2
- package/dest/slashing/helpers.d.ts.map +1 -1
- package/dest/slashing/helpers.js +10 -7
- package/dest/slashing/types.d.ts +15 -23
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +16 -10
- package/dest/snapshots/types.d.ts +15 -78
- package/dest/snapshots/types.d.ts.map +1 -1
- package/dest/stats/stats.d.ts +2 -2
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +23 -23
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +70 -47
- package/dest/tests/mocks.d.ts +8 -5
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +31 -38
- package/dest/timetable/index.d.ts +7 -10
- package/dest/timetable/index.d.ts.map +1 -1
- package/dest/timetable/index.js +60 -80
- package/dest/trees/append_only_tree_snapshot.d.ts +9 -14
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +6 -3
- package/dest/trees/nullifier_leaf.d.ts +18 -42
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.d.ts +16 -59
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.js +2 -14
- package/dest/trees/public_data_leaf.d.ts +21 -53
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_witness.d.ts +16 -58
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/tx/block_header.d.ts +4 -3
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +6 -3
- package/dest/tx/call_context.d.ts +4 -14
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/capsule.d.ts +2 -2
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/function_data.d.ts +4 -10
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +16 -49
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +8 -12
- package/dest/tx/hashed_values.d.ts +4 -3
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/hashed_values.js +6 -3
- package/dest/tx/in_tx.d.ts +5 -17
- package/dest/tx/in_tx.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.d.ts +8 -19
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +8 -4
- package/dest/tx/partial_state_reference.d.ts +22 -65
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +6 -3
- package/dest/tx/private_execution_result.d.ts +6 -16
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/profiling.d.ts +54 -352
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +4 -4
- package/dest/tx/protocol_contracts.d.ts +5 -9
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/proven_tx.d.ts +30 -74
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/proven_tx.js +6 -0
- package/dest/tx/public_call_request_with_calldata.d.ts +4 -3
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +6 -3
- package/dest/tx/simulated_tx.d.ts +62 -1249
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +12 -10
- package/dest/tx/state_reference.d.ts +30 -117
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +6 -4
- package/dest/tx/tree_snapshots.d.ts +27 -84
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tree_snapshots.js +6 -4
- package/dest/tx/tx.d.ts +12 -11
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +30 -23
- package/dest/tx/tx_constant_data.d.ts +4 -3
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_constant_data.js +6 -3
- package/dest/tx/tx_context.d.ts +32 -131
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_context.js +6 -6
- package/dest/tx/tx_hash.d.ts +6 -4
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_hash.js +13 -5
- package/dest/tx/tx_receipt.d.ts +144 -67
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +141 -51
- package/dest/tx/validator/tx_validator.d.ts +5 -27
- package/dest/tx/validator/tx_validator.d.ts.map +1 -1
- package/dest/tx/validator/tx_validator.js +0 -4
- package/dest/types/shared.d.ts +4 -3
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/types/shared.js +6 -3
- package/dest/update-checker/dev_version.d.ts +3 -0
- package/dest/update-checker/dev_version.d.ts.map +1 -0
- package/dest/update-checker/dev_version.js +1 -0
- package/dest/update-checker/index.d.ts +2 -1
- package/dest/update-checker/index.d.ts.map +1 -1
- package/dest/update-checker/index.js +1 -0
- package/dest/update-checker/package_version.d.ts +6 -3
- package/dest/update-checker/package_version.d.ts.map +1 -1
- package/dest/update-checker/package_version.js +8 -19
- package/dest/validators/schemas.d.ts +147 -614
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +6 -4
- package/dest/validators/types.d.ts +20 -3
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/versioning/versioning.js +1 -1
- package/dest/vks/verification_key.d.ts +3 -3
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/world-state/genesis_data.d.ts +3 -1
- package/dest/world-state/genesis_data.d.ts.map +1 -1
- package/dest/world-state/genesis_data.js +3 -0
- package/dest/world-state/world_state_revision.d.ts +4 -39
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +0 -20
- package/package.json +12 -11
- package/src/abi/abi.ts +53 -19
- package/src/abi/contract_artifact.ts +11 -6
- package/src/abi/utils.ts +6 -4
- package/src/avm/avm.ts +5 -0
- package/src/avm/message_pack.ts +12 -3
- package/src/avm/revert_code.ts +0 -6
- package/src/aztec-address/index.ts +12 -3
- package/src/block/attestation_info.ts +11 -11
- package/src/block/block_parameter.ts +72 -4
- package/src/block/index.ts +0 -1
- package/src/block/l2_block_source.ts +201 -149
- package/src/block/l2_block_stream/l2_block_stream.ts +39 -28
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +5 -0
- package/src/block/l2_block_stream/l2_tips_store_base.ts +29 -7
- package/src/block/proposal/attestations_and_signers.ts +32 -17
- package/src/block/test/l2_tips_store_test_suite.ts +1 -1
- package/src/checkpoint/checkpoint_data.ts +4 -0
- package/src/checkpoint/checkpoint_reexecution_tracker.ts +167 -0
- package/src/checkpoint/digest.ts +28 -0
- package/src/checkpoint/index.ts +3 -0
- package/src/checkpoint/previous_checkpoint_out_hashes.ts +61 -0
- package/src/config/chain-config.ts +6 -15
- package/src/config/index.ts +0 -1
- package/src/config/sequencer-config.ts +25 -7
- package/src/contract/complete_address.ts +7 -3
- package/src/contract/contract_address.ts +6 -6
- package/src/contract/contract_instance.ts +11 -2
- package/src/contract/interfaces/contract_instance.ts +6 -2
- package/src/database-version/version_manager.ts +17 -0
- package/src/gas/gas.ts +8 -3
- package/src/gas/gas_fees.ts +9 -9
- package/src/gas/gas_settings.ts +8 -3
- package/src/ha-signing/config.ts +9 -16
- package/src/ha-signing/local_config.ts +2 -2
- package/src/hash/hash.ts +2 -2
- package/src/interfaces/api_limit.ts +1 -1
- package/src/interfaces/archiver.ts +80 -94
- package/src/interfaces/aztec-node-admin.ts +32 -15
- package/src/interfaces/aztec-node-debug.ts +1 -1
- package/src/interfaces/aztec-node.ts +296 -262
- package/src/interfaces/block-builder.ts +2 -0
- package/src/interfaces/block_response.ts +92 -0
- package/src/interfaces/chain_tips.ts +24 -0
- package/src/interfaces/checkpoint_parameter.ts +20 -0
- package/src/interfaces/checkpoint_response.ts +84 -0
- package/src/interfaces/client.ts +6 -1
- package/src/interfaces/configs.ts +40 -1
- package/src/interfaces/l1_publish_info.ts +40 -0
- package/src/interfaces/l2_logs_source.ts +13 -42
- package/src/interfaces/merkle_tree_operations.ts +9 -2
- package/src/interfaces/p2p-bootstrap.ts +2 -2
- package/src/interfaces/p2p.ts +35 -15
- package/src/interfaces/private_kernel_prover.ts +88 -0
- package/src/interfaces/prover-agent.ts +1 -1
- package/src/interfaces/prover-node.ts +7 -7
- package/src/interfaces/proving-job-source.ts +4 -4
- package/src/interfaces/proving-job.ts +3 -3
- package/src/interfaces/public_storage_override.ts +26 -0
- package/src/interfaces/server.ts +5 -0
- package/src/interfaces/slasher.ts +17 -4
- package/src/interfaces/tx_provider.ts +6 -0
- package/src/interfaces/validator.ts +18 -2
- package/src/interfaces/world_state.ts +1 -1
- package/src/kernel/hints/key_validation_request.ts +18 -16
- package/src/kernel/index.ts +4 -0
- package/src/kernel/log_hash.ts +29 -9
- package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +49 -0
- package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +52 -0
- package/src/kernel/private_kernel_inner_2_circuit_private_inputs.ts +29 -0
- package/src/kernel/private_kernel_inner_3_circuit_private_inputs.ts +31 -0
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +29 -14
- package/src/kernel/private_to_avm_accumulated_data.ts +16 -5
- package/src/kernel/private_to_public_accumulated_data.ts +9 -3
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +10 -4
- package/src/kernel/private_to_rollup_accumulated_data.ts +8 -3
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +9 -9
- package/src/kernel/public_call_request.ts +22 -7
- package/src/keys/derivation.ts +21 -9
- package/src/keys/public_key.ts +26 -2
- package/src/keys/public_keys.ts +124 -110
- package/src/kv-store/config.ts +3 -10
- package/src/logs/{extended_directional_app_tagging_secret.ts → app_tagging_secret.ts} +62 -23
- package/src/logs/app_tagging_secret_kind.ts +21 -0
- package/src/logs/contract_class_log.ts +15 -5
- package/src/logs/index.ts +6 -6
- package/src/logs/log_cursor.ts +110 -0
- package/src/logs/log_result.ts +104 -0
- package/src/logs/logs_query.ts +138 -0
- package/src/logs/message_context.ts +5 -1
- package/src/logs/pre_tag.ts +3 -6
- package/src/logs/private_log.ts +9 -3
- package/src/logs/query_all_logs_by_tags.ts +98 -0
- package/src/logs/siloed_tag.ts +6 -1
- package/src/logs/tagging_index_range.ts +4 -10
- package/src/messaging/append_l1_to_l2_messages.ts +21 -0
- package/src/messaging/index.ts +1 -0
- package/src/messaging/l2_to_l1_membership.ts +108 -19
- package/src/messaging/l2_to_l1_message.ts +29 -9
- package/src/noir/index.ts +2 -0
- package/src/p2p/block_proposal.ts +99 -28
- package/src/p2p/checkpoint_attestation.ts +26 -26
- package/src/p2p/checkpoint_proposal.ts +109 -39
- package/src/p2p/consensus_payload.ts +59 -28
- package/src/p2p/signature_utils.ts +110 -25
- package/src/p2p/signed_txs.ts +46 -28
- package/src/parity/parity_base_private_inputs.ts +10 -4
- package/src/parity/parity_public_inputs.ts +9 -2
- package/src/proofs/chonk_proof.ts +49 -15
- package/src/rollup/block_rollup_public_inputs.ts +13 -0
- package/src/rollup/checkpoint_rollup_public_inputs.ts +10 -0
- package/src/schemas/schemas.ts +6 -1
- package/src/slashing/helpers.ts +13 -9
- package/src/slashing/types.ts +21 -14
- package/src/stats/stats.ts +4 -0
- package/src/tests/factories.ts +97 -68
- package/src/tests/mocks.ts +49 -57
- package/src/timetable/index.ts +63 -105
- package/src/trees/append_only_tree_snapshot.ts +8 -3
- package/src/trees/nullifier_membership_witness.ts +2 -12
- package/src/tx/block_header.ts +8 -3
- package/src/tx/global_variables.ts +10 -18
- package/src/tx/hashed_values.ts +8 -3
- package/src/tx/indexed_tx_effect.ts +17 -4
- package/src/tx/partial_state_reference.ts +8 -3
- package/src/tx/profiling.ts +4 -4
- package/src/tx/proven_tx.ts +6 -0
- package/src/tx/public_call_request_with_calldata.ts +8 -3
- package/src/tx/simulated_tx.ts +18 -21
- package/src/tx/state_reference.ts +9 -4
- package/src/tx/tree_snapshots.ts +9 -4
- package/src/tx/tx.ts +41 -22
- package/src/tx/tx_constant_data.ts +8 -3
- package/src/tx/tx_context.ts +8 -3
- package/src/tx/tx_hash.ts +20 -5
- package/src/tx/tx_receipt.ts +263 -80
- package/src/tx/validator/tx_validator.ts +1 -5
- package/src/types/shared.ts +8 -3
- package/src/update-checker/dev_version.ts +2 -0
- package/src/update-checker/index.ts +1 -0
- package/src/update-checker/package_version.ts +10 -23
- package/src/validators/schemas.ts +6 -4
- package/src/validators/types.ts +21 -2
- package/src/versioning/versioning.ts +1 -1
- package/src/world-state/genesis_data.ts +12 -0
- package/src/world-state/world_state_revision.ts +0 -33
- package/dest/block/checkpointed_l2_block.d.ts +0 -150
- package/dest/block/checkpointed_l2_block.d.ts.map +0 -1
- package/dest/block/checkpointed_l2_block.js +0 -46
- package/dest/config/pipelining-config.d.ts +0 -19
- package/dest/config/pipelining-config.d.ts.map +0 -1
- package/dest/config/pipelining-config.js +0 -18
- package/dest/interfaces/get_logs_response.d.ts +0 -97
- package/dest/interfaces/get_logs_response.d.ts.map +0 -1
- package/dest/interfaces/get_logs_response.js +0 -12
- package/dest/logs/extended_contract_class_log.d.ts +0 -51
- package/dest/logs/extended_contract_class_log.d.ts.map +0 -1
- package/dest/logs/extended_contract_class_log.js +0 -67
- package/dest/logs/extended_directional_app_tagging_secret.d.ts +0 -47
- package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +0 -1
- package/dest/logs/extended_public_log.d.ts +0 -106
- package/dest/logs/extended_public_log.d.ts.map +0 -1
- package/dest/logs/extended_public_log.js +0 -73
- package/dest/logs/log_filter.d.ts +0 -25
- package/dest/logs/log_filter.d.ts.map +0 -1
- package/dest/logs/log_filter.js +0 -12
- package/dest/logs/log_id.d.ts +0 -85
- package/dest/logs/log_id.d.ts.map +0 -1
- package/dest/logs/log_id.js +0 -93
- package/dest/logs/tx_scoped_l2_log.d.ts +0 -51
- package/dest/logs/tx_scoped_l2_log.d.ts.map +0 -1
- package/dest/logs/tx_scoped_l2_log.js +0 -77
- package/src/block/checkpointed_l2_block.ts +0 -70
- package/src/config/pipelining-config.ts +0 -31
- package/src/interfaces/get_logs_response.ts +0 -35
- package/src/logs/extended_contract_class_log.ts +0 -87
- package/src/logs/extended_public_log.ts +0 -94
- package/src/logs/log_filter.ts +0 -36
- package/src/logs/log_id.ts +0 -124
- package/src/logs/tx_scoped_l2_log.ts +0 -114
package/src/timetable/index.ts
CHANGED
|
@@ -34,7 +34,6 @@ export type CheckpointTimingConfig = {
|
|
|
34
34
|
l1PublishingTime?: number;
|
|
35
35
|
minExecutionTime?: number;
|
|
36
36
|
p2pPropagationTime?: number;
|
|
37
|
-
pipelining?: boolean;
|
|
38
37
|
};
|
|
39
38
|
|
|
40
39
|
export interface CheckpointTiming {
|
|
@@ -64,13 +63,15 @@ export interface PipelinedCheckpointTiming extends CheckpointTiming {
|
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
|
-
*
|
|
66
|
+
* Checkpoint timing model for proposer pipelining.
|
|
68
67
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
68
|
+
* The build work starts at the wall-clock slot boundary and the checkpoint
|
|
69
|
+
* proposal is broadcast early enough that attestations complete by the end of
|
|
70
|
+
* the build slot. L1 submission can then be sent at the boundary of the target
|
|
71
|
+
* slot. The target-slot window getters are intended for consumers such as P2P
|
|
72
|
+
* validators that need to validate pipelined messages against wallclock time.
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
class CheckpointTimingModel implements PipelinedCheckpointTiming {
|
|
74
75
|
public readonly aztecSlotDuration: number;
|
|
75
76
|
public readonly blockDuration: number | undefined;
|
|
76
77
|
public readonly checkpointAssembleTime: number;
|
|
@@ -78,6 +79,7 @@ abstract class BaseCheckpointTiming implements CheckpointTiming {
|
|
|
78
79
|
public readonly l1PublishingTime: number;
|
|
79
80
|
public readonly minExecutionTime: number;
|
|
80
81
|
public readonly p2pPropagationTime: number;
|
|
82
|
+
private readonly ethereumSlotDuration: number;
|
|
81
83
|
|
|
82
84
|
constructor(opts: CheckpointTimingConfig) {
|
|
83
85
|
this.aztecSlotDuration = opts.aztecSlotDuration;
|
|
@@ -88,6 +90,7 @@ abstract class BaseCheckpointTiming implements CheckpointTiming {
|
|
|
88
90
|
this.l1PublishingTime = opts.l1PublishingTime ?? DEFAULT_L1_PUBLISHING_TIME;
|
|
89
91
|
this.minExecutionTime = opts.minExecutionTime ?? MIN_EXECUTION_TIME;
|
|
90
92
|
this.p2pPropagationTime = opts.p2pPropagationTime ?? DEFAULT_P2P_PROPAGATION_TIME;
|
|
93
|
+
this.ethereumSlotDuration = opts.ethereumSlotDuration ?? this.l1PublishingTime;
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
public get checkpointFinalizationTime(): number {
|
|
@@ -98,142 +101,99 @@ abstract class BaseCheckpointTiming implements CheckpointTiming {
|
|
|
98
101
|
return this.checkpointAssembleTime + this.p2pPropagationTime * 2 + this.l1PublishingTime;
|
|
99
102
|
}
|
|
100
103
|
|
|
101
|
-
public get
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
return
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
public abstract get timeReservedAtEnd(): number;
|
|
109
|
-
public abstract get minimumBuildSlotWork(): number;
|
|
110
|
-
|
|
111
|
-
public get initializeDeadline(): number {
|
|
112
|
-
return this.aztecSlotDuration - this.minimumBuildSlotWork;
|
|
104
|
+
public get proposalWindowIntoTargetSlot(): number {
|
|
105
|
+
// Proposals no longer spill into the target slot: they are broadcast early
|
|
106
|
+
// enough in the build slot that attestations complete before the boundary.
|
|
107
|
+
// Any residual tolerance into the target slot is covered by clock disparity.
|
|
108
|
+
return 0;
|
|
113
109
|
}
|
|
114
110
|
|
|
115
|
-
public
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
public get attestationWindowIntoTargetSlot(): number {
|
|
112
|
+
// Span from the target-slot start to the L1 publish deadline (12s before the last L1 block of
|
|
113
|
+
// the target slot). The p2p layer accepts slot-N attestations until right before the publish
|
|
114
|
+
// deadline so the proposer can keep collecting useful attestations up to the latest moment the
|
|
115
|
+
// checkpoint can still land on L1 in the target slot.
|
|
116
|
+
return Math.max(0, this.aztecSlotDuration - 2 * this.ethereumSlotDuration);
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
public
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return 1;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const timeAvailableForBlocks = this.aztecSlotDuration - this.checkpointInitializationTime - this.timeReservedAtEnd;
|
|
130
|
-
return Math.floor(timeAvailableForBlocks / this.blockDuration);
|
|
119
|
+
public get pipeliningAttestationGracePeriod(): number {
|
|
120
|
+
// Under the early-pipelining regime attestations complete inside the build slot itself. Local
|
|
121
|
+
// networks can publish much faster than the Ethereum slot geometry, so they may use the target
|
|
122
|
+
// slot attestation window without moving the L1 publish cutoff.
|
|
123
|
+
return this.l1PublishingTime < this.ethereumSlotDuration ? this.attestationWindowIntoTargetSlot : 0;
|
|
131
124
|
}
|
|
132
|
-
}
|
|
133
125
|
|
|
134
|
-
/**
|
|
135
|
-
* Checkpoint timing model for the non-pipelined sequencer flow.
|
|
136
|
-
*
|
|
137
|
-
* In this mode, checkpoint assembly, attestation collection, and L1 publishing
|
|
138
|
-
* must all complete within the current Aztec slot.
|
|
139
|
-
*/
|
|
140
|
-
class StandardCheckpointTimingModel extends BaseCheckpointTiming {
|
|
141
126
|
public get timeReservedAtEnd(): number {
|
|
142
|
-
|
|
127
|
+
// Reserve enough time at the end of the build slot for:
|
|
128
|
+
// - assembling and broadcasting the checkpoint proposal
|
|
129
|
+
// - round-trip p2p propagation (proposal out, attestations back)
|
|
130
|
+
// - validators re-executing the last block
|
|
131
|
+
return this.checkpointAssembleTime + 2 * this.p2pPropagationTime + (this.blockDuration ?? 0);
|
|
143
132
|
}
|
|
144
133
|
|
|
145
134
|
public get minimumBuildSlotWork(): number {
|
|
146
|
-
return this.checkpointInitializationTime + this.minExecutionTime * 2
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
public get checkpointAssemblyDeadline(): number {
|
|
150
|
-
return this.aztecSlotDuration - this.l1PublishingTime - 2 * this.p2pPropagationTime;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
public get checkpointAttestationDeadline(): number {
|
|
154
|
-
return this.aztecSlotDuration - this.l1PublishingTime;
|
|
135
|
+
return this.checkpointInitializationTime + this.minExecutionTime * 2;
|
|
155
136
|
}
|
|
156
137
|
|
|
157
|
-
public get
|
|
158
|
-
return this.aztecSlotDuration - this.
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Checkpoint timing model for proposer pipelining.
|
|
164
|
-
*
|
|
165
|
-
* In this mode, the build work still starts in the current slot, but checkpoint
|
|
166
|
-
* assembly and attestation collection can extend into the target slot. The extra
|
|
167
|
-
* target-slot window getters are intended for consumers such as P2P validators
|
|
168
|
-
* that need to validate pipelined messages against wallclock time.
|
|
169
|
-
*/
|
|
170
|
-
class PipelinedCheckpointTimingModel extends BaseCheckpointTiming implements PipelinedCheckpointTiming {
|
|
171
|
-
public get proposalWindowIntoTargetSlot(): number {
|
|
172
|
-
// Allow the p2p propagation time to receive a checkpoint proposal from leader
|
|
173
|
-
return this.p2pPropagationTime;
|
|
138
|
+
public get initializeDeadline(): number {
|
|
139
|
+
return this.aztecSlotDuration - this.minimumBuildSlotWork;
|
|
174
140
|
}
|
|
175
141
|
|
|
176
|
-
public get
|
|
177
|
-
|
|
142
|
+
public get checkpointAssemblyDeadline(): number {
|
|
143
|
+
// Allow enough time to build all blocks and receive attestations. With
|
|
144
|
+
// `pipeliningAttestationGracePeriod = 0` this equals `aztecSlotDuration`.
|
|
145
|
+
return this.aztecSlotDuration + this.pipeliningAttestationGracePeriod;
|
|
178
146
|
}
|
|
179
147
|
|
|
180
|
-
public get
|
|
181
|
-
return this.
|
|
148
|
+
public get checkpointAttestationStartDeadline(): number {
|
|
149
|
+
return this.checkpointAssemblyDeadline;
|
|
182
150
|
}
|
|
183
151
|
|
|
184
|
-
public get
|
|
185
|
-
|
|
152
|
+
public get checkpointAttestationDeadline(): number {
|
|
153
|
+
// L1 publish deadline — 12s (one Ethereum slot) before the last L1 block of the target L2 slot;
|
|
154
|
+
// the latest the checkpoint can be submitted and still land on L1 in the target slot. This is an
|
|
155
|
+
// L1-geometry bound (ethereumSlotDuration), matching the publisher's send lead in sendRequestsAt
|
|
156
|
+
// (which also targets one Ethereum slot before the target slot start).
|
|
157
|
+
return this.aztecSlotDuration * 2 - this.ethereumSlotDuration;
|
|
186
158
|
}
|
|
187
159
|
|
|
188
|
-
public get
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
|
|
192
|
-
return this.aztecSlotDuration + this.pipeliningAttestationGracePeriod;
|
|
160
|
+
public get checkpointPublishingDeadline(): number {
|
|
161
|
+
// L1 publish deadline — 12s (one Ethereum slot) before the last L1 block of the target L2 slot;
|
|
162
|
+
// the latest the checkpoint can be submitted and still land on L1 in the target slot.
|
|
163
|
+
return this.aztecSlotDuration * 2 - this.ethereumSlotDuration;
|
|
193
164
|
}
|
|
194
165
|
|
|
195
|
-
public
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
166
|
+
public calculateMaxBlocksPerSlot(): number {
|
|
167
|
+
if (!this.blockDuration) {
|
|
168
|
+
return 1;
|
|
169
|
+
}
|
|
199
170
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return this.aztecSlotDuration * 2 - this.l1PublishingTime;
|
|
171
|
+
const timeAvailableForBlocks = this.aztecSlotDuration - this.checkpointInitializationTime - this.timeReservedAtEnd;
|
|
172
|
+
return Math.floor(timeAvailableForBlocks / this.blockDuration);
|
|
203
173
|
}
|
|
204
174
|
}
|
|
205
175
|
|
|
206
176
|
/**
|
|
207
|
-
* Creates a checkpoint timing model
|
|
177
|
+
* Creates a checkpoint timing model.
|
|
208
178
|
*
|
|
209
179
|
* Most callers should use this factory and depend only on the shared
|
|
210
|
-
* `CheckpointTiming` interface.
|
|
211
|
-
* `opts.pipelining`.
|
|
180
|
+
* `CheckpointTiming` interface.
|
|
212
181
|
*/
|
|
213
182
|
export function createCheckpointTimingModel(opts: CheckpointTimingConfig): CheckpointTiming {
|
|
214
|
-
|
|
215
|
-
const normalizedOpts = normalizeCheckpointTimingConfig(opts);
|
|
216
|
-
|
|
217
|
-
const timing = normalizedOpts.pipelining
|
|
218
|
-
? new PipelinedCheckpointTimingModel(normalizedOpts)
|
|
219
|
-
: new StandardCheckpointTimingModel(normalizedOpts);
|
|
220
|
-
validateCheckpointTimingModel(timing);
|
|
221
|
-
return timing;
|
|
183
|
+
return createPipelinedCheckpointTimingModel(opts);
|
|
222
184
|
}
|
|
223
185
|
|
|
224
186
|
/**
|
|
225
|
-
* Creates a
|
|
187
|
+
* Creates a checkpoint timing model exposing the target-slot window accessors.
|
|
226
188
|
*
|
|
227
|
-
* Use this when the caller specifically needs the pipelined
|
|
228
|
-
*
|
|
189
|
+
* Use this when the caller specifically needs the pipelined timing surface, such
|
|
190
|
+
* as proposal or attestation acceptance windows into the target slot.
|
|
229
191
|
*/
|
|
230
|
-
export function createPipelinedCheckpointTimingModel(
|
|
231
|
-
opts: Omit<CheckpointTimingConfig, 'pipelining'>,
|
|
232
|
-
): PipelinedCheckpointTiming {
|
|
192
|
+
export function createPipelinedCheckpointTimingModel(opts: CheckpointTimingConfig): PipelinedCheckpointTiming {
|
|
233
193
|
validateCheckpointTimingConfig(opts);
|
|
234
194
|
const normalizedOpts = normalizeCheckpointTimingConfig(opts);
|
|
235
195
|
|
|
236
|
-
const timing = new
|
|
196
|
+
const timing = new CheckpointTimingModel(normalizedOpts);
|
|
237
197
|
validateCheckpointTimingModel(timing);
|
|
238
198
|
return timing;
|
|
239
199
|
}
|
|
@@ -255,7 +215,6 @@ export function calculateMaxBlocksPerSlot(
|
|
|
255
215
|
checkpointAssembleTime?: number;
|
|
256
216
|
p2pPropagationTime?: number;
|
|
257
217
|
l1PublishingTime?: number;
|
|
258
|
-
pipelining?: boolean;
|
|
259
218
|
} = {},
|
|
260
219
|
): number {
|
|
261
220
|
return createCheckpointTimingModel({
|
|
@@ -265,7 +224,6 @@ export function calculateMaxBlocksPerSlot(
|
|
|
265
224
|
checkpointInitializationTime: opts.checkpointInitializationTime,
|
|
266
225
|
l1PublishingTime: opts.l1PublishingTime,
|
|
267
226
|
p2pPropagationTime: opts.p2pPropagationTime,
|
|
268
|
-
pipelining: opts.pipelining,
|
|
269
227
|
}).calculateMaxBlocksPerSlot();
|
|
270
228
|
}
|
|
271
229
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { schemas } from '@aztec/foundation/schemas';
|
|
3
|
-
import { BufferReader, FieldReader,
|
|
3
|
+
import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
|
|
4
4
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
5
5
|
|
|
6
6
|
import { inspect } from 'util';
|
|
@@ -44,8 +44,13 @@ export class AppendOnlyTreeSnapshot {
|
|
|
44
44
|
return this.root.size + 4;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
toBuffer()
|
|
48
|
-
|
|
47
|
+
toBuffer(): Buffer;
|
|
48
|
+
toBuffer(sink: BufferSink): void;
|
|
49
|
+
toBuffer(sink?: BufferSink): Buffer | void {
|
|
50
|
+
if (!sink) {
|
|
51
|
+
return BufferSink.serialize(this);
|
|
52
|
+
}
|
|
53
|
+
serializeToSink(sink, this.root, this.nextAvailableLeafIndex);
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
toFields(): Fr[] {
|
|
@@ -53,22 +53,12 @@ export class NullifierMembershipWitness {
|
|
|
53
53
|
return new MembershipWitness(NULLIFIER_TREE_HEIGHT, this.index, this.siblingPath.toTuple());
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
* Returns a field array representation of a nullifier witness.
|
|
58
|
-
* @returns A field array representation of a nullifier witness.
|
|
59
|
-
*/
|
|
60
|
-
public toFields(): Fr[] {
|
|
61
|
-
return [new Fr(this.index), ...this.leafPreimage.toFields(), ...this.siblingPath.toFields()];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Returns a representation of the nullifier membership witness as expected by intrinsic Noir deserialization.
|
|
66
|
-
*/
|
|
56
|
+
/** Serializes as `(NullifierLeafPreimage, MembershipWitness)` to match the Noir oracle return type. */
|
|
67
57
|
public toNoirRepresentation(): (string | string[])[] {
|
|
68
58
|
// TODO(#12874): remove the stupid as string conversion by modifying ForeignCallOutput type in acvm.js
|
|
69
59
|
return [
|
|
70
|
-
new Fr(this.index).toString() as string,
|
|
71
60
|
...(this.leafPreimage.toFields().map(fr => fr.toString()) as string[]),
|
|
61
|
+
new Fr(this.index).toString() as string,
|
|
72
62
|
this.siblingPath.toFields().map(fr => fr.toString()) as string[],
|
|
73
63
|
];
|
|
74
64
|
}
|
package/src/tx/block_header.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
|
|
|
4
4
|
import { randomInt } from '@aztec/foundation/crypto/random';
|
|
5
5
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
6
6
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
7
|
-
import { BufferReader,
|
|
7
|
+
import { BufferReader, BufferSink, FieldReader, serializeToFields, serializeToSink } from '@aztec/foundation/serialize';
|
|
8
8
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
9
9
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
10
10
|
|
|
@@ -85,8 +85,13 @@ export class BlockHeader {
|
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
toBuffer()
|
|
89
|
-
|
|
88
|
+
toBuffer(): Buffer;
|
|
89
|
+
toBuffer(sink: BufferSink): void;
|
|
90
|
+
toBuffer(sink?: BufferSink): Buffer | void {
|
|
91
|
+
if (!sink) {
|
|
92
|
+
return BufferSink.serialize(this);
|
|
93
|
+
}
|
|
94
|
+
serializeToSink(sink, ...BlockHeader.getFields(this));
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
toFields(): Fr[] {
|
|
@@ -4,13 +4,7 @@ import { randomInt } from '@aztec/foundation/crypto/random';
|
|
|
4
4
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
6
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
7
|
-
import {
|
|
8
|
-
BufferReader,
|
|
9
|
-
FieldReader,
|
|
10
|
-
bigintToUInt64BE,
|
|
11
|
-
serializeToBuffer,
|
|
12
|
-
serializeToFields,
|
|
13
|
-
} from '@aztec/foundation/serialize';
|
|
7
|
+
import { BufferReader, BufferSink, FieldReader, serializeToFields, serializeToSink } from '@aztec/foundation/serialize';
|
|
14
8
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
15
9
|
|
|
16
10
|
import { inspect } from 'util';
|
|
@@ -149,17 +143,15 @@ export class GlobalVariables {
|
|
|
149
143
|
] as const;
|
|
150
144
|
}
|
|
151
145
|
|
|
152
|
-
toBuffer()
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
this.gasFees,
|
|
162
|
-
]);
|
|
146
|
+
toBuffer(): Buffer;
|
|
147
|
+
toBuffer(sink: BufferSink): void;
|
|
148
|
+
toBuffer(sink?: BufferSink): Buffer | void {
|
|
149
|
+
if (!sink) {
|
|
150
|
+
return BufferSink.serialize(this);
|
|
151
|
+
}
|
|
152
|
+
serializeToSink(sink, this.chainId, this.version, this.blockNumber, this.slotNumber);
|
|
153
|
+
sink.writeUInt64(this.timestamp);
|
|
154
|
+
serializeToSink(sink, this.coinbase, this.feeRecipient, this.gasFees);
|
|
163
155
|
}
|
|
164
156
|
|
|
165
157
|
toFields() {
|
package/src/tx/hashed_values.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
import { BufferReader,
|
|
2
|
+
import { BufferReader, BufferSink, serializeToSink } from '@aztec/foundation/serialize';
|
|
3
3
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
4
4
|
|
|
5
5
|
import { z } from 'zod';
|
|
@@ -48,8 +48,13 @@ export class HashedValues {
|
|
|
48
48
|
return new HashedValues([Fr.random(), Fr.random()], Fr.random());
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
toBuffer()
|
|
52
|
-
|
|
51
|
+
toBuffer(): Buffer;
|
|
52
|
+
toBuffer(sink: BufferSink): void;
|
|
53
|
+
toBuffer(sink?: BufferSink): Buffer | void {
|
|
54
|
+
if (!sink) {
|
|
55
|
+
return BufferSink.serialize(this);
|
|
56
|
+
}
|
|
57
|
+
serializeToSink(sink, new Vector(this.values), this.hash);
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
static fromBuffer(buffer: Buffer | BufferReader): HashedValues {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
1
|
+
import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { schemas } from '@aztec/foundation/schemas';
|
|
3
3
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
4
|
|
|
@@ -6,21 +6,32 @@ import { BlockHash } from '../block/block_hash.js';
|
|
|
6
6
|
import { type DataInBlock, dataInBlockSchemaFor, randomDataInBlock } from '../block/in_block.js';
|
|
7
7
|
import { TxEffect } from './tx_effect.js';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/** A tx effect together with its position in the block (`txIndexInBlock`) and the slot the block was built in. */
|
|
10
|
+
export type IndexedTxEffect = DataInBlock<TxEffect> & { txIndexInBlock: number; slotNumber: SlotNumber };
|
|
10
11
|
|
|
11
12
|
export function indexedTxSchema() {
|
|
12
|
-
return dataInBlockSchemaFor(TxEffect.schema).extend({
|
|
13
|
+
return dataInBlockSchemaFor(TxEffect.schema).extend({
|
|
14
|
+
txIndexInBlock: schemas.Integer,
|
|
15
|
+
slotNumber: schemas.SlotNumber,
|
|
16
|
+
});
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
export async function randomIndexedTxEffect(): Promise<IndexedTxEffect> {
|
|
16
20
|
return {
|
|
17
21
|
...randomDataInBlock(await TxEffect.random({ numNullifiers: 1 + Math.floor(Math.random() * 64) })),
|
|
18
22
|
txIndexInBlock: Math.floor(Math.random() * 1000),
|
|
23
|
+
slotNumber: SlotNumber(Math.floor(Math.random() * 1000)),
|
|
19
24
|
};
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
export function serializeIndexedTxEffect(effect: IndexedTxEffect): Buffer {
|
|
23
|
-
return serializeToBuffer(
|
|
28
|
+
return serializeToBuffer(
|
|
29
|
+
effect.l2BlockHash,
|
|
30
|
+
effect.l2BlockNumber,
|
|
31
|
+
effect.txIndexInBlock,
|
|
32
|
+
effect.slotNumber,
|
|
33
|
+
effect.data,
|
|
34
|
+
);
|
|
24
35
|
}
|
|
25
36
|
|
|
26
37
|
export function deserializeIndexedTxEffect(buffer: Buffer): IndexedTxEffect {
|
|
@@ -29,12 +40,14 @@ export function deserializeIndexedTxEffect(buffer: Buffer): IndexedTxEffect {
|
|
|
29
40
|
const l2BlockHash = BlockHash.fromBuffer(reader);
|
|
30
41
|
const l2BlockNumber = BlockNumber(reader.readNumber());
|
|
31
42
|
const txIndexInBlock = reader.readNumber();
|
|
43
|
+
const slotNumber = SlotNumber(reader.readNumber());
|
|
32
44
|
const data = reader.readObject(TxEffect);
|
|
33
45
|
|
|
34
46
|
return {
|
|
35
47
|
l2BlockHash,
|
|
36
48
|
l2BlockNumber,
|
|
37
49
|
txIndexInBlock,
|
|
50
|
+
slotNumber,
|
|
38
51
|
data,
|
|
39
52
|
};
|
|
40
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PARTIAL_STATE_REFERENCE_LENGTH } from '@aztec/constants';
|
|
2
2
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
-
import { BufferReader, FieldReader,
|
|
3
|
+
import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
|
|
4
4
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
5
5
|
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -88,8 +88,13 @@ export class PartialStateReference {
|
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
toBuffer()
|
|
92
|
-
|
|
91
|
+
toBuffer(): Buffer;
|
|
92
|
+
toBuffer(sink: BufferSink): void;
|
|
93
|
+
toBuffer(sink?: BufferSink): Buffer | void {
|
|
94
|
+
if (!sink) {
|
|
95
|
+
return BufferSink.serialize(this);
|
|
96
|
+
}
|
|
97
|
+
serializeToSink(sink, this.noteHashTree, this.nullifierTree, this.publicDataTree);
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
toFields() {
|
package/src/tx/profiling.ts
CHANGED
|
@@ -133,12 +133,12 @@ export class TxProfileResult {
|
|
|
133
133
|
],
|
|
134
134
|
{
|
|
135
135
|
nodeRPCCalls: {
|
|
136
|
-
perMethod: {
|
|
136
|
+
perMethod: { getBlock: { times: [1] } },
|
|
137
137
|
roundTrips: {
|
|
138
138
|
roundTrips: 1,
|
|
139
139
|
totalBlockingTime: 1,
|
|
140
140
|
roundTripDurations: [1],
|
|
141
|
-
roundTripMethods: [['
|
|
141
|
+
roundTripMethods: [['getBlock']],
|
|
142
142
|
},
|
|
143
143
|
},
|
|
144
144
|
timings: {
|
|
@@ -184,12 +184,12 @@ export class UtilityExecutionResult {
|
|
|
184
184
|
static random(): UtilityExecutionResult {
|
|
185
185
|
return new UtilityExecutionResult([Fr.random()], [], 0n, {
|
|
186
186
|
nodeRPCCalls: {
|
|
187
|
-
perMethod: {
|
|
187
|
+
perMethod: { getBlock: { times: [1] } },
|
|
188
188
|
roundTrips: {
|
|
189
189
|
roundTrips: 1,
|
|
190
190
|
totalBlockingTime: 1,
|
|
191
191
|
roundTripDurations: [1],
|
|
192
|
-
roundTripMethods: [['
|
|
192
|
+
roundTripMethods: [['getBlock']],
|
|
193
193
|
},
|
|
194
194
|
},
|
|
195
195
|
timings: {
|
package/src/tx/proven_tx.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from './private_execution_result.js';
|
|
14
14
|
import { type ProvingStats, ProvingTimingsSchema } from './profiling.js';
|
|
15
15
|
import { Tx } from './tx.js';
|
|
16
|
+
import type { TxHash } from './tx_hash.js';
|
|
16
17
|
|
|
17
18
|
export class TxProvingResult {
|
|
18
19
|
constructor(
|
|
@@ -22,6 +23,11 @@ export class TxProvingResult {
|
|
|
22
23
|
public stats?: ProvingStats,
|
|
23
24
|
) {}
|
|
24
25
|
|
|
26
|
+
getTxHash(): Promise<TxHash> {
|
|
27
|
+
// Equivalent to `(await this.toTx()).txHash` but skips walking the execution result tree to collect logs.
|
|
28
|
+
return Tx.computeTxHash({ data: this.publicInputs });
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
async toTx(): Promise<Tx> {
|
|
26
32
|
const contractClassLogs = collectSortedContractClassLogs(this.privateExecutionResult);
|
|
27
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
import { BufferReader,
|
|
2
|
+
import { BufferReader, BufferSink, serializeToSink } from '@aztec/foundation/serialize';
|
|
3
3
|
|
|
4
4
|
import { inspect } from 'util';
|
|
5
5
|
import { z } from 'zod';
|
|
@@ -63,8 +63,13 @@ export class PublicCallRequestWithCalldata {
|
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
toBuffer()
|
|
67
|
-
|
|
66
|
+
toBuffer(): Buffer;
|
|
67
|
+
toBuffer(sink: BufferSink): void;
|
|
68
|
+
toBuffer(sink?: BufferSink): Buffer | void {
|
|
69
|
+
if (!sink) {
|
|
70
|
+
return BufferSink.serialize(this);
|
|
71
|
+
}
|
|
72
|
+
serializeToSink(sink, this.request, new Vector(this.calldata));
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
package/src/tx/simulated_tx.ts
CHANGED
|
@@ -3,13 +3,13 @@ import type { FieldsOf } from '@aztec/foundation/types';
|
|
|
3
3
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
|
-
import { type ContractArtifact, ContractArtifactSchema } from '../abi/abi.js';
|
|
7
6
|
import {
|
|
8
7
|
type ContractInstanceWithAddress,
|
|
9
8
|
ContractInstanceWithAddressSchema,
|
|
10
9
|
} from '../contract/interfaces/contract_instance.js';
|
|
11
10
|
import { Gas } from '../gas/gas.js';
|
|
12
11
|
import type { GasUsed } from '../gas/gas_used.js';
|
|
12
|
+
import { type PublicStorageOverride, PublicStorageOverrideSchema } from '../interfaces/public_storage_override.js';
|
|
13
13
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
14
14
|
import { ChonkProof } from '../proofs/chonk_proof.js';
|
|
15
15
|
import type { OffchainEffect } from './offchain_effect.js';
|
|
@@ -24,39 +24,36 @@ import { NestedProcessReturnValues, PublicSimulationOutput } from './public_simu
|
|
|
24
24
|
import { Tx } from './tx.js';
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
* If passed during the execution of a user circuit, the contract function simulator will replace
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* If passed during the execution of a user circuit, the contract function simulator will replace
|
|
28
|
+
* the contract instance at that address with the one provided. An example use case would be
|
|
29
|
+
* overriding your own account contract so that valid signatures don't have to be provided while
|
|
30
|
+
* simulating. The override's `currentContractClassId` resolves through PXE's locally registered
|
|
31
|
+
* classes, so pre-register the target artifact via `pxe.registerContractClass(...)`.
|
|
30
32
|
*/
|
|
31
|
-
export type ContractOverrides = Record<
|
|
32
|
-
string /* AztecAddress as string */,
|
|
33
|
-
{ instance: ContractInstanceWithAddress; artifact: ContractArtifact }
|
|
34
|
-
>;
|
|
33
|
+
export type ContractOverrides = Record<string /* AztecAddress as string */, { instance: ContractInstanceWithAddress }>;
|
|
35
34
|
|
|
36
35
|
/*
|
|
37
|
-
* Optional values that can be overridden during simulation.
|
|
38
|
-
*
|
|
36
|
+
* Optional values that can be overridden during simulation. `publicStorage` writes to the public-data
|
|
37
|
+
* tree fork. `contracts` overrides contract instances in the contract DB.
|
|
38
|
+
* In order to simulate a transaction with these set, it *must* be run without the kernel circuits,
|
|
39
|
+
* or validations will fail.
|
|
39
40
|
*/
|
|
40
41
|
export class SimulationOverrides {
|
|
42
|
+
public publicStorage?: PublicStorageOverride[];
|
|
41
43
|
public contracts?: ContractOverrides;
|
|
42
44
|
|
|
43
|
-
constructor(
|
|
44
|
-
this.
|
|
45
|
+
constructor(args: { publicStorage?: PublicStorageOverride[]; contracts?: ContractOverrides } = {}) {
|
|
46
|
+
this.publicStorage = args.publicStorage?.length ? args.publicStorage : undefined;
|
|
47
|
+
this.contracts = args.contracts && Object.keys(args.contracts).length > 0 ? args.contracts : undefined;
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
static get schema() {
|
|
48
51
|
return z
|
|
49
52
|
.object({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
z.string(),
|
|
53
|
-
z.object({ instance: ContractInstanceWithAddressSchema, artifact: ContractArtifactSchema }),
|
|
54
|
-
),
|
|
55
|
-
),
|
|
53
|
+
publicStorage: optional(z.array(PublicStorageOverrideSchema)),
|
|
54
|
+
contracts: optional(z.record(z.string(), z.object({ instance: ContractInstanceWithAddressSchema }))),
|
|
56
55
|
})
|
|
57
|
-
.transform(
|
|
58
|
-
return new SimulationOverrides(contracts);
|
|
59
|
-
});
|
|
56
|
+
.transform(args => new SimulationOverrides(args));
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
59
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
STATE_REFERENCE_LENGTH,
|
|
6
6
|
} from '@aztec/constants';
|
|
7
7
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
8
|
-
import { BufferReader, FieldReader,
|
|
8
|
+
import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
|
|
9
9
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
10
10
|
|
|
11
11
|
import { inspect } from 'util';
|
|
@@ -46,9 +46,14 @@ export class StateReference {
|
|
|
46
46
|
return new StateReference(...StateReference.getFields(fields));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
// Note: The order here must match the order in the ProposedHeaderLib solidity library.
|
|
50
|
+
toBuffer(): Buffer;
|
|
51
|
+
toBuffer(sink: BufferSink): void;
|
|
52
|
+
toBuffer(sink?: BufferSink): Buffer | void {
|
|
53
|
+
if (!sink) {
|
|
54
|
+
return BufferSink.serialize(this);
|
|
55
|
+
}
|
|
56
|
+
serializeToSink(sink, this.l1ToL2MessageTree, this.partial);
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
toFields(): Fr[] {
|