@aztec/stdlib 0.0.1-commit.96bb3f7 → 0.0.1-commit.993d240
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 +6 -45
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +17 -70
- package/dest/abi/encoder.d.ts +1 -1
- package/dest/abi/encoder.d.ts.map +1 -1
- package/dest/abi/encoder.js +64 -7
- package/dest/abi/event_metadata_definition.d.ts +3 -1
- package/dest/abi/event_metadata_definition.d.ts.map +1 -1
- package/dest/abi/event_metadata_definition.js +1 -1
- 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 +30 -10
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_call.js +20 -3
- package/dest/abi/function_selector.d.ts +3 -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 +20 -1
- package/dest/abi/utils.d.ts.map +1 -1
- package/dest/abi/utils.js +22 -0
- package/dest/auth_witness/auth_witness.d.ts +3 -2
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/auth_witness/auth_witness.js +3 -3
- package/dest/avm/avm.d.ts +1777 -10484
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +6 -3
- package/dest/avm/avm_accumulated_data.d.ts +50 -87
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.d.ts +185 -937
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_proving_request.d.ts +824 -5617
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.d.ts +13 -1
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +13 -1
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/message_pack.js +12 -3
- package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
- package/dest/avm/public_data_read.d.ts +10 -1
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.d.ts +10 -1
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_write.d.ts +12 -12
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_inner_call_request.d.ts +4 -1
- package/dest/avm/public_inner_call_request.d.ts.map +1 -1
- package/dest/avm/revert_code.d.ts +9 -10
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +13 -21
- 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 +27 -0
- package/dest/block/block_data.d.ts.map +1 -0
- package/dest/block/block_data.js +12 -0
- package/dest/block/block_hash.d.ts +20 -15
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +23 -20
- package/dest/block/block_parameter.d.ts +38 -4
- package/dest/block/block_parameter.d.ts.map +1 -1
- package/dest/block/block_parameter.js +55 -2
- package/dest/block/body.d.ts +1 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +2 -1
- package/dest/block/in_block.d.ts +9 -28
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/in_block.js +5 -5
- package/dest/block/index.d.ts +2 -4
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +1 -3
- package/dest/block/l2_block.d.ts +64 -87
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +73 -109
- 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 +220 -322
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +69 -2
- package/dest/block/l2_block_stream/interfaces.d.ts +14 -8
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +6 -3
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +80 -40
- 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 +6 -3
- 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 +7 -11
- package/dest/block/validate_block_result.d.ts +1 -1
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +5 -4
- package/dest/checkpoint/checkpoint.d.ts +61 -102
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +53 -17
- package/dest/checkpoint/checkpoint_data.d.ts +97 -0
- package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint_data.js +38 -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 +6 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +5 -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 +55 -190
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/published_checkpoint.js +5 -5
- package/dest/checkpoint/validate.d.ts +36 -0
- package/dest/checkpoint/validate.d.ts.map +1 -0
- package/dest/checkpoint/validate.js +120 -0
- 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/index.d.ts +3 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +2 -0
- package/dest/config/node-rpc-config.js +1 -1
- package/dest/config/pipelining-config.d.ts +15 -0
- package/dest/config/pipelining-config.d.ts.map +1 -0
- package/dest/config/pipelining-config.js +18 -0
- package/dest/config/sequencer-config.d.ts +14 -0
- package/dest/config/sequencer-config.d.ts.map +1 -0
- package/dest/config/sequencer-config.js +38 -0
- package/dest/contract/complete_address.d.ts +6 -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 +9 -8
- package/dest/contract/contract_class.d.ts +2 -3
- package/dest/contract/contract_class.d.ts.map +1 -1
- package/dest/contract/contract_class_id.d.ts +3 -3
- package/dest/contract/contract_class_id.d.ts.map +1 -1
- package/dest/contract/contract_class_id.js +7 -6
- package/dest/contract/contract_deployment_data.d.ts +18 -64
- 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 -5
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +0 -4
- 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/node-info.d.ts +3 -1
- package/dest/contract/interfaces/node-info.d.ts.map +1 -1
- package/dest/contract/interfaces/node-info.js +2 -1
- package/dest/contract/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 +5 -8
- package/dest/database-version/database_version.d.ts +52 -0
- package/dest/database-version/database_version.d.ts.map +1 -0
- package/dest/database-version/database_version.js +69 -0
- package/dest/database-version/version_manager.d.ts +8 -50
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +13 -67
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.js +7 -10
- package/dest/deserialization/index.d.ts +11 -0
- package/dest/deserialization/index.d.ts.map +1 -0
- package/dest/deserialization/index.js +10 -0
- package/dest/epoch-helpers/index.d.ts +16 -18
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +23 -3
- package/dest/errors/proving_error.d.ts +2 -2
- package/dest/errors/proving_error.d.ts.map +1 -1
- 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/file-store/local.d.ts +3 -3
- package/dest/file-store/local.d.ts.map +1 -1
- package/dest/file-store/local.js +13 -4
- package/dest/file-store/s3.d.ts +1 -1
- package/dest/file-store/s3.d.ts.map +1 -1
- package/dest/file-store/s3.js +11 -3
- package/dest/gas/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 +20 -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 +72 -0
- package/dest/ha-signing/config.d.ts.map +1 -0
- package/dest/ha-signing/config.js +88 -0
- package/dest/ha-signing/index.d.ts +4 -0
- package/dest/ha-signing/index.d.ts.map +1 -0
- package/dest/ha-signing/index.js +3 -0
- package/dest/ha-signing/local_config.d.ts +32 -0
- package/dest/ha-signing/local_config.d.ts.map +1 -0
- package/dest/ha-signing/local_config.js +24 -0
- package/dest/ha-signing/types.d.ts +90 -0
- package/dest/ha-signing/types.d.ts.map +1 -0
- package/dest/ha-signing/types.js +39 -0
- package/dest/hash/hash.d.ts +35 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +78 -11
- package/dest/hash/map_slot.d.ts +1 -1
- package/dest/hash/map_slot.d.ts.map +1 -1
- package/dest/hash/map_slot.js +4 -3
- package/dest/interfaces/allowed_element.d.ts +17 -35
- package/dest/interfaces/allowed_element.d.ts.map +1 -1
- package/dest/interfaces/allowed_element.js +8 -8
- package/dest/interfaces/api_limit.d.ts +2 -1
- package/dest/interfaces/api_limit.d.ts.map +1 -1
- package/dest/interfaces/api_limit.js +1 -0
- package/dest/interfaces/archiver.d.ts +22 -32
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +209 -61
- package/dest/interfaces/aztec-node-admin.d.ts +111 -230
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +68 -17
- 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 +111 -131
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +300 -76
- package/dest/interfaces/block-builder.d.ts +55 -18
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +16 -2
- 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 +75 -119
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +18 -3
- 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 -25
- 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 +13 -22
- 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 +18 -13
- 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-broker.d.ts +16 -1
- package/dest/interfaces/prover-broker.d.ts.map +1 -1
- package/dest/interfaces/prover-broker.js +4 -1
- package/dest/interfaces/prover-client.d.ts +19 -21
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-client.js +18 -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 +751 -5802
- 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 +27 -59
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +10 -4
- package/dest/interfaces/tx_provider.d.ts +8 -3
- package/dest/interfaces/tx_provider.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +95 -131
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +16 -5
- package/dest/interfaces/world_state.d.ts +6 -5
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +3 -3
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.js +29 -16
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +4 -4
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.js +28 -17
- package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
- package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_transient_data_hints.js +9 -3
- package/dest/kernel/hints/index.d.ts +2 -2
- package/dest/kernel/hints/index.js +2 -2
- package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +12 -7
- 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/hints/key_validation_request_and_separator.d.ts +24 -0
- package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
- package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/read_request.d.ts +7 -1
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request_hints.d.ts +7 -1
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
- package/dest/kernel/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_accumulated_data.d.ts +23 -1
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.d.ts +25 -1
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_request.d.ts +16 -1
- package/dest/kernel/private_call_request.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +82 -9
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +16 -16
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +34 -4
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
- package/dest/kernel/private_kernel_data.d.ts +7 -1
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_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_init_circuit_private_inputs.d.ts +22 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_inner_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_inner_circuit_private_inputs.d.ts +7 -1
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_prover_output.d.ts +3 -29
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +12 -3
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +34 -8
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +32 -13
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +26 -70
- 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 +7 -6
- 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 +13 -9
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +21 -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 +22 -6
- 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 +13 -9
- package/dest/kernel/private_validation_requests.d.ts +13 -4
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +9 -9
- package/dest/kernel/public_call_request.d.ts +36 -30
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +16 -7
- package/dest/kernel/utils/optional_number.d.ts +7 -1
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/keys/derivation.d.ts +9 -5
- package/dest/keys/derivation.d.ts.map +1 -1
- package/dest/keys/derivation.js +28 -18
- package/dest/keys/key_types.d.ts +3 -3
- package/dest/keys/key_types.d.ts.map +1 -1
- package/dest/keys/public_key.d.ts +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 +56 -79
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +102 -74
- package/dest/keys/utils.d.ts +1 -1
- package/dest/keys/utils.d.ts.map +1 -1
- package/dest/keys/utils.js +8 -4
- package/dest/kv-store/config.d.ts +14 -0
- package/dest/kv-store/config.d.ts.map +1 -0
- package/dest/kv-store/config.js +21 -0
- package/dest/kv-store/index.d.ts +2 -0
- package/dest/kv-store/index.d.ts.map +1 -0
- package/dest/kv-store/index.js +1 -0
- 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 +6 -0
- package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -0
- package/dest/logs/app_tagging_secret_kind.js +4 -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/debug_log_store.d.ts +30 -0
- package/dest/logs/debug_log_store.d.ts.map +1 -0
- package/dest/logs/debug_log_store.js +30 -0
- package/dest/logs/index.d.ts +9 -7
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +8 -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 +4 -7
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/message_context.js +23 -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 +14 -22
- 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 +8 -13
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +6 -3
- package/dest/logs/public_log.d.ts +4 -3
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +2 -1
- 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 +12 -9
- package/dest/logs/siloed_tag.d.ts.map +1 -1
- package/dest/logs/siloed_tag.js +18 -6
- package/dest/logs/tag.d.ts +5 -6
- package/dest/logs/tag.d.ts.map +1 -1
- package/dest/logs/tag.js +5 -1
- package/dest/logs/tagging_index_range.d.ts +22 -0
- package/dest/logs/tagging_index_range.d.ts.map +1 -0
- package/dest/logs/tagging_index_range.js +8 -0
- 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/inbox_leaf.d.ts +3 -1
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- 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_actor.d.ts +7 -1
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.d.ts +8 -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_actor.d.ts +7 -1
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +64 -8
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +122 -32
- 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/messaging/out_hash.d.ts +41 -4
- package/dest/messaging/out_hash.d.ts.map +1 -1
- package/dest/messaging/out_hash.js +52 -26
- package/dest/noir/index.d.ts +5 -3
- package/dest/noir/index.d.ts.map +1 -1
- package/dest/note/index.d.ts +1 -2
- package/dest/note/index.d.ts.map +1 -1
- package/dest/note/index.js +0 -1
- package/dest/note/note.d.ts +2 -2
- package/dest/note/note.d.ts.map +1 -1
- package/dest/note/note_dao.d.ts +36 -5
- package/dest/note/note_dao.d.ts.map +1 -1
- package/dest/note/note_dao.js +14 -14
- package/dest/p2p/attestation_utils.d.ts +11 -1
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +45 -0
- package/dest/p2p/block_proposal.d.ts +51 -19
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +77 -43
- package/dest/p2p/checkpoint_attestation.d.ts +20 -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 +65 -26
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/checkpoint_proposal.js +90 -66
- package/dest/p2p/client_type.d.ts +2 -5
- package/dest/p2p/client_type.d.ts.map +1 -1
- package/dest/p2p/client_type.js +0 -7
- package/dest/p2p/consensus_payload.d.ts +35 -19
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +47 -24
- package/dest/p2p/constants.d.ts +5 -0
- package/dest/p2p/constants.d.ts.map +1 -0
- package/dest/p2p/constants.js +3 -0
- package/dest/p2p/gossipable.d.ts +4 -4
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/index.d.ts +2 -2
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +1 -1
- package/dest/p2p/message_validator.d.ts +18 -3
- package/dest/p2p/message_validator.d.ts.map +1 -1
- package/dest/p2p/message_validator.js +2 -1
- package/dest/p2p/peer_error.d.ts +3 -1
- package/dest/p2p/peer_error.d.ts.map +1 -1
- package/dest/p2p/peer_error.js +5 -0
- 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 +17 -13
- package/dest/p2p/signed_txs.d.ts.map +1 -1
- package/dest/p2p/signed_txs.js +32 -25
- package/dest/p2p/topic_type.d.ts +3 -4
- package/dest/p2p/topic_type.d.ts.map +1 -1
- package/dest/p2p/topic_type.js +7 -23
- package/dest/parity/parity_base_private_inputs.d.ts +10 -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 +11 -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 +3 -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 +121 -19
- package/dest/proofs/proof.d.ts +4 -1
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/recursive_proof.d.ts +11 -2
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.d.ts +34 -1
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.d.ts +12 -1
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.d.ts +1 -1
- package/dest/rollup/block_headers_hash.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.js +9 -3
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts +5 -2
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.d.ts +55 -4
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +14 -2
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +69 -6
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.d.ts +10 -1
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.d.ts +31 -4
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +23 -7
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +5 -2
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +53 -11
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +20 -7
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +48 -7
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
- package/dest/rollup/epoch_constant_data.d.ts +16 -1
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/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 +7 -2
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +18 -8
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.js +7 -4
- package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +5 -2
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts +30 -2
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/schemas/schemas.d.ts +33 -79
- 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 +16 -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 +21 -111
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +28 -24
- package/dest/slashing/{tally.d.ts → votes.d.ts} +8 -2
- package/dest/slashing/votes.d.ts.map +1 -0
- package/dest/slashing/{tally.js → votes.js} +35 -3
- package/dest/snapshots/types.d.ts +15 -78
- package/dest/snapshots/types.d.ts.map +1 -1
- package/dest/stats/stats.d.ts +2 -4
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +26 -33
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +99 -100
- package/dest/tests/jest.js +1 -1
- package/dest/tests/mocks.d.ts +31 -17
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +100 -84
- package/dest/timetable/index.d.ts +87 -0
- package/dest/timetable/index.d.ts.map +1 -0
- package/dest/timetable/index.js +243 -0
- package/dest/trees/append_only_tree_snapshot.d.ts +21 -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 +31 -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 +25 -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 +37 -53
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +7 -6
- package/dest/trees/public_data_witness.d.ts +26 -58
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/tx/block_header.d.ts +19 -4
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +16 -5
- package/dest/tx/call_context.d.ts +16 -14
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/capsule.d.ts +10 -3
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/capsule.js +9 -3
- package/dest/tx/execution_payload.d.ts +9 -1
- package/dest/tx/execution_payload.d.ts.map +1 -1
- 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 +7 -11
- 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 +27 -52
- 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 +10 -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 +6 -18
- 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 +6 -20
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +2 -2
- package/dest/tx/partial_state_reference.d.ts +25 -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 +32 -21
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +7 -7
- package/dest/tx/private_tx_constant_data.d.ts +16 -1
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/profiling.d.ts +115 -278
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +59 -12
- package/dest/tx/protocol_contracts.d.ts +5 -9
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +2 -2
- 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 +10 -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/public_simulation_output.d.ts +4 -2
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +7 -3
- package/dest/tx/simulated_tx.d.ts +68 -1144
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +17 -12
- package/dest/tx/state_reference.d.ts +32 -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 +35 -17
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +46 -32
- 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 +33 -131
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_context.js +6 -6
- package/dest/tx/tx_effect.d.ts +32 -6
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +0 -7
- package/dest/tx/tx_execution_request.d.ts +30 -1
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_hash.d.ts +7 -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 +69 -18
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +58 -29
- package/dest/tx/tx_request.d.ts +6 -1
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/tx_request.js +2 -2
- package/dest/tx/validator/empty_validator.d.ts +2 -2
- package/dest/tx/validator/empty_validator.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.d.ts +11 -2
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +13 -1
- package/dest/tx/validator/tx_validator.d.ts +6 -28
- 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 +7 -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 +4 -2
- package/dest/update-checker/index.d.ts.map +1 -1
- package/dest/update-checker/index.js +3 -1
- package/dest/update-checker/package_version.d.ts +6 -0
- package/dest/update-checker/package_version.d.ts.map +1 -0
- package/dest/update-checker/package_version.js +13 -0
- package/dest/update-checker/version_checker.d.ts +25 -0
- package/dest/update-checker/version_checker.d.ts.map +1 -0
- package/dest/update-checker/version_checker.js +50 -0
- package/dest/validators/errors.d.ts +6 -1
- package/dest/validators/errors.d.ts.map +1 -1
- package/dest/validators/errors.js +7 -0
- package/dest/validators/schemas.d.ts +147 -614
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +9 -6
- package/dest/validators/types.d.ts +21 -4
- 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 -118
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +5 -126
- package/dest/vks/vk_data.d.ts +7 -1
- package/dest/vks/vk_data.d.ts.map +1 -1
- 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 +15 -26
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +7 -1
- package/dest/zkpassport/index.d.ts +3 -4
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/dest/zkpassport/index.js +9 -9
- package/package.json +32 -16
- 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 +36 -82
- package/src/abi/encoder.ts +85 -6
- package/src/abi/event_metadata_definition.ts +2 -0
- package/src/abi/event_selector.ts +2 -8
- package/src/abi/function_call.ts +25 -3
- 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 +44 -0
- package/src/auth_witness/auth_witness.ts +3 -3
- package/src/avm/avm.ts +5 -0
- package/src/avm/message_pack.ts +12 -3
- package/src/avm/revert_code.ts +20 -25
- package/src/aztec-address/index.ts +15 -12
- package/src/block/attestation_info.ts +11 -11
- package/src/block/block_data.ts +25 -0
- package/src/block/block_hash.ts +32 -24
- package/src/block/block_parameter.ts +74 -4
- package/src/block/body.ts +2 -1
- package/src/block/in_block.ts +6 -6
- package/src/block/index.ts +1 -3
- package/src/block/l2_block.ts +112 -148
- package/src/block/l2_block_info.ts +8 -6
- package/src/block/l2_block_source.ts +216 -106
- package/src/block/l2_block_stream/interfaces.ts +14 -7
- package/src/block/l2_block_stream/l2_block_stream.ts +87 -47
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +5 -0
- package/src/block/l2_block_stream/l2_tips_store_base.ts +55 -21
- package/src/block/proposal/attestations_and_signers.ts +32 -17
- package/src/block/test/l2_tips_store_test_suite.ts +14 -12
- package/src/block/validate_block_result.ts +5 -4
- package/src/checkpoint/checkpoint.ts +82 -23
- package/src/checkpoint/checkpoint_data.ts +91 -0
- package/src/checkpoint/checkpoint_reexecution_tracker.ts +167 -0
- package/src/checkpoint/digest.ts +28 -0
- package/src/checkpoint/index.ts +5 -0
- package/src/checkpoint/previous_checkpoint_out_hashes.ts +61 -0
- package/src/checkpoint/published_checkpoint.ts +7 -4
- package/src/checkpoint/validate.ts +230 -0
- package/src/config/chain-config.ts +13 -16
- package/src/config/index.ts +2 -0
- package/src/config/node-rpc-config.ts +1 -1
- package/src/config/pipelining-config.ts +31 -0
- package/src/config/sequencer-config.ts +65 -0
- package/src/contract/complete_address.ts +7 -3
- package/src/contract/contract_address.ts +10 -10
- package/src/contract/contract_class.ts +3 -3
- package/src/contract/contract_class_id.ts +7 -6
- package/src/contract/contract_instance.ts +11 -2
- package/src/contract/index.ts +0 -4
- package/src/contract/interfaces/contract_class.ts +2 -82
- package/src/contract/interfaces/contract_instance.ts +6 -2
- package/src/contract/interfaces/node-info.ts +3 -0
- package/src/contract/private_function.ts +6 -5
- package/src/database-version/database_version.ts +87 -0
- package/src/database-version/version_manager.ts +18 -77
- package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
- package/src/deserialization/index.ts +21 -0
- package/src/epoch-helpers/index.ts +40 -1
- 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/file-store/local.ts +15 -5
- package/src/file-store/s3.ts +12 -3
- 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 +29 -10
- package/src/gas/gas_settings.ts +73 -15
- package/src/gas/index.ts +1 -0
- package/src/ha-signing/config.ts +152 -0
- package/src/ha-signing/index.ts +29 -0
- package/src/ha-signing/local_config.ts +46 -0
- package/src/ha-signing/types.ts +126 -0
- package/src/hash/hash.ts +76 -11
- package/src/hash/map_slot.ts +3 -2
- package/src/interfaces/allowed_element.ts +29 -9
- package/src/interfaces/api_limit.ts +1 -0
- package/src/interfaces/archiver.ts +83 -93
- package/src/interfaces/aztec-node-admin.ts +57 -18
- package/src/interfaces/aztec-node-debug.ts +40 -0
- package/src/interfaces/aztec-node.ts +293 -322
- package/src/interfaces/block-builder.ts +95 -29
- 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 +76 -11
- package/src/interfaces/l1_publish_info.ts +40 -0
- package/src/interfaces/l2_logs_source.ts +13 -26
- package/src/interfaces/merkle_tree_operations.ts +12 -21
- package/src/interfaces/p2p-bootstrap.ts +2 -2
- package/src/interfaces/p2p.ts +38 -29
- package/src/interfaces/private_kernel_prover.ts +88 -0
- package/src/interfaces/prover-agent.ts +1 -1
- package/src/interfaces/prover-broker.ts +22 -0
- package/src/interfaces/prover-client.ts +32 -5
- 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 +21 -10
- package/src/interfaces/tx_provider.ts +8 -2
- package/src/interfaces/validator.ts +87 -38
- package/src/interfaces/world_state.ts +5 -4
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +31 -24
- package/src/kernel/hints/build_nullifier_read_request_hints.ts +32 -32
- package/src/kernel/hints/build_transient_data_hints.ts +17 -2
- package/src/kernel/hints/index.ts +2 -2
- package/src/kernel/hints/key_validation_request.ts +18 -16
- package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
- package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
- package/src/kernel/index.ts +4 -0
- package/src/kernel/log_hash.ts +29 -9
- package/src/kernel/private_circuit_public_inputs.ts +14 -14
- package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
- package/src/kernel/private_kernel_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_private_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +42 -18
- 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 +14 -8
- package/src/kernel/private_to_rollup_accumulated_data.ts +8 -3
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +13 -13
- package/src/kernel/private_validation_requests.ts +8 -8
- package/src/kernel/public_call_request.ts +22 -7
- package/src/keys/derivation.ts +33 -21
- package/src/keys/key_types.ts +6 -2
- package/src/keys/public_key.ts +26 -2
- package/src/keys/public_keys.ts +125 -111
- package/src/keys/utils.ts +8 -4
- package/src/kv-store/config.ts +29 -0
- package/src/kv-store/index.ts +1 -0
- 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 +6 -0
- package/src/logs/contract_class_log.ts +15 -5
- package/src/logs/debug_log_store.ts +54 -0
- package/src/logs/index.ts +8 -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 +17 -7
- 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/public_log.ts +4 -2
- 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 +28 -13
- package/src/logs/tag.ts +9 -9
- package/src/logs/tagging_index_range.ts +18 -0
- 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 +178 -39
- package/src/messaging/l2_to_l1_message.ts +29 -9
- package/src/messaging/out_hash.ts +60 -29
- package/src/noir/index.ts +4 -2
- package/src/note/index.ts +0 -1
- package/src/note/note_dao.ts +17 -15
- package/src/p2p/attestation_utils.ts +56 -0
- package/src/p2p/block_proposal.ts +141 -45
- package/src/p2p/checkpoint_attestation.ts +33 -32
- package/src/p2p/checkpoint_proposal.ts +181 -90
- package/src/p2p/client_type.ts +0 -6
- package/src/p2p/consensus_payload.ts +68 -29
- package/src/p2p/constants.ts +6 -0
- package/src/p2p/gossipable.ts +4 -4
- package/src/p2p/index.ts +1 -1
- package/src/p2p/message_validator.ts +14 -2
- package/src/p2p/peer_error.ts +7 -0
- package/src/p2p/signature_utils.ts +110 -25
- package/src/p2p/signed_txs.ts +52 -29
- package/src/p2p/topic_type.ts +8 -15
- 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 +141 -17
- package/src/rollup/block_headers_hash.ts +12 -3
- package/src/rollup/block_rollup_public_inputs.ts +15 -2
- package/src/rollup/checkpoint_header.ts +22 -2
- package/src/rollup/checkpoint_rollup_public_inputs.ts +26 -10
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
- package/src/rollup/root_rollup_public_inputs.ts +11 -8
- package/src/schemas/schemas.ts +6 -1
- package/src/slashing/helpers.ts +21 -9
- package/src/slashing/index.ts +1 -2
- package/src/slashing/serialization.ts +1 -81
- package/src/slashing/types.ts +38 -49
- package/src/slashing/{tally.ts → votes.ts} +41 -2
- package/src/stats/stats.ts +4 -2
- package/src/tests/factories.ts +126 -145
- package/src/tests/jest.ts +1 -1
- package/src/tests/mocks.ts +154 -112
- package/src/timetable/index.ts +361 -0
- 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/trees/public_data_leaf.ts +11 -5
- package/src/tx/block_header.ts +26 -7
- 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 +13 -21
- package/src/tx/hashed_values.ts +8 -3
- package/src/tx/index.ts +1 -0
- package/src/tx/indexed_tx_effect.ts +2 -2
- package/src/tx/partial_state_reference.ts +8 -3
- package/src/tx/private_execution_result.ts +6 -6
- package/src/tx/profiling.ts +60 -9
- package/src/tx/protocol_contracts.ts +2 -2
- package/src/tx/proven_tx.ts +6 -0
- package/src/tx/public_call_request_with_calldata.ts +8 -3
- package/src/tx/public_simulation_output.ts +4 -0
- package/src/tx/simulated_tx.ts +30 -22
- package/src/tx/state_reference.ts +9 -4
- package/src/tx/tree_snapshots.ts +9 -4
- package/src/tx/tx.ts +61 -44
- package/src/tx/tx_constant_data.ts +8 -3
- package/src/tx/tx_context.ts +8 -3
- package/src/tx/tx_effect.ts +0 -9
- package/src/tx/tx_hash.ts +20 -5
- package/src/tx/tx_receipt.ts +89 -29
- package/src/tx/tx_request.ts +2 -2
- package/src/tx/validator/empty_validator.ts +1 -1
- package/src/tx/validator/error_texts.ts +16 -1
- package/src/tx/validator/tx_validator.ts +2 -6
- package/src/types/shared.ts +8 -13
- package/src/update-checker/dev_version.ts +2 -0
- package/src/update-checker/index.ts +3 -1
- package/src/update-checker/package_version.ts +17 -0
- package/src/update-checker/version_checker.ts +65 -0
- package/src/validators/errors.ts +9 -0
- package/src/validators/schemas.ts +13 -4
- package/src/validators/types.ts +25 -5
- 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 -1
- package/src/zkpassport/index.ts +11 -12
- 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 -267
- package/dest/block/checkpointed_l2_block.d.ts.map +0 -1
- package/dest/block/checkpointed_l2_block.js +0 -84
- package/dest/block/l2_block_code_to_purge.d.ts +0 -11
- package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
- package/dest/block/l2_block_code_to_purge.js +0 -55
- package/dest/block/l2_block_header.d.ts +0 -94
- package/dest/block/l2_block_header.d.ts.map +0 -1
- package/dest/block/l2_block_header.js +0 -160
- package/dest/block/l2_block_new.d.ts +0 -134
- package/dest/block/l2_block_new.d.ts.map +0 -1
- package/dest/block/l2_block_new.js +0 -155
- package/dest/contract/contract_class_metadata.d.ts +0 -8
- package/dest/contract/contract_class_metadata.d.ts.map +0 -1
- package/dest/contract/contract_class_metadata.js +0 -1
- package/dest/contract/contract_metadata.d.ts +0 -7
- package/dest/contract/contract_metadata.d.ts.map +0 -1
- package/dest/contract/contract_metadata.js +0 -1
- package/dest/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/database-version/index.d.ts +0 -2
- package/dest/database-version/index.d.ts.map +0 -1
- package/dest/database-version/index.js +0 -1
- package/dest/interfaces/get_logs_response.d.ts +0 -90
- package/dest/interfaces/get_logs_response.d.ts.map +0 -1
- package/dest/interfaces/get_logs_response.js +0 -12
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -25
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
- package/dest/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 -157
- package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
- package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
- package/dest/logs/directional_app_tagging_secret.js +0 -64
- package/dest/logs/extended_contract_class_log.d.ts +0 -49
- 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_public_log.d.ts +0 -98
- 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 -78
- package/dest/logs/log_id.d.ts.map +0 -1
- package/dest/logs/log_id.js +0 -91
- 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/note/notes_filter.d.ts +0 -27
- package/dest/note/notes_filter.d.ts.map +0 -1
- package/dest/note/notes_filter.js +0 -11
- package/dest/slashing/empire.d.ts +0 -31
- package/dest/slashing/empire.d.ts.map +0 -1
- package/dest/slashing/empire.js +0 -85
- package/dest/slashing/tally.d.ts.map +0 -1
- package/dest/update-checker/update-checker.d.ts +0 -49
- package/dest/update-checker/update-checker.d.ts.map +0 -1
- package/dest/update-checker/update-checker.js +0 -130
- package/src/abi/mocked_keys.ts +0 -2
- package/src/block/checkpointed_l2_block.ts +0 -120
- package/src/block/l2_block_code_to_purge.ts +0 -80
- package/src/block/l2_block_header.ts +0 -255
- package/src/block/l2_block_new.ts +0 -211
- package/src/contract/contract_class_metadata.ts +0 -8
- package/src/contract/contract_metadata.ts +0 -7
- package/src/contract/private_function_membership_proof.ts +0 -167
- package/src/contract/utility_function_membership_proof.ts +0 -118
- package/src/database-version/index.ts +0 -1
- package/src/interfaces/get_logs_response.ts +0 -35
- package/src/l1-contracts/slash_factory.ts +0 -179
- package/src/logs/directional_app_tagging_secret.ts +0 -79
- 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 -31
- package/src/logs/log_id.ts +0 -121
- package/src/logs/tx_scoped_l2_log.ts +0 -98
- package/src/note/notes_filter.ts +0 -38
- package/src/slashing/empire.ts +0 -102
- package/src/update-checker/update-checker.ts +0 -166
|
@@ -1,46 +1,77 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OUT_HASH_TREE_LEAF_COUNT } from '@aztec/constants';
|
|
2
2
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
3
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import {
|
|
4
|
+
import { computeBalancedShaRoot, computeUnbalancedShaRoot, computeWonkyShaRoot } from '@aztec/foundation/trees';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Computes the out hash of a tx. It's the root of the unbalanced tree of all the L2-to-L1 messages emitted by the tx.
|
|
8
|
+
* @param messages - The L2-to-L1 messages emitted by the tx.
|
|
9
|
+
* @returns The out hash of the tx.
|
|
10
|
+
*/
|
|
6
11
|
export function computeTxOutHash(messages: Fr[]): Fr {
|
|
12
|
+
// Must match the implementation in `tx_base_public_inputs_composer.nr > compute_kernel_out_hash()`
|
|
7
13
|
if (!messages.length) {
|
|
8
14
|
return Fr.ZERO;
|
|
9
15
|
}
|
|
10
|
-
//
|
|
11
|
-
// Zero hashes (which should not happen) are not compressed.
|
|
16
|
+
// It's an unbalanced tree because zero hashes (which should not happen) will be included.
|
|
12
17
|
return Fr.fromBuffer(computeUnbalancedShaRoot(messages.map(msg => msg.toBuffer())));
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Computes the out hash of a block. It's the root of the wonky tree of all the tx out hashes.
|
|
22
|
+
* @param messagesPerTx - The L2-to-L1 messages emitted by the txs in the block. This is an array of message arrays.
|
|
23
|
+
* The array at index 0 contains the messages emitted by the first tx, the array at index 1 contains the messages
|
|
24
|
+
* emitted by the second tx, and so on.
|
|
25
|
+
* @returns The out hash of the block.
|
|
26
|
+
*/
|
|
27
|
+
export function computeBlockOutHash(messagesPerTx: Fr[][]): Fr {
|
|
28
|
+
// See how the tx out hashes are aggregated into a block out hash in `merge_tx_rollups.nr > accumulate_out_hash()`.
|
|
29
|
+
const txOutHashes = messagesPerTx.map(messages => computeTxOutHash(messages));
|
|
30
|
+
return Fr.fromBuffer(computeWonkyShaRoot(txOutHashes.map(hash => hash.toBuffer())));
|
|
18
31
|
}
|
|
19
32
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Computes the out hash of a checkpoint. It's the root of the wonky tree of all the block out hashes.
|
|
35
|
+
* @param messagesPerBlock - The L2-to-L1 messages emitted by the txs in the blocks in the checkpoint. This is an array
|
|
36
|
+
* of arrays of messages. The array at index 0 contains the arrays of messages emitted by the first block, the array at
|
|
37
|
+
* index 1 contains the arrays of messages emitted by the second block, and so on.
|
|
38
|
+
* @returns The out hash of the checkpoint.
|
|
39
|
+
*/
|
|
40
|
+
export function computeCheckpointOutHash(messagesPerBlock: Fr[][][]): Fr {
|
|
41
|
+
// See how the block out hashes are aggregated into a checkpoint out hash in `merge_block_rollups.nr > accumulate_out_hash()`.
|
|
42
|
+
const blockOutHashes = messagesPerBlock.map(block => computeBlockOutHash(block));
|
|
43
|
+
return Fr.fromBuffer(computeWonkyShaRoot(blockOutHashes.map(hash => hash.toBuffer())));
|
|
23
44
|
}
|
|
24
45
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const paddedOutHashes = padArrayEnd(
|
|
35
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Computes the accumulated (epoch) out hash of a checkpoint. It's the root of the balanced tree of all the out hashes
|
|
48
|
+
* from the first checkpoint in an epoch to the current checkpoint.
|
|
49
|
+
* It's this value that's set to the checkpoint header and validated on L1 instead of the checkpoint out hash.
|
|
50
|
+
* @param checkpointOutHashes - The out hashes of all checkpoints in the epoch.
|
|
51
|
+
* @returns The accumulated (epoch) out hash.
|
|
52
|
+
*/
|
|
53
|
+
export function accumulateCheckpointOutHashes(checkpointOutHashes: Fr[]): Fr {
|
|
54
|
+
// See how the checkpoint out hashes are accumulated in `checkpoint_rollup_public_inputs_composer.nr > accumulate_checkpoint_out_hash()`.
|
|
55
|
+
const paddedOutHashes = padArrayEnd(
|
|
56
|
+
checkpointOutHashes.map(hash => hash.toBuffer()),
|
|
57
|
+
Buffer.alloc(32),
|
|
58
|
+
OUT_HASH_TREE_LEAF_COUNT,
|
|
59
|
+
);
|
|
60
|
+
return Fr.fromBuffer(computeBalancedShaRoot(paddedOutHashes));
|
|
36
61
|
}
|
|
37
62
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Computes the epoch out hash. It's the root of the balanced tree of all the checkpoint out hashes.
|
|
65
|
+
* It should match the **accumulated** out hash of the last checkpoint in the epoch.
|
|
66
|
+
* This value will be inserted into the Outbox on L1.
|
|
67
|
+
* @param messagesPerCheckpoint - The L2-to-L1 messages emitted by the txs in the blocks in the checkpoints in the epoch.
|
|
68
|
+
* This is an array of arrays of arrays of messages. The array at index 0 contains the arrays of arrays of messages
|
|
69
|
+
* emitted by the first checkpoint, the array at index 1 contains the arrays of arrays of messages emitted by the second
|
|
70
|
+
* checkpoint, and so on.
|
|
71
|
+
* @returns The epoch out hash.
|
|
72
|
+
*/
|
|
73
|
+
export function computeEpochOutHash(messagesPerCheckpoint: Fr[][][][]): Fr {
|
|
74
|
+
// See how the accumulated out hash is assigned to the root rollup's public inputs in `root_rollup.nr`.
|
|
75
|
+
const checkpointOutHashes = messagesPerCheckpoint.map(checkpoint => computeCheckpointOutHash(checkpoint));
|
|
76
|
+
return accumulateCheckpointOutHashes(checkpointOutHashes);
|
|
46
77
|
}
|
package/src/noir/index.ts
CHANGED
|
@@ -19,7 +19,7 @@ export const AZTEC_VIEW_ATTRIBUTE = 'abi_view';
|
|
|
19
19
|
export interface NoirFunctionAbi {
|
|
20
20
|
/** The parameters of the function. */
|
|
21
21
|
parameters: ABIParameter[];
|
|
22
|
-
/** The return type of the function. */
|
|
22
|
+
/** The return type of the function, or null for void functions. */
|
|
23
23
|
return_type: {
|
|
24
24
|
/**
|
|
25
25
|
* The type of the return value.
|
|
@@ -29,7 +29,7 @@ export interface NoirFunctionAbi {
|
|
|
29
29
|
* The visibility of the return value.
|
|
30
30
|
*/
|
|
31
31
|
visibility: ABIParameterVisibility;
|
|
32
|
-
};
|
|
32
|
+
} | null;
|
|
33
33
|
/** Mapping of error selector => error type */
|
|
34
34
|
error_types: Partial<Record<string, AbiErrorType>>;
|
|
35
35
|
}
|
|
@@ -64,6 +64,8 @@ interface NoirFunctionEntry {
|
|
|
64
64
|
export interface NoirCompiledContract {
|
|
65
65
|
/** The name of the contract. */
|
|
66
66
|
name: string;
|
|
67
|
+
/** The version of the Aztec stack that compiled this contract. */
|
|
68
|
+
aztec_version: string;
|
|
67
69
|
/** Is the contract's public bytecode transpiled? */
|
|
68
70
|
transpiled?: boolean;
|
|
69
71
|
/** The functions of the contract. */
|
package/src/note/index.ts
CHANGED
package/src/note/note_dao.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
2
1
|
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
2
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import { Point } from '@aztec/foundation/curves/grumpkin';
|
|
5
3
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
5
|
import { Note } from '@aztec/stdlib/note';
|
|
@@ -56,8 +54,10 @@ export class NoteDao {
|
|
|
56
54
|
/** The L2 block hash in which the tx with this note was included. Used for note management while processing
|
|
57
55
|
* reorgs.*/
|
|
58
56
|
public l2BlockHash: string,
|
|
59
|
-
/** The index of the
|
|
60
|
-
public
|
|
57
|
+
/** The index of the tx within the block, used for ordering notes. */
|
|
58
|
+
public txIndexInBlock: number,
|
|
59
|
+
/** The index of the note within the tx (based on note hash position), used for ordering notes. */
|
|
60
|
+
public noteIndexInTx: number,
|
|
61
61
|
) {}
|
|
62
62
|
|
|
63
63
|
toBuffer(): Buffer {
|
|
@@ -73,7 +73,8 @@ export class NoteDao {
|
|
|
73
73
|
this.txHash,
|
|
74
74
|
this.l2BlockNumber,
|
|
75
75
|
Fr.fromHexString(this.l2BlockHash),
|
|
76
|
-
this.
|
|
76
|
+
this.txIndexInBlock,
|
|
77
|
+
this.noteIndexInTx,
|
|
77
78
|
]);
|
|
78
79
|
}
|
|
79
80
|
|
|
@@ -91,7 +92,8 @@ export class NoteDao {
|
|
|
91
92
|
const txHash = reader.readObject(TxHash);
|
|
92
93
|
const l2BlockNumber = BlockNumber(reader.readNumber());
|
|
93
94
|
const l2BlockHash = Fr.fromBuffer(reader).toString();
|
|
94
|
-
const
|
|
95
|
+
const txIndexInBlock = reader.readNumber();
|
|
96
|
+
const noteIndexInTx = reader.readNumber();
|
|
95
97
|
|
|
96
98
|
return new NoteDao(
|
|
97
99
|
note,
|
|
@@ -105,7 +107,8 @@ export class NoteDao {
|
|
|
105
107
|
txHash,
|
|
106
108
|
l2BlockNumber,
|
|
107
109
|
l2BlockHash,
|
|
108
|
-
|
|
110
|
+
txIndexInBlock,
|
|
111
|
+
noteIndexInTx,
|
|
109
112
|
);
|
|
110
113
|
}
|
|
111
114
|
|
|
@@ -134,7 +137,8 @@ export class NoteDao {
|
|
|
134
137
|
this.txHash.equals(other.txHash) &&
|
|
135
138
|
this.l2BlockNumber === other.l2BlockNumber &&
|
|
136
139
|
this.l2BlockHash === other.l2BlockHash &&
|
|
137
|
-
this.
|
|
140
|
+
this.txIndexInBlock === other.txIndexInBlock &&
|
|
141
|
+
this.noteIndexInTx === other.noteIndexInTx
|
|
138
142
|
);
|
|
139
143
|
}
|
|
140
144
|
|
|
@@ -143,11 +147,7 @@ export class NoteDao {
|
|
|
143
147
|
* @returns - Its size in bytes.
|
|
144
148
|
*/
|
|
145
149
|
public getSize() {
|
|
146
|
-
|
|
147
|
-
const noteSize = 4 + this.note.items.length * Fr.SIZE_IN_BYTES;
|
|
148
|
-
return (
|
|
149
|
-
noteSize + AztecAddress.SIZE_IN_BYTES * 2 + Fr.SIZE_IN_BYTES * 4 + TxHash.SIZE + Point.SIZE_IN_BYTES + indexSize
|
|
150
|
-
);
|
|
150
|
+
return this.toBuffer().length;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
static async random({
|
|
@@ -162,7 +162,8 @@ export class NoteDao {
|
|
|
162
162
|
txHash = TxHash.random(),
|
|
163
163
|
l2BlockNumber = BlockNumber(Math.floor(Math.random() * 1000)),
|
|
164
164
|
l2BlockHash = Fr.random().toString(),
|
|
165
|
-
|
|
165
|
+
txIndexInBlock = Math.floor(Math.random() * 100),
|
|
166
|
+
noteIndexInTx = Math.floor(Math.random() * 100),
|
|
166
167
|
}: Partial<NoteDao> = {}) {
|
|
167
168
|
return new NoteDao(
|
|
168
169
|
note,
|
|
@@ -176,7 +177,8 @@ export class NoteDao {
|
|
|
176
177
|
txHash,
|
|
177
178
|
l2BlockNumber,
|
|
178
179
|
l2BlockHash,
|
|
179
|
-
|
|
180
|
+
txIndexInBlock,
|
|
181
|
+
noteIndexInTx,
|
|
180
182
|
);
|
|
181
183
|
}
|
|
182
184
|
}
|
|
@@ -33,3 +33,59 @@ export function orderAttestations(
|
|
|
33
33
|
|
|
34
34
|
return orderedAttestations;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Trims attestations to the minimum required number to save L1 calldata gas.
|
|
39
|
+
* Each signature costs 65 bytes of calldata vs 20 bytes for just an address.
|
|
40
|
+
*
|
|
41
|
+
* Priority order for keeping attestations:
|
|
42
|
+
* 1. The proposer's attestation (required by L1 contract - MissingProposerSignature revert)
|
|
43
|
+
* 2. Attestations from the local node's validator keys
|
|
44
|
+
* 3. Remaining attestations filled to reach the required count
|
|
45
|
+
*/
|
|
46
|
+
export function trimAttestations(
|
|
47
|
+
attestations: CheckpointAttestation[],
|
|
48
|
+
required: number,
|
|
49
|
+
proposerAddress: EthAddress,
|
|
50
|
+
localAddresses: EthAddress[],
|
|
51
|
+
): CheckpointAttestation[] {
|
|
52
|
+
if (attestations.length <= required) {
|
|
53
|
+
return attestations;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const proposerAttestation: CheckpointAttestation[] = [];
|
|
57
|
+
const localAttestations: CheckpointAttestation[] = [];
|
|
58
|
+
const otherAttestations: CheckpointAttestation[] = [];
|
|
59
|
+
|
|
60
|
+
for (const attestation of attestations) {
|
|
61
|
+
const sender = attestation.getSender();
|
|
62
|
+
if (!sender) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (sender.equals(proposerAddress)) {
|
|
66
|
+
proposerAttestation.push(attestation);
|
|
67
|
+
} else if (localAddresses.some(addr => addr.equals(sender))) {
|
|
68
|
+
localAttestations.push(attestation);
|
|
69
|
+
} else {
|
|
70
|
+
otherAttestations.push(attestation);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const result: CheckpointAttestation[] = [...proposerAttestation];
|
|
75
|
+
|
|
76
|
+
for (const att of localAttestations) {
|
|
77
|
+
if (result.length >= required) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
result.push(att);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
for (const att of otherAttestations) {
|
|
84
|
+
if (result.length >= required) {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
result.push(att);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
@@ -1,35 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
BlockNumber,
|
|
3
|
+
BlockProposalHash,
|
|
4
|
+
type CheckpointNumber,
|
|
5
|
+
IndexWithinCheckpoint,
|
|
6
|
+
SlotNumber,
|
|
7
|
+
} from '@aztec/foundation/branded-types';
|
|
8
|
+
import { type BaseBuffer32, Buffer32 } from '@aztec/foundation/buffer';
|
|
3
9
|
import { keccak256 } from '@aztec/foundation/crypto/keccak';
|
|
4
|
-
import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
|
|
5
10
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
6
11
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
7
12
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
8
13
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
9
14
|
|
|
15
|
+
import type { TypedDataDefinition } from 'viem';
|
|
16
|
+
|
|
10
17
|
import type { L2Block } from '../block/l2_block.js';
|
|
11
18
|
import type { L2BlockInfo } from '../block/l2_block_info.js';
|
|
19
|
+
import { MAX_TXS_PER_BLOCK } from '../deserialization/index.js';
|
|
20
|
+
import { DutyType, type SigningContext } from '../ha-signing/index.js';
|
|
12
21
|
import { BlockHeader } from '../tx/block_header.js';
|
|
13
22
|
import { TxHash } from '../tx/index.js';
|
|
14
23
|
import type { Tx } from '../tx/tx.js';
|
|
15
24
|
import { Gossipable } from './gossipable.js';
|
|
16
25
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
type CoordinationSignatureContext,
|
|
27
|
+
type CoordinationSignatureType,
|
|
28
|
+
EMPTY_COORDINATION_SIGNATURE_CONTEXT,
|
|
29
|
+
type Signable,
|
|
30
|
+
coordinationSignatureContextEquals,
|
|
31
|
+
getCoordinationSignatureTypedData,
|
|
32
|
+
readCoordinationSignatureContext,
|
|
33
|
+
recoverCoordinationSigner,
|
|
34
|
+
serializeCoordinationSignatureContext,
|
|
20
35
|
} from './signature_utils.js';
|
|
21
36
|
import { SignedTxs } from './signed_txs.js';
|
|
22
37
|
import { TopicType } from './topic_type.js';
|
|
23
38
|
|
|
24
|
-
export
|
|
25
|
-
constructor(hash: Buffer) {
|
|
26
|
-
super(hash);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
39
|
+
export type { BlockProposalHash } from '@aztec/foundation/branded-types';
|
|
29
40
|
|
|
30
41
|
export type BlockProposalOptions = {
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Whether to include the tx objects along with the block proposal.
|
|
44
|
+
* Dramatically increases size of the payload but eliminates failed reexecutions due to missing txs.
|
|
45
|
+
*/
|
|
46
|
+
publishFullTxs?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether to generate an invalid block proposal for broadcasting.
|
|
49
|
+
* Use only for testing.
|
|
50
|
+
*/
|
|
33
51
|
broadcastInvalidBlockProposal?: boolean;
|
|
34
52
|
};
|
|
35
53
|
|
|
@@ -38,19 +56,19 @@ export type BlockProposalOptions = {
|
|
|
38
56
|
* to be included in a block within a checkpoint. This is used for non-last blocks in a slot.
|
|
39
57
|
* The last block is sent as part of a CheckpointProposal.
|
|
40
58
|
*/
|
|
41
|
-
export class BlockProposal extends Gossipable {
|
|
59
|
+
export class BlockProposal extends Gossipable implements Signable {
|
|
42
60
|
static override p2pTopic = TopicType.block_proposal;
|
|
43
61
|
|
|
44
|
-
|
|
62
|
+
readonly primaryType: CoordinationSignatureType = 'BlockProposal';
|
|
63
|
+
|
|
64
|
+
private cachedSender: EthAddress | undefined | null = undefined;
|
|
45
65
|
|
|
46
66
|
constructor(
|
|
47
67
|
/** The per-block header containing block state and global variables */
|
|
48
68
|
public readonly blockHeader: BlockHeader,
|
|
49
69
|
|
|
50
|
-
// TODO(palla/mbps): Is this really needed? Can we just derive it from the indexWithinCheckpoint of the parent block and the slot number?
|
|
51
|
-
// See the block-proposal-handler, we have a lot of extra validations to check this is correct, so maybe we can avoid storing it here.
|
|
52
70
|
/** Index of this block within the checkpoint (0-indexed) */
|
|
53
|
-
public readonly indexWithinCheckpoint:
|
|
71
|
+
public readonly indexWithinCheckpoint: IndexWithinCheckpoint,
|
|
54
72
|
|
|
55
73
|
/** Hash of L1 to L2 messages for this checkpoint (constant across all blocks in checkpoint) */
|
|
56
74
|
public readonly inHash: Fr,
|
|
@@ -64,14 +82,17 @@ export class BlockProposal extends Gossipable {
|
|
|
64
82
|
/** The proposer's signature over the block data */
|
|
65
83
|
public readonly signature: Signature,
|
|
66
84
|
|
|
85
|
+
/** The signing domain (chainId + rollupAddress) the signature is bound to */
|
|
86
|
+
public readonly signatureContext: CoordinationSignatureContext,
|
|
87
|
+
|
|
67
88
|
/** The signed transactions in the block (optional, for DA guarantees) */
|
|
68
89
|
public readonly signedTxs?: SignedTxs,
|
|
69
90
|
) {
|
|
70
91
|
super();
|
|
71
92
|
}
|
|
72
93
|
|
|
73
|
-
override generateP2PMessageIdentifier(): Promise<
|
|
74
|
-
return Promise.resolve(new
|
|
94
|
+
override generateP2PMessageIdentifier(): Promise<BaseBuffer32> {
|
|
95
|
+
return Promise.resolve(new Buffer32(this.getPayloadHashBuffer()));
|
|
75
96
|
}
|
|
76
97
|
|
|
77
98
|
get archive(): Fr {
|
|
@@ -105,9 +126,8 @@ export class BlockProposal extends Gossipable {
|
|
|
105
126
|
* Get the payload to sign for this block proposal.
|
|
106
127
|
* The signature is over: blockHeader + indexWithinCheckpoint + inHash + archiveRoot + txHashes
|
|
107
128
|
*/
|
|
108
|
-
getPayloadToSign(
|
|
129
|
+
getPayloadToSign(): Buffer {
|
|
109
130
|
return serializeToBuffer([
|
|
110
|
-
domainSeparator,
|
|
111
131
|
this.blockHeader,
|
|
112
132
|
this.indexWithinCheckpoint,
|
|
113
133
|
this.inHash,
|
|
@@ -117,14 +137,32 @@ export class BlockProposal extends Gossipable {
|
|
|
117
137
|
]);
|
|
118
138
|
}
|
|
119
139
|
|
|
140
|
+
private getPayloadHashBuffer(): Buffer {
|
|
141
|
+
return keccak256(this.getPayloadToSign());
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Returns a keccak256 hash of the signed payload.
|
|
146
|
+
* Used by the attestation pool to dedup distinct signed payloads at the same
|
|
147
|
+
* (slot, indexWithinCheckpoint) regardless of archive collisions.
|
|
148
|
+
* The hash deliberately excludes the signature so non-deterministic ECDSA
|
|
149
|
+
* re-signs of the same payload do not look like equivocation.
|
|
150
|
+
*/
|
|
151
|
+
getPayloadHash(): BlockProposalHash {
|
|
152
|
+
return BlockProposalHash.fromBuffer(this.getPayloadHashBuffer());
|
|
153
|
+
}
|
|
154
|
+
|
|
120
155
|
static async createProposalFromSigner(
|
|
121
156
|
blockHeader: BlockHeader,
|
|
122
|
-
|
|
157
|
+
checkpointNumber: CheckpointNumber,
|
|
158
|
+
indexWithinCheckpoint: IndexWithinCheckpoint,
|
|
123
159
|
inHash: Fr,
|
|
124
160
|
archiveRoot: Fr,
|
|
125
161
|
txHashes: TxHash[],
|
|
126
162
|
txs: Tx[] | undefined,
|
|
127
|
-
|
|
163
|
+
signatureContext: CoordinationSignatureContext,
|
|
164
|
+
proposalSigner: (typedData: TypedDataDefinition, context: SigningContext) => Promise<Signature>,
|
|
165
|
+
txsSigner?: (typedData: TypedDataDefinition, context: SigningContext) => Promise<Signature>,
|
|
128
166
|
): Promise<BlockProposal> {
|
|
129
167
|
// Create a temporary proposal to get the payload to sign
|
|
130
168
|
const tempProposal = new BlockProposal(
|
|
@@ -134,47 +172,76 @@ export class BlockProposal extends Gossipable {
|
|
|
134
172
|
archiveRoot,
|
|
135
173
|
txHashes,
|
|
136
174
|
Signature.empty(),
|
|
175
|
+
signatureContext,
|
|
137
176
|
);
|
|
138
177
|
|
|
139
|
-
|
|
140
|
-
const
|
|
178
|
+
// Create the block signing context
|
|
179
|
+
const blockContext: SigningContext = {
|
|
180
|
+
slot: blockHeader.globalVariables.slotNumber,
|
|
181
|
+
blockNumber: blockHeader.globalVariables.blockNumber,
|
|
182
|
+
checkpointNumber,
|
|
183
|
+
blockIndexWithinCheckpoint: indexWithinCheckpoint,
|
|
184
|
+
dutyType: DutyType.BLOCK_PROPOSAL,
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const typedData = getCoordinationSignatureTypedData(tempProposal);
|
|
188
|
+
const sig = await proposalSigner(typedData, blockContext);
|
|
141
189
|
|
|
142
190
|
// If txs are provided, sign them as well
|
|
143
191
|
let signedTxs: SignedTxs | undefined;
|
|
144
192
|
if (txs) {
|
|
145
|
-
|
|
193
|
+
const txsSigningContext: SigningContext = { dutyType: DutyType.TXS };
|
|
194
|
+
if (!txsSigner) {
|
|
195
|
+
throw new Error('signed_txs requires a typed-data signer');
|
|
196
|
+
}
|
|
197
|
+
signedTxs = await SignedTxs.createFromSigner(txs, signatureContext, typedData =>
|
|
198
|
+
txsSigner(typedData, txsSigningContext),
|
|
199
|
+
);
|
|
146
200
|
}
|
|
147
201
|
|
|
148
|
-
return new BlockProposal(
|
|
202
|
+
return new BlockProposal(
|
|
203
|
+
blockHeader,
|
|
204
|
+
indexWithinCheckpoint,
|
|
205
|
+
inHash,
|
|
206
|
+
archiveRoot,
|
|
207
|
+
txHashes,
|
|
208
|
+
sig,
|
|
209
|
+
signatureContext,
|
|
210
|
+
signedTxs,
|
|
211
|
+
);
|
|
149
212
|
}
|
|
150
213
|
|
|
151
214
|
/**
|
|
152
215
|
* Lazily evaluate the sender of the proposal; result is cached.
|
|
153
|
-
* If there's signedTxs, also verifies
|
|
154
|
-
*
|
|
216
|
+
* If there's signedTxs, also verifies that its signing domain matches this proposal's and
|
|
217
|
+
* that the signedTxs sender matches the block proposal sender. This prevents a proposer
|
|
218
|
+
* from wrapping a foreign-chain SignedTxs bundle inside a local-chain proposal.
|
|
219
|
+
* @returns The sender address, or undefined if signature recovery fails or inner/outer mismatch
|
|
155
220
|
*/
|
|
156
221
|
getSender(): EthAddress | undefined {
|
|
157
|
-
if (
|
|
158
|
-
const
|
|
159
|
-
const blockSender = tryRecoverAddress(hashed, this.signature);
|
|
222
|
+
if (this.cachedSender === undefined) {
|
|
223
|
+
const blockSender = recoverCoordinationSigner(this, this.signature);
|
|
160
224
|
|
|
161
|
-
// If there's signedTxs, verify the sender matches
|
|
162
225
|
if (blockSender && this.signedTxs) {
|
|
226
|
+
if (!coordinationSignatureContextEquals(this.signedTxs.signatureContext, this.signatureContext)) {
|
|
227
|
+
this.cachedSender = null;
|
|
228
|
+
return undefined;
|
|
229
|
+
}
|
|
163
230
|
const txsSender = this.signedTxs.getSender();
|
|
164
231
|
if (!txsSender || !txsSender.equals(blockSender)) {
|
|
165
|
-
|
|
232
|
+
this.cachedSender = null;
|
|
233
|
+
return undefined;
|
|
166
234
|
}
|
|
167
235
|
}
|
|
168
236
|
|
|
169
|
-
|
|
170
|
-
this.sender = blockSender;
|
|
237
|
+
this.cachedSender = blockSender ?? null;
|
|
171
238
|
}
|
|
172
239
|
|
|
173
|
-
return this.
|
|
240
|
+
return this.cachedSender ?? undefined;
|
|
174
241
|
}
|
|
175
242
|
|
|
176
243
|
getPayload() {
|
|
177
|
-
return this.getPayloadToSign(
|
|
244
|
+
return this.getPayloadToSign();
|
|
178
245
|
}
|
|
179
246
|
|
|
180
247
|
toBuffer(): Buffer {
|
|
@@ -184,6 +251,7 @@ export class BlockProposal extends Gossipable {
|
|
|
184
251
|
this.inHash,
|
|
185
252
|
this.archiveRoot,
|
|
186
253
|
this.signature,
|
|
254
|
+
serializeCoordinationSignatureContext(this.signatureContext),
|
|
187
255
|
this.txHashes.length,
|
|
188
256
|
this.txHashes,
|
|
189
257
|
];
|
|
@@ -200,11 +268,16 @@ export class BlockProposal extends Gossipable {
|
|
|
200
268
|
const reader = BufferReader.asReader(buf);
|
|
201
269
|
|
|
202
270
|
const blockHeader = reader.readObject(BlockHeader);
|
|
203
|
-
const indexWithinCheckpoint = reader.readNumber();
|
|
271
|
+
const indexWithinCheckpoint = IndexWithinCheckpoint(reader.readNumber());
|
|
204
272
|
const inHash = reader.readObject(Fr);
|
|
205
273
|
const archiveRoot = reader.readObject(Fr);
|
|
206
274
|
const signature = reader.readObject(Signature);
|
|
207
|
-
const
|
|
275
|
+
const signatureContext = readCoordinationSignatureContext(reader);
|
|
276
|
+
const txHashCount = reader.readNumber();
|
|
277
|
+
if (txHashCount > MAX_TXS_PER_BLOCK) {
|
|
278
|
+
throw new Error(`txHashes count ${txHashCount} exceeds maximum ${MAX_TXS_PER_BLOCK}`);
|
|
279
|
+
}
|
|
280
|
+
const txHashes = reader.readArray(txHashCount, TxHash);
|
|
208
281
|
|
|
209
282
|
if (!reader.isEmpty()) {
|
|
210
283
|
const hasSignedTxs = reader.readNumber();
|
|
@@ -217,12 +290,21 @@ export class BlockProposal extends Gossipable {
|
|
|
217
290
|
archiveRoot,
|
|
218
291
|
txHashes,
|
|
219
292
|
signature,
|
|
293
|
+
signatureContext,
|
|
220
294
|
signedTxs,
|
|
221
295
|
);
|
|
222
296
|
}
|
|
223
297
|
}
|
|
224
298
|
|
|
225
|
-
return new BlockProposal(
|
|
299
|
+
return new BlockProposal(
|
|
300
|
+
blockHeader,
|
|
301
|
+
indexWithinCheckpoint,
|
|
302
|
+
inHash,
|
|
303
|
+
archiveRoot,
|
|
304
|
+
txHashes,
|
|
305
|
+
signature,
|
|
306
|
+
signatureContext,
|
|
307
|
+
);
|
|
226
308
|
}
|
|
227
309
|
|
|
228
310
|
getSize(): number {
|
|
@@ -232,6 +314,8 @@ export class BlockProposal extends Gossipable {
|
|
|
232
314
|
this.inHash.size +
|
|
233
315
|
this.archiveRoot.size +
|
|
234
316
|
this.signature.getSize() +
|
|
317
|
+
4 /* chainId */ +
|
|
318
|
+
20 /* rollupAddress */ +
|
|
235
319
|
4 /* txHashes.length */ +
|
|
236
320
|
this.txHashes.length * TxHash.SIZE +
|
|
237
321
|
4 /* hasSignedTxs flag */ +
|
|
@@ -240,17 +324,26 @@ export class BlockProposal extends Gossipable {
|
|
|
240
324
|
}
|
|
241
325
|
|
|
242
326
|
static empty(): BlockProposal {
|
|
243
|
-
return new BlockProposal(
|
|
327
|
+
return new BlockProposal(
|
|
328
|
+
BlockHeader.empty(),
|
|
329
|
+
IndexWithinCheckpoint(0),
|
|
330
|
+
Fr.ZERO,
|
|
331
|
+
Fr.ZERO,
|
|
332
|
+
[],
|
|
333
|
+
Signature.empty(),
|
|
334
|
+
EMPTY_COORDINATION_SIGNATURE_CONTEXT,
|
|
335
|
+
);
|
|
244
336
|
}
|
|
245
337
|
|
|
246
338
|
static random(): BlockProposal {
|
|
247
339
|
return new BlockProposal(
|
|
248
340
|
BlockHeader.random(),
|
|
249
|
-
Math.floor(Math.random() * 5),
|
|
341
|
+
IndexWithinCheckpoint(Math.floor(Math.random() * 5)),
|
|
250
342
|
Fr.random(),
|
|
251
343
|
Fr.random(),
|
|
252
344
|
[TxHash.random(), TxHash.random()],
|
|
253
345
|
Signature.random(),
|
|
346
|
+
EMPTY_COORDINATION_SIGNATURE_CONTEXT,
|
|
254
347
|
);
|
|
255
348
|
}
|
|
256
349
|
|
|
@@ -262,6 +355,8 @@ export class BlockProposal extends Gossipable {
|
|
|
262
355
|
archiveRoot: this.archiveRoot.toString(),
|
|
263
356
|
signature: this.signature.toString(),
|
|
264
357
|
txHashes: this.txHashes.map(h => h.toString()),
|
|
358
|
+
chainId: this.signatureContext.chainId,
|
|
359
|
+
rollupAddress: this.signatureContext.rollupAddress.toString(),
|
|
265
360
|
};
|
|
266
361
|
}
|
|
267
362
|
|
|
@@ -272,7 +367,7 @@ export class BlockProposal extends Gossipable {
|
|
|
272
367
|
* @returns True if the proposal matches the block
|
|
273
368
|
*/
|
|
274
369
|
matchesBlock(block: L2Block): boolean {
|
|
275
|
-
return this.archiveRoot.equals(block.archive.root) && this.blockHeader.equals(block.
|
|
370
|
+
return this.archiveRoot.equals(block.archive.root) && this.blockHeader.equals(block.header);
|
|
276
371
|
}
|
|
277
372
|
|
|
278
373
|
/**
|
|
@@ -287,6 +382,7 @@ export class BlockProposal extends Gossipable {
|
|
|
287
382
|
this.archiveRoot,
|
|
288
383
|
this.txHashes,
|
|
289
384
|
this.signature,
|
|
385
|
+
this.signatureContext,
|
|
290
386
|
);
|
|
291
387
|
}
|
|
292
388
|
}
|