@aztec/stdlib 0.0.1-commit.b33fc05d0 → 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 +142 -1081
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +41 -18
- package/dest/abi/authorization_selector.d.ts +4 -7
- package/dest/abi/authorization_selector.d.ts.map +1 -1
- package/dest/abi/buffer.d.ts +14 -4
- package/dest/abi/buffer.d.ts.map +1 -1
- package/dest/abi/buffer.js +25 -4
- 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/decoder.d.ts +5 -44
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +12 -67
- package/dest/abi/encoder.d.ts +1 -1
- package/dest/abi/encoder.d.ts.map +1 -1
- package/dest/abi/encoder.js +32 -6
- package/dest/abi/event_selector.d.ts +4 -7
- 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/function_selector.d.ts +3 -6
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/function_selector.js +2 -4
- package/dest/abi/function_signature_decoder.d.ts +43 -0
- package/dest/abi/function_signature_decoder.d.ts.map +1 -0
- package/dest/abi/function_signature_decoder.js +66 -0
- package/dest/abi/index.d.ts +2 -1
- package/dest/abi/index.d.ts.map +1 -1
- package/dest/abi/index.js +1 -0
- package/dest/abi/note_selector.d.ts +4 -7
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/note_selector.js +1 -3
- package/dest/abi/selector.d.ts +2 -2
- package/dest/abi/selector.d.ts.map +1 -1
- package/dest/abi/selector.js +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 +5 -21
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +12 -30
- package/dest/aztec-address/index.d.ts +8 -8
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +9 -6
- 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 +13 -38
- package/dest/block/block_data.d.ts.map +1 -1
- package/dest/block/block_data.js +2 -2
- package/dest/block/block_hash.d.ts +11 -10
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +10 -9
- 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 +10 -29
- package/dest/block/l2_block_info.d.ts.map +1 -1
- package/dest/block/l2_block_info.js +6 -5
- package/dest/block/l2_block_source.d.ts +210 -357
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +67 -1
- package/dest/block/l2_block_stream/interfaces.d.ts +6 -3
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -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 +43 -11
- 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.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 +5 -4
- package/dest/checkpoint/checkpoint.d.ts +30 -96
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +9 -1
- package/dest/checkpoint/checkpoint_data.d.ts +68 -91
- package/dest/checkpoint/checkpoint_data.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint_data.js +12 -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/checkpoint/validate.js +2 -2
- 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 +13 -12
- 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 +18 -4
- 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 +6 -6
- package/dest/contract/contract_address.d.ts.map +1 -1
- package/dest/contract/contract_address.js +6 -5
- package/dest/contract/contract_class_id.d.ts +2 -2
- package/dest/contract/contract_class_id.js +2 -2
- 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/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 +17 -241
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_class.js +1 -28
- 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/contract/private_function.d.ts +1 -1
- package/dest/contract/private_function.d.ts.map +1 -1
- package/dest/contract/private_function.js +2 -4
- 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 +10 -22
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +12 -0
- package/dest/file-store/factory.d.ts +4 -3
- package/dest/file-store/factory.d.ts.map +1 -1
- package/dest/file-store/factory.js +2 -2
- package/dest/file-store/http.d.ts +9 -2
- package/dest/file-store/http.d.ts.map +1 -1
- package/dest/file-store/http.js +20 -9
- package/dest/file-store/index.d.ts +2 -1
- package/dest/file-store/index.d.ts.map +1 -1
- package/dest/gas/fee_math.d.ts +49 -0
- package/dest/gas/fee_math.d.ts.map +1 -0
- package/dest/gas/fee_math.js +80 -0
- 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 +13 -14
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +17 -4
- package/dest/gas/gas_settings.d.ts +66 -86
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +56 -9
- package/dest/gas/index.d.ts +2 -1
- package/dest/gas/index.d.ts.map +1 -1
- package/dest/gas/index.js +1 -0
- package/dest/ha-signing/config.d.ts +11 -75
- package/dest/ha-signing/config.d.ts.map +1 -1
- package/dest/ha-signing/config.js +9 -18
- package/dest/ha-signing/index.d.ts +2 -2
- package/dest/ha-signing/index.d.ts.map +1 -1
- package/dest/ha-signing/index.js +1 -1
- 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/ha-signing/types.d.ts +37 -32
- package/dest/ha-signing/types.d.ts.map +1 -1
- package/dest/ha-signing/types.js +13 -6
- package/dest/hash/hash.d.ts +34 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +63 -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 +22 -32
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +214 -70
- package/dest/interfaces/aztec-node-admin.d.ts +66 -301
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +59 -16
- package/dest/interfaces/aztec-node-debug.d.ts +21 -0
- package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
- package/dest/interfaces/aztec-node-debug.js +21 -0
- package/dest/interfaces/aztec-node.d.ts +110 -106
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +309 -69
- package/dest/interfaces/block-builder.d.ts +33 -7
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +6 -4
- 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 +8 -2
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/client.js +7 -1
- package/dest/interfaces/configs.d.ts +44 -128
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +10 -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 -34
- 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 +20 -23
- 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-client.js +1 -4
- package/dest/interfaces/prover-node.js +22 -8
- package/dest/interfaces/proving-job-source.js +24 -4
- package/dest/interfaces/proving-job.d.ts +742 -5793
- 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 -65
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +8 -4
- 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 +48 -248
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +5 -1
- package/dest/interfaces/world_state.d.ts +6 -5
- 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/l1-contracts/index.d.ts +2 -2
- package/dest/l1-contracts/index.d.ts.map +1 -1
- package/dest/l1-contracts/index.js +1 -1
- package/dest/logs/app_tagging_secret.d.ts +46 -0
- package/dest/logs/app_tagging_secret.d.ts.map +1 -0
- package/dest/logs/app_tagging_secret.js +109 -0
- 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 +6 -8
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/message_context.js +27 -9
- package/dest/logs/pending_tagged_log.d.ts +2 -3
- package/dest/logs/pending_tagged_log.d.ts.map +1 -1
- package/dest/logs/pending_tagged_log.js +2 -2
- 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/shared_secret_derivation.d.ts +11 -10
- package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
- package/dest/logs/shared_secret_derivation.js +15 -9
- package/dest/logs/siloed_tag.d.ts +8 -7
- package/dest/logs/siloed_tag.d.ts.map +1 -1
- package/dest/logs/siloed_tag.js +13 -3
- package/dest/logs/tag.d.ts +5 -6
- package/dest/logs/tag.d.ts.map +1 -1
- package/dest/logs/tag.js +4 -0
- 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/l1_to_l2_message.d.ts +3 -2
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.js +11 -13
- package/dest/messaging/l1_to_l2_message_source.d.ts +4 -2
- package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
- 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 +5 -3
- 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/note/note_dao.d.ts +1 -1
- package/dest/note/note_dao.d.ts.map +1 -1
- package/dest/note/note_dao.js +1 -4
- package/dest/p2p/block_proposal.d.ts +31 -14
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +57 -39
- package/dest/p2p/checkpoint_attestation.d.ts +15 -9
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +23 -24
- package/dest/p2p/checkpoint_proposal.d.ts +35 -16
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/checkpoint_proposal.js +59 -49
- 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/gossipable.d.ts +4 -4
- package/dest/p2p/gossipable.d.ts.map +1 -1
- 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 +57 -7
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +112 -15
- package/dest/proofs/recursive_proof.d.ts +2 -2
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.d.ts +1 -1
- package/dest/rollup/block_headers_hash.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.js +8 -2
- 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/index.d.ts +2 -3
- package/dest/slashing/index.d.ts.map +1 -1
- package/dest/slashing/index.js +1 -2
- package/dest/slashing/serialization.d.ts +2 -6
- package/dest/slashing/serialization.d.ts.map +1 -1
- package/dest/slashing/serialization.js +0 -60
- package/dest/slashing/types.d.ts +18 -112
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +16 -24
- package/dest/slashing/{tally.d.ts → votes.d.ts} +1 -1
- package/dest/slashing/{tally.d.ts.map → votes.d.ts.map} +1 -1
- package/dest/slashing/{tally.js → votes.js} +1 -1
- 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 +25 -32
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +82 -82
- package/dest/tests/mocks.d.ts +8 -5
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +42 -54
- package/dest/timetable/index.d.ts +48 -1
- package/dest/timetable/index.d.ts.map +1 -1
- package/dest/timetable/index.js +184 -14
- 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 +19 -42
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.js +3 -0
- 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 +5 -4
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +7 -4
- 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 +7 -3
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/capsule.js +9 -3
- package/dest/tx/fee_provider.d.ts +10 -0
- package/dest/tx/fee_provider.d.ts.map +1 -0
- package/dest/tx/fee_provider.js +1 -0
- package/dest/tx/function_data.d.ts +4 -10
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/global_variable_builder.d.ts +3 -4
- package/dest/tx/global_variable_builder.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/index.d.ts +2 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -0
- 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 +9 -6
- 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 +67 -353
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +17 -7
- 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 +64 -1143
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +13 -11
- 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 +14 -13
- 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 -63
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +143 -60
- package/dest/tx/validator/error_texts.d.ts +5 -1
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +6 -0
- 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 -12
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/types/shared.js +6 -12
- 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 +9 -7
- 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.d.ts +4 -2
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/versioning/versioning.js +5 -2
- package/dest/vks/verification_key.d.ts +4 -139
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +5 -126
- package/dest/world-state/genesis_data.d.ts +13 -0
- package/dest/world-state/genesis_data.d.ts.map +1 -0
- package/dest/world-state/genesis_data.js +7 -0
- package/dest/world-state/index.d.ts +2 -1
- package/dest/world-state/index.d.ts.map +1 -1
- package/dest/world-state/index.js +1 -0
- package/dest/world-state/world_state_revision.d.ts +11 -39
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +7 -21
- package/package.json +12 -11
- package/src/abi/abi.ts +78 -21
- package/src/abi/authorization_selector.ts +2 -8
- package/src/abi/buffer.ts +25 -4
- package/src/abi/contract_artifact.ts +11 -6
- package/src/abi/decoder.ts +23 -78
- package/src/abi/encoder.ts +42 -6
- package/src/abi/event_selector.ts +2 -8
- package/src/abi/function_selector.ts +4 -13
- package/src/abi/function_signature_decoder.ts +77 -0
- package/src/abi/index.ts +1 -0
- package/src/abi/note_selector.ts +3 -12
- package/src/abi/selector.ts +1 -1
- 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 +19 -39
- package/src/aztec-address/index.ts +15 -12
- package/src/block/attestation_info.ts +11 -11
- package/src/block/block_data.ts +3 -4
- package/src/block/block_hash.ts +21 -14
- package/src/block/block_parameter.ts +72 -4
- package/src/block/index.ts +0 -1
- package/src/block/l2_block_info.ts +8 -6
- package/src/block/l2_block_source.ts +209 -147
- package/src/block/l2_block_stream/interfaces.ts +6 -2
- 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 +53 -19
- package/src/block/proposal/attestations_and_signers.ts +32 -17
- package/src/block/test/l2_tips_store_test_suite.ts +10 -3
- package/src/checkpoint/checkpoint.ts +11 -1
- package/src/checkpoint/checkpoint_data.ts +44 -4
- 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/checkpoint/validate.ts +2 -2
- package/src/config/chain-config.ts +13 -16
- package/src/config/sequencer-config.ts +34 -6
- package/src/contract/complete_address.ts +7 -3
- package/src/contract/contract_address.ts +7 -7
- package/src/contract/contract_class_id.ts +2 -2
- package/src/contract/contract_instance.ts +11 -2
- package/src/contract/index.ts +0 -2
- package/src/contract/interfaces/contract_class.ts +2 -82
- package/src/contract/interfaces/contract_instance.ts +6 -2
- package/src/contract/private_function.ts +3 -1
- package/src/database-version/version_manager.ts +17 -0
- package/src/epoch-helpers/index.ts +24 -0
- package/src/file-store/factory.ts +13 -4
- package/src/file-store/http.ts +29 -10
- package/src/file-store/index.ts +1 -0
- package/src/gas/README.md +154 -0
- package/src/gas/fee_math.ts +120 -0
- package/src/gas/gas.ts +8 -3
- package/src/gas/gas_fees.ts +26 -13
- package/src/gas/gas_settings.ts +73 -15
- package/src/gas/index.ts +1 -0
- package/src/ha-signing/config.ts +14 -18
- package/src/ha-signing/index.ts +3 -1
- package/src/ha-signing/local_config.ts +2 -2
- package/src/ha-signing/types.ts +48 -34
- package/src/hash/hash.ts +63 -2
- package/src/interfaces/api_limit.ts +1 -1
- package/src/interfaces/archiver.ts +89 -93
- package/src/interfaces/aztec-node-admin.ts +35 -20
- package/src/interfaces/aztec-node-debug.ts +40 -0
- package/src/interfaces/aztec-node.ts +307 -257
- package/src/interfaces/block-builder.ts +39 -8
- 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 +7 -1
- package/src/interfaces/configs.ts +43 -1
- package/src/interfaces/l1_publish_info.ts +40 -0
- package/src/interfaces/l2_logs_source.ts +13 -39
- package/src/interfaces/merkle_tree_operations.ts +20 -22
- 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-client.ts +3 -6
- 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 -10
- package/src/interfaces/tx_provider.ts +6 -0
- package/src/interfaces/validator.ts +34 -15
- package/src/interfaces/world_state.ts +5 -4
- 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/l1-contracts/index.ts +1 -1
- package/src/logs/app_tagging_secret.ts +137 -0
- 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 +22 -8
- package/src/logs/pending_tagged_log.ts +1 -3
- 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/shared_secret_derivation.ts +21 -10
- package/src/logs/siloed_tag.ts +20 -11
- package/src/logs/tag.ts +8 -8
- 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/l1_to_l2_message.ts +12 -9
- package/src/messaging/l1_to_l2_message_source.ts +3 -1
- 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 +4 -2
- package/src/note/note_dao.ts +1 -4
- package/src/p2p/block_proposal.ts +111 -36
- package/src/p2p/checkpoint_attestation.ts +27 -31
- package/src/p2p/checkpoint_proposal.ts +126 -68
- package/src/p2p/consensus_payload.ts +59 -28
- package/src/p2p/gossipable.ts +4 -4
- 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 +132 -12
- package/src/rollup/block_headers_hash.ts +11 -2
- 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/index.ts +1 -2
- package/src/slashing/serialization.ts +1 -81
- package/src/slashing/types.ts +24 -49
- package/src/slashing/{tally.ts → votes.ts} +1 -1
- package/src/stats/stats.ts +4 -0
- package/src/tests/factories.ts +103 -111
- package/src/tests/mocks.ts +66 -70
- package/src/timetable/index.ts +251 -13
- package/src/trees/append_only_tree_snapshot.ts +8 -3
- package/src/trees/nullifier_leaf.ts +4 -0
- package/src/trees/nullifier_membership_witness.ts +2 -12
- package/src/tx/block_header.ts +10 -5
- package/src/tx/capsule.ts +10 -2
- package/src/tx/fee_provider.ts +10 -0
- package/src/tx/global_variable_builder.ts +2 -3
- package/src/tx/global_variables.ts +10 -18
- package/src/tx/hashed_values.ts +8 -3
- package/src/tx/index.ts +1 -0
- package/src/tx/indexed_tx_effect.ts +18 -6
- package/src/tx/partial_state_reference.ts +8 -3
- package/src/tx/profiling.ts +15 -6
- 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 +22 -21
- package/src/tx/state_reference.ts +9 -4
- package/src/tx/tree_snapshots.ts +9 -4
- package/src/tx/tx.ts +43 -24
- 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 +265 -85
- package/src/tx/validator/error_texts.ts +8 -0
- package/src/tx/validator/tx_validator.ts +1 -5
- package/src/types/shared.ts +8 -13
- package/src/update-checker/dev_version.ts +2 -0
- package/src/update-checker/index.ts +1 -0
- package/src/update-checker/package_version.ts +11 -11
- package/src/validators/schemas.ts +6 -4
- package/src/validators/types.ts +21 -2
- package/src/versioning/versioning.ts +5 -2
- package/src/vks/verification_key.ts +5 -184
- package/src/world-state/genesis_data.ts +27 -0
- package/src/world-state/index.ts +1 -0
- package/src/world-state/world_state_revision.ts +9 -34
- package/dest/abi/mocked_keys.d.ts +0 -2
- package/dest/abi/mocked_keys.d.ts.map +0 -1
- package/dest/abi/mocked_keys.js +0 -1
- 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/contract/private_function_membership_proof.d.ts +0 -32
- package/dest/contract/private_function_membership_proof.d.ts.map +0 -1
- package/dest/contract/private_function_membership_proof.js +0 -124
- package/dest/contract/utility_function_membership_proof.d.ts +0 -27
- package/dest/contract/utility_function_membership_proof.d.ts.map +0 -1
- package/dest/contract/utility_function_membership_proof.js +0 -87
- 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/l1-contracts/slash_factory.d.ts +0 -45
- package/dest/l1-contracts/slash_factory.d.ts.map +0 -1
- package/dest/l1-contracts/slash_factory.js +0 -158
- 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_directional_app_tagging_secret.js +0 -72
- 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 -22
- package/dest/logs/log_filter.d.ts.map +0 -1
- package/dest/logs/log_filter.js +0 -11
- 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 -94
- package/dest/logs/tx_scoped_l2_log.d.ts +0 -49
- package/dest/logs/tx_scoped_l2_log.d.ts.map +0 -1
- package/dest/logs/tx_scoped_l2_log.js +0 -70
- package/dest/slashing/empire.d.ts +0 -31
- package/dest/slashing/empire.d.ts.map +0 -1
- package/dest/slashing/empire.js +0 -87
- package/src/abi/mocked_keys.ts +0 -2
- package/src/block/checkpointed_l2_block.ts +0 -70
- package/src/contract/private_function_membership_proof.ts +0 -167
- package/src/contract/utility_function_membership_proof.ts +0 -118
- package/src/interfaces/get_logs_response.ts +0 -35
- package/src/l1-contracts/slash_factory.ts +0 -180
- package/src/logs/extended_contract_class_log.ts +0 -87
- package/src/logs/extended_directional_app_tagging_secret.ts +0 -87
- package/src/logs/extended_public_log.ts +0 -94
- package/src/logs/log_filter.ts +0 -31
- package/src/logs/log_id.ts +0 -125
- package/src/logs/tx_scoped_l2_log.ts +0 -98
- package/src/slashing/empire.ts +0 -104
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Outcome of attempting to re-execute a checkpoint proposal locally.
|
|
6
|
+
*
|
|
7
|
+
* - `valid` — re-execution succeeded and the computed checkpoint matched the proposal.
|
|
8
|
+
* - `invalid` — the proposal disagreed with the computed checkpoint, or violated a deterministic
|
|
9
|
+
* constraint (limits, signatures, etc).
|
|
10
|
+
* - `unvalidated` — the local node could not complete validation for non-deterministic reasons
|
|
11
|
+
* (missing blocks/txs, timeouts, infra errors). Treated as proposer-fault for
|
|
12
|
+
* slashing but surfaced separately for telemetry.
|
|
13
|
+
*/
|
|
14
|
+
export type ReexecutionOutcome = 'valid' | 'invalid' | 'unvalidated';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Tracks two pieces of per-slot state collected during proposal handling:
|
|
18
|
+
*
|
|
19
|
+
* 1. Whether each block proposal's transactions were successfully collected locally
|
|
20
|
+
* (keyed by `slot` + `indexWithinCheckpoint`). Consumed by the data-withholding watcher.
|
|
21
|
+
* 2. The outcome of locally re-executing each checkpoint proposal (keyed by
|
|
22
|
+
* `(checkpointNumber, archiveRoot)` and by `slot`). Consumed by the data-withholding
|
|
23
|
+
* watcher (via `hasReexecuted`) and the sentinel (via `getOutcomeForSlot`).
|
|
24
|
+
*
|
|
25
|
+
* Both pieces of state live on the same per-slot `Entry`, so cleanup via `removeBefore`
|
|
26
|
+
* naturally drops everything for a pruned slot in one step.
|
|
27
|
+
*/
|
|
28
|
+
interface Entry {
|
|
29
|
+
// Set by recordOutcome — these may be undefined until the checkpoint proposal has been
|
|
30
|
+
// evaluated. recordTxsCollected may create an Entry before any of them are known.
|
|
31
|
+
checkpointNumber: CheckpointNumber | undefined;
|
|
32
|
+
archiveRoot: string | undefined;
|
|
33
|
+
outcome: ReexecutionOutcome | undefined;
|
|
34
|
+
|
|
35
|
+
slot: SlotNumber;
|
|
36
|
+
|
|
37
|
+
// Per block-proposal at this slot: indexWithinCheckpoint → true (collected) | false (failed to collect).
|
|
38
|
+
txsCollected: Map<number, boolean>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class CheckpointReexecutionTracker {
|
|
42
|
+
private readonly byCheckpoint = new Map<CheckpointNumber, Map<string, Entry>>();
|
|
43
|
+
private readonly bySlot = new Map<SlotNumber, Entry>();
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Record the outcome of evaluating a checkpoint proposal.
|
|
47
|
+
* @param slot - Slot the proposal was for. Always required.
|
|
48
|
+
* @param archiveRoot - Archive root in the proposal.
|
|
49
|
+
* @param outcome - Outcome of evaluation.
|
|
50
|
+
* @param checkpointNumber - Checkpoint number, if known. Required for `valid` outcomes; optional
|
|
51
|
+
* for `invalid`/`unvalidated` because some early rejections fire before blocks are loaded.
|
|
52
|
+
*/
|
|
53
|
+
public recordOutcome(
|
|
54
|
+
slot: SlotNumber,
|
|
55
|
+
archiveRoot: Fr,
|
|
56
|
+
outcome: ReexecutionOutcome,
|
|
57
|
+
checkpointNumber?: CheckpointNumber,
|
|
58
|
+
): void {
|
|
59
|
+
const archiveRootStr = archiveRoot.toString();
|
|
60
|
+
|
|
61
|
+
// Preserve any per-block txsCollected already accumulated for this slot.
|
|
62
|
+
const existing = this.bySlot.get(slot);
|
|
63
|
+
const entry: Entry = {
|
|
64
|
+
checkpointNumber,
|
|
65
|
+
archiveRoot: archiveRootStr,
|
|
66
|
+
slot,
|
|
67
|
+
outcome,
|
|
68
|
+
txsCollected: existing?.txsCollected ?? new Map(),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
if (checkpointNumber !== undefined) {
|
|
72
|
+
let archives = this.byCheckpoint.get(checkpointNumber);
|
|
73
|
+
if (!archives) {
|
|
74
|
+
archives = new Map();
|
|
75
|
+
this.byCheckpoint.set(checkpointNumber, archives);
|
|
76
|
+
}
|
|
77
|
+
archives.set(archiveRootStr, entry);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
this.bySlot.set(slot, entry);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Record whether the local node successfully collected the transactions for a block proposal.
|
|
85
|
+
* Called from the validator's proposal handler immediately after tx collection completes
|
|
86
|
+
* (regardless of whether re-execution will subsequently succeed). The data-withholding
|
|
87
|
+
* watcher consults these records as an authoritative signal: tx availability now is too
|
|
88
|
+
* weak (txs may have been evicted from the mempool by the time the watcher runs), but a
|
|
89
|
+
* record that the txs *were* available at proposal time still vouches for the proposer.
|
|
90
|
+
*
|
|
91
|
+
* @param slot - Slot the block proposal was for.
|
|
92
|
+
* @param indexWithinCheckpoint - Index of the block within its enclosing checkpoint.
|
|
93
|
+
* @param collected - True if every tx in the proposal was collected locally before deadline.
|
|
94
|
+
*/
|
|
95
|
+
public recordTxsCollected(slot: SlotNumber, indexWithinCheckpoint: number, collected: boolean): void {
|
|
96
|
+
let entry = this.bySlot.get(slot);
|
|
97
|
+
if (!entry) {
|
|
98
|
+
entry = {
|
|
99
|
+
checkpointNumber: undefined,
|
|
100
|
+
archiveRoot: undefined,
|
|
101
|
+
slot,
|
|
102
|
+
outcome: undefined,
|
|
103
|
+
txsCollected: new Map(),
|
|
104
|
+
};
|
|
105
|
+
this.bySlot.set(slot, entry);
|
|
106
|
+
}
|
|
107
|
+
entry.txsCollected.set(indexWithinCheckpoint, collected);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Returns true if the given (checkpoint number, archive root) has been successfully
|
|
112
|
+
* re-executed locally (outcome `valid`).
|
|
113
|
+
*/
|
|
114
|
+
public hasReexecuted(checkpointNumber: CheckpointNumber, archiveRoot: Fr): boolean {
|
|
115
|
+
return this.byCheckpoint.get(checkpointNumber)?.get(archiveRoot.toString())?.outcome === 'valid';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Returns the recorded outcome for a given slot, or undefined if no proposal was evaluated. */
|
|
119
|
+
public getOutcomeForSlot(slot: SlotNumber): ReexecutionOutcome | undefined {
|
|
120
|
+
return this.bySlot.get(slot)?.outcome;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Returns the recorded tx-collection result for a block proposal at the given slot and
|
|
125
|
+
* `indexWithinCheckpoint`, or `undefined` if no record exists.
|
|
126
|
+
*
|
|
127
|
+
* Three-valued by design:
|
|
128
|
+
* - `true` — we collected every tx for this block proposal before the deadline.
|
|
129
|
+
* - `false` — we tried and failed (missing txs at the deadline).
|
|
130
|
+
* - `undefined` — no record (e.g. we never saw the block proposal). Callers should fall
|
|
131
|
+
* back to a current-state check (e.g. mempool probe) for this case.
|
|
132
|
+
*/
|
|
133
|
+
public getTxsCollectedRecord(slot: SlotNumber, indexWithinCheckpoint: number): boolean | undefined {
|
|
134
|
+
return this.bySlot.get(slot)?.txsCollected.get(indexWithinCheckpoint);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Drops entries for checkpoints with `number < checkpointNumber`. */
|
|
138
|
+
public removeBefore(checkpointNumber: CheckpointNumber): void {
|
|
139
|
+
// Track the highest slot among checkpoints we're pruning. Once we know it, any slot
|
|
140
|
+
// strictly below that watermark is older than the most recently pruned checkpoint and
|
|
141
|
+
// can be dropped from `bySlot` too — including slot-only entries (no checkpoint number)
|
|
142
|
+
// which would otherwise leak, because removing by checkpoint number can't reach them.
|
|
143
|
+
let maxRemovedSlot: SlotNumber | undefined;
|
|
144
|
+
for (const [n, archives] of this.byCheckpoint) {
|
|
145
|
+
if (n < checkpointNumber) {
|
|
146
|
+
for (const entry of archives.values()) {
|
|
147
|
+
// Only drop the slot index if it still points at the entry we're removing.
|
|
148
|
+
if (this.bySlot.get(entry.slot) === entry) {
|
|
149
|
+
this.bySlot.delete(entry.slot);
|
|
150
|
+
}
|
|
151
|
+
if (maxRemovedSlot === undefined || entry.slot > maxRemovedSlot) {
|
|
152
|
+
maxRemovedSlot = entry.slot;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
this.byCheckpoint.delete(n);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (maxRemovedSlot !== undefined) {
|
|
160
|
+
for (const slot of [...this.bySlot.keys()]) {
|
|
161
|
+
if (slot < maxRemovedSlot) {
|
|
162
|
+
this.bySlot.delete(slot);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
|
|
4
|
+
import { ConsensusPayload } from '../p2p/consensus_payload.js';
|
|
5
|
+
import { type CoordinationSignatureContext, getHashedSignaturePayloadTypedData } from '../p2p/signature_utils.js';
|
|
6
|
+
import { CheckpointHeader } from '../rollup/checkpoint_header.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Computes the EIP-712 payload digest for a checkpoint proposal — the digest validators sign
|
|
10
|
+
* and the L1 contract verifies during `propose()`. Mirrors `ProposeLib.digest(ProposePayload)` on L1.
|
|
11
|
+
*
|
|
12
|
+
* The result is the same `bytes32` that gets stored in `tempCheckpointLogs[checkpointNumber].payloadDigest`,
|
|
13
|
+
* so this helper is also reused when constructing simulation state overrides for pipelined proposals.
|
|
14
|
+
*/
|
|
15
|
+
export function computeCheckpointPayloadDigest(args: {
|
|
16
|
+
header: CheckpointHeader;
|
|
17
|
+
archiveRoot: Fr;
|
|
18
|
+
feeAssetPriceModifier: bigint;
|
|
19
|
+
signatureContext: CoordinationSignatureContext;
|
|
20
|
+
}): Buffer32 {
|
|
21
|
+
const consensusPayload = new ConsensusPayload(
|
|
22
|
+
args.header,
|
|
23
|
+
args.archiveRoot,
|
|
24
|
+
args.feeAssetPriceModifier,
|
|
25
|
+
args.signatureContext,
|
|
26
|
+
);
|
|
27
|
+
return getHashedSignaturePayloadTypedData(consensusPayload);
|
|
28
|
+
}
|
package/src/checkpoint/index.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from './checkpoint.js';
|
|
2
2
|
export * from './checkpoint_data.js';
|
|
3
3
|
export * from './checkpoint_info.js';
|
|
4
|
+
export * from './checkpoint_reexecution_tracker.js';
|
|
5
|
+
export * from './digest.js';
|
|
6
|
+
export * from './previous_checkpoint_out_hashes.js';
|
|
4
7
|
export * from './published_checkpoint.js';
|
|
5
8
|
export * from './validate.js';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CheckpointNumber, type EpochNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
4
|
+
|
|
5
|
+
import type { L2BlockSource } from '../block/l2_block_source.js';
|
|
6
|
+
import { type L1RollupConstants, getEpochAtSlot } from '../epoch-helpers/index.js';
|
|
7
|
+
import type { ProposedCheckpointData } from './checkpoint_data.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Returns the out hashes (in epoch order) of all checkpoints in `epoch` that precede
|
|
11
|
+
* `checkpointNumber`, used to compute the `epochOutHash` baked into that checkpoint's header.
|
|
12
|
+
*
|
|
13
|
+
* Under proposer pipelining the parent checkpoint may not be confirmed on L1 by the time the
|
|
14
|
+
* builder runs, so the on-chain archiver query (`getCheckpointsData`) is missing it and the
|
|
15
|
+
* resulting `epochOutHash` would diverge from what other validators (and L1) compute after the
|
|
16
|
+
* parent lands. To avoid that, the parent's `checkpointOutHash` is spliced in from the locally
|
|
17
|
+
* known proposed checkpoint when:
|
|
18
|
+
* - pipelining is enabled,
|
|
19
|
+
* - the archiver lookup is genuinely short (its last entry is not already cp `N-1`),
|
|
20
|
+
* - and the proposed cp `N-1` is in the same target epoch (otherwise we're at an epoch boundary
|
|
21
|
+
* and the previous-epoch cps must be excluded).
|
|
22
|
+
*
|
|
23
|
+
* Callers may either pass the already-loaded `proposedCheckpointData` (the proposer has it on
|
|
24
|
+
* hand) or leave it undefined, in which case it's fetched via `getProposedCheckpointData`.
|
|
25
|
+
*/
|
|
26
|
+
export async function getPreviousCheckpointOutHashes(input: {
|
|
27
|
+
blockSource: Pick<L2BlockSource, 'getCheckpointsData' | 'getProposedCheckpointData'>;
|
|
28
|
+
epoch: EpochNumber;
|
|
29
|
+
checkpointNumber: CheckpointNumber;
|
|
30
|
+
l1Constants: Pick<L1RollupConstants, 'epochDuration'>;
|
|
31
|
+
pipeliningEnabled: boolean;
|
|
32
|
+
proposedCheckpointData?: ProposedCheckpointData;
|
|
33
|
+
log?: Logger;
|
|
34
|
+
}): Promise<Fr[]> {
|
|
35
|
+
const { blockSource, epoch, checkpointNumber, l1Constants, pipeliningEnabled, log } = input;
|
|
36
|
+
|
|
37
|
+
const checkpointed = (await blockSource.getCheckpointsData({ epoch }))
|
|
38
|
+
.filter(c => c.checkpointNumber < checkpointNumber)
|
|
39
|
+
.sort((a, b) => a.checkpointNumber - b.checkpointNumber);
|
|
40
|
+
|
|
41
|
+
if (!pipeliningEnabled || checkpointNumber === 0) {
|
|
42
|
+
return checkpointed.map(c => c.checkpointOutHash);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const parentCheckpoint = CheckpointNumber(checkpointNumber - 1);
|
|
46
|
+
if (checkpointed.at(-1)?.checkpointNumber === parentCheckpoint) {
|
|
47
|
+
return checkpointed.map(c => c.checkpointOutHash);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const proposedParent =
|
|
51
|
+
input.proposedCheckpointData ?? (await blockSource.getProposedCheckpointData({ number: parentCheckpoint }));
|
|
52
|
+
if (!proposedParent || proposedParent.checkpointNumber !== parentCheckpoint) {
|
|
53
|
+
return checkpointed.map(c => c.checkpointOutHash);
|
|
54
|
+
}
|
|
55
|
+
if (getEpochAtSlot(proposedParent.header.slotNumber, l1Constants) !== epoch) {
|
|
56
|
+
return checkpointed.map(c => c.checkpointOutHash);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
log?.debug(`Splicing pipelined parent cp ${parentCheckpoint} outHash for cp ${checkpointNumber}`);
|
|
60
|
+
return [...checkpointed.map(c => c.checkpointOutHash), proposedParent.checkpointOutHash];
|
|
61
|
+
}
|
|
@@ -36,7 +36,7 @@ export function validateCheckpoint(
|
|
|
36
36
|
): void {
|
|
37
37
|
validateCheckpointStructure(checkpoint);
|
|
38
38
|
validateCheckpointLimits(checkpoint, opts);
|
|
39
|
-
|
|
39
|
+
validateCheckpointBlocksLimits(checkpoint, opts);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -125,7 +125,7 @@ export function validateCheckpointStructure(checkpoint: Checkpoint): void {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/** Validates checkpoint blocks gas limits */
|
|
128
|
-
function
|
|
128
|
+
function validateCheckpointBlocksLimits(
|
|
129
129
|
checkpoint: Checkpoint,
|
|
130
130
|
opts: {
|
|
131
131
|
maxL2BlockGas?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type
|
|
1
|
+
import { type L1ContractAddresses, pickL1ContractAddressMappings } from '@aztec/ethereum/l1-contract-addresses';
|
|
2
|
+
import { type ConfigMappingsType, numberConfigHelper } from '@aztec/foundation/config';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
|
|
5
5
|
export { type SequencerConfig, SequencerConfigSchema } from '../interfaces/configs.js';
|
|
@@ -7,26 +7,28 @@ export { type AllowedElement } from '../interfaces/allowed_element.js';
|
|
|
7
7
|
|
|
8
8
|
export const emptyChainConfig: ChainConfig = {
|
|
9
9
|
l1ChainId: 0,
|
|
10
|
-
l1Contracts: { rollupAddress: EthAddress.ZERO },
|
|
11
10
|
rollupVersion: 0,
|
|
11
|
+
rollupAddress: EthAddress.ZERO,
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const chainConfigMappings: ConfigMappingsType<ChainConfig> = {
|
|
15
15
|
l1ChainId: {
|
|
16
16
|
env: 'L1_CHAIN_ID',
|
|
17
|
-
|
|
18
|
-
defaultValue: 31337,
|
|
17
|
+
...numberConfigHelper(31337),
|
|
19
18
|
description: 'The chain ID of the ethereum host.',
|
|
20
19
|
},
|
|
21
20
|
rollupVersion: {
|
|
22
21
|
env: 'ROLLUP_VERSION',
|
|
23
22
|
description: 'The version of the rollup.',
|
|
24
|
-
parseEnv: (val: string) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
parseEnv: (val: string) => {
|
|
24
|
+
const parsed = parseInt(val, 10);
|
|
25
|
+
if (!Number.isSafeInteger(parsed)) {
|
|
26
|
+
throw new Error(`Invalid rollup version: ${val}`);
|
|
27
|
+
}
|
|
28
|
+
return parsed;
|
|
29
|
+
},
|
|
29
30
|
},
|
|
31
|
+
...pickL1ContractAddressMappings('rollupAddress'),
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
/** Chain configuration. */
|
|
@@ -35,9 +37,4 @@ export type ChainConfig = {
|
|
|
35
37
|
l1ChainId: number;
|
|
36
38
|
/** The version of the rollup. */
|
|
37
39
|
rollupVersion: number;
|
|
38
|
-
|
|
39
|
-
l1Contracts: {
|
|
40
|
-
/** The address to rollup */
|
|
41
|
-
rollupAddress: EthAddress;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
40
|
+
} & Pick<L1ContractAddresses, 'rollupAddress'>;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
type ConfigMappingsType,
|
|
3
|
+
floatConfigHelper,
|
|
4
|
+
numberConfigHelper,
|
|
5
|
+
optionalNumberConfigHelper,
|
|
6
|
+
} from '@aztec/foundation/config';
|
|
2
7
|
|
|
3
8
|
import type { SequencerConfig } from '../interfaces/configs.js';
|
|
9
|
+
import { DEFAULT_P2P_PROPAGATION_TIME } from '../timetable/index.js';
|
|
4
10
|
|
|
5
11
|
/** Default maximum number of transactions per block. */
|
|
6
12
|
export const DEFAULT_MAX_TXS_PER_BLOCK = 32;
|
|
7
13
|
|
|
14
|
+
/** Default maximum number of blocks the sequencer packs into a single checkpoint. */
|
|
15
|
+
export const DEFAULT_MAX_BLOCKS_PER_CHECKPOINT = 24;
|
|
16
|
+
|
|
8
17
|
/**
|
|
9
18
|
* Partial sequencer config mappings for fields that need to be shared across packages.
|
|
10
19
|
* The full sequencer config mappings remain in sequencer-client, but shared fields
|
|
@@ -12,26 +21,45 @@ export const DEFAULT_MAX_TXS_PER_BLOCK = 32;
|
|
|
12
21
|
* to avoid duplication.
|
|
13
22
|
*/
|
|
14
23
|
export const sharedSequencerConfigMappings: ConfigMappingsType<
|
|
15
|
-
Pick<
|
|
24
|
+
Pick<
|
|
25
|
+
SequencerConfig,
|
|
26
|
+
| 'blockDurationMs'
|
|
27
|
+
| 'expectedBlockProposalsPerSlot'
|
|
28
|
+
| 'maxTxsPerBlock'
|
|
29
|
+
| 'attestationPropagationTime'
|
|
30
|
+
| 'maxBlocksPerCheckpoint'
|
|
31
|
+
>
|
|
16
32
|
> = {
|
|
17
33
|
blockDurationMs: {
|
|
18
34
|
env: 'SEQ_BLOCK_DURATION_MS',
|
|
19
35
|
description:
|
|
20
36
|
'Duration per block in milliseconds when building multiple blocks per slot. ' +
|
|
21
37
|
'If undefined (default), builds a single block per slot using the full slot duration.',
|
|
22
|
-
|
|
38
|
+
...optionalNumberConfigHelper(),
|
|
23
39
|
},
|
|
24
40
|
expectedBlockProposalsPerSlot: {
|
|
25
41
|
env: 'SEQ_EXPECTED_BLOCK_PROPOSALS_PER_SLOT',
|
|
26
42
|
description:
|
|
27
43
|
'Expected number of block proposals per slot for P2P peer scoring. ' +
|
|
28
44
|
'0 (default) disables block proposal scoring. Set to a positive value to enable.',
|
|
29
|
-
|
|
30
|
-
defaultValue: 0,
|
|
45
|
+
...numberConfigHelper(0),
|
|
31
46
|
},
|
|
32
47
|
maxTxsPerBlock: {
|
|
33
48
|
env: 'SEQ_MAX_TX_PER_BLOCK',
|
|
34
49
|
description: 'The maximum number of txs to include in a block.',
|
|
35
|
-
|
|
50
|
+
...optionalNumberConfigHelper(),
|
|
51
|
+
},
|
|
52
|
+
attestationPropagationTime: {
|
|
53
|
+
env: 'SEQ_ATTESTATION_PROPAGATION_TIME',
|
|
54
|
+
description: 'How many seconds it takes for proposals and attestations to travel across the p2p layer (one-way).',
|
|
55
|
+
defaultValue: DEFAULT_P2P_PROPAGATION_TIME,
|
|
56
|
+
...floatConfigHelper(DEFAULT_P2P_PROPAGATION_TIME),
|
|
57
|
+
},
|
|
58
|
+
maxBlocksPerCheckpoint: {
|
|
59
|
+
env: 'MAX_BLOCKS_PER_CHECKPOINT',
|
|
60
|
+
description:
|
|
61
|
+
'Maximum number of blocks the sequencer packs into a single checkpoint, and the maximum indexWithinCheckpoint accepted on inbound block proposals.',
|
|
62
|
+
parseEnv: (val: string) => parseInt(val, 10),
|
|
63
|
+
defaultValue: DEFAULT_MAX_BLOCKS_PER_CHECKPOINT,
|
|
36
64
|
},
|
|
37
65
|
};
|
|
@@ -38,7 +38,8 @@ export class CompleteAddress {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/** Size in bytes of an instance */
|
|
41
|
-
|
|
41
|
+
// address (1 Fr) + publicKeys (1 Fr hash + 1 Point + 4 Fr hashes = 7 Fr) + partialAddress (1 Fr) = 9 Fr
|
|
42
|
+
static readonly SIZE_IN_BYTES = 32 * 9;
|
|
42
43
|
|
|
43
44
|
static get schema() {
|
|
44
45
|
return hexSchemaFor(CompleteAddress);
|
|
@@ -54,8 +55,11 @@ export class CompleteAddress {
|
|
|
54
55
|
|
|
55
56
|
static async fromSecretKeyAndPartialAddress(secretKey: Fr, partialAddress: Fr): Promise<CompleteAddress> {
|
|
56
57
|
const { publicKeys } = await deriveKeys(secretKey);
|
|
57
|
-
|
|
58
|
+
return await this.fromPublicKeysAndPartialAddress(publicKeys, partialAddress);
|
|
59
|
+
}
|
|
58
60
|
|
|
61
|
+
static async fromPublicKeysAndPartialAddress(publicKeys: PublicKeys, partialAddress: Fr): Promise<CompleteAddress> {
|
|
62
|
+
const address = await computeAddress(publicKeys, partialAddress);
|
|
59
63
|
return new CompleteAddress(address, publicKeys, partialAddress);
|
|
60
64
|
}
|
|
61
65
|
|
|
@@ -87,7 +91,7 @@ export class CompleteAddress {
|
|
|
87
91
|
* @returns A readable string representation of the complete address.
|
|
88
92
|
*/
|
|
89
93
|
public toReadableString(): string {
|
|
90
|
-
return `Address: ${this.address.toString()}\
|
|
94
|
+
return `Address: ${this.address.toString()}\nNpkM hash: ${this.publicKeys.npkMHash.toString()}\nIvpkM: ${this.publicKeys.ivpkM.toString()}\nOvpkM hash: ${this.publicKeys.ovpkMHash.toString()}\nTpkM hash: ${this.publicKeys.tpkMHash.toString()}\nMspkM hash: ${this.publicKeys.mspkMHash.toString()}\nFbpkM hash: ${this.publicKeys.fbpkMHash.toString()}\nPartial Address: ${this.partialAddress.toString()}\n`;
|
|
91
95
|
}
|
|
92
96
|
|
|
93
97
|
/**
|
|
@@ -13,9 +13,9 @@ import type { ContractInstance } from './interfaces/contract_instance.js';
|
|
|
13
13
|
/**
|
|
14
14
|
* Returns the deployment address for a given contract instance.
|
|
15
15
|
* ```
|
|
16
|
-
* salted_initialization_hash =
|
|
17
|
-
* partial_address =
|
|
18
|
-
* address = ((
|
|
16
|
+
* salted_initialization_hash = poseidon2(DOM_SEP__SALTED_INITIALIZATION_HASH, [salt, initialization_hash, deployer, immutables_hash])
|
|
17
|
+
* partial_address = poseidon2(DOM_SEP__PARTIAL_ADDRESS, [contract_class_id, salted_initialization_hash])
|
|
18
|
+
* address = ((poseidon2(DOM_SEP__CONTRACT_ADDRESS_V2, [public_keys_hash, partial_address]) * G) + ivpk_m).x <- the x-coordinate of the address point
|
|
19
19
|
* ```
|
|
20
20
|
* @param instance - A contract instance for which to calculate the deployment address.
|
|
21
21
|
*/
|
|
@@ -34,7 +34,7 @@ export async function computeContractAddressFromInstance(
|
|
|
34
34
|
*/
|
|
35
35
|
export async function computePartialAddress(
|
|
36
36
|
instance:
|
|
37
|
-
| Pick<ContractInstance, 'originalContractClassId' | 'initializationHash' | 'salt' | 'deployer'>
|
|
37
|
+
| Pick<ContractInstance, 'originalContractClassId' | 'initializationHash' | 'salt' | 'deployer' | 'immutablesHash'>
|
|
38
38
|
| { originalContractClassId: Fr; saltedInitializationHash: Fr },
|
|
39
39
|
): Promise<Fr> {
|
|
40
40
|
const saltedInitializationHash =
|
|
@@ -53,11 +53,11 @@ export async function computePartialAddress(
|
|
|
53
53
|
* @param instance - Contract instance for which to compute the salted initialization hash.
|
|
54
54
|
*/
|
|
55
55
|
export function computeSaltedInitializationHash(
|
|
56
|
-
instance: Pick<ContractInstance, 'initializationHash' | 'salt' | 'deployer'>,
|
|
56
|
+
instance: Pick<ContractInstance, 'initializationHash' | 'salt' | 'deployer' | 'immutablesHash'>,
|
|
57
57
|
): Promise<Fr> {
|
|
58
58
|
return poseidon2HashWithSeparator(
|
|
59
|
-
[instance.salt, instance.initializationHash, instance.deployer],
|
|
60
|
-
DomainSeparator.
|
|
59
|
+
[instance.salt, instance.initializationHash, instance.deployer, instance.immutablesHash],
|
|
60
|
+
DomainSeparator.SALTED_INITIALIZATION_HASH,
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -13,10 +13,10 @@ import { computePrivateFunctionsRoot } from './private_function.js';
|
|
|
13
13
|
*
|
|
14
14
|
* ```
|
|
15
15
|
* version = 1
|
|
16
|
-
* private_function_leaves = private_functions.map(fn =>
|
|
16
|
+
* private_function_leaves = private_functions.map(fn => poseidon2(DOM_SEP__PRIVATE_FUNCTION_LEAF, [fn.function_selector as Field, fn.vk_hash]))
|
|
17
17
|
* private_functions_root = merkleize(private_function_leaves)
|
|
18
18
|
* bytecode_commitment = calculate_commitment(packed_bytecode)
|
|
19
|
-
* contract_class_id =
|
|
19
|
+
* contract_class_id = poseidon2(DOM_SEP__CONTRACT_CLASS_ID, [version, artifact_hash, private_functions_root, bytecode_commitment])
|
|
20
20
|
* ```
|
|
21
21
|
* @param contractClass - Contract class.
|
|
22
22
|
* @returns The identifier.
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from './contract_address.js';
|
|
21
21
|
import type { ContractInstance, ContractInstanceWithAddress } from './interfaces/contract_instance.js';
|
|
22
22
|
|
|
23
|
-
const VERSION =
|
|
23
|
+
const VERSION = 2 as const;
|
|
24
24
|
|
|
25
25
|
export type ContractInstantiationData = {
|
|
26
26
|
constructorArtifact?: FunctionAbi | string;
|
|
@@ -29,6 +29,7 @@ export type ContractInstantiationData = {
|
|
|
29
29
|
salt: Fr;
|
|
30
30
|
publicKeys?: PublicKeys;
|
|
31
31
|
deployer?: AztecAddress;
|
|
32
|
+
immutablesHash?: Fr;
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
export class SerializableContractInstance {
|
|
@@ -38,6 +39,7 @@ export class SerializableContractInstance {
|
|
|
38
39
|
public readonly currentContractClassId: Fr;
|
|
39
40
|
public readonly originalContractClassId: Fr;
|
|
40
41
|
public readonly initializationHash: Fr;
|
|
42
|
+
public readonly immutablesHash: Fr;
|
|
41
43
|
public readonly publicKeys: PublicKeys;
|
|
42
44
|
|
|
43
45
|
constructor(instance: ContractInstance) {
|
|
@@ -49,6 +51,7 @@ export class SerializableContractInstance {
|
|
|
49
51
|
this.currentContractClassId = instance.currentContractClassId;
|
|
50
52
|
this.originalContractClassId = instance.originalContractClassId;
|
|
51
53
|
this.initializationHash = instance.initializationHash;
|
|
54
|
+
this.immutablesHash = instance.immutablesHash;
|
|
52
55
|
this.publicKeys = instance.publicKeys;
|
|
53
56
|
}
|
|
54
57
|
|
|
@@ -60,6 +63,7 @@ export class SerializableContractInstance {
|
|
|
60
63
|
this.currentContractClassId,
|
|
61
64
|
this.originalContractClassId,
|
|
62
65
|
this.initializationHash,
|
|
66
|
+
this.immutablesHash,
|
|
63
67
|
this.publicKeys,
|
|
64
68
|
);
|
|
65
69
|
}
|
|
@@ -78,6 +82,7 @@ export class SerializableContractInstance {
|
|
|
78
82
|
currentContractClassId: reader.readObject(Fr),
|
|
79
83
|
originalContractClassId: reader.readObject(Fr),
|
|
80
84
|
initializationHash: reader.readObject(Fr),
|
|
85
|
+
immutablesHash: reader.readObject(Fr),
|
|
81
86
|
publicKeys: reader.readObject(PublicKeys),
|
|
82
87
|
});
|
|
83
88
|
}
|
|
@@ -90,6 +95,7 @@ export class SerializableContractInstance {
|
|
|
90
95
|
currentContractClassId: Fr.random(),
|
|
91
96
|
originalContractClassId: Fr.random(),
|
|
92
97
|
initializationHash: Fr.random(),
|
|
98
|
+
immutablesHash: Fr.random(),
|
|
93
99
|
publicKeys: await PublicKeys.random(),
|
|
94
100
|
...opts,
|
|
95
101
|
});
|
|
@@ -103,6 +109,7 @@ export class SerializableContractInstance {
|
|
|
103
109
|
currentContractClassId: Fr.zero(),
|
|
104
110
|
originalContractClassId: Fr.zero(),
|
|
105
111
|
initializationHash: Fr.zero(),
|
|
112
|
+
immutablesHash: Fr.zero(),
|
|
106
113
|
publicKeys: PublicKeys.default(),
|
|
107
114
|
});
|
|
108
115
|
}
|
|
@@ -130,15 +137,17 @@ export async function getContractInstanceFromInstantiationParams(
|
|
|
130
137
|
)
|
|
131
138
|
: await computeInitializationHash(constructorArtifact, args);
|
|
132
139
|
const publicKeys = opts.publicKeys ?? PublicKeys.default();
|
|
140
|
+
const immutablesHash = opts.immutablesHash ?? Fr.ZERO;
|
|
133
141
|
|
|
134
142
|
const instance: ContractInstance = {
|
|
135
143
|
currentContractClassId: contractClass.id,
|
|
136
144
|
originalContractClassId: contractClass.id,
|
|
137
145
|
initializationHash,
|
|
146
|
+
immutablesHash,
|
|
138
147
|
publicKeys,
|
|
139
148
|
salt: opts.salt,
|
|
140
149
|
deployer,
|
|
141
|
-
version:
|
|
150
|
+
version: 2,
|
|
142
151
|
};
|
|
143
152
|
|
|
144
153
|
return { ...instance, address: await computeContractAddressFromInstance(instance) };
|
package/src/contract/index.ts
CHANGED
|
@@ -6,8 +6,6 @@ export * from './contract_deployment_data.js';
|
|
|
6
6
|
export * from './contract_instance.js';
|
|
7
7
|
export * from './contract_instance_update.js';
|
|
8
8
|
export * from './private_function.js';
|
|
9
|
-
export * from './private_function_membership_proof.js';
|
|
10
|
-
export * from './utility_function_membership_proof.js';
|
|
11
9
|
export * from './interfaces/index.js';
|
|
12
10
|
export * from './contract_function_dao.js';
|
|
13
11
|
export * from './partial_address.js';
|