@aztec/stdlib 3.0.3-rc.3 → 3.9.9-nightly.20260312
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 +602 -4
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +7 -7
- package/dest/abi/contract_artifact.d.ts +2 -2
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +1 -1
- package/dest/abi/decoder.d.ts +2 -2
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +7 -5
- package/dest/abi/encoder.d.ts +1 -1
- package/dest/abi/encoder.d.ts.map +1 -1
- package/dest/abi/encoder.js +37 -6
- 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/function_call.d.ts +47 -9
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_call.js +20 -3
- package/dest/abi/function_selector.d.ts +2 -1
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/function_selector.js +7 -0
- package/dest/abi/selector.js +3 -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 +2 -1
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/auth_witness/auth_witness.js +3 -3
- package/dest/avm/avm.d.ts +362 -362
- package/dest/avm/avm.js +1 -1
- package/dest/avm/avm_accumulated_data.d.ts +30 -3
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +5 -2
- package/dest/avm/avm_circuit_public_inputs.d.ts +9 -9
- package/dest/avm/avm_circuit_public_inputs.js +3 -1
- package/dest/avm/avm_proving_request.d.ts +465 -465
- package/dest/avm/contract_storage_read.d.ts +13 -1
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +13 -1
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
- package/dest/avm/public_data_read.d.ts +10 -1
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.d.ts +10 -1
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.js +3 -1
- package/dest/avm/public_data_write.d.ts +7 -1
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_inner_call_request.d.ts +4 -1
- package/dest/avm/public_inner_call_request.d.ts.map +1 -1
- package/dest/avm/public_inner_call_request.js +3 -1
- package/dest/avm/revert_code.d.ts +19 -4
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +18 -6
- package/dest/aztec-address/index.js +4 -2
- package/dest/block/attestation_info.d.ts +5 -5
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +4 -4
- package/dest/block/block_data.d.ts +52 -0
- package/dest/block/block_data.d.ts.map +1 -0
- package/dest/block/block_data.js +12 -0
- package/dest/block/block_hash.d.ts +18 -14
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +22 -20
- package/dest/block/block_parameter.d.ts +4 -3
- package/dest/block/block_parameter.d.ts.map +1 -1
- package/dest/block/block_parameter.js +2 -0
- package/dest/block/body.d.ts +1 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +5 -2
- package/dest/block/checkpointed_l2_block.d.ts +150 -0
- package/dest/block/checkpointed_l2_block.d.ts.map +1 -0
- package/dest/block/checkpointed_l2_block.js +46 -0
- package/dest/block/in_block.d.ts +9 -9
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/in_block.js +5 -5
- package/dest/block/index.d.ts +3 -4
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +2 -3
- package/dest/block/l2_block.d.ts +65 -57
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +73 -107
- package/dest/block/l2_block_source.d.ts +372 -92
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +25 -6
- package/dest/block/l2_block_stream/index.d.ts +2 -1
- package/dest/block/l2_block_stream/index.d.ts.map +1 -1
- package/dest/block/l2_block_stream/index.js +1 -0
- package/dest/block/l2_block_stream/interfaces.d.ts +15 -5
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +13 -3
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +125 -32
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -16
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.js +55 -61
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.js +179 -0
- package/dest/block/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 +478 -41
- package/dest/block/validate_block_result.d.ts +24 -24
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +18 -17
- package/dest/checkpoint/checkpoint.d.ts +58 -18
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +83 -16
- package/dest/checkpoint/checkpoint_data.d.ts +120 -0
- package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint_data.js +26 -0
- package/dest/checkpoint/checkpoint_info.d.ts +38 -0
- package/dest/checkpoint/checkpoint_info.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint_info.js +34 -0
- package/dest/checkpoint/index.d.ts +4 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +3 -0
- package/dest/checkpoint/published_checkpoint.d.ts +46 -23
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/published_checkpoint.js +15 -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/index.d.ts +2 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -0
- package/dest/config/node-rpc-config.js +1 -1
- package/dest/config/sequencer-config.d.ts +10 -0
- package/dest/config/sequencer-config.d.ts.map +1 -0
- package/dest/config/sequencer-config.js +23 -0
- package/dest/contract/complete_address.d.ts +4 -1
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/contract_address.js +4 -4
- package/dest/contract/contract_class.d.ts +2 -3
- package/dest/contract/contract_class.d.ts.map +1 -1
- package/dest/contract/contract_class_id.d.ts +2 -2
- package/dest/contract/contract_class_id.d.ts.map +1 -1
- package/dest/contract/contract_class_id.js +6 -5
- package/dest/contract/contract_deployment_data.d.ts +5 -5
- package/dest/contract/index.d.ts +1 -3
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +0 -2
- package/dest/contract/interfaces/contract_class.d.ts +11 -13
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_class.js +18 -18
- package/dest/contract/interfaces/contract_instance.d.ts +28 -29
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.js +5 -5
- package/dest/contract/interfaces/contract_instance_update.d.ts +6 -7
- package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance_update.js +5 -5
- package/dest/contract/interfaces/node-info.d.ts +3 -1
- package/dest/contract/interfaces/node-info.d.ts.map +1 -1
- package/dest/contract/interfaces/node-info.js +2 -1
- package/dest/contract/private_function.d.ts +1 -1
- package/dest/contract/private_function.d.ts.map +1 -1
- package/dest/contract/private_function.js +3 -4
- package/dest/contract/private_function_membership_proof.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.js +1 -1
- package/dest/database-version/database_version.d.ts +58 -0
- package/dest/database-version/database_version.d.ts.map +1 -0
- package/dest/database-version/database_version.js +69 -0
- package/dest/database-version/version_manager.d.ts +3 -49
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +1 -64
- 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 +11 -1
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +14 -6
- package/dest/errors/proving_error.d.ts +2 -2
- package/dest/errors/proving_error.d.ts.map +1 -1
- package/dest/file-store/local.d.ts +3 -3
- package/dest/file-store/local.d.ts.map +1 -1
- package/dest/file-store/local.js +13 -4
- package/dest/file-store/s3.d.ts +1 -1
- package/dest/file-store/s3.d.ts.map +1 -1
- package/dest/file-store/s3.js +11 -3
- package/dest/gas/gas.js +3 -1
- package/dest/gas/gas_fees.js +3 -1
- package/dest/hash/hash.d.ts +2 -9
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +14 -20
- 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 +30 -25
- package/dest/interfaces/allowed_element.d.ts.map +1 -1
- package/dest/interfaces/allowed_element.js +11 -11
- package/dest/interfaces/api_limit.d.ts +3 -1
- package/dest/interfaces/api_limit.d.ts.map +1 -1
- package/dest/interfaces/api_limit.js +2 -0
- package/dest/interfaces/archiver.d.ts +6 -6
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +33 -17
- package/dest/interfaces/aztec-node-admin.d.ts +202 -65
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +15 -7
- package/dest/interfaces/aztec-node.d.ts +86 -83
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +18 -18
- package/dest/interfaces/block-builder.d.ts +27 -15
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +24 -1
- package/dest/interfaces/configs.d.ts +132 -53
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +22 -8
- package/dest/interfaces/get_logs_response.d.ts +27 -5
- package/dest/interfaces/get_logs_response.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.js +5 -4
- package/dest/interfaces/l2_logs_source.d.ts +21 -8
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +2 -2
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p.d.ts +9 -16
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +3 -4
- package/dest/interfaces/prover-broker.d.ts +16 -1
- package/dest/interfaces/prover-broker.d.ts.map +1 -1
- package/dest/interfaces/prover-broker.js +4 -1
- package/dest/interfaces/prover-client.d.ts +24 -3
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-client.js +22 -4
- package/dest/interfaces/proving-job.d.ts +218 -218
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +1 -7
- package/dest/interfaces/server_circuit_prover.d.ts +4 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/slasher.d.ts +9 -1
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +5 -3
- package/dest/interfaces/tx_provider.d.ts +3 -3
- package/dest/interfaces/tx_provider.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +224 -47
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +17 -8
- package/dest/interfaces/world_state.d.ts +17 -8
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/kernel/claimed_length_array.js +3 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +7 -6
- 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 +31 -19
- 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/find_private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +1 -3
- package/dest/kernel/hints/index.d.ts +2 -2
- package/dest/kernel/hints/index.js +2 -2
- package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +2 -1
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
- package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
- package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/read_request.d.ts +7 -1
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request_hints.d.ts +7 -1
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
- package/dest/kernel/hints/transient_data_squashing_hint.js +3 -1
- package/dest/kernel/log_hash.js +3 -1
- package/dest/kernel/private_accumulated_data.d.ts +23 -1
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.d.ts +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 +126 -53
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +71 -71
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +33 -3
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
- package/dest/kernel/private_kernel_data.d.ts +7 -1
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +22 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +12 -3
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +26 -3
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +11 -7
- package/dest/kernel/private_log_data.js +5 -2
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
- package/dest/kernel/private_to_avm_accumulated_data.js +5 -2
- package/dest/kernel/private_to_public_accumulated_data.js +3 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +3 -3
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +17 -1
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.js +3 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +18 -3
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_validation_requests.d.ts +13 -4
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +12 -10
- package/dest/kernel/public_call_request.d.ts +22 -1
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +5 -2
- package/dest/kernel/utils/optional_number.d.ts +7 -1
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/keys/derivation.d.ts +3 -3
- package/dest/keys/derivation.js +15 -15
- package/dest/keys/key_types.d.ts +3 -3
- package/dest/keys/key_types.d.ts.map +1 -1
- package/dest/keys/public_keys.d.ts +5 -1
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +2 -2
- package/dest/keys/utils.d.ts +1 -1
- package/dest/keys/utils.d.ts.map +1 -1
- package/dest/keys/utils.js +8 -4
- package/dest/l1-contracts/slash_factory.d.ts +1 -1
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.js +1 -0
- package/dest/logs/contract_class_log.js +3 -1
- package/dest/logs/debug_log_store.d.ts +30 -0
- package/dest/logs/debug_log_store.d.ts.map +1 -0
- package/dest/logs/debug_log_store.js +30 -0
- package/dest/logs/extended_contract_class_log.d.ts +3 -1
- package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
- package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
- package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
- package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +23 -15
- package/dest/logs/extended_public_log.d.ts +17 -3
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/index.d.ts +5 -3
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +4 -2
- package/dest/logs/log_id.d.ts +22 -7
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_id.js +23 -13
- package/dest/logs/pre_tag.d.ts +16 -11
- 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 +2 -2
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +5 -2
- 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 +5 -2
- package/dest/logs/siloed_tag.d.ts +25 -0
- package/dest/logs/siloed_tag.d.ts.map +1 -0
- package/dest/logs/siloed_tag.js +32 -0
- package/dest/logs/tag.d.ts +21 -0
- package/dest/logs/tag.d.ts.map +1 -0
- package/dest/logs/tag.js +30 -0
- package/dest/logs/tx_scoped_l2_log.d.ts +24 -33
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/logs/tx_scoped_l2_log.js +37 -43
- package/dest/messaging/in_hash.d.ts +4 -2
- package/dest/messaging/in_hash.d.ts.map +1 -1
- package/dest/messaging/in_hash.js +3 -1
- package/dest/messaging/inbox_leaf.d.ts +3 -1
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/l1_actor.d.ts +7 -1
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.d.ts +6 -1
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l2_actor.d.ts +7 -1
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +88 -6
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +160 -42
- package/dest/messaging/out_hash.d.ts +41 -3
- package/dest/messaging/out_hash.d.ts.map +1 -1
- package/dest/messaging/out_hash.js +54 -19
- package/dest/note/index.d.ts +1 -2
- package/dest/note/index.d.ts.map +1 -1
- package/dest/note/index.js +0 -1
- package/dest/note/note_dao.d.ts +36 -5
- package/dest/note/note_dao.d.ts.map +1 -1
- package/dest/note/note_dao.js +15 -12
- package/dest/p2p/attestation_utils.d.ts +13 -3
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +46 -1
- package/dest/p2p/block_proposal.d.ts +102 -23
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +138 -39
- package/dest/p2p/checkpoint_attestation.d.ts +82 -0
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
- package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +22 -19
- package/dest/p2p/checkpoint_proposal.d.ts +174 -0
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
- package/dest/p2p/checkpoint_proposal.js +231 -0
- 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 +20 -11
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +24 -19
- package/dest/p2p/constants.d.ts +5 -0
- package/dest/p2p/constants.d.ts.map +1 -0
- package/dest/p2p/constants.js +3 -0
- package/dest/p2p/gossipable.d.ts +4 -3
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +16 -5
- package/dest/p2p/index.d.ts +5 -3
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +4 -2
- 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 +5 -3
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +3 -1
- package/dest/p2p/signed_txs.d.ts +42 -0
- package/dest/p2p/signed_txs.d.ts.map +1 -0
- package/dest/p2p/signed_txs.js +75 -0
- package/dest/p2p/topic_type.d.ts +5 -5
- package/dest/p2p/topic_type.d.ts.map +1 -1
- package/dest/p2p/topic_type.js +9 -19
- package/dest/parity/parity_base_private_inputs.d.ts +3 -1
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.d.ts +4 -1
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_root_private_inputs.d.ts +2 -1
- package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.d.ts +1 -1
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +9 -4
- package/dest/proofs/proof.d.ts +4 -1
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/recursive_proof.d.ts +10 -1
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.d.ts +1 -3
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +1 -9
- package/dest/rollup/base_rollup_hints.d.ts +34 -1
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.d.ts +12 -1
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.js +1 -1
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.d.ts +47 -11
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +8 -12
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +64 -1
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.d.ts +11 -1
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +4 -1
- package/dest/rollup/checkpoint_header.d.ts +46 -12
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +53 -20
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +46 -6
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +11 -3
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +44 -3
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
- package/dest/rollup/epoch_constant_data.d.ts +16 -1
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/root_rollup_private_inputs.d.ts +6 -1
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +21 -6
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.js +10 -4
- package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts +29 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/schemas/schemas.d.ts +5 -3
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +2 -1
- package/dest/slashing/empire.d.ts +1 -1
- package/dest/slashing/empire.d.ts.map +1 -1
- package/dest/slashing/empire.js +2 -0
- package/dest/slashing/helpers.d.ts +2 -2
- package/dest/slashing/helpers.d.ts.map +1 -1
- package/dest/slashing/helpers.js +6 -0
- package/dest/slashing/tally.d.ts +8 -2
- package/dest/slashing/tally.d.ts.map +1 -1
- package/dest/slashing/tally.js +35 -3
- package/dest/slashing/types.d.ts +10 -7
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +18 -6
- package/dest/snapshots/types.d.ts +1 -1
- package/dest/snapshots/types.d.ts.map +1 -1
- package/dest/snapshots/types.js +5 -5
- package/dest/stats/stats.d.ts +10 -8
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +41 -10
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +99 -36
- package/dest/tests/jest.js +1 -1
- package/dest/tests/mocks.d.ts +81 -20
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +160 -71
- package/dest/timetable/index.d.ts +37 -0
- package/dest/timetable/index.d.ts.map +1 -0
- package/dest/timetable/index.js +39 -0
- package/dest/trees/append_only_tree_snapshot.d.ts +13 -1
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +3 -1
- package/dest/trees/nullifier_leaf.d.ts +13 -1
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.d.ts +10 -1
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.d.ts +17 -1
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +7 -6
- package/dest/trees/public_data_witness.d.ts +11 -1
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/tx/block_header.d.ts +23 -8
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +17 -3
- package/dest/tx/call_context.d.ts +13 -1
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/call_context.js +3 -1
- package/dest/tx/capsule.d.ts +4 -1
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/execution_payload.d.ts +9 -1
- package/dest/tx/execution_payload.d.ts.map +1 -1
- package/dest/tx/function_data.d.ts +4 -2
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/global_variable_builder.d.ts +5 -3
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +14 -1
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +3 -1
- package/dest/tx/hashed_values.d.ts +7 -1
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/in_tx.d.ts +4 -4
- package/dest/tx/index.d.ts +1 -2
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +0 -1
- package/dest/tx/indexed_tx_effect.d.ts +5 -5
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +3 -2
- package/dest/tx/partial_state_reference.d.ts +4 -1
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/private_execution_result.d.ts +24 -7
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +4 -21
- package/dest/tx/private_tx_constant_data.d.ts +16 -1
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/profiling.d.ts +152 -29
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +47 -10
- package/dest/tx/protocol_contracts.d.ts +2 -2
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +2 -2
- package/dest/tx/public_call_request_with_calldata.d.ts +7 -1
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +3 -1
- package/dest/tx/public_simulation_output.d.ts +4 -2
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +7 -3
- package/dest/tx/simulated_tx.d.ts +1035 -8
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +4 -1
- package/dest/tx/state_reference.d.ts +3 -1
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +3 -1
- package/dest/tx/tree_snapshots.js +3 -1
- package/dest/tx/tx.d.ts +38 -7
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +36 -12
- package/dest/tx/tx_context.d.ts +2 -1
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_effect.d.ts +32 -6
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +6 -9
- 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_execution_request.js +6 -2
- package/dest/tx/tx_hash.d.ts +2 -1
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_receipt.d.ts +62 -14
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +55 -16
- package/dest/tx/tx_request.d.ts +6 -1
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/tx_request.js +2 -2
- package/dest/tx/validator/empty_validator.d.ts +2 -2
- package/dest/tx/validator/empty_validator.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.d.ts +7 -2
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +7 -1
- package/dest/tx/validator/tx_validator.d.ts +2 -5
- package/dest/tx/validator/tx_validator.d.ts.map +1 -1
- package/dest/tx/validator/tx_validator.js +4 -4
- package/dest/types/shared.d.ts +4 -1
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/update-checker/index.d.ts +3 -2
- package/dest/update-checker/index.d.ts.map +1 -1
- package/dest/update-checker/index.js +2 -1
- package/dest/update-checker/package_version.d.ts +3 -0
- package/dest/update-checker/package_version.d.ts.map +1 -0
- package/dest/update-checker/package_version.js +24 -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 +38 -38
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +17 -16
- package/dest/validators/types.d.ts +3 -3
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/vks/verification_key.d.ts +22 -1
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/vk_data.d.ts +7 -1
- package/dest/vks/vk_data.d.ts.map +1 -1
- package/dest/zkpassport/index.d.ts +3 -4
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/dest/zkpassport/index.js +9 -9
- package/package.json +28 -14
- package/src/abi/abi.ts +39 -33
- package/src/abi/contract_artifact.ts +10 -10
- package/src/abi/decoder.ts +15 -6
- package/src/abi/encoder.ts +49 -6
- package/src/abi/event_metadata_definition.ts +2 -0
- package/src/abi/function_call.ts +25 -3
- package/src/abi/function_selector.ts +8 -0
- package/src/abi/utils.ts +42 -0
- package/src/auth_witness/auth_witness.ts +3 -3
- package/src/avm/avm.ts +1 -1
- package/src/avm/revert_code.ts +15 -0
- package/src/block/attestation_info.ts +9 -6
- package/src/block/block_data.ts +26 -0
- package/src/block/block_hash.ts +26 -25
- package/src/block/block_parameter.ts +4 -2
- package/src/block/body.ts +2 -1
- package/src/block/checkpointed_l2_block.ts +70 -0
- package/src/block/in_block.ts +6 -6
- package/src/block/index.ts +2 -3
- package/src/block/l2_block.ts +112 -147
- package/src/block/l2_block_source.ts +207 -70
- package/src/block/l2_block_stream/index.ts +1 -0
- package/src/block/l2_block_stream/interfaces.ts +15 -4
- package/src/block/l2_block_stream/l2_block_stream.ts +160 -39
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +62 -56
- package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
- package/src/block/test/l2_tips_store_test_suite.ts +480 -35
- package/src/block/validate_block_result.ts +40 -35
- package/src/checkpoint/checkpoint.ts +120 -23
- package/src/checkpoint/checkpoint_data.ts +51 -0
- package/src/checkpoint/checkpoint_info.ts +52 -0
- package/src/checkpoint/index.ts +3 -0
- package/src/checkpoint/published_checkpoint.ts +25 -8
- package/src/checkpoint/validate.ts +230 -0
- package/src/config/index.ts +1 -0
- package/src/config/node-rpc-config.ts +1 -1
- package/src/config/sequencer-config.ts +34 -0
- package/src/contract/contract_address.ts +4 -4
- package/src/contract/contract_class.ts +3 -3
- package/src/contract/contract_class_id.ts +6 -5
- package/src/contract/index.ts +0 -2
- package/src/contract/interfaces/contract_class.ts +59 -46
- package/src/contract/interfaces/contract_instance.ts +15 -13
- package/src/contract/interfaces/contract_instance_update.ts +11 -9
- package/src/contract/interfaces/node-info.ts +3 -0
- package/src/contract/private_function.ts +3 -4
- package/src/contract/private_function_membership_proof.ts +1 -1
- package/src/database-version/database_version.ts +87 -0
- package/src/database-version/version_manager.ts +1 -77
- package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
- package/src/deserialization/index.ts +21 -0
- package/src/epoch-helpers/index.ts +27 -10
- package/src/file-store/local.ts +15 -5
- package/src/file-store/s3.ts +12 -3
- package/src/hash/hash.ts +12 -19
- package/src/hash/map_slot.ts +3 -2
- package/src/interfaces/allowed_element.ts +34 -12
- package/src/interfaces/api_limit.ts +2 -0
- package/src/interfaces/archiver.ts +41 -25
- package/src/interfaces/aztec-node-admin.ts +33 -6
- package/src/interfaces/aztec-node.ts +133 -139
- package/src/interfaces/block-builder.ts +76 -25
- package/src/interfaces/configs.ts +104 -37
- package/src/interfaces/get_logs_response.ts +13 -9
- package/src/interfaces/l2_logs_source.ts +25 -7
- package/src/interfaces/merkle_tree_operations.ts +4 -1
- package/src/interfaces/p2p.ts +10 -25
- package/src/interfaces/prover-broker.ts +22 -0
- package/src/interfaces/prover-client.ts +43 -10
- package/src/interfaces/proving-job.ts +2 -11
- package/src/interfaces/server_circuit_prover.ts +3 -3
- package/src/interfaces/slasher.ts +28 -22
- package/src/interfaces/tx_provider.ts +2 -2
- package/src/interfaces/validator.ts +110 -32
- package/src/interfaces/world_state.ts +16 -9
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +34 -30
- 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/find_private_kernel_reset_dimensions.ts +2 -4
- package/src/kernel/hints/index.ts +2 -2
- package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
- package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
- package/src/kernel/private_circuit_public_inputs.ts +99 -99
- package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +14 -5
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_validation_requests.ts +8 -8
- package/src/keys/derivation.ts +15 -15
- package/src/keys/key_types.ts +6 -2
- package/src/keys/public_keys.ts +2 -2
- package/src/keys/utils.ts +8 -4
- package/src/l1-contracts/slash_factory.ts +1 -0
- package/src/logs/debug_log_store.ts +54 -0
- package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +24 -16
- package/src/logs/index.ts +4 -2
- package/src/logs/log_id.ts +26 -12
- package/src/logs/pre_tag.ts +5 -5
- package/src/logs/private_log.ts +2 -1
- package/src/logs/public_log.ts +4 -2
- package/src/logs/siloed_tag.ts +50 -0
- package/src/logs/tag.ts +42 -0
- package/src/logs/tx_scoped_l2_log.ts +45 -43
- package/src/messaging/in_hash.ts +3 -1
- package/src/messaging/l1_to_l2_message.ts +1 -0
- package/src/messaging/l2_to_l1_membership.ts +178 -52
- package/src/messaging/out_hash.ts +62 -21
- package/src/note/index.ts +0 -1
- package/src/note/note_dao.ts +18 -13
- package/src/p2p/attestation_utils.ts +59 -3
- package/src/p2p/block_proposal.ts +211 -46
- package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +36 -25
- package/src/p2p/checkpoint_proposal.ts +370 -0
- package/src/p2p/client_type.ts +0 -6
- package/src/p2p/consensus_payload.ts +29 -18
- package/src/p2p/constants.ts +6 -0
- package/src/p2p/gossipable.ts +14 -4
- package/src/p2p/index.ts +4 -2
- package/src/p2p/message_validator.ts +14 -2
- package/src/p2p/peer_error.ts +7 -0
- package/src/p2p/signature_utils.ts +3 -1
- package/src/p2p/signed_txs.ts +88 -0
- package/src/p2p/topic_type.ts +10 -16
- package/src/proofs/chonk_proof.ts +9 -5
- package/src/rollup/avm_proof_data.ts +0 -7
- package/src/rollup/block_headers_hash.ts +1 -1
- package/src/rollup/block_rollup_public_inputs.ts +5 -11
- package/src/rollup/checkpoint_constant_data.ts +1 -0
- package/src/rollup/checkpoint_header.ts +67 -20
- package/src/rollup/checkpoint_rollup_public_inputs.ts +17 -5
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
- package/src/rollup/root_rollup_public_inputs.ts +16 -7
- package/src/schemas/schemas.ts +4 -0
- package/src/slashing/empire.ts +3 -1
- package/src/slashing/helpers.ts +8 -0
- package/src/slashing/tally.ts +41 -2
- package/src/slashing/types.ts +38 -20
- package/src/snapshots/types.ts +33 -29
- package/src/stats/stats.ts +10 -7
- package/src/tests/factories.ts +124 -54
- package/src/tests/jest.ts +1 -1
- package/src/tests/mocks.ts +260 -100
- package/src/timetable/index.ts +66 -0
- package/src/trees/public_data_leaf.ts +11 -5
- package/src/tx/block_header.ts +28 -9
- package/src/tx/global_variable_builder.ts +9 -2
- package/src/tx/global_variables.ts +6 -0
- package/src/tx/index.ts +0 -1
- package/src/tx/indexed_tx_effect.ts +3 -2
- package/src/tx/private_execution_result.ts +2 -17
- package/src/tx/profiling.ts +51 -9
- package/src/tx/protocol_contracts.ts +2 -2
- package/src/tx/public_simulation_output.ts +4 -0
- package/src/tx/simulated_tx.ts +8 -1
- package/src/tx/tx.ts +39 -22
- package/src/tx/tx_effect.ts +3 -10
- package/src/tx/tx_execution_request.ts +2 -0
- package/src/tx/tx_receipt.ts +85 -18
- package/src/tx/tx_request.ts +2 -2
- package/src/tx/validator/empty_validator.ts +1 -1
- package/src/tx/validator/error_texts.ts +8 -1
- package/src/tx/validator/tx_validator.ts +9 -7
- package/src/update-checker/index.ts +2 -1
- package/src/update-checker/package_version.ts +30 -0
- package/src/update-checker/version_checker.ts +65 -0
- package/src/validators/errors.ts +9 -0
- package/src/validators/schemas.ts +61 -48
- package/src/validators/types.ts +5 -4
- package/src/zkpassport/index.ts +11 -12
- package/dest/block/l2_block_code_to_purge.d.ts +0 -12
- package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
- package/dest/block/l2_block_code_to_purge.js +0 -61
- package/dest/block/l2_block_header.d.ts +0 -98
- package/dest/block/l2_block_header.d.ts.map +0 -1
- package/dest/block/l2_block_header.js +0 -153
- package/dest/block/l2_block_new.d.ts +0 -130
- package/dest/block/l2_block_new.d.ts.map +0 -1
- package/dest/block/l2_block_new.js +0 -151
- package/dest/block/published_l2_block.d.ts +0 -130
- package/dest/block/published_l2_block.d.ts.map +0 -1
- package/dest/block/published_l2_block.js +0 -48
- package/dest/contract/contract_class_metadata.d.ts +0 -8
- package/dest/contract/contract_class_metadata.d.ts.map +0 -1
- package/dest/contract/contract_class_metadata.js +0 -1
- package/dest/contract/contract_metadata.d.ts +0 -7
- package/dest/contract/contract_metadata.d.ts.map +0 -1
- package/dest/contract/contract_metadata.js +0 -1
- package/dest/database-version/index.d.ts +0 -2
- package/dest/database-version/index.d.ts.map +0 -1
- package/dest/database-version/index.js +0 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -25
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
- package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
- package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
- package/dest/logs/log_with_tx_data.d.ts +0 -19
- package/dest/logs/log_with_tx_data.d.ts.map +0 -1
- package/dest/logs/log_with_tx_data.js +0 -49
- package/dest/note/notes_filter.d.ts +0 -27
- package/dest/note/notes_filter.d.ts.map +0 -1
- package/dest/note/notes_filter.js +0 -11
- package/dest/p2p/block_attestation.d.ts +0 -80
- package/dest/p2p/block_attestation.d.ts.map +0 -1
- package/dest/tx/content_commitment.d.ts +0 -49
- package/dest/tx/content_commitment.d.ts.map +0 -1
- package/dest/tx/content_commitment.js +0 -90
- 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/block/l2_block_code_to_purge.ts +0 -88
- package/src/block/l2_block_header.ts +0 -246
- package/src/block/l2_block_new.ts +0 -197
- package/src/block/published_l2_block.ts +0 -65
- package/src/contract/contract_class_metadata.ts +0 -8
- package/src/contract/contract_metadata.ts +0 -7
- package/src/database-version/index.ts +0 -1
- package/src/logs/log_with_tx_data.ts +0 -46
- package/src/note/notes_filter.ts +0 -38
- package/src/tx/content_commitment.ts +0 -113
- package/src/update-checker/update-checker.ts +0 -166
package/src/slashing/tally.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { sumBigint } from '@aztec/foundation/bigint';
|
|
2
|
+
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
2
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
+
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
3
5
|
import type { PartialBy } from '@aztec/foundation/types';
|
|
4
6
|
|
|
5
7
|
import { getEpochForOffense } from './helpers.js';
|
|
@@ -11,6 +13,9 @@ import type { Offense, ValidatorSlashVote } from './types.js';
|
|
|
11
13
|
* @param committees - Array of committees (each containing array of validator addresses)
|
|
12
14
|
* @param epochsForCommittees - Array of epochs corresponding to each committee
|
|
13
15
|
* @param settings - Settings including slashingAmounts and optional validator override lists
|
|
16
|
+
* @param settings.maxSlashedValidators - If set, limits the total number of [validator, epoch] pairs
|
|
17
|
+
* with non-zero votes. The lowest-vote pairs are zeroed out to stay within the limit.
|
|
18
|
+
* @param logger - Logger, logs which validators were dropped.
|
|
14
19
|
* @returns Array of ValidatorSlashVote, where each vote is how many slash units the validator in that position should be slashed
|
|
15
20
|
*/
|
|
16
21
|
export function getSlashConsensusVotesFromOffenses(
|
|
@@ -20,9 +25,12 @@ export function getSlashConsensusVotesFromOffenses(
|
|
|
20
25
|
settings: {
|
|
21
26
|
slashingAmounts: [bigint, bigint, bigint];
|
|
22
27
|
epochDuration: number;
|
|
28
|
+
targetCommitteeSize: number;
|
|
29
|
+
maxSlashedValidators?: number;
|
|
23
30
|
},
|
|
31
|
+
logger: Logger = createLogger('slasher:tally'),
|
|
24
32
|
): ValidatorSlashVote[] {
|
|
25
|
-
const { slashingAmounts } = settings;
|
|
33
|
+
const { slashingAmounts, targetCommitteeSize, maxSlashedValidators } = settings;
|
|
26
34
|
|
|
27
35
|
if (committees.length !== epochsForCommittees.length) {
|
|
28
36
|
throw new Error('committees and epochsForCommittees must have the same length');
|
|
@@ -31,7 +39,9 @@ export function getSlashConsensusVotesFromOffenses(
|
|
|
31
39
|
const votes = committees.flatMap((committee, committeeIndex) => {
|
|
32
40
|
const committeeEpoch = epochsForCommittees[committeeIndex];
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
// Map over actual committee members, then pad to targetCommitteeSize.
|
|
43
|
+
// Padding handles cases where committees may be empty (e.g., when there aren't enough validators to fill the committee size during network startup).
|
|
44
|
+
const votes = committee.map(validator => {
|
|
35
45
|
// Find offenses for this validator in this specific epoch.
|
|
36
46
|
// If an offense has no epoch, it is considered for all epochs due to a slashAlways setting.
|
|
37
47
|
const validatorOffenses = offenses.filter(
|
|
@@ -45,8 +55,37 @@ export function getSlashConsensusVotesFromOffenses(
|
|
|
45
55
|
const slashUnits = getSlashUnitsForAmount(slashAmount, slashingAmounts);
|
|
46
56
|
return Number(slashUnits);
|
|
47
57
|
});
|
|
58
|
+
|
|
59
|
+
return padArrayEnd(votes, 0, targetCommitteeSize);
|
|
48
60
|
});
|
|
49
61
|
|
|
62
|
+
// if a cap is set, zero out the lowest-vote [validator, epoch] pairs so that the most severe slashes stay.
|
|
63
|
+
if (maxSlashedValidators === undefined) {
|
|
64
|
+
return votes;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const nonZeroByDescendingVote = [...votes.entries()].filter(([, vote]) => vote > 0).sort(([, a], [, b]) => b - a);
|
|
68
|
+
|
|
69
|
+
const toTruncate = nonZeroByDescendingVote.slice(maxSlashedValidators);
|
|
70
|
+
for (const [idx] of toTruncate) {
|
|
71
|
+
votes[idx] = 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (toTruncate.length > 0) {
|
|
75
|
+
const truncated = toTruncate.map(([idx]) => {
|
|
76
|
+
const committeeIndex = Math.floor(idx / targetCommitteeSize);
|
|
77
|
+
const positionInCommittee = idx % targetCommitteeSize;
|
|
78
|
+
return {
|
|
79
|
+
validator: committees[committeeIndex][positionInCommittee].toString(),
|
|
80
|
+
epoch: epochsForCommittees[committeeIndex],
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
logger.warn(
|
|
84
|
+
`Truncated ${toTruncate.length} validator-epoch pairs to stay within limit of ${maxSlashedValidators}`,
|
|
85
|
+
{ truncated },
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
50
89
|
return votes;
|
|
51
90
|
}
|
|
52
91
|
|
package/src/slashing/types.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { schemas, zodFor } from '../schemas/index.js';
|
|
6
6
|
|
|
7
7
|
export enum OffenseType {
|
|
8
8
|
UNKNOWN = 0,
|
|
@@ -20,6 +20,10 @@ export enum OffenseType {
|
|
|
20
20
|
PROPOSED_INCORRECT_ATTESTATIONS = 6,
|
|
21
21
|
/** A committee member attested to a block that was built as a descendent of an invalid block (as in a block with invalid attestations) */
|
|
22
22
|
ATTESTED_DESCENDANT_OF_INVALID = 7,
|
|
23
|
+
/** A proposer sent duplicate proposals for the same position (slot, indexWithinCheckpoint for blocks or slot for checkpoints) */
|
|
24
|
+
DUPLICATE_PROPOSAL = 8,
|
|
25
|
+
/** A validator signed attestations for different proposals at the same slot (equivocation) */
|
|
26
|
+
DUPLICATE_ATTESTATION = 9,
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
export function getOffenseTypeName(offense: OffenseType) {
|
|
@@ -40,6 +44,10 @@ export function getOffenseTypeName(offense: OffenseType) {
|
|
|
40
44
|
return 'proposed_incorrect_attestations';
|
|
41
45
|
case OffenseType.ATTESTED_DESCENDANT_OF_INVALID:
|
|
42
46
|
return 'attested_descendant_of_invalid';
|
|
47
|
+
case OffenseType.DUPLICATE_PROPOSAL:
|
|
48
|
+
return 'duplicate_proposal';
|
|
49
|
+
case OffenseType.DUPLICATE_ATTESTATION:
|
|
50
|
+
return 'duplicate_attestation';
|
|
43
51
|
default:
|
|
44
52
|
throw new Error(`Unknown offense type: ${offense}`);
|
|
45
53
|
}
|
|
@@ -56,6 +64,8 @@ export const OffenseToBigInt: Record<OffenseType, bigint> = {
|
|
|
56
64
|
[OffenseType.PROPOSED_INSUFFICIENT_ATTESTATIONS]: 5n,
|
|
57
65
|
[OffenseType.PROPOSED_INCORRECT_ATTESTATIONS]: 6n,
|
|
58
66
|
[OffenseType.ATTESTED_DESCENDANT_OF_INVALID]: 7n,
|
|
67
|
+
[OffenseType.DUPLICATE_PROPOSAL]: 8n,
|
|
68
|
+
[OffenseType.DUPLICATE_ATTESTATION]: 9n,
|
|
59
69
|
};
|
|
60
70
|
|
|
61
71
|
export function bigIntToOffense(offense: bigint): OffenseType {
|
|
@@ -76,6 +86,10 @@ export function bigIntToOffense(offense: bigint): OffenseType {
|
|
|
76
86
|
return OffenseType.PROPOSED_INCORRECT_ATTESTATIONS;
|
|
77
87
|
case 7n:
|
|
78
88
|
return OffenseType.ATTESTED_DESCENDANT_OF_INVALID;
|
|
89
|
+
case 8n:
|
|
90
|
+
return OffenseType.DUPLICATE_PROPOSAL;
|
|
91
|
+
case 9n:
|
|
92
|
+
return OffenseType.DUPLICATE_ATTESTATION;
|
|
79
93
|
default:
|
|
80
94
|
throw new Error(`Unknown offense: ${offense}`);
|
|
81
95
|
}
|
|
@@ -90,12 +104,14 @@ export type Offense = {
|
|
|
90
104
|
|
|
91
105
|
export type OffenseIdentifier = Pick<Offense, 'validator' | 'offenseType' | 'epochOrSlot'>;
|
|
92
106
|
|
|
93
|
-
export const OffenseSchema =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
107
|
+
export const OffenseSchema = zodFor<Offense>()(
|
|
108
|
+
z.object({
|
|
109
|
+
validator: schemas.EthAddress,
|
|
110
|
+
amount: schemas.BigInt,
|
|
111
|
+
offenseType: OffenseTypeSchema,
|
|
112
|
+
epochOrSlot: schemas.BigInt,
|
|
113
|
+
}),
|
|
114
|
+
);
|
|
99
115
|
|
|
100
116
|
/** Offense by a validator in the context of a slash payload */
|
|
101
117
|
export type ValidatorSlashOffense = {
|
|
@@ -120,19 +136,21 @@ export type SlashPayload = {
|
|
|
120
136
|
/** Slash payload with round information from empire slash proposer */
|
|
121
137
|
export type SlashPayloadRound = SlashPayload & { votes: bigint; round: bigint };
|
|
122
138
|
|
|
123
|
-
export const SlashPayloadRoundSchema =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
z.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
export const SlashPayloadRoundSchema = zodFor<SlashPayloadRound>()(
|
|
140
|
+
z.object({
|
|
141
|
+
address: schemas.EthAddress,
|
|
142
|
+
timestamp: schemas.BigInt,
|
|
143
|
+
votes: schemas.BigInt,
|
|
144
|
+
round: schemas.BigInt,
|
|
145
|
+
slashes: z.array(
|
|
146
|
+
z.object({
|
|
147
|
+
validator: schemas.EthAddress,
|
|
148
|
+
amount: schemas.BigInt,
|
|
149
|
+
offenses: z.array(z.object({ offenseType: OffenseTypeSchema, epochOrSlot: schemas.BigInt })),
|
|
150
|
+
}),
|
|
151
|
+
),
|
|
152
|
+
}),
|
|
153
|
+
);
|
|
136
154
|
|
|
137
155
|
/** Votes for a validator slash in the consensus slash proposer */
|
|
138
156
|
export type ValidatorSlashVote = number;
|
package/src/snapshots/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
-
import {
|
|
2
|
+
import { schemas, zodFor } from '@aztec/foundation/schemas';
|
|
3
3
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
@@ -38,33 +38,37 @@ export type SnapshotsIndex = SnapshotsIndexMetadata & {
|
|
|
38
38
|
export type UploadSnapshotMetadata = Pick<SnapshotMetadata, 'l2BlockNumber' | 'l2BlockHash' | 'l1BlockNumber'> &
|
|
39
39
|
Pick<SnapshotsIndex, 'l1ChainId' | 'rollupVersion' | 'rollupAddress'>;
|
|
40
40
|
|
|
41
|
-
export const SnapshotsIndexSchema =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
z.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
export const SnapshotsIndexSchema = zodFor<SnapshotsIndex>()(
|
|
42
|
+
z.object({
|
|
43
|
+
l1ChainId: z.number(),
|
|
44
|
+
rollupVersion: z.number(),
|
|
45
|
+
rollupAddress: schemas.EthAddress,
|
|
46
|
+
snapshots: z.array(
|
|
47
|
+
z.object({
|
|
48
|
+
l2BlockNumber: z.number(),
|
|
49
|
+
l2BlockHash: z.string(),
|
|
50
|
+
l1BlockNumber: z.number(),
|
|
51
|
+
timestamp: z.number(),
|
|
52
|
+
schemaVersions: z.object({
|
|
53
|
+
archiver: z.number(),
|
|
54
|
+
worldState: z.number(),
|
|
55
|
+
}),
|
|
56
|
+
dataUrls: z
|
|
57
|
+
.record(z.enum(SnapshotDataKeys), z.string())
|
|
58
|
+
// See https://stackoverflow.com/questions/77958464/zod-record-with-required-keys
|
|
59
|
+
.refine((obj): obj is Required<typeof obj> => SnapshotDataKeys.every(key => !!obj[key])),
|
|
54
60
|
}),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
.refine((obj): obj is Required<typeof obj> => SnapshotDataKeys.every(key => !!obj[key])),
|
|
59
|
-
}),
|
|
60
|
-
),
|
|
61
|
-
}) satisfies ZodFor<SnapshotsIndex>;
|
|
61
|
+
),
|
|
62
|
+
}),
|
|
63
|
+
);
|
|
62
64
|
|
|
63
|
-
export const UploadSnapshotMetadataSchema =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
export const UploadSnapshotMetadataSchema = zodFor<UploadSnapshotMetadata>()(
|
|
66
|
+
z.object({
|
|
67
|
+
l2BlockNumber: z.number(),
|
|
68
|
+
l2BlockHash: z.string(),
|
|
69
|
+
l1BlockNumber: z.number(),
|
|
70
|
+
l1ChainId: z.number(),
|
|
71
|
+
rollupVersion: z.number(),
|
|
72
|
+
rollupAddress: schemas.EthAddress,
|
|
73
|
+
}),
|
|
74
|
+
);
|
package/src/stats/stats.ts
CHANGED
|
@@ -20,6 +20,13 @@ export type L2BlockStats = {
|
|
|
20
20
|
publicLogCount?: number;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
export type CheckpointStats = {
|
|
24
|
+
/** Number of transactions in the checkpoint */
|
|
25
|
+
txCount: number;
|
|
26
|
+
/** Number of blocks in the checkpoint */
|
|
27
|
+
blockCount: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
23
30
|
/** Stats logged for each L1 publish tx.*/
|
|
24
31
|
export type L1PublishStats = {
|
|
25
32
|
/** Address of the sender. */
|
|
@@ -45,11 +52,11 @@ export type L1PublishStats = {
|
|
|
45
52
|
};
|
|
46
53
|
|
|
47
54
|
/** Stats logged for each L1 rollup publish tx.*/
|
|
48
|
-
export type
|
|
55
|
+
export type L1PublishCheckpointStats = {
|
|
49
56
|
/** Name of the event for metrics purposes */
|
|
50
57
|
eventName: 'rollup-published-to-l1';
|
|
51
58
|
} & L1PublishStats &
|
|
52
|
-
|
|
59
|
+
CheckpointStats;
|
|
53
60
|
|
|
54
61
|
/** Stats logged for each L1 rollup publish tx.*/
|
|
55
62
|
export type L1PublishProofStats = {
|
|
@@ -189,16 +196,12 @@ export type CircuitVerificationStats = {
|
|
|
189
196
|
|
|
190
197
|
/** Stats for an L2 block built by a sequencer. */
|
|
191
198
|
export type L2BlockBuiltStats = {
|
|
192
|
-
/** The creator of the block */
|
|
193
|
-
creator: string;
|
|
194
199
|
/** Name of the event. */
|
|
195
200
|
eventName: 'l2-block-built';
|
|
196
201
|
/** Total duration in ms. */
|
|
197
202
|
duration: number;
|
|
198
203
|
/** Time for processing public txs in ms. */
|
|
199
204
|
publicProcessDuration: number;
|
|
200
|
-
/** Time for running rollup circuits in ms. */
|
|
201
|
-
rollupCircuitsDuration: number;
|
|
202
205
|
} & L2BlockStats;
|
|
203
206
|
|
|
204
207
|
/** Stats for an L2 block processed by the world state synchronizer. */
|
|
@@ -272,7 +275,7 @@ export type Stats =
|
|
|
272
275
|
| CircuitSimulationStats
|
|
273
276
|
| CircuitWitnessGenerationStats
|
|
274
277
|
| PublicDBAccessStats
|
|
275
|
-
|
|
|
278
|
+
| L1PublishCheckpointStats
|
|
276
279
|
| L1PublishProofStats
|
|
277
280
|
| L2BlockBuiltStats
|
|
278
281
|
| L2BlockHandledStats
|
package/src/tests/factories.ts
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
ARCHIVE_HEIGHT,
|
|
9
9
|
AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
|
|
10
|
-
AZTEC_MAX_EPOCH_DURATION,
|
|
11
10
|
CHONK_PROOF_LENGTH,
|
|
12
11
|
CONTRACT_CLASS_LOG_SIZE_IN_FIELDS,
|
|
13
|
-
|
|
12
|
+
DomainSeparator,
|
|
14
13
|
L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH,
|
|
14
|
+
MAX_CHECKPOINTS_PER_EPOCH,
|
|
15
15
|
MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
16
16
|
MAX_ENQUEUED_CALLS_PER_CALL,
|
|
17
17
|
MAX_ENQUEUED_CALLS_PER_TX,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
VK_TREE_HEIGHT,
|
|
44
44
|
} from '@aztec/constants';
|
|
45
45
|
import { type FieldsOf, makeTuple } from '@aztec/foundation/array';
|
|
46
|
-
import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
46
|
+
import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
47
47
|
import { compact } from '@aztec/foundation/collection';
|
|
48
48
|
import { Grumpkin } from '@aztec/foundation/crypto/grumpkin';
|
|
49
49
|
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
import { PublicDataRead } from '../avm/public_data_read.js';
|
|
88
88
|
import { PublicDataWrite } from '../avm/public_data_write.js';
|
|
89
89
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
90
|
-
import {
|
|
90
|
+
import type { L2Tips } from '../block/l2_block_source.js';
|
|
91
91
|
import {
|
|
92
92
|
type ContractClassPublic,
|
|
93
93
|
ContractDeploymentData,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
import { Gas, GasFees, GasSettings } from '../gas/index.js';
|
|
103
103
|
import { computeCalldataHash } from '../hash/hash.js';
|
|
104
104
|
import { KeyValidationRequest } from '../kernel/hints/key_validation_request.js';
|
|
105
|
-
import {
|
|
105
|
+
import { KeyValidationRequestAndSeparator } from '../kernel/hints/key_validation_request_and_separator.js';
|
|
106
106
|
import { ReadRequest, ScopedReadRequest } from '../kernel/hints/read_request.js';
|
|
107
107
|
import {
|
|
108
108
|
ClaimedLengthArray,
|
|
@@ -128,9 +128,11 @@ import {
|
|
|
128
128
|
PublicCallRequestArrayLengths,
|
|
129
129
|
} from '../kernel/public_call_request.js';
|
|
130
130
|
import { PublicKeys, computeAddress } from '../keys/index.js';
|
|
131
|
+
import { ExtendedDirectionalAppTaggingSecret } from '../logs/extended_directional_app_tagging_secret.js';
|
|
131
132
|
import { ContractClassLog, ContractClassLogFields } from '../logs/index.js';
|
|
132
133
|
import { PrivateLog } from '../logs/private_log.js';
|
|
133
134
|
import { FlatPublicLogs, PublicLog } from '../logs/public_log.js';
|
|
135
|
+
import { TxScopedL2Log } from '../logs/tx_scoped_l2_log.js';
|
|
134
136
|
import { CountedL2ToL1Message, L2ToL1Message, ScopedL2ToL1Message } from '../messaging/l2_to_l1_message.js';
|
|
135
137
|
import { ParityBasePrivateInputs } from '../parity/parity_base_private_inputs.js';
|
|
136
138
|
import { ParityPublicInputs } from '../parity/parity_public_inputs.js';
|
|
@@ -163,7 +165,6 @@ import { NullifierLeaf, NullifierLeafPreimage } from '../trees/nullifier_leaf.js
|
|
|
163
165
|
import { PublicDataTreeLeaf, PublicDataTreeLeafPreimage } from '../trees/public_data_leaf.js';
|
|
164
166
|
import { BlockHeader } from '../tx/block_header.js';
|
|
165
167
|
import { CallContext } from '../tx/call_context.js';
|
|
166
|
-
import { ContentCommitment } from '../tx/content_commitment.js';
|
|
167
168
|
import { FunctionData } from '../tx/function_data.js';
|
|
168
169
|
import { GlobalVariables } from '../tx/global_variables.js';
|
|
169
170
|
import { PartialStateReference } from '../tx/partial_state_reference.js';
|
|
@@ -173,6 +174,7 @@ import { StateReference } from '../tx/state_reference.js';
|
|
|
173
174
|
import { TreeSnapshots } from '../tx/tree_snapshots.js';
|
|
174
175
|
import { TxConstantData } from '../tx/tx_constant_data.js';
|
|
175
176
|
import { TxContext } from '../tx/tx_context.js';
|
|
177
|
+
import { TxHash } from '../tx/tx_hash.js';
|
|
176
178
|
import { TxRequest } from '../tx/tx_request.js';
|
|
177
179
|
import { Vector } from '../types/index.js';
|
|
178
180
|
import { VkData } from '../vks/index.js';
|
|
@@ -258,12 +260,12 @@ function makeKeyValidationRequests(seed: number): KeyValidationRequest {
|
|
|
258
260
|
}
|
|
259
261
|
|
|
260
262
|
/**
|
|
261
|
-
* Creates arbitrary
|
|
262
|
-
* @param seed - The seed to use for generating the
|
|
263
|
-
* @returns A
|
|
263
|
+
* Creates arbitrary KeyValidationRequestAndSeparator from the given seed.
|
|
264
|
+
* @param seed - The seed to use for generating the KeyValidationRequestAndSeparator.
|
|
265
|
+
* @returns A KeyValidationRequestAndSeparator.
|
|
264
266
|
*/
|
|
265
|
-
function
|
|
266
|
-
return new
|
|
267
|
+
function makeKeyValidationRequestAndSeparators(seed: number): KeyValidationRequestAndSeparator {
|
|
268
|
+
return new KeyValidationRequestAndSeparator(makeKeyValidationRequests(seed), fr(seed + 4));
|
|
267
269
|
}
|
|
268
270
|
|
|
269
271
|
export function makePublicDataWrite(seed = 1) {
|
|
@@ -655,7 +657,7 @@ function makeClaimedLengthArray<T extends Serializable, N extends number>(
|
|
|
655
657
|
*/
|
|
656
658
|
export function makePrivateCircuitPublicInputs(seed = 0): PrivateCircuitPublicInputs {
|
|
657
659
|
return PrivateCircuitPublicInputs.from({
|
|
658
|
-
|
|
660
|
+
expirationTimestamp: BigInt(seed + 0x31415),
|
|
659
661
|
callContext: makeCallContext(seed, { isStaticCall: true }),
|
|
660
662
|
argsHash: fr(seed + 0x100),
|
|
661
663
|
returnsHash: fr(seed + 0x200),
|
|
@@ -670,9 +672,9 @@ export function makePrivateCircuitPublicInputs(seed = 0): PrivateCircuitPublicIn
|
|
|
670
672
|
makeScopedReadRequest,
|
|
671
673
|
seed + 0x310,
|
|
672
674
|
),
|
|
673
|
-
|
|
675
|
+
keyValidationRequestsAndSeparators: makeClaimedLengthArray(
|
|
674
676
|
MAX_KEY_VALIDATION_REQUESTS_PER_CALL,
|
|
675
|
-
|
|
677
|
+
makeKeyValidationRequestAndSeparators,
|
|
676
678
|
seed + 0x320,
|
|
677
679
|
),
|
|
678
680
|
noteHashes: makeClaimedLengthArray(MAX_NOTE_HASHES_PER_CALL, makeNoteHash, seed + 0x400),
|
|
@@ -835,7 +837,6 @@ export function makeBlockRollupPublicInputs(seed = 0): BlockRollupPublicInputs {
|
|
|
835
837
|
makeSpongeBlob(seed + 0x600),
|
|
836
838
|
makeSpongeBlob(seed + 0x700),
|
|
837
839
|
BigInt(seed + 0x800),
|
|
838
|
-
BigInt(seed + 0x810),
|
|
839
840
|
fr(seed + 0x820),
|
|
840
841
|
fr(seed + 0x830),
|
|
841
842
|
fr(seed + 0x840),
|
|
@@ -849,11 +850,13 @@ export function makeCheckpointRollupPublicInputs(seed = 0) {
|
|
|
849
850
|
makeEpochConstantData(seed),
|
|
850
851
|
makeAppendOnlyTreeSnapshot(seed + 0x100),
|
|
851
852
|
makeAppendOnlyTreeSnapshot(seed + 0x200),
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
853
|
+
makeAppendOnlyTreeSnapshot(seed + 0x300),
|
|
854
|
+
makeAppendOnlyTreeSnapshot(seed + 0x350),
|
|
855
|
+
makeTuple(MAX_CHECKPOINTS_PER_EPOCH, () => fr(seed), 0x400),
|
|
856
|
+
makeTuple(MAX_CHECKPOINTS_PER_EPOCH, () => makeFeeRecipient(seed), 0x500),
|
|
855
857
|
makeBlobAccumulator(seed + 0x600),
|
|
856
|
-
|
|
858
|
+
makeBlobAccumulator(seed + 0x700),
|
|
859
|
+
makeFinalBlobBatchingChallenges(seed + 0x800),
|
|
857
860
|
);
|
|
858
861
|
}
|
|
859
862
|
|
|
@@ -885,20 +888,14 @@ export function makeRootRollupPublicInputs(seed = 0): RootRollupPublicInputs {
|
|
|
885
888
|
return new RootRollupPublicInputs(
|
|
886
889
|
fr(seed + 0x100),
|
|
887
890
|
fr(seed + 0x200),
|
|
888
|
-
|
|
889
|
-
makeTuple(
|
|
891
|
+
fr(seed + 0x300),
|
|
892
|
+
makeTuple(MAX_CHECKPOINTS_PER_EPOCH, () => fr(seed), 0x400),
|
|
893
|
+
makeTuple(MAX_CHECKPOINTS_PER_EPOCH, () => makeFeeRecipient(seed), 0x500),
|
|
890
894
|
makeEpochConstantData(seed + 0x600),
|
|
891
895
|
makeFinalBlobAccumulator(seed + 0x700),
|
|
892
896
|
);
|
|
893
897
|
}
|
|
894
898
|
|
|
895
|
-
/**
|
|
896
|
-
* Makes content commitment
|
|
897
|
-
*/
|
|
898
|
-
export function makeContentCommitment(seed = 0): ContentCommitment {
|
|
899
|
-
return new ContentCommitment(fr(seed + 0x100), fr(seed + 0x200), fr(seed + 0x300));
|
|
900
|
-
}
|
|
901
|
-
|
|
902
899
|
export function makeBlockHeader(
|
|
903
900
|
seed = 0,
|
|
904
901
|
overrides: Partial<FieldsOf<Omit<BlockHeader, 'globalVariables'>>> & Partial<FieldsOf<GlobalVariables>> = {},
|
|
@@ -914,38 +911,20 @@ export function makeBlockHeader(
|
|
|
914
911
|
});
|
|
915
912
|
}
|
|
916
913
|
|
|
917
|
-
export function
|
|
918
|
-
seed = 0,
|
|
919
|
-
blockNumber?: number,
|
|
920
|
-
slotNumber?: number,
|
|
921
|
-
overrides: Partial<FieldsOf<L2BlockHeader>> = {},
|
|
922
|
-
) {
|
|
923
|
-
return new L2BlockHeader(
|
|
924
|
-
makeAppendOnlyTreeSnapshot(seed + 0x100),
|
|
925
|
-
overrides?.contentCommitment ?? makeContentCommitment(seed + 0x200),
|
|
926
|
-
overrides?.state ?? makeStateReference(seed + 0x600),
|
|
927
|
-
makeGlobalVariables((seed += 0x700), {
|
|
928
|
-
...(blockNumber !== undefined ? { blockNumber: BlockNumber(blockNumber) } : {}),
|
|
929
|
-
...(slotNumber !== undefined ? { slotNumber: SlotNumber(slotNumber) } : {}),
|
|
930
|
-
}),
|
|
931
|
-
new Fr(seed + 0x800),
|
|
932
|
-
new Fr(seed + 0x900),
|
|
933
|
-
new Fr(seed + 0xa00),
|
|
934
|
-
new Fr(seed + 0xb00),
|
|
935
|
-
);
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
export function makeCheckpointHeader(seed = 0) {
|
|
914
|
+
export function makeCheckpointHeader(seed = 0, overrides: Partial<FieldsOf<CheckpointHeader>> = {}) {
|
|
939
915
|
return CheckpointHeader.from({
|
|
940
916
|
lastArchiveRoot: fr(seed + 0x100),
|
|
941
917
|
blockHeadersHash: fr(seed + 0x150),
|
|
942
|
-
|
|
918
|
+
blobsHash: fr(seed + 0x200),
|
|
919
|
+
inHash: fr(seed + 0x210),
|
|
920
|
+
epochOutHash: fr(seed + 0x220),
|
|
943
921
|
slotNumber: SlotNumber(seed + 0x300),
|
|
944
922
|
timestamp: BigInt(seed + 0x400),
|
|
945
923
|
coinbase: makeEthAddress(seed + 0x500),
|
|
946
924
|
feeRecipient: makeAztecAddress(seed + 0x600),
|
|
947
925
|
gasFees: makeGasFees(seed + 0x700),
|
|
948
926
|
totalManaUsed: fr(seed + 0x800),
|
|
927
|
+
...overrides,
|
|
949
928
|
});
|
|
950
929
|
}
|
|
951
930
|
|
|
@@ -986,7 +965,7 @@ function makeCountedL2ToL1Message(seed = 0) {
|
|
|
986
965
|
return new CountedL2ToL1Message(makeL2ToL1Message(seed), seed + 2);
|
|
987
966
|
}
|
|
988
967
|
|
|
989
|
-
function makeScopedL2ToL1Message(seed = 1) {
|
|
968
|
+
export function makeScopedL2ToL1Message(seed = 1) {
|
|
990
969
|
return new ScopedL2ToL1Message(makeL2ToL1Message(seed), makeAztecAddress(seed + 3));
|
|
991
970
|
}
|
|
992
971
|
|
|
@@ -1309,11 +1288,11 @@ export async function makeContractInstanceFromClassId(
|
|
|
1309
1288
|
|
|
1310
1289
|
const saltedInitializationHash = await poseidon2HashWithSeparator(
|
|
1311
1290
|
[salt, initializationHash, deployer],
|
|
1312
|
-
|
|
1291
|
+
DomainSeparator.PARTIAL_ADDRESS,
|
|
1313
1292
|
);
|
|
1314
1293
|
const partialAddress = await poseidon2HashWithSeparator(
|
|
1315
1294
|
[classId, saltedInitializationHash],
|
|
1316
|
-
|
|
1295
|
+
DomainSeparator.PARTIAL_ADDRESS,
|
|
1317
1296
|
);
|
|
1318
1297
|
const address = await computeAddress(publicKeys, partialAddress);
|
|
1319
1298
|
return new SerializableContractInstance({
|
|
@@ -1696,3 +1675,94 @@ export async function makeAvmCircuitInputs(
|
|
|
1696
1675
|
export function fr(n: number): Fr {
|
|
1697
1676
|
return new Fr(BigInt(n));
|
|
1698
1677
|
}
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* Creates a random TxScopedL2Log with private log data.
|
|
1681
|
+
*/
|
|
1682
|
+
export function randomTxScopedPrivateL2Log(opts?: {
|
|
1683
|
+
tag?: Fr;
|
|
1684
|
+
txHash?: TxHash;
|
|
1685
|
+
blockNumber?: number;
|
|
1686
|
+
blockTimestamp?: bigint;
|
|
1687
|
+
noteHashes?: Fr[];
|
|
1688
|
+
firstNullifier?: Fr;
|
|
1689
|
+
}) {
|
|
1690
|
+
const log = PrivateLog.random(opts?.tag);
|
|
1691
|
+
return new TxScopedL2Log(
|
|
1692
|
+
opts?.txHash ?? TxHash.random(),
|
|
1693
|
+
BlockNumber(opts?.blockNumber ?? 1),
|
|
1694
|
+
opts?.blockTimestamp ?? 1n,
|
|
1695
|
+
log.getEmittedFields(),
|
|
1696
|
+
opts?.noteHashes ?? [Fr.random(), Fr.random()],
|
|
1697
|
+
opts?.firstNullifier ?? Fr.random(),
|
|
1698
|
+
);
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* Creates a random TxScopedL2Log with public log data.
|
|
1703
|
+
*/
|
|
1704
|
+
export async function randomTxScopedPublicL2Log(opts?: {
|
|
1705
|
+
txHash?: TxHash;
|
|
1706
|
+
blockNumber?: number;
|
|
1707
|
+
blockTimestamp?: bigint;
|
|
1708
|
+
noteHashes?: Fr[];
|
|
1709
|
+
firstNullifier?: Fr;
|
|
1710
|
+
}) {
|
|
1711
|
+
const log = await PublicLog.random();
|
|
1712
|
+
return new TxScopedL2Log(
|
|
1713
|
+
opts?.txHash ?? TxHash.random(),
|
|
1714
|
+
BlockNumber(opts?.blockNumber ?? 1),
|
|
1715
|
+
opts?.blockTimestamp ?? 1n,
|
|
1716
|
+
log.getEmittedFields(),
|
|
1717
|
+
opts?.noteHashes ?? [Fr.random(), Fr.random()],
|
|
1718
|
+
opts?.firstNullifier ?? Fr.random(),
|
|
1719
|
+
);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* Creates L2Tips with all tips pointing to the same block number.
|
|
1724
|
+
* Useful for mocking aztecNode.getL2Tips() in tests.
|
|
1725
|
+
* @param blockNumber - The block number to use for all tips.
|
|
1726
|
+
* @param hash - Optional hash for the block (defaults to empty string).
|
|
1727
|
+
* @param checkpointNumber - Optional checkpoint number (defaults to blockNumber).
|
|
1728
|
+
* @param checkpointHash - Optional checkpoint hash (defaults to block hash).
|
|
1729
|
+
* @returns L2Tips object with all tips at the same block.
|
|
1730
|
+
*/
|
|
1731
|
+
export function makeL2Tips(
|
|
1732
|
+
blockNumber: number | BlockNumber,
|
|
1733
|
+
hash = '',
|
|
1734
|
+
checkpointNumber?: number | CheckpointNumber,
|
|
1735
|
+
checkpointHash?: string,
|
|
1736
|
+
): L2Tips {
|
|
1737
|
+
const bn = typeof blockNumber === 'number' ? BlockNumber(blockNumber) : blockNumber;
|
|
1738
|
+
const cpn =
|
|
1739
|
+
checkpointNumber !== undefined
|
|
1740
|
+
? typeof checkpointNumber === 'number'
|
|
1741
|
+
? CheckpointNumber(checkpointNumber)
|
|
1742
|
+
: checkpointNumber
|
|
1743
|
+
: CheckpointNumber.fromBlockNumber(bn);
|
|
1744
|
+
const cph = checkpointHash ?? hash;
|
|
1745
|
+
return {
|
|
1746
|
+
proposed: { number: bn, hash },
|
|
1747
|
+
checkpointed: {
|
|
1748
|
+
block: { number: bn, hash },
|
|
1749
|
+
checkpoint: { number: cpn, hash: cph },
|
|
1750
|
+
},
|
|
1751
|
+
proven: {
|
|
1752
|
+
block: { number: bn, hash },
|
|
1753
|
+
checkpoint: { number: cpn, hash: cph },
|
|
1754
|
+
},
|
|
1755
|
+
finalized: {
|
|
1756
|
+
block: { number: bn, hash },
|
|
1757
|
+
checkpoint: { number: cpn, hash: cph },
|
|
1758
|
+
},
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
export async function randomExtendedDirectionalAppTaggingSecret(): Promise<ExtendedDirectionalAppTaggingSecret> {
|
|
1763
|
+
const resolvedApp = await AztecAddress.random();
|
|
1764
|
+
// Using the fromString method like this is messy as it leaks the underlying serialization format but I don't want to
|
|
1765
|
+
// expose the type's constructor just for tests since in prod the secret is always constructed via compute. Also this
|
|
1766
|
+
// method is tested in extended_directional_app_tagging_secret.test.ts hence all should be fine.
|
|
1767
|
+
return ExtendedDirectionalAppTaggingSecret.fromString(`${Fr.random().toString()}:${resolvedApp.toString()}`);
|
|
1768
|
+
}
|
package/src/tests/jest.ts
CHANGED
|
@@ -20,7 +20,7 @@ export function equalL2Blocks(a: any, b: any) {
|
|
|
20
20
|
// use a custom comparator because the blockHash property is lazily computed and one instance might not have it
|
|
21
21
|
return aAsL2Block.toBuffer().equals(bAsL2Block.toBuffer());
|
|
22
22
|
} else if (aAsL2Block || bAsL2Block) {
|
|
23
|
-
// one value is an
|
|
23
|
+
// one value is an L2Block and the other isn't. Definitely not equal.
|
|
24
24
|
return false;
|
|
25
25
|
} else {
|
|
26
26
|
// we don't know what they are, tell Jest to keep looking
|