@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/tx/tx_receipt.ts
CHANGED
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
import { BlockNumber, BlockNumberSchema } from '@aztec/foundation/branded-types';
|
|
2
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
2
|
|
|
4
3
|
import { z } from 'zod';
|
|
5
4
|
|
|
6
5
|
import { RevertCode } from '../avm/revert_code.js';
|
|
7
|
-
import {
|
|
6
|
+
import { BlockHash } from '../block/block_hash.js';
|
|
7
|
+
import { DebugLog } from '../logs/debug_log.js';
|
|
8
8
|
import { type ZodFor, schemas } from '../schemas/schemas.js';
|
|
9
9
|
import { TxHash } from './tx_hash.js';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Possible status of a transaction.
|
|
13
|
-
*/
|
|
11
|
+
/** Block inclusion/finalization status. */
|
|
14
12
|
export enum TxStatus {
|
|
15
13
|
DROPPED = 'dropped',
|
|
16
14
|
PENDING = 'pending',
|
|
15
|
+
PROPOSED = 'proposed',
|
|
16
|
+
CHECKPOINTED = 'checkpointed',
|
|
17
|
+
PROVEN = 'proven',
|
|
18
|
+
FINALIZED = 'finalized', // TODO(#13569): Implement finalized status properly
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Tx status sorted by finalization progress. */
|
|
22
|
+
export const SortedTxStatuses: TxStatus[] = [
|
|
23
|
+
TxStatus.DROPPED,
|
|
24
|
+
TxStatus.PENDING,
|
|
25
|
+
TxStatus.PROPOSED,
|
|
26
|
+
TxStatus.CHECKPOINTED,
|
|
27
|
+
TxStatus.PROVEN,
|
|
28
|
+
TxStatus.FINALIZED,
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
/** Execution result - only set when tx is in a block. */
|
|
32
|
+
export enum TxExecutionResult {
|
|
17
33
|
SUCCESS = 'success',
|
|
18
34
|
APP_LOGIC_REVERTED = 'app_logic_reverted',
|
|
19
35
|
TEARDOWN_REVERTED = 'teardown_reverted',
|
|
@@ -30,20 +46,58 @@ export class TxReceipt {
|
|
|
30
46
|
constructor(
|
|
31
47
|
/** A unique identifier for a transaction. */
|
|
32
48
|
public txHash: TxHash,
|
|
33
|
-
/** The transaction's status. */
|
|
49
|
+
/** The transaction's block finalization status. */
|
|
34
50
|
public status: TxStatus,
|
|
51
|
+
/** The execution result of the transaction, only set when tx is in a block. */
|
|
52
|
+
public executionResult: TxExecutionResult | undefined,
|
|
35
53
|
/** Description of transaction error, if any. */
|
|
36
|
-
public error: string,
|
|
54
|
+
public error: string | undefined,
|
|
37
55
|
/** The transaction fee paid for the transaction. */
|
|
38
56
|
public transactionFee?: bigint,
|
|
39
57
|
/** The hash of the block containing the transaction. */
|
|
40
|
-
public blockHash?:
|
|
58
|
+
public blockHash?: BlockHash,
|
|
41
59
|
/** The block number in which the transaction was included. */
|
|
42
60
|
public blockNumber?: BlockNumber,
|
|
61
|
+
/**
|
|
62
|
+
* Debug logs collected during public function execution. Served only when the node is in test mode and placed on
|
|
63
|
+
* the receipt only because it's a convenient place for it (the logs are printed out by the wallet when a mined
|
|
64
|
+
* tx receipt is obtained).
|
|
65
|
+
*/
|
|
66
|
+
public debugLogs?: DebugLog[],
|
|
43
67
|
) {}
|
|
44
68
|
|
|
69
|
+
/** Returns true if the transaction was executed successfully. */
|
|
70
|
+
hasExecutionSucceeded(): boolean {
|
|
71
|
+
return this.executionResult === TxExecutionResult.SUCCESS;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Returns true if the transaction execution reverted. */
|
|
75
|
+
hasExecutionReverted(): boolean {
|
|
76
|
+
return this.executionResult !== undefined && this.executionResult !== TxExecutionResult.SUCCESS;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Returns true if the transaction has been included in a block (proposed, checkpointed, proven, or finalized). */
|
|
80
|
+
isMined(): boolean {
|
|
81
|
+
return (
|
|
82
|
+
this.status === TxStatus.PROPOSED ||
|
|
83
|
+
this.status === TxStatus.CHECKPOINTED ||
|
|
84
|
+
this.status === TxStatus.PROVEN ||
|
|
85
|
+
this.status === TxStatus.FINALIZED
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Returns true if the transaction is pending. */
|
|
90
|
+
isPending(): boolean {
|
|
91
|
+
return this.status === TxStatus.PENDING;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Returns true if the transaction was dropped. */
|
|
95
|
+
isDropped(): boolean {
|
|
96
|
+
return this.status === TxStatus.DROPPED;
|
|
97
|
+
}
|
|
98
|
+
|
|
45
99
|
static empty() {
|
|
46
|
-
return new TxReceipt(TxHash.zero(), TxStatus.DROPPED,
|
|
100
|
+
return new TxReceipt(TxHash.zero(), TxStatus.DROPPED, undefined, undefined);
|
|
47
101
|
}
|
|
48
102
|
|
|
49
103
|
static get schema(): ZodFor<TxReceipt> {
|
|
@@ -51,34 +105,47 @@ export class TxReceipt {
|
|
|
51
105
|
.object({
|
|
52
106
|
txHash: TxHash.schema,
|
|
53
107
|
status: z.nativeEnum(TxStatus),
|
|
54
|
-
|
|
55
|
-
|
|
108
|
+
executionResult: z.nativeEnum(TxExecutionResult).optional(),
|
|
109
|
+
error: z.string().optional(),
|
|
110
|
+
blockHash: BlockHash.schema.optional(),
|
|
56
111
|
blockNumber: BlockNumberSchema.optional(),
|
|
57
112
|
transactionFee: schemas.BigInt.optional(),
|
|
113
|
+
debugLogs: z.array(DebugLog.schema).optional(),
|
|
58
114
|
})
|
|
59
|
-
.transform(TxReceipt.from);
|
|
115
|
+
.transform(fields => TxReceipt.from(fields));
|
|
60
116
|
}
|
|
61
117
|
|
|
62
|
-
static from(fields:
|
|
118
|
+
static from(fields: {
|
|
119
|
+
txHash: TxHash;
|
|
120
|
+
status: TxStatus;
|
|
121
|
+
executionResult?: TxExecutionResult;
|
|
122
|
+
error?: string;
|
|
123
|
+
transactionFee?: bigint;
|
|
124
|
+
blockHash?: BlockHash;
|
|
125
|
+
blockNumber?: BlockNumber;
|
|
126
|
+
debugLogs?: DebugLog[];
|
|
127
|
+
}) {
|
|
63
128
|
return new TxReceipt(
|
|
64
129
|
fields.txHash,
|
|
65
130
|
fields.status,
|
|
131
|
+
fields.executionResult,
|
|
66
132
|
fields.error,
|
|
67
133
|
fields.transactionFee,
|
|
68
134
|
fields.blockHash,
|
|
69
135
|
fields.blockNumber,
|
|
136
|
+
fields.debugLogs,
|
|
70
137
|
);
|
|
71
138
|
}
|
|
72
139
|
|
|
73
|
-
public static
|
|
140
|
+
public static executionResultFromRevertCode(revertCode: RevertCode): TxExecutionResult {
|
|
74
141
|
if (revertCode.equals(RevertCode.OK)) {
|
|
75
|
-
return
|
|
142
|
+
return TxExecutionResult.SUCCESS;
|
|
76
143
|
} else if (revertCode.equals(RevertCode.APP_LOGIC_REVERTED)) {
|
|
77
|
-
return
|
|
144
|
+
return TxExecutionResult.APP_LOGIC_REVERTED;
|
|
78
145
|
} else if (revertCode.equals(RevertCode.TEARDOWN_REVERTED)) {
|
|
79
|
-
return
|
|
146
|
+
return TxExecutionResult.TEARDOWN_REVERTED;
|
|
80
147
|
} else if (revertCode.equals(RevertCode.BOTH_REVERTED)) {
|
|
81
|
-
return
|
|
148
|
+
return TxExecutionResult.BOTH_REVERTED;
|
|
82
149
|
} else {
|
|
83
150
|
throw new Error(`Unknown revert code: ${revertCode.getCode()}`);
|
|
84
151
|
}
|
package/src/tx/tx_request.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DomainSeparator, TX_REQUEST_LENGTH } from '@aztec/constants';
|
|
2
2
|
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
|
|
3
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
4
|
import { BufferReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
|
|
@@ -68,7 +68,7 @@ export class TxRequest {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
hash() {
|
|
71
|
-
return poseidon2HashWithSeparator(this.toFields(),
|
|
71
|
+
return poseidon2HashWithSeparator(this.toFields(), DomainSeparator.TX_REQUEST);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
static empty() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnyTx, TxValidationResult, TxValidator } from './tx_validator.js';
|
|
2
2
|
|
|
3
|
-
export class EmptyTxValidator<T
|
|
3
|
+
export class EmptyTxValidator<T = AnyTx> implements TxValidator<T> {
|
|
4
4
|
public validateTx(_tx: T): Promise<TxValidationResult> {
|
|
5
5
|
return Promise.resolve({ result: 'valid' });
|
|
6
6
|
}
|
|
@@ -6,13 +6,17 @@ export const TX_ERROR_GAS_LIMIT_TOO_HIGH = 'Gas limit is higher than the amount
|
|
|
6
6
|
|
|
7
7
|
// Phases
|
|
8
8
|
export const TX_ERROR_SETUP_FUNCTION_NOT_ALLOWED = 'Setup function not on allow list';
|
|
9
|
+
export const TX_ERROR_SETUP_FUNCTION_UNKNOWN_CONTRACT = 'Setup function targets unknown contract';
|
|
10
|
+
export const TX_ERROR_SETUP_ONLY_SELF_WRONG_SENDER = 'Setup only_self function called with incorrect msg_sender';
|
|
11
|
+
export const TX_ERROR_SETUP_NULL_MSG_SENDER = 'Setup function called with null msg sender';
|
|
12
|
+
export const TX_ERROR_SETUP_WRONG_CALLDATA_LENGTH = 'Setup function called with wrong calldata length';
|
|
9
13
|
|
|
10
14
|
// Nullifiers
|
|
11
15
|
export const TX_ERROR_DUPLICATE_NULLIFIER_IN_TX = 'Duplicate nullifier in tx';
|
|
12
16
|
export const TX_ERROR_EXISTING_NULLIFIER = 'Existing nullifier';
|
|
13
17
|
|
|
14
18
|
// Metadata
|
|
15
|
-
export const
|
|
19
|
+
export const TX_ERROR_INVALID_EXPIRATION_TIMESTAMP = 'Invalid expiration timestamp';
|
|
16
20
|
export const TX_ERROR_INCORRECT_L1_CHAIN_ID = 'Incorrect L1 chain id';
|
|
17
21
|
export const TX_ERROR_INCORRECT_ROLLUP_VERSION = 'Incorrect rollup version';
|
|
18
22
|
export const TX_ERROR_INCORRECT_VK_TREE_ROOT = 'Incorrect verification keys tree root';
|
|
@@ -31,6 +35,9 @@ export const TX_ERROR_CONTRACT_CLASS_LOGS = 'Mismatched contract class logs';
|
|
|
31
35
|
export const TX_ERROR_CONTRACT_CLASS_LOG_SORTING = 'Incorrectly sorted contract class logs';
|
|
32
36
|
export const TX_ERROR_INCORRECT_HASH = 'Incorrect tx hash';
|
|
33
37
|
|
|
38
|
+
// Size
|
|
39
|
+
export const TX_ERROR_SIZE_ABOVE_LIMIT = 'Transaction size above size limit';
|
|
40
|
+
|
|
34
41
|
// Block header
|
|
35
42
|
export const TX_ERROR_BLOCK_HEADER = 'Block header not found';
|
|
36
43
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { zodFor } from '../../schemas/schemas.js';
|
|
4
4
|
import type { ProcessedTx } from '../processed_tx.js';
|
|
5
5
|
import type { Tx } from '../tx.js';
|
|
6
6
|
import type { TxHash } from '../tx_hash.js';
|
|
@@ -20,12 +20,14 @@ export type TxValidationResult =
|
|
|
20
20
|
| { result: 'invalid'; reason: string[] }
|
|
21
21
|
| { result: 'skipped'; reason: string[] };
|
|
22
22
|
|
|
23
|
-
export interface TxValidator<T
|
|
23
|
+
export interface TxValidator<T = AnyTx> {
|
|
24
24
|
validateTx(tx: T): Promise<TxValidationResult>;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export const TxValidationResultSchema =
|
|
28
|
-
z.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
export const TxValidationResultSchema = zodFor<TxValidationResult>()(
|
|
28
|
+
z.discriminatedUnion('result', [
|
|
29
|
+
z.object({ result: z.literal('valid') }),
|
|
30
|
+
z.object({ result: z.literal('invalid'), reason: z.array(z.string()) }),
|
|
31
|
+
z.object({ result: z.literal('skipped'), reason: z.array(z.string()) }),
|
|
32
|
+
]),
|
|
33
|
+
);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './package_version.js';
|
|
2
|
+
export * from './version_checker.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { fileURLToPath } from '@aztec/foundation/url';
|
|
2
|
+
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
4
|
+
import { dirname, resolve } from 'path';
|
|
5
|
+
|
|
6
|
+
/** Returns the package version from the release-please manifest or the package.json, or undefined if not found. */
|
|
7
|
+
export function getPackageVersion(): string | undefined {
|
|
8
|
+
const dir = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
|
|
10
|
+
// Try the release-please manifest first (works in dev/repo checkout).
|
|
11
|
+
try {
|
|
12
|
+
const releasePleaseManifestPath = resolve(dir, '../../../../.release-please-manifest.json');
|
|
13
|
+
return JSON.parse(readFileSync(releasePleaseManifestPath).toString())['.'];
|
|
14
|
+
} catch {
|
|
15
|
+
// Not in a repo checkout, fall through.
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Fall back to the stdlib package.json version (works in npm-installed packages).
|
|
19
|
+
try {
|
|
20
|
+
const packageJsonPath = resolve(dir, '../../package.json');
|
|
21
|
+
const version = JSON.parse(readFileSync(packageJsonPath).toString()).version;
|
|
22
|
+
if (version && version !== '0.1.0') {
|
|
23
|
+
return version;
|
|
24
|
+
}
|
|
25
|
+
} catch {
|
|
26
|
+
// No package.json found either.
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
+
import { RunningPromise } from '@aztec/foundation/promise';
|
|
3
|
+
|
|
4
|
+
import { EventEmitter } from 'node:events';
|
|
5
|
+
|
|
6
|
+
export type EventMap = {
|
|
7
|
+
newVersion: [{ name: string; currentVersion: string; latestVersion: string }];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type VersionCheck = {
|
|
11
|
+
name: string;
|
|
12
|
+
currentVersion: string;
|
|
13
|
+
getLatestVersion: () => Promise<string | undefined>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export class VersionChecker extends EventEmitter<EventMap> {
|
|
17
|
+
private runningPromise: RunningPromise;
|
|
18
|
+
constructor(
|
|
19
|
+
private checks: Array<VersionCheck>,
|
|
20
|
+
intervalCheckMs = 60_000,
|
|
21
|
+
private logger = createLogger('version_checker'),
|
|
22
|
+
) {
|
|
23
|
+
super();
|
|
24
|
+
this.runningPromise = new RunningPromise(this.run, logger, intervalCheckMs);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public start(): void {
|
|
28
|
+
if (this.runningPromise.isRunning()) {
|
|
29
|
+
this.logger.warn('VersionChecker is already running');
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
this.runningPromise.start();
|
|
34
|
+
this.logger.info('Version check started');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public trigger(): Promise<void> {
|
|
38
|
+
return this.runningPromise.trigger();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public async stop(): Promise<void> {
|
|
42
|
+
if (!this.runningPromise.isRunning()) {
|
|
43
|
+
this.logger.warn('VersionChecker is not running');
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
await this.runningPromise.stop();
|
|
48
|
+
this.logger.info('Version checker stopped');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private run = async () => {
|
|
52
|
+
await Promise.allSettled(this.checks.map(check => this.checkVersion(check)));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
private async checkVersion({ name, currentVersion, getLatestVersion }: VersionCheck): Promise<void> {
|
|
56
|
+
try {
|
|
57
|
+
const latestVersion = await getLatestVersion();
|
|
58
|
+
if (latestVersion && latestVersion !== currentVersion) {
|
|
59
|
+
this.emit('newVersion', { name, latestVersion, currentVersion });
|
|
60
|
+
}
|
|
61
|
+
} catch (err) {
|
|
62
|
+
this.logger.warn(`Error checking for new ${name} versions: ${err}`, { err });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
package/src/validators/errors.ts
CHANGED
|
@@ -36,6 +36,15 @@ export class FailedToReExecuteTransactionsError extends ValidatorError {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
export class ReExInitialStateMismatchError extends ValidatorError {
|
|
40
|
+
constructor(
|
|
41
|
+
public readonly expectedArchiveRoot: Fr,
|
|
42
|
+
public readonly actualArchiveRoot: Fr,
|
|
43
|
+
) {
|
|
44
|
+
super('Re-execution initial state mismatch');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
39
48
|
export class ReExStateMismatchError extends ValidatorError {
|
|
40
49
|
constructor(
|
|
41
50
|
public readonly expectedArchiveRoot: Fr,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { schemas, zodFor } from '@aztec/foundation/schemas';
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
@@ -11,20 +11,25 @@ import type {
|
|
|
11
11
|
ValidatorsStats,
|
|
12
12
|
} from './types.js';
|
|
13
13
|
|
|
14
|
-
export const ValidatorStatusInSlotSchema =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
export const ValidatorStatusInSlotSchema = zodFor<ValidatorStatusInSlot>()(
|
|
15
|
+
z.enum([
|
|
16
|
+
'checkpoint-mined',
|
|
17
|
+
'checkpoint-proposed',
|
|
18
|
+
'checkpoint-missed',
|
|
19
|
+
'blocks-missed',
|
|
20
|
+
'attestation-sent',
|
|
21
|
+
'attestation-missed',
|
|
22
|
+
]),
|
|
23
|
+
);
|
|
21
24
|
|
|
22
|
-
export const ValidatorStatusHistorySchema =
|
|
23
|
-
z.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
25
|
+
export const ValidatorStatusHistorySchema = zodFor<ValidatorStatusHistory>()(
|
|
26
|
+
z.array(
|
|
27
|
+
z.object({
|
|
28
|
+
slot: schemas.SlotNumber,
|
|
29
|
+
status: ValidatorStatusInSlotSchema,
|
|
30
|
+
}),
|
|
31
|
+
),
|
|
32
|
+
);
|
|
28
33
|
|
|
29
34
|
export const ValidatorStatusHistorySchemaArray = z.array(ValidatorStatusHistorySchema);
|
|
30
35
|
|
|
@@ -36,40 +41,48 @@ const ValidatorTimeStatSchema = z.object({
|
|
|
36
41
|
date: z.string(),
|
|
37
42
|
});
|
|
38
43
|
|
|
39
|
-
const ValidatorMissedStatsSchema =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
const ValidatorMissedStatsSchema = zodFor<ValidatorMissedStats>()(
|
|
45
|
+
z.object({
|
|
46
|
+
currentStreak: schemas.Integer,
|
|
47
|
+
rate: z.number().optional(),
|
|
48
|
+
count: schemas.Integer,
|
|
49
|
+
total: schemas.Integer,
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
45
52
|
|
|
46
|
-
export const ValidatorStatsSchema =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
export const ValidatorStatsSchema = zodFor<ValidatorStats>()(
|
|
54
|
+
z.object({
|
|
55
|
+
address: schemas.EthAddress,
|
|
56
|
+
lastProposal: ValidatorTimeStatSchema.optional(),
|
|
57
|
+
lastAttestation: ValidatorTimeStatSchema.optional(),
|
|
58
|
+
totalSlots: schemas.Integer,
|
|
59
|
+
missedProposals: ValidatorMissedStatsSchema,
|
|
60
|
+
missedAttestations: ValidatorMissedStatsSchema,
|
|
61
|
+
history: ValidatorStatusHistorySchema,
|
|
62
|
+
}),
|
|
63
|
+
);
|
|
55
64
|
|
|
56
|
-
export const ValidatorsStatsSchema =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
export const ValidatorsStatsSchema = zodFor<ValidatorsStats>()(
|
|
66
|
+
z.object({
|
|
67
|
+
stats: z.record(ValidatorStatsSchema),
|
|
68
|
+
lastProcessedSlot: schemas.SlotNumber.optional(),
|
|
69
|
+
initialSlot: schemas.SlotNumber.optional(),
|
|
70
|
+
slotWindow: schemas.Integer,
|
|
71
|
+
}),
|
|
72
|
+
);
|
|
62
73
|
|
|
63
|
-
export const SingleValidatorStatsSchema =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
z.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
export const SingleValidatorStatsSchema = zodFor<SingleValidatorStats>()(
|
|
75
|
+
z.object({
|
|
76
|
+
validator: ValidatorStatsSchema,
|
|
77
|
+
allTimeProvenPerformance: z.array(
|
|
78
|
+
z.object({
|
|
79
|
+
missed: schemas.Integer,
|
|
80
|
+
total: schemas.Integer,
|
|
81
|
+
epoch: schemas.EpochNumber,
|
|
82
|
+
}),
|
|
83
|
+
),
|
|
84
|
+
lastProcessedSlot: schemas.SlotNumber.optional(),
|
|
85
|
+
initialSlot: schemas.SlotNumber.optional(),
|
|
86
|
+
slotWindow: schemas.Integer,
|
|
87
|
+
}),
|
|
88
|
+
);
|
package/src/validators/types.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
|
|
4
|
-
export type ValidatorStatusType = '
|
|
4
|
+
export type ValidatorStatusType = 'proposer' | 'attestation';
|
|
5
5
|
|
|
6
6
|
export type ValidatorStatusInSlot =
|
|
7
|
-
| '
|
|
8
|
-
| '
|
|
9
|
-
| '
|
|
7
|
+
| 'checkpoint-mined'
|
|
8
|
+
| 'checkpoint-proposed'
|
|
9
|
+
| 'checkpoint-missed'
|
|
10
|
+
| 'blocks-missed'
|
|
10
11
|
| 'attestation-sent'
|
|
11
12
|
| 'attestation-missed';
|
|
12
13
|
|
package/src/zkpassport/index.ts
CHANGED
|
@@ -5,14 +5,13 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
|
5
5
|
import { withoutHexPrefix } from '@aztec/foundation/string';
|
|
6
6
|
|
|
7
7
|
export type ViemZkPassportProofParams = {
|
|
8
|
+
version: `0x${string}`;
|
|
8
9
|
proofVerificationData: {
|
|
9
10
|
vkeyHash: `0x${string}`;
|
|
10
11
|
proof: `0x${string}`;
|
|
11
12
|
publicInputs: `0x${string}`[];
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
-
committedInputs: `0x${string}`;
|
|
15
|
-
};
|
|
14
|
+
committedInputs: `0x${string}`;
|
|
16
15
|
serviceConfig: {
|
|
17
16
|
validityPeriodInSeconds: bigint;
|
|
18
17
|
domain: string;
|
|
@@ -91,7 +90,7 @@ export class ZkPassportProofParams {
|
|
|
91
90
|
Buffer32.fromString(params.proofVerificationData.vkeyHash),
|
|
92
91
|
Buffer.from(withoutHexPrefix(params.proofVerificationData.proof), 'hex'),
|
|
93
92
|
params.proofVerificationData.publicInputs.map(input => Fr.fromString(input)),
|
|
94
|
-
Buffer.from(withoutHexPrefix(params.
|
|
93
|
+
Buffer.from(withoutHexPrefix(params.committedInputs), 'hex'),
|
|
95
94
|
params.serviceConfig.validityPeriodInSeconds,
|
|
96
95
|
params.serviceConfig.domain,
|
|
97
96
|
params.serviceConfig.scope,
|
|
@@ -99,20 +98,20 @@ export class ZkPassportProofParams {
|
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
toViem(): ViemZkPassportProofParams {
|
|
101
|
+
// Version is set to bytes32(0) as per zkpassport library convention
|
|
102
102
|
return {
|
|
103
|
-
|
|
104
|
-
devMode: this.devMode,
|
|
105
|
-
validityPeriodInSeconds: this.validityPeriodInSeconds,
|
|
106
|
-
domain: this.domain,
|
|
107
|
-
scope: this.scope,
|
|
108
|
-
},
|
|
103
|
+
version: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
109
104
|
proofVerificationData: {
|
|
110
105
|
vkeyHash: this.vkeyHash.toString(),
|
|
111
106
|
proof: `0x${this.proof.toString('hex')}`,
|
|
112
107
|
publicInputs: this.publicInputs.map(input => input.toString()),
|
|
113
108
|
},
|
|
114
|
-
|
|
115
|
-
|
|
109
|
+
committedInputs: `0x${this.committedInputs.toString('hex')}`,
|
|
110
|
+
serviceConfig: {
|
|
111
|
+
devMode: this.devMode,
|
|
112
|
+
validityPeriodInSeconds: this.validityPeriodInSeconds,
|
|
113
|
+
domain: this.domain,
|
|
114
|
+
scope: this.scope,
|
|
116
115
|
},
|
|
117
116
|
};
|
|
118
117
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
|
-
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
4
|
-
import { L2BlockHeader } from './l2_block_header.js';
|
|
5
|
-
export declare function makeL2BlockHeader(seed?: number, blockNumber?: number, slotNumber?: number, overrides?: Partial<FieldsOf<L2BlockHeader>>, inHash?: Fr): L2BlockHeader;
|
|
6
|
-
/**
|
|
7
|
-
* Makes arbitrary append only tree snapshot.
|
|
8
|
-
* @param seed - The seed to use for generating the append only tree snapshot.
|
|
9
|
-
* @returns An append only tree snapshot.
|
|
10
|
-
*/
|
|
11
|
-
export declare function makeAppendOnlyTreeSnapshot(seed?: number): AppendOnlyTreeSnapshot;
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDJfYmxvY2tfY29kZV90b19wdXJnZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Jsb2NrL2wyX2Jsb2NrX2NvZGVfdG9fcHVyZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBRXBELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBSXhELE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHVDQUF1QyxDQUFDO0FBSy9FLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUVyRCx3QkFBZ0IsaUJBQWlCLENBQy9CLElBQUksU0FBSSxFQUNSLFdBQVcsQ0FBQyxFQUFFLE1BQU0sRUFDcEIsVUFBVSxDQUFDLEVBQUUsTUFBTSxFQUNuQixTQUFTLEdBQUUsT0FBTyxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQUMsQ0FBTSxFQUNoRCxNQUFNLENBQUMsRUFBRSxFQUFFLGlCQWVaO0FBRUQ7Ozs7R0FJRztBQUNILHdCQUFnQiwwQkFBMEIsQ0FBQyxJQUFJLFNBQUksR0FBRyxzQkFBc0IsQ0FFM0UifQ==
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"l2_block_code_to_purge.d.ts","sourceRoot":"","sources":["../../src/block/l2_block_code_to_purge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAK/E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,wBAAgB,iBAAiB,CAC/B,IAAI,SAAI,EACR,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAM,EAChD,MAAM,CAAC,EAAE,EAAE,iBAeZ;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,SAAI,GAAG,sBAAsB,CAE3E"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
-
import { compact } from '@aztec/foundation/collection';
|
|
3
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
|
-
import { AztecAddress } from '../aztec-address/index.js';
|
|
6
|
-
import { GasFees } from '../gas/gas_fees.js';
|
|
7
|
-
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
8
|
-
import { ContentCommitment } from '../tx/content_commitment.js';
|
|
9
|
-
import { GlobalVariables } from '../tx/global_variables.js';
|
|
10
|
-
import { PartialStateReference } from '../tx/partial_state_reference.js';
|
|
11
|
-
import { StateReference } from '../tx/state_reference.js';
|
|
12
|
-
import { L2BlockHeader } from './l2_block_header.js';
|
|
13
|
-
export function makeL2BlockHeader(seed = 0, blockNumber, slotNumber, overrides = {}, inHash) {
|
|
14
|
-
return new L2BlockHeader(makeAppendOnlyTreeSnapshot(seed + 0x100), overrides?.contentCommitment ?? makeContentCommitment(seed + 0x200, inHash), overrides?.state ?? makeStateReference(seed + 0x600), makeGlobalVariables(seed += 0x700, {
|
|
15
|
-
...blockNumber ? {
|
|
16
|
-
blockNumber: BlockNumber(blockNumber)
|
|
17
|
-
} : {},
|
|
18
|
-
...slotNumber ? {
|
|
19
|
-
slotNumber: SlotNumber(slotNumber)
|
|
20
|
-
} : {}
|
|
21
|
-
}), new Fr(seed + 0x300), new Fr(seed + 0x800), new Fr(seed + 0x900), new Fr(seed + 0xa00));
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Makes arbitrary append only tree snapshot.
|
|
25
|
-
* @param seed - The seed to use for generating the append only tree snapshot.
|
|
26
|
-
* @returns An append only tree snapshot.
|
|
27
|
-
*/ export function makeAppendOnlyTreeSnapshot(seed = 1) {
|
|
28
|
-
return new AppendOnlyTreeSnapshot(new Fr(seed), seed);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Makes content commitment
|
|
32
|
-
*/ function makeContentCommitment(seed = 0, inHash) {
|
|
33
|
-
return new ContentCommitment(new Fr(seed + 0x100), inHash ?? new Fr(seed + 0x200), new Fr(seed + 0x300));
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Makes arbitrary state reference.
|
|
37
|
-
* @param seed - The seed to use for generating the state reference.
|
|
38
|
-
* @returns A state reference.
|
|
39
|
-
*/ function makeStateReference(seed = 0) {
|
|
40
|
-
return new StateReference(makeAppendOnlyTreeSnapshot(seed), makePartialStateReference(seed + 1));
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Makes arbitrary partial state reference.
|
|
44
|
-
* @param seed - The seed to use for generating the partial state reference.
|
|
45
|
-
* @returns A partial state reference.
|
|
46
|
-
*/ function makePartialStateReference(seed = 0) {
|
|
47
|
-
return new PartialStateReference(makeAppendOnlyTreeSnapshot(seed), makeAppendOnlyTreeSnapshot(seed + 1), makeAppendOnlyTreeSnapshot(seed + 2));
|
|
48
|
-
}
|
|
49
|
-
function makeGlobalVariables(seed = 1, overrides = {}) {
|
|
50
|
-
return GlobalVariables.from({
|
|
51
|
-
chainId: new Fr(seed),
|
|
52
|
-
version: new Fr(seed + 1),
|
|
53
|
-
blockNumber: BlockNumber(seed + 2),
|
|
54
|
-
slotNumber: SlotNumber(seed + 3),
|
|
55
|
-
timestamp: BigInt(seed + 4),
|
|
56
|
-
coinbase: EthAddress.fromField(new Fr(seed + 5)),
|
|
57
|
-
feeRecipient: AztecAddress.fromField(new Fr(seed + 6)),
|
|
58
|
-
gasFees: new GasFees(seed + 7, seed + 8),
|
|
59
|
-
...compact(overrides)
|
|
60
|
-
});
|
|
61
|
-
}
|