@aztec/stdlib 0.0.1-commit.b655e406 → 0.0.1-commit.fce3e4f
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 +92 -107
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +2 -2
- package/dest/abi/authorization_selector.d.ts +1 -1
- package/dest/abi/authorization_selector.d.ts.map +1 -1
- package/dest/abi/buffer.d.ts +1 -1
- package/dest/abi/contract_artifact.d.ts +1 -1
- package/dest/abi/contract_artifact.js +3 -3
- package/dest/abi/decoder.d.ts +1 -1
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/encoder.d.ts +1 -1
- package/dest/abi/event_metadata_definition.d.ts +1 -1
- package/dest/abi/event_selector.d.ts +1 -1
- package/dest/abi/event_selector.d.ts.map +1 -1
- package/dest/abi/function_call.d.ts +1 -9
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_selector.d.ts +1 -1
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/index.d.ts +1 -1
- package/dest/abi/mocked_keys.d.ts +1 -1
- package/dest/abi/note_selector.d.ts +1 -1
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/selector.d.ts +1 -1
- package/dest/abi/selector.d.ts.map +1 -1
- package/dest/abi/utils.d.ts +1 -1
- package/dest/auth_witness/auth_witness.d.ts +1 -2
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/auth_witness/index.d.ts +1 -1
- package/dest/avm/avm.d.ts +4189 -2057
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +375 -16
- package/dest/avm/avm_accumulated_data.d.ts +25 -36
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +18 -0
- package/dest/avm/avm_circuit_public_inputs.d.ts +156 -146
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +9 -0
- package/dest/avm/avm_proving_request.d.ts +2023 -1503
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.d.ts +1 -13
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +1 -13
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/index.d.ts +1 -1
- package/dest/avm/message_pack.d.ts +2 -2
- package/dest/avm/message_pack.d.ts.map +1 -1
- package/dest/avm/message_pack.js +3 -0
- package/dest/avm/public_call_stack_item_compressed.d.ts +1 -3
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
- package/dest/avm/public_data_read.d.ts +1 -10
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.d.ts +1 -10
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_write.d.ts +13 -11
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_data_write.js +9 -0
- package/dest/avm/public_inner_call_request.d.ts +1 -4
- package/dest/avm/public_inner_call_request.d.ts.map +1 -1
- package/dest/avm/revert_code.d.ts +16 -7
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +24 -8
- package/dest/aztec-address/index.d.ts +10 -1
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +24 -2
- package/dest/block/attestation_info.d.ts +3 -1
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +4 -1
- package/dest/block/block_hash.d.ts +1 -1
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/body.d.ts +8 -8
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +11 -27
- package/dest/block/in_block.d.ts +3 -11
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/index.d.ts +2 -1
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +1 -0
- package/dest/block/l2_block.d.ts +15 -7
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +54 -4
- package/dest/block/l2_block_code_to_purge.d.ts +1 -1
- package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
- package/dest/block/l2_block_code_to_purge.js +4 -3
- package/dest/block/l2_block_header.d.ts +10 -12
- package/dest/block/l2_block_header.d.ts.map +1 -1
- package/dest/block/l2_block_header.js +18 -11
- package/dest/block/l2_block_info.d.ts +9 -9
- package/dest/block/l2_block_new.d.ts +108 -0
- package/dest/block/l2_block_new.d.ts.map +1 -0
- package/dest/block/l2_block_new.js +135 -0
- package/dest/block/l2_block_number.d.ts +1 -1
- package/dest/block/l2_block_source.d.ts +10 -9
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_stream/index.d.ts +1 -1
- package/dest/block/l2_block_stream/interfaces.d.ts +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +1 -6
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +1 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.d.ts +16 -5
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.js +14 -0
- package/dest/block/proposal/committee_attestation.d.ts +1 -1
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
- package/dest/block/proposal/index.d.ts +1 -1
- package/dest/block/published_l2_block.d.ts +15 -28
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +12 -27
- package/dest/block/test/index.d.ts +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
- package/dest/block/validate_block_result.d.ts +6 -178
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +4 -3
- package/dest/checkpoint/checkpoint.d.ts +121 -0
- package/dest/checkpoint/checkpoint.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint.js +62 -0
- package/dest/checkpoint/index.d.ts +3 -2
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +2 -1
- package/dest/checkpoint/published_checkpoint.d.ts +212 -0
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -0
- package/dest/checkpoint/published_checkpoint.js +71 -0
- package/dest/config/chain-config.d.ts +1 -1
- package/dest/config/index.d.ts +1 -1
- package/dest/config/node-rpc-config.d.ts +1 -1
- package/dest/contract/artifact_hash.d.ts +2 -2
- package/dest/contract/artifact_hash.d.ts.map +1 -1
- package/dest/contract/complete_address.d.ts +1 -4
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/contract_address.d.ts +1 -1
- package/dest/contract/contract_class.d.ts +1 -1
- package/dest/contract/contract_class_id.d.ts +1 -1
- package/dest/contract/contract_class_metadata.d.ts +1 -1
- package/dest/contract/contract_deployment_data.d.ts +119 -0
- package/dest/contract/contract_deployment_data.d.ts.map +1 -0
- package/dest/contract/contract_deployment_data.js +99 -0
- package/dest/contract/contract_function_dao.d.ts +1 -1
- package/dest/contract/contract_instance.d.ts +1 -1
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance_update.d.ts +1 -1
- package/dest/contract/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/contract_metadata.d.ts +1 -1
- package/dest/contract/deployment_info.d.ts +1 -1
- package/dest/contract/index.d.ts +2 -1
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +1 -0
- package/dest/contract/interfaces/contract_class.d.ts +41 -122
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_data_source.d.ts +1 -1
- package/dest/contract/interfaces/contract_instance.d.ts +11 -11
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance_update.d.ts +3 -3
- package/dest/contract/interfaces/index.d.ts +1 -1
- package/dest/contract/interfaces/node-info.d.ts +1 -1
- package/dest/contract/interfaces/protocol_contract_addresses.d.ts +1 -1
- package/dest/contract/partial_address.d.ts +1 -1
- package/dest/contract/private_function.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.d.ts +2 -2
- package/dest/contract/private_function_membership_proof.js +1 -1
- package/dest/contract/utility_function_membership_proof.d.ts +1 -1
- package/dest/database-version/index.d.ts +1 -1
- package/dest/database-version/version_manager.d.ts +6 -8
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -1
- package/dest/delayed_public_mutable/index.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_delay_change.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_delay_change.d.ts.map +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -1
- package/dest/epoch-helpers/index.d.ts +12 -11
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +10 -9
- package/dest/errors/index.d.ts +1 -1
- package/dest/errors/proving_error.d.ts +2 -2
- package/dest/errors/proving_error.d.ts.map +1 -1
- package/dest/errors/simulation_error.d.ts +1 -1
- package/dest/errors/simulation_error.d.ts.map +1 -1
- package/dest/fees/index.d.ts +1 -1
- package/dest/fees/transaction_fee.d.ts +1 -1
- package/dest/file-store/factory.d.ts +1 -1
- package/dest/file-store/gcs.d.ts +1 -1
- package/dest/file-store/gcs.d.ts.map +1 -1
- package/dest/file-store/http.d.ts +1 -1
- package/dest/file-store/http.d.ts.map +1 -1
- package/dest/file-store/http.js +8 -3
- package/dest/file-store/index.d.ts +1 -1
- package/dest/file-store/interface.d.ts +1 -1
- package/dest/file-store/local.d.ts +1 -1
- package/dest/file-store/local.d.ts.map +1 -1
- 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 +3 -7
- package/dest/gas/gas.d.ts +9 -1
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas.js +12 -0
- package/dest/gas/gas_fees.d.ts +9 -1
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +12 -0
- package/dest/gas/gas_settings.d.ts +9 -1
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +12 -0
- package/dest/gas/gas_used.d.ts +13 -2
- package/dest/gas/gas_used.d.ts.map +1 -1
- package/dest/gas/gas_used.js +19 -1
- package/dest/gas/index.d.ts +1 -1
- package/dest/hash/hash.d.ts +11 -3
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +11 -1
- package/dest/hash/index.d.ts +1 -1
- package/dest/hash/map_slot.d.ts +1 -1
- package/dest/interfaces/allowed_element.d.ts +5 -5
- package/dest/interfaces/api_limit.d.ts +1 -1
- package/dest/interfaces/archiver.d.ts +6 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +8 -6
- package/dest/interfaces/aztec-node-admin.d.ts +92 -85
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.d.ts +3 -2
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +1 -1
- package/dest/interfaces/block-builder.d.ts +1 -1
- package/dest/interfaces/client.d.ts +1 -1
- package/dest/interfaces/configs.d.ts +31 -21
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +3 -1
- package/dest/interfaces/epoch-prover.d.ts +5 -5
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.d.ts +2 -2
- package/dest/interfaces/l2_logs_source.d.ts +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +3 -3
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p-bootstrap.d.ts +1 -1
- package/dest/interfaces/p2p.d.ts +3 -2
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +1 -1
- package/dest/interfaces/private_kernel_prover.d.ts +1 -1
- package/dest/interfaces/processed-tx-handler.d.ts +1 -1
- package/dest/interfaces/prover-agent.d.ts +1 -1
- package/dest/interfaces/prover-broker.d.ts +1 -1
- package/dest/interfaces/prover-client.d.ts +5 -5
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-coordination.d.ts +1 -1
- package/dest/interfaces/prover-node.d.ts +1 -1
- package/dest/interfaces/proving-job-source.d.ts +1 -1
- package/dest/interfaces/proving-job.d.ts +1672 -1159
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +3 -2
- package/dest/interfaces/public_state_source.d.ts +1 -1
- package/dest/interfaces/server.d.ts +1 -1
- package/dest/interfaces/server_circuit_prover.d.ts +2 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/service.d.ts +1 -1
- package/dest/interfaces/slasher.d.ts +3 -3
- package/dest/interfaces/tx_provider.d.ts +1 -1
- package/dest/interfaces/validator.d.ts +27 -19
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -1
- package/dest/interfaces/world_state.d.ts +1 -1
- package/dest/kernel/claimed_length_array.d.ts +1 -1
- package/dest/kernel/claimed_length_array.d.ts.map +1 -1
- package/dest/kernel/hiding_kernel_private_inputs.d.ts +1 -1
- package/dest/kernel/hiding_kernel_private_inputs.d.ts.map +1 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/build_transient_data_hints.d.ts +2 -2
- package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_transient_data_hints.js +2 -2
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/hints/index.d.ts +1 -1
- package/dest/kernel/hints/key_validation_hint.d.ts +1 -2
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +1 -2
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +1 -6
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +1 -1
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +2 -24
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.js +4 -9
- package/dest/kernel/hints/read_request.d.ts +1 -7
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request_hints.d.ts +1 -7
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts +1 -1
- package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts.map +1 -1
- package/dest/kernel/hints/scoped_value_cache.d.ts +1 -1
- package/dest/kernel/hints/scoped_value_cache.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
- package/dest/kernel/index.d.ts +1 -1
- package/dest/kernel/log_hash.d.ts +1 -1
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/note_hash.d.ts +1 -1
- package/dest/kernel/note_hash.d.ts.map +1 -1
- package/dest/kernel/nullifier.d.ts +1 -1
- package/dest/kernel/nullifier.d.ts.map +1 -1
- package/dest/kernel/padded_side_effects.d.ts +1 -1
- package/dest/kernel/padded_side_effects.d.ts.map +1 -1
- package/dest/kernel/private_accumulated_data.d.ts +1 -23
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.d.ts +1 -25
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_request.d.ts +1 -16
- package/dest/kernel/private_call_request.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +17 -74
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +17 -5
- package/dest/kernel/private_context_inputs.d.ts +1 -1
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -29
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +8 -4
- package/dest/kernel/private_kernel_data.d.ts +1 -7
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_data.js +0 -2
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +7 -20
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.js +7 -3
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +1 -7
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_prover_output.d.ts +10 -10
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +1 -4
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/private_kernel_simulated_output.d.ts +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +1 -10
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +1 -23
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_log_data.d.ts +1 -1
- package/dest/kernel/private_log_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +17 -1
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +18 -0
- package/dest/kernel/private_to_public_accumulated_data.d.ts +1 -1
- package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts +1 -1
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +1 -17
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +1 -16
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.d.ts +2 -24
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +5 -13
- package/dest/kernel/public_call_request.d.ts +22 -27
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +18 -0
- package/dest/kernel/utils/index.d.ts +1 -1
- package/dest/kernel/utils/interfaces.d.ts +1 -1
- package/dest/kernel/utils/optional_number.d.ts +1 -7
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/kernel/utils/order_and_comparison.d.ts +1 -1
- package/dest/keys/derivation.d.ts +1 -1
- package/dest/keys/index.d.ts +1 -1
- package/dest/keys/key_types.d.ts +1 -1
- package/dest/keys/public_key.d.ts +1 -1
- package/dest/keys/public_keys.d.ts +9 -5
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +12 -0
- package/dest/keys/utils.d.ts +1 -1
- package/dest/l1-contracts/index.d.ts +1 -1
- package/dest/l1-contracts/slash_factory.d.ts +3 -3
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/logs/contract_class_log.d.ts +20 -4
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +24 -0
- package/dest/logs/debug_log.d.ts +10 -2
- package/dest/logs/debug_log.d.ts.map +1 -1
- package/dest/logs/debug_log.js +13 -0
- package/dest/logs/directional_app_tagging_secret.d.ts +1 -1
- package/dest/logs/directional_app_tagging_secret.d.ts.map +1 -1
- package/dest/logs/extended_contract_class_log.d.ts +1 -3
- package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
- package/dest/logs/extended_public_log.d.ts +3 -5
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/index.d.ts +1 -1
- package/dest/logs/log_filter.d.ts +1 -1
- package/dest/logs/log_id.d.ts +1 -4
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_with_tx_data.d.ts +1 -1
- package/dest/logs/log_with_tx_data.d.ts.map +1 -1
- package/dest/logs/message_context.d.ts +1 -1
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/pending_tagged_log.d.ts +1 -1
- package/dest/logs/pending_tagged_log.d.ts.map +1 -1
- package/dest/logs/pre_tag.d.ts +1 -1
- package/dest/logs/private_log.d.ts +10 -2
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +14 -5
- package/dest/logs/public_log.d.ts +9 -1
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +9 -0
- package/dest/logs/shared_secret_derivation.d.ts +1 -1
- package/dest/logs/tx_scoped_l2_log.d.ts +8 -8
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/messaging/in_hash.d.ts +4 -0
- package/dest/messaging/in_hash.d.ts.map +1 -0
- package/dest/messaging/in_hash.js +8 -0
- package/dest/messaging/inbox_leaf.d.ts +1 -3
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/index.d.ts +3 -1
- package/dest/messaging/index.d.ts.map +1 -1
- package/dest/messaging/index.js +2 -0
- package/dest/messaging/l1_actor.d.ts +1 -7
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.d.ts +1 -6
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message_source.d.ts +1 -1
- package/dest/messaging/l2_actor.d.ts +1 -7
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +2 -2
- package/dest/messaging/l2_to_l1_message.d.ts +17 -1
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.js +18 -0
- package/dest/messaging/out_hash.d.ts +5 -0
- package/dest/messaging/out_hash.d.ts.map +1 -0
- package/dest/messaging/out_hash.js +28 -0
- package/dest/noir/index.d.ts +7 -7
- package/dest/noir/index.d.ts.map +1 -1
- package/dest/noir/index.js +6 -6
- package/dest/note/comparator.d.ts +1 -1
- package/dest/note/index.d.ts +2 -2
- package/dest/note/index.d.ts.map +1 -1
- package/dest/note/index.js +1 -1
- package/dest/note/note.d.ts +2 -17
- package/dest/note/note.d.ts.map +1 -1
- package/dest/note/note_dao.d.ts +71 -0
- package/dest/note/note_dao.d.ts.map +1 -0
- package/dest/note/note_dao.js +101 -0
- package/dest/note/note_status.d.ts +1 -1
- package/dest/note/notes_filter.d.ts +1 -1
- package/dest/p2p/attestation_utils.d.ts +1 -1
- package/dest/p2p/block_attestation.d.ts +5 -12
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_proposal.d.ts +3 -6
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +1 -1
- package/dest/p2p/client_type.d.ts +1 -1
- package/dest/p2p/consensus_payload.d.ts +10 -188
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +16 -23
- package/dest/p2p/gossipable.d.ts +6 -5
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +16 -10
- package/dest/p2p/index.d.ts +1 -1
- package/dest/p2p/interface.d.ts +1 -1
- package/dest/p2p/message_validator.d.ts +1 -1
- package/dest/p2p/peer_error.d.ts +1 -1
- package/dest/p2p/signature_utils.d.ts +1 -1
- package/dest/p2p/topic_type.d.ts +1 -1
- package/dest/parity/index.d.ts +1 -1
- package/dest/parity/parity_base_private_inputs.d.ts +1 -3
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.d.ts +1 -4
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_root_private_inputs.d.ts +1 -2
- 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/index.d.ts +1 -1
- package/dest/proofs/proof.d.ts +1 -4
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/proof_data.d.ts +1 -1
- package/dest/proofs/proof_data.d.ts.map +1 -1
- package/dest/proofs/proving_request_type.d.ts +1 -1
- package/dest/proofs/recursive_proof.d.ts +2 -26
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.d.ts +1 -1
- package/dest/rollup/base_rollup_hints.d.ts +1 -34
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.d.ts +1 -12
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.d.ts +4 -0
- package/dest/rollup/block_headers_hash.d.ts.map +1 -0
- package/dest/rollup/block_headers_hash.js +9 -0
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.d.ts +8 -40
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +8 -2
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +2 -76
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +1 -9
- package/dest/rollup/checkpoint_constant_data.d.ts +26 -13
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +27 -3
- package/dest/rollup/checkpoint_header.d.ts +16 -14
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +40 -13
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +1 -25
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +5 -29
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +4 -4
- package/dest/rollup/epoch_constant_data.d.ts +1 -16
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/index.d.ts +2 -1
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +1 -0
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_private_inputs.d.ts +1 -6
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +1 -3
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tree_snapshot_diff_hints.d.ts +1 -24
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts +1 -29
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/schemas/index.d.ts +1 -1
- package/dest/schemas/schemas.d.ts +86 -15
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +12 -1
- package/dest/slashing/empire.d.ts +1 -1
- package/dest/slashing/empire.d.ts.map +1 -1
- package/dest/slashing/empire.js +5 -4
- package/dest/slashing/helpers.d.ts +7 -6
- package/dest/slashing/helpers.d.ts.map +1 -1
- package/dest/slashing/helpers.js +8 -6
- package/dest/slashing/index.d.ts +1 -1
- package/dest/slashing/interfaces.d.ts +3 -2
- package/dest/slashing/interfaces.d.ts.map +1 -1
- package/dest/slashing/serialization.d.ts +1 -1
- package/dest/slashing/tally.d.ts +1 -1
- package/dest/slashing/types.d.ts +10 -10
- package/dest/snapshots/download.d.ts +1 -1
- package/dest/snapshots/index.d.ts +1 -1
- package/dest/snapshots/types.d.ts +18 -18
- package/dest/snapshots/upload.d.ts +1 -1
- package/dest/stats/index.d.ts +1 -1
- package/dest/stats/stats.d.ts +1 -1
- package/dest/tests/factories.d.ts +34 -29
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +72 -147
- package/dest/tests/fixtures.d.ts +1 -1
- package/dest/tests/index.d.ts +1 -1
- package/dest/tests/jest.d.ts +1 -1
- package/dest/tests/mocks.d.ts +54 -23
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +133 -33
- package/dest/trees/append_only_tree_snapshot.d.ts +9 -16
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +9 -9
- package/dest/trees/database_public_state_source.d.ts +1 -1
- package/dest/trees/database_public_state_source.d.ts.map +1 -1
- package/dest/trees/index.d.ts +1 -1
- package/dest/trees/merkle_tree_id.d.ts +5 -5
- package/dest/trees/merkle_tree_id.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.d.ts +17 -13
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.js +24 -0
- package/dest/trees/nullifier_membership_witness.d.ts +4 -37
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.d.ts +28 -27
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +24 -0
- package/dest/trees/public_data_witness.d.ts +11 -45
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/tx/block_header.d.ts +5 -12
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +13 -2
- package/dest/tx/call_context.d.ts +6 -18
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/capsule.d.ts +1 -4
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/content_commitment.d.ts +1 -1
- package/dest/tx/content_commitment.d.ts.map +1 -1
- package/dest/tx/execution_payload.d.ts +37 -0
- package/dest/tx/execution_payload.d.ts.map +1 -0
- package/dest/tx/execution_payload.js +40 -0
- package/dest/tx/function_data.d.ts +4 -6
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/global_variable_builder.d.ts +3 -2
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +43 -24
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +48 -8
- package/dest/tx/hashed_values.d.ts +1 -7
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/index.d.ts +2 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -0
- package/dest/tx/indexed_tx_effect.d.ts +2 -2
- package/dest/tx/indexed_tx_effect.js +3 -1
- package/dest/tx/offchain_effect.d.ts +1 -1
- package/dest/tx/partial_state_reference.d.ts +4 -7
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +10 -10
- package/dest/tx/private_execution_result.d.ts +14 -49
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +6 -3
- package/dest/tx/private_tx_constant_data.d.ts +1 -16
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/processed_tx.d.ts +1 -1
- package/dest/tx/profiling.d.ts +38 -38
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +5 -4
- package/dest/tx/protocol_contracts.d.ts +10 -2
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +9 -0
- package/dest/tx/proven_tx.d.ts +18 -18
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.d.ts +9 -7
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +12 -0
- package/dest/tx/public_simulation_output.d.ts +3 -1
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +8 -1
- package/dest/tx/simulated_tx.d.ts +21 -21
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/state_reference.d.ts +10 -12
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +9 -9
- package/dest/tx/tree_snapshots.d.ts +15 -7
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tree_snapshots.js +9 -0
- package/dest/tx/tx.d.ts +3 -17
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +5 -4
- package/dest/tx/tx_constant_data.d.ts +1 -1
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_context.d.ts +1 -2
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_effect.d.ts +20 -42
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +54 -59
- package/dest/tx/tx_execution_request.d.ts +1 -30
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_hash.d.ts +1 -2
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_receipt.d.ts +1 -7
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_request.d.ts +1 -6
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/validator/empty_validator.d.ts +1 -1
- package/dest/tx/validator/empty_validator.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.d.ts +1 -1
- package/dest/tx/validator/tx_validator.d.ts +5 -5
- package/dest/types/index.d.ts +1 -1
- package/dest/types/shared.d.ts +1 -4
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/update-checker/index.d.ts +1 -1
- package/dest/update-checker/update-checker.d.ts +2 -3
- package/dest/update-checker/update-checker.d.ts.map +1 -1
- package/dest/validators/errors.d.ts +6 -7
- package/dest/validators/errors.d.ts.map +1 -1
- package/dest/validators/errors.js +2 -4
- package/dest/validators/index.d.ts +1 -1
- package/dest/validators/schemas.d.ts +266 -208
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +7 -7
- package/dest/validators/types.d.ts +10 -9
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/versioning/index.d.ts +1 -1
- package/dest/versioning/versioning.d.ts +1 -1
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/vks/index.d.ts +1 -1
- package/dest/vks/verification_key.d.ts +10 -22
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +20 -0
- package/dest/vks/vk_data.d.ts +1 -7
- package/dest/vks/vk_data.d.ts.map +1 -1
- package/dest/world-state/index.d.ts +1 -1
- package/dest/world-state/world_state_revision.d.ts +34 -2
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +24 -1
- package/dest/zkpassport/index.d.ts +1 -1
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/package.json +12 -11
- package/src/abi/abi.ts +4 -4
- package/src/abi/contract_artifact.ts +3 -3
- package/src/avm/avm.ts +562 -6
- package/src/avm/avm_accumulated_data.ts +40 -0
- package/src/avm/avm_circuit_public_inputs.ts +40 -0
- package/src/avm/message_pack.ts +4 -1
- package/src/avm/public_data_write.ts +12 -1
- package/src/avm/revert_code.ts +29 -9
- package/src/aztec-address/index.ts +26 -2
- package/src/block/attestation_info.ts +8 -1
- package/src/block/body.ts +16 -39
- package/src/block/index.ts +1 -0
- package/src/block/l2_block.ts +62 -4
- package/src/block/l2_block_code_to_purge.ts +4 -2
- package/src/block/l2_block_header.ts +19 -5
- package/src/block/l2_block_new.ts +171 -0
- package/src/block/l2_block_source.ts +9 -8
- package/src/block/proposal/attestations_and_signers.ts +20 -1
- package/src/block/published_l2_block.ts +14 -31
- package/src/block/validate_block_result.ts +9 -7
- package/src/checkpoint/checkpoint.ts +88 -0
- package/src/checkpoint/index.ts +2 -1
- package/src/checkpoint/published_checkpoint.ts +91 -0
- package/src/contract/contract_deployment_data.ts +125 -0
- package/src/contract/index.ts +1 -0
- package/src/contract/private_function_membership_proof.ts +1 -1
- package/src/epoch-helpers/index.ts +28 -21
- package/src/file-store/http.ts +6 -3
- package/src/file-store/s3.ts +3 -7
- package/src/gas/gas.ts +14 -0
- package/src/gas/gas_fees.ts +14 -0
- package/src/gas/gas_settings.ts +19 -0
- package/src/gas/gas_used.ts +22 -1
- package/src/hash/hash.ts +13 -2
- package/src/interfaces/archiver.ts +10 -5
- package/src/interfaces/aztec-node.ts +4 -3
- package/src/interfaces/configs.ts +6 -0
- package/src/interfaces/epoch-prover.ts +3 -4
- package/src/interfaces/merkle_tree_operations.ts +2 -2
- package/src/interfaces/p2p.ts +4 -2
- package/src/interfaces/proving-job.ts +14 -5
- package/src/interfaces/validator.ts +5 -2
- package/src/kernel/hints/build_transient_data_hints.ts +2 -2
- package/src/kernel/hints/private_kernel_reset_hints.ts +0 -8
- package/src/kernel/private_circuit_public_inputs.ts +29 -9
- package/src/kernel/private_kernel_circuit_public_inputs.ts +7 -0
- package/src/kernel/private_kernel_data.ts +0 -2
- package/src/kernel/private_kernel_init_circuit_private_inputs.ts +6 -0
- package/src/kernel/private_to_avm_accumulated_data.ts +35 -0
- package/src/kernel/private_validation_requests.ts +1 -13
- package/src/kernel/public_call_request.ts +27 -0
- package/src/keys/public_keys.ts +19 -0
- package/src/logs/contract_class_log.ts +32 -0
- package/src/logs/debug_log.ts +20 -1
- package/src/logs/private_log.ts +19 -3
- package/src/logs/public_log.ts +14 -0
- package/src/messaging/in_hash.ts +10 -0
- package/src/messaging/index.ts +2 -0
- package/src/messaging/l2_to_l1_membership.ts +2 -2
- package/src/messaging/l2_to_l1_message.ts +25 -0
- package/src/messaging/out_hash.ts +36 -0
- package/src/noir/index.ts +6 -6
- package/src/note/index.ts +1 -1
- package/src/note/note_dao.ts +151 -0
- package/src/p2p/block_attestation.ts +2 -1
- package/src/p2p/block_proposal.ts +3 -2
- package/src/p2p/consensus_payload.ts +16 -26
- package/src/p2p/gossipable.ts +17 -8
- package/src/rollup/block_headers_hash.ts +12 -0
- package/src/rollup/block_rollup_public_inputs.ts +8 -0
- package/src/rollup/block_root_rollup_private_inputs.ts +0 -9
- package/src/rollup/checkpoint_constant_data.ts +43 -4
- package/src/rollup/checkpoint_header.ts +46 -22
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +5 -5
- package/src/rollup/index.ts +1 -0
- package/src/schemas/schemas.ts +18 -0
- package/src/slashing/empire.ts +6 -4
- package/src/slashing/helpers.ts +17 -12
- package/src/slashing/interfaces.ts +3 -1
- package/src/tests/factories.ts +211 -227
- package/src/tests/mocks.ts +228 -50
- package/src/trees/append_only_tree_snapshot.ts +11 -12
- package/src/trees/nullifier_leaf.ts +32 -0
- package/src/trees/public_data_leaf.ts +32 -0
- package/src/tx/block_header.ts +16 -3
- package/src/tx/execution_payload.ts +60 -0
- package/src/tx/global_variable_builder.ts +2 -1
- package/src/tx/global_variables.ts +63 -9
- package/src/tx/index.ts +1 -0
- package/src/tx/indexed_tx_effect.ts +1 -1
- package/src/tx/partial_state_reference.ts +9 -17
- package/src/tx/private_execution_result.ts +5 -2
- package/src/tx/profiling.ts +4 -6
- package/src/tx/protocol_contracts.ts +16 -0
- package/src/tx/public_call_request_with_calldata.ts +17 -0
- package/src/tx/public_simulation_output.ts +18 -1
- package/src/tx/state_reference.ts +9 -15
- package/src/tx/tree_snapshots.ts +16 -0
- package/src/tx/tx.ts +5 -5
- package/src/tx/tx_effect.ts +84 -90
- package/src/validators/errors.ts +3 -4
- package/src/validators/schemas.ts +7 -7
- package/src/validators/types.ts +9 -8
- package/src/vks/verification_key.ts +25 -0
- package/src/world-state/world_state_revision.ts +47 -5
- package/dest/checkpoint/checkpoint_body.d.ts +0 -4
- package/dest/checkpoint/checkpoint_body.d.ts.map +0 -1
- package/dest/checkpoint/checkpoint_body.js +0 -9
- package/dest/note/unique_note.d.ts +0 -43
- package/dest/note/unique_note.d.ts.map +0 -1
- package/dest/note/unique_note.js +0 -67
- package/src/checkpoint/checkpoint_body.ts +0 -10
- package/src/note/unique_note.ts +0 -88
|
@@ -30,6 +30,17 @@ export class L2ToL1Message {
|
|
|
30
30
|
return new L2ToL1Message(EthAddress.ZERO, Fr.zero());
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Creates an L2ToL1Message instance from a plain object without Zod validation.
|
|
35
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
36
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
37
|
+
* @param obj - Plain object containing L2ToL1Message fields
|
|
38
|
+
* @returns An L2ToL1Message instance
|
|
39
|
+
*/
|
|
40
|
+
static fromPlainObject(obj: any): L2ToL1Message {
|
|
41
|
+
return new L2ToL1Message(EthAddress.fromPlainObject(obj.recipient), Fr.fromPlainObject(obj.content));
|
|
42
|
+
}
|
|
43
|
+
|
|
33
44
|
/**
|
|
34
45
|
* Checks if another L2ToL1Message is equal to this instance.
|
|
35
46
|
* @param other Another L2ToL1Message instance to compare with.
|
|
@@ -149,6 +160,20 @@ export class ScopedL2ToL1Message {
|
|
|
149
160
|
return new ScopedL2ToL1Message(L2ToL1Message.empty(), AztecAddress.ZERO);
|
|
150
161
|
}
|
|
151
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Creates a ScopedL2ToL1Message instance from a plain object without Zod validation.
|
|
165
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
166
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
167
|
+
* @param obj - Plain object containing ScopedL2ToL1Message fields
|
|
168
|
+
* @returns A ScopedL2ToL1Message instance
|
|
169
|
+
*/
|
|
170
|
+
static fromPlainObject(obj: any): ScopedL2ToL1Message {
|
|
171
|
+
return new ScopedL2ToL1Message(
|
|
172
|
+
L2ToL1Message.fromPlainObject(obj.message),
|
|
173
|
+
AztecAddress.fromPlainObject(obj.contractAddress),
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
152
177
|
isEmpty(): boolean {
|
|
153
178
|
return this.message.isEmpty() && this.contractAddress.isZero();
|
|
154
179
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import { UnbalancedMerkleTreeCalculator, computeUnbalancedShaRoot } from '@aztec/foundation/trees';
|
|
3
|
+
|
|
4
|
+
export function computeTxOutHash(messages: Fr[]): Fr {
|
|
5
|
+
if (!messages.length) {
|
|
6
|
+
return Fr.ZERO;
|
|
7
|
+
}
|
|
8
|
+
// Tx out hash is the root of the unbalanced merkle tree of all the messages.
|
|
9
|
+
// Zero hashes (which should not happen) are not compressed.
|
|
10
|
+
return Fr.fromBuffer(computeUnbalancedShaRoot(messages.map(msg => msg.toBuffer())));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function computeBlockOutHash(messagesPerBlock: Fr[][]): Fr {
|
|
14
|
+
const txOutHashes = messagesPerBlock.map(messages => computeTxOutHash(messages));
|
|
15
|
+
return aggregateOutHashes(txOutHashes);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function computeCheckpointOutHash(messagesForAllTxs: Fr[][][]): Fr {
|
|
19
|
+
const blockOutHashes = messagesForAllTxs.map(block => computeBlockOutHash(block));
|
|
20
|
+
return aggregateOutHashes(blockOutHashes);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// The root of this tree should match the `out_hash` calculated in the circuits. Zero hashes are compressed to reduce
|
|
24
|
+
// cost if the non-zero leaves result in a shorter path.
|
|
25
|
+
function aggregateOutHashes(outHashes: Fr[]): Fr {
|
|
26
|
+
if (!outHashes.length) {
|
|
27
|
+
return Fr.ZERO;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const valueToCompress = Buffer.alloc(32);
|
|
31
|
+
const tree = UnbalancedMerkleTreeCalculator.create(
|
|
32
|
+
outHashes.map(hash => hash.toBuffer()),
|
|
33
|
+
valueToCompress,
|
|
34
|
+
);
|
|
35
|
+
return Fr.fromBuffer(tree.getRoot());
|
|
36
|
+
}
|
package/src/noir/index.ts
CHANGED
|
@@ -8,12 +8,12 @@ import type {
|
|
|
8
8
|
DebugInfo,
|
|
9
9
|
} from '../abi/abi.js';
|
|
10
10
|
|
|
11
|
-
export const AZTEC_PRIVATE_ATTRIBUTE = '
|
|
12
|
-
export const AZTEC_PUBLIC_ATTRIBUTE = '
|
|
13
|
-
export const AZTEC_UTILITY_ATTRIBUTE = '
|
|
14
|
-
export const
|
|
15
|
-
export const AZTEC_INITIALIZER_ATTRIBUTE = '
|
|
16
|
-
export const AZTEC_VIEW_ATTRIBUTE = '
|
|
11
|
+
export const AZTEC_PRIVATE_ATTRIBUTE = 'abi_private';
|
|
12
|
+
export const AZTEC_PUBLIC_ATTRIBUTE = 'abi_public';
|
|
13
|
+
export const AZTEC_UTILITY_ATTRIBUTE = 'abi_utility';
|
|
14
|
+
export const AZTEC_ONLY_SELF_ATTRIBUTE = 'abi_only_self';
|
|
15
|
+
export const AZTEC_INITIALIZER_ATTRIBUTE = 'abi_initializer';
|
|
16
|
+
export const AZTEC_VIEW_ATTRIBUTE = 'abi_view';
|
|
17
17
|
|
|
18
18
|
/** The ABI of an Aztec.nr function. */
|
|
19
19
|
export interface NoirFunctionAbi {
|
package/src/note/index.ts
CHANGED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
2
|
+
import { Fr, Point } from '@aztec/foundation/fields';
|
|
3
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
import { Note } from '@aztec/stdlib/note';
|
|
6
|
+
import { TxHash } from '@aztec/stdlib/tx';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A Note Data Access Object, representing a note that was committed to the note hash tree, holding all of the
|
|
10
|
+
* information required to use it during execution and manage its state.
|
|
11
|
+
*/
|
|
12
|
+
export class NoteDao {
|
|
13
|
+
constructor(
|
|
14
|
+
// Note information
|
|
15
|
+
|
|
16
|
+
/** The packed content of the note, as will be returned in the getNotes oracle. */
|
|
17
|
+
public note: Note,
|
|
18
|
+
/** The address of the contract that created the note (i.e. the address used by the kernel during siloing). */
|
|
19
|
+
public contractAddress: AztecAddress,
|
|
20
|
+
/**
|
|
21
|
+
* The storage location of the note. This value is not used for anything in PXE, but we do index by storage slot
|
|
22
|
+
* since contracts typically make queries based on it.
|
|
23
|
+
*/
|
|
24
|
+
public storageSlot: Fr,
|
|
25
|
+
/**
|
|
26
|
+
* The randomness injected to the note.
|
|
27
|
+
*/
|
|
28
|
+
public randomness: Fr,
|
|
29
|
+
/** The nonce that was injected into the note hash preimage in order to guarantee uniqueness. */
|
|
30
|
+
public noteNonce: Fr,
|
|
31
|
+
|
|
32
|
+
// Computed values
|
|
33
|
+
/**
|
|
34
|
+
* The inner hash (non-unique, non-siloed) of the note. Each contract determines how the note is hashed. Can
|
|
35
|
+
* be used alongside contractAddress and nonce to compute the uniqueNoteHash and the siloedNoteHash.
|
|
36
|
+
*/
|
|
37
|
+
public noteHash: Fr,
|
|
38
|
+
/**
|
|
39
|
+
* The nullifier of the note, siloed by contract address.
|
|
40
|
+
* Note: Might be set as 0 if the note was added to PXE as nullified.
|
|
41
|
+
*/
|
|
42
|
+
public siloedNullifier: Fr,
|
|
43
|
+
|
|
44
|
+
// Metadata
|
|
45
|
+
/** The hash of the tx in which this note was created. Knowing the tx hash allows for efficient node queries e.g.
|
|
46
|
+
* when searching for txEffects.
|
|
47
|
+
*/
|
|
48
|
+
public txHash: TxHash,
|
|
49
|
+
/** The L2 block number in which the tx with this note was included. Used for note management while processing
|
|
50
|
+
* reorgs.*/
|
|
51
|
+
public l2BlockNumber: number,
|
|
52
|
+
/** The L2 block hash in which the tx with this note was included. Used for note management while processing
|
|
53
|
+
* reorgs.*/
|
|
54
|
+
public l2BlockHash: string,
|
|
55
|
+
/** The index of the leaf in the global note hash tree the note is stored at */
|
|
56
|
+
public index: bigint,
|
|
57
|
+
) {}
|
|
58
|
+
|
|
59
|
+
toBuffer(): Buffer {
|
|
60
|
+
return serializeToBuffer([
|
|
61
|
+
this.note,
|
|
62
|
+
this.contractAddress,
|
|
63
|
+
this.storageSlot,
|
|
64
|
+
this.randomness,
|
|
65
|
+
this.noteNonce,
|
|
66
|
+
this.noteHash,
|
|
67
|
+
this.siloedNullifier,
|
|
68
|
+
this.txHash,
|
|
69
|
+
this.l2BlockNumber,
|
|
70
|
+
Fr.fromHexString(this.l2BlockHash),
|
|
71
|
+
this.index,
|
|
72
|
+
]);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
76
|
+
const reader = BufferReader.asReader(buffer);
|
|
77
|
+
|
|
78
|
+
const note = Note.fromBuffer(reader);
|
|
79
|
+
const contractAddress = AztecAddress.fromBuffer(reader);
|
|
80
|
+
const storageSlot = Fr.fromBuffer(reader);
|
|
81
|
+
const randomness = Fr.fromBuffer(reader);
|
|
82
|
+
const noteNonce = Fr.fromBuffer(reader);
|
|
83
|
+
const noteHash = Fr.fromBuffer(reader);
|
|
84
|
+
const siloedNullifier = Fr.fromBuffer(reader);
|
|
85
|
+
const txHash = reader.readObject(TxHash);
|
|
86
|
+
const l2BlockNumber = reader.readNumber();
|
|
87
|
+
const l2BlockHash = Fr.fromBuffer(reader).toString();
|
|
88
|
+
const index = toBigIntBE(reader.readBytes(32));
|
|
89
|
+
|
|
90
|
+
return new NoteDao(
|
|
91
|
+
note,
|
|
92
|
+
contractAddress,
|
|
93
|
+
storageSlot,
|
|
94
|
+
randomness,
|
|
95
|
+
noteNonce,
|
|
96
|
+
noteHash,
|
|
97
|
+
siloedNullifier,
|
|
98
|
+
txHash,
|
|
99
|
+
l2BlockNumber,
|
|
100
|
+
l2BlockHash,
|
|
101
|
+
index,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
toString() {
|
|
106
|
+
return '0x' + this.toBuffer().toString('hex');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
static fromString(str: string) {
|
|
110
|
+
const hex = str.replace(/^0x/, '');
|
|
111
|
+
return NoteDao.fromBuffer(Buffer.from(hex, 'hex'));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Returns the size in bytes of the Note Dao.
|
|
116
|
+
* @returns - Its size in bytes.
|
|
117
|
+
*/
|
|
118
|
+
public getSize() {
|
|
119
|
+
const indexSize = Math.ceil(Math.log2(Number(this.index)));
|
|
120
|
+
const noteSize = 4 + this.note.items.length * Fr.SIZE_IN_BYTES;
|
|
121
|
+
return noteSize + AztecAddress.SIZE_IN_BYTES + Fr.SIZE_IN_BYTES * 4 + TxHash.SIZE + Point.SIZE_IN_BYTES + indexSize;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
static async random({
|
|
125
|
+
note = Note.random(),
|
|
126
|
+
contractAddress = undefined,
|
|
127
|
+
storageSlot = Fr.random(),
|
|
128
|
+
randomness = Fr.random(),
|
|
129
|
+
noteNonce = Fr.random(),
|
|
130
|
+
noteHash = Fr.random(),
|
|
131
|
+
siloedNullifier = Fr.random(),
|
|
132
|
+
txHash = TxHash.random(),
|
|
133
|
+
l2BlockNumber = Math.floor(Math.random() * 1000),
|
|
134
|
+
l2BlockHash = Fr.random().toString(),
|
|
135
|
+
index = Fr.random().toBigInt(),
|
|
136
|
+
}: Partial<NoteDao> = {}) {
|
|
137
|
+
return new NoteDao(
|
|
138
|
+
note,
|
|
139
|
+
contractAddress ?? (await AztecAddress.random()),
|
|
140
|
+
storageSlot,
|
|
141
|
+
randomness,
|
|
142
|
+
noteNonce,
|
|
143
|
+
noteHash,
|
|
144
|
+
siloedNullifier,
|
|
145
|
+
txHash,
|
|
146
|
+
l2BlockNumber,
|
|
147
|
+
l2BlockHash,
|
|
148
|
+
index,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
3
|
import { keccak256, tryRecoverAddress } from '@aztec/foundation/crypto';
|
|
3
4
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
@@ -62,7 +63,7 @@ export class BlockAttestation extends Gossipable {
|
|
|
62
63
|
return this.payload.archive;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
get slotNumber():
|
|
66
|
+
get slotNumber(): SlotNumber {
|
|
66
67
|
return this.payload.header.slotNumber;
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
3
|
import { keccak256, tryRecoverAddress } from '@aztec/foundation/crypto';
|
|
3
4
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
@@ -65,13 +66,13 @@ export class BlockProposal extends Gossipable {
|
|
|
65
66
|
return this.payload.archive;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
get slotNumber():
|
|
69
|
+
get slotNumber(): SlotNumber {
|
|
69
70
|
return this.payload.header.slotNumber;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
toBlockInfo(): Omit<L2BlockInfo, 'blockNumber'> {
|
|
73
74
|
return {
|
|
74
|
-
slotNumber: this.slotNumber
|
|
75
|
+
slotNumber: this.slotNumber,
|
|
75
76
|
lastArchive: this.payload.header.lastArchiveRoot,
|
|
76
77
|
timestamp: this.payload.header.timestamp,
|
|
77
78
|
archive: this.archive,
|
|
@@ -8,8 +8,8 @@ import { encodeAbiParameters, parseAbiParameters } from 'viem';
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
|
|
10
10
|
import type { L2Block } from '../block/l2_block.js';
|
|
11
|
+
import type { Checkpoint } from '../checkpoint/checkpoint.js';
|
|
11
12
|
import { CheckpointHeader } from '../rollup/checkpoint_header.js';
|
|
12
|
-
import { StateReference } from '../tx/state_reference.js';
|
|
13
13
|
import type { Signable, SignatureDomainSeparator } from './signature_utils.js';
|
|
14
14
|
|
|
15
15
|
export class ConsensusPayload implements Signable {
|
|
@@ -20,8 +20,6 @@ export class ConsensusPayload implements Signable {
|
|
|
20
20
|
public readonly header: CheckpointHeader,
|
|
21
21
|
/** The archive root after the block is added */
|
|
22
22
|
public readonly archive: Fr,
|
|
23
|
-
/** The state reference after the block is added */
|
|
24
|
-
public readonly stateReference: StateReference,
|
|
25
23
|
) {}
|
|
26
24
|
|
|
27
25
|
static get schema() {
|
|
@@ -29,13 +27,12 @@ export class ConsensusPayload implements Signable {
|
|
|
29
27
|
.object({
|
|
30
28
|
header: CheckpointHeader.schema,
|
|
31
29
|
archive: schemas.Fr,
|
|
32
|
-
stateReference: StateReference.schema,
|
|
33
30
|
})
|
|
34
|
-
.transform(obj => new ConsensusPayload(obj.header, obj.archive
|
|
31
|
+
.transform(obj => new ConsensusPayload(obj.header, obj.archive));
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
static getFields(fields: FieldsOf<ConsensusPayload>) {
|
|
38
|
-
return [fields.header, fields.archive
|
|
35
|
+
return [fields.header, fields.archive] as const;
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer {
|
|
@@ -43,59 +40,53 @@ export class ConsensusPayload implements Signable {
|
|
|
43
40
|
'uint8, ' + //domainSeperator
|
|
44
41
|
'(' +
|
|
45
42
|
'bytes32, ' + // archive
|
|
46
|
-
'((bytes32,uint32),((bytes32,uint32),(bytes32,uint32),(bytes32,uint32))), ' + // stateReference
|
|
47
43
|
'(int256), ' + // oracleInput
|
|
48
44
|
'bytes32' + // headerHash
|
|
49
45
|
')',
|
|
50
46
|
);
|
|
51
47
|
const archiveRoot = this.archive.toString();
|
|
52
|
-
const stateReference = this.stateReference.toAbi();
|
|
53
48
|
|
|
54
49
|
const headerHash = this.header.hash().toString();
|
|
55
50
|
const encodedData = encodeAbiParameters(abi, [
|
|
56
51
|
domainSeparator,
|
|
57
|
-
[archiveRoot,
|
|
52
|
+
[archiveRoot, [0n] /* @todo See #9963 */, headerHash],
|
|
58
53
|
] as const);
|
|
59
54
|
|
|
60
55
|
return hexToBuffer(encodedData);
|
|
61
56
|
}
|
|
62
57
|
|
|
63
58
|
toBuffer(): Buffer {
|
|
64
|
-
return serializeToBuffer([this.header, this.archive
|
|
59
|
+
return serializeToBuffer([this.header, this.archive]);
|
|
65
60
|
}
|
|
66
61
|
|
|
67
62
|
public equals(other: ConsensusPayload): boolean {
|
|
68
|
-
return (
|
|
69
|
-
this.header.equals(other.header) &&
|
|
70
|
-
this.archive.equals(other.archive) &&
|
|
71
|
-
this.stateReference.equals(other.stateReference)
|
|
72
|
-
);
|
|
63
|
+
return this.header.equals(other.header) && this.archive.equals(other.archive);
|
|
73
64
|
}
|
|
74
65
|
|
|
75
66
|
static fromBuffer(buf: Buffer | BufferReader): ConsensusPayload {
|
|
76
67
|
const reader = BufferReader.asReader(buf);
|
|
77
|
-
const payload = new ConsensusPayload(
|
|
78
|
-
reader.readObject(CheckpointHeader),
|
|
79
|
-
reader.readObject(Fr),
|
|
80
|
-
reader.readObject(StateReference),
|
|
81
|
-
);
|
|
68
|
+
const payload = new ConsensusPayload(reader.readObject(CheckpointHeader), reader.readObject(Fr));
|
|
82
69
|
return payload;
|
|
83
70
|
}
|
|
84
71
|
|
|
85
72
|
static fromFields(fields: FieldsOf<ConsensusPayload>): ConsensusPayload {
|
|
86
|
-
return new ConsensusPayload(fields.header, fields.archive
|
|
73
|
+
return new ConsensusPayload(fields.header, fields.archive);
|
|
87
74
|
}
|
|
88
75
|
|
|
89
76
|
static fromBlock(block: L2Block): ConsensusPayload {
|
|
90
|
-
return new ConsensusPayload(block.header.toCheckpointHeader(), block.archive.root
|
|
77
|
+
return new ConsensusPayload(block.header.toCheckpointHeader(), block.archive.root);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static fromCheckpoint(checkpoint: Checkpoint): ConsensusPayload {
|
|
81
|
+
return new ConsensusPayload(checkpoint.header, checkpoint.archive.root);
|
|
91
82
|
}
|
|
92
83
|
|
|
93
84
|
static empty(): ConsensusPayload {
|
|
94
|
-
return new ConsensusPayload(CheckpointHeader.empty(), Fr.ZERO
|
|
85
|
+
return new ConsensusPayload(CheckpointHeader.empty(), Fr.ZERO);
|
|
95
86
|
}
|
|
96
87
|
|
|
97
88
|
static random(): ConsensusPayload {
|
|
98
|
-
return new ConsensusPayload(CheckpointHeader.random(), Fr.random()
|
|
89
|
+
return new ConsensusPayload(CheckpointHeader.random(), Fr.random());
|
|
99
90
|
}
|
|
100
91
|
|
|
101
92
|
/**
|
|
@@ -115,11 +106,10 @@ export class ConsensusPayload implements Signable {
|
|
|
115
106
|
return {
|
|
116
107
|
header: this.header.toInspect(),
|
|
117
108
|
archive: this.archive.toString(),
|
|
118
|
-
stateReference: this.stateReference.toInspect(),
|
|
119
109
|
};
|
|
120
110
|
}
|
|
121
111
|
|
|
122
112
|
toString() {
|
|
123
|
-
return `header: ${this.header.toString()}, archive: ${this.archive.toString()}
|
|
113
|
+
return `header: ${this.header.toString()}, archive: ${this.archive.toString()}}`;
|
|
124
114
|
}
|
|
125
115
|
}
|
package/src/p2p/gossipable.ts
CHANGED
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
2
|
+
import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
3
|
|
|
4
4
|
import type { TopicType } from './topic_type.js';
|
|
5
5
|
|
|
6
6
|
export class P2PMessage {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(
|
|
8
|
+
public readonly payload: Buffer,
|
|
9
|
+
public readonly timestamp?: Date,
|
|
10
|
+
) {}
|
|
8
11
|
|
|
9
|
-
static fromGossipable(message: Gossipable): P2PMessage {
|
|
10
|
-
return new P2PMessage(message.toBuffer());
|
|
12
|
+
static fromGossipable(message: Gossipable, instrumentMessages = false): P2PMessage {
|
|
13
|
+
return new P2PMessage(message.toBuffer(), instrumentMessages ? new Date() : undefined);
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
static fromMessageData(messageData: Buffer): P2PMessage {
|
|
16
|
+
static fromMessageData(messageData: Buffer, instrumentMessages = false): P2PMessage {
|
|
14
17
|
const reader = new BufferReader(messageData);
|
|
18
|
+
const timestamp = instrumentMessages ? new Date(Number(reader.readUInt64())) : undefined;
|
|
15
19
|
const payload = reader.readBuffer();
|
|
16
|
-
return new P2PMessage(payload);
|
|
20
|
+
return new P2PMessage(payload, timestamp);
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
toMessageData(): Buffer {
|
|
20
|
-
|
|
24
|
+
const arr: Buffer[] = [];
|
|
25
|
+
if (this.timestamp) {
|
|
26
|
+
arr.push(bigintToUInt64BE(BigInt(this.timestamp.getTime())));
|
|
27
|
+
}
|
|
28
|
+
arr.push(serializeToBuffer(this.payload.length, this.payload));
|
|
29
|
+
return serializeToBuffer(arr);
|
|
21
30
|
}
|
|
22
31
|
}
|
|
23
32
|
|
|
@@ -35,7 +44,7 @@ export abstract class Gossipable {
|
|
|
35
44
|
* A digest of the message information **used for logging only**.
|
|
36
45
|
* The identifier used for deduplication is `getMsgIdFn` as defined in `encoding.ts` which is a hash over topic and data.
|
|
37
46
|
*/
|
|
38
|
-
async
|
|
47
|
+
async p2pMessageLoggingIdentifier(): Promise<Buffer32> {
|
|
39
48
|
if (this.cachedId) {
|
|
40
49
|
return this.cachedId;
|
|
41
50
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import { computeUnbalancedPoseidonRoot } from '@aztec/foundation/trees';
|
|
3
|
+
|
|
4
|
+
import type { BlockHeader } from '../tx/block_header.js';
|
|
5
|
+
|
|
6
|
+
export async function computeBlockHeadersHash(blockHeaders: BlockHeader[]): Promise<Fr> {
|
|
7
|
+
const blockHeaderHashes = await Promise.all(blockHeaders.map(header => header.hash()));
|
|
8
|
+
// Must match the implementation in merge_block_rollups.nr, with the **wonky** rollup structure
|
|
9
|
+
// (see validate_consecutive_block_rollups.nr > assert_rollups_filled_greedily.nr).
|
|
10
|
+
const blockHeadersHash = await computeUnbalancedPoseidonRoot(blockHeaderHashes.map(hash => hash.toBuffer()));
|
|
11
|
+
return Fr.fromBuffer(blockHeadersHash);
|
|
12
|
+
}
|
|
@@ -50,6 +50,12 @@ export class BlockRollupPublicInputs {
|
|
|
50
50
|
* Timestamp of the last block in this block range.
|
|
51
51
|
*/
|
|
52
52
|
public endTimestamp: UInt64,
|
|
53
|
+
/**
|
|
54
|
+
* Hash of the headers of all blocks in this block range. It will be combined with the `blockHeadersHash` from
|
|
55
|
+
* other blocks in the same checkpoint to form a wonky tree. The root of that tree becomes the final hash stored in
|
|
56
|
+
* the checkpoint header, enabling validation of the blocks included in a checkpoint given their headers.
|
|
57
|
+
*/
|
|
58
|
+
public blockHeadersHash: Fr,
|
|
53
59
|
/**
|
|
54
60
|
* SHA256 hash of l1 to l2 messages.
|
|
55
61
|
*/
|
|
@@ -84,6 +90,7 @@ export class BlockRollupPublicInputs {
|
|
|
84
90
|
Fr.fromBuffer(reader),
|
|
85
91
|
Fr.fromBuffer(reader),
|
|
86
92
|
Fr.fromBuffer(reader),
|
|
93
|
+
Fr.fromBuffer(reader),
|
|
87
94
|
);
|
|
88
95
|
}
|
|
89
96
|
|
|
@@ -98,6 +105,7 @@ export class BlockRollupPublicInputs {
|
|
|
98
105
|
this.endSpongeBlob,
|
|
99
106
|
bigintToUInt64BE(this.startTimestamp),
|
|
100
107
|
bigintToUInt64BE(this.endTimestamp),
|
|
108
|
+
this.blockHeadersHash,
|
|
101
109
|
this.inHash,
|
|
102
110
|
this.outHash,
|
|
103
111
|
this.accumulatedFees,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SpongeBlob } from '@aztec/blob-lib/types';
|
|
2
1
|
import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH } from '@aztec/constants';
|
|
3
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
3
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
@@ -157,11 +156,6 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
157
156
|
* The constants of the checkpoint.
|
|
158
157
|
*/
|
|
159
158
|
public constants: CheckpointConstantData,
|
|
160
|
-
/**
|
|
161
|
-
* The start sponge blob of this block. No data has been absorbed into it yet, since it's the first block. But the
|
|
162
|
-
* number of expected fields must be set to the total number of fields in the entire checkpoint.
|
|
163
|
-
*/
|
|
164
|
-
public startSpongeBlob: SpongeBlob,
|
|
165
159
|
/**
|
|
166
160
|
* The timestamp of this block.
|
|
167
161
|
*/
|
|
@@ -186,7 +180,6 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
186
180
|
fields.previousArchive,
|
|
187
181
|
fields.previousState,
|
|
188
182
|
fields.constants,
|
|
189
|
-
fields.startSpongeBlob,
|
|
190
183
|
fields.timestamp,
|
|
191
184
|
fields.newL1ToL2MessageSubtreeRootSiblingPath,
|
|
192
185
|
fields.newArchiveSiblingPath,
|
|
@@ -199,7 +192,6 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
199
192
|
this.previousArchive,
|
|
200
193
|
this.previousState,
|
|
201
194
|
this.constants,
|
|
202
|
-
this.startSpongeBlob,
|
|
203
195
|
bigintToUInt64BE(this.timestamp),
|
|
204
196
|
this.newL1ToL2MessageSubtreeRootSiblingPath,
|
|
205
197
|
this.newArchiveSiblingPath,
|
|
@@ -213,7 +205,6 @@ export class BlockRootEmptyTxFirstRollupPrivateInputs {
|
|
|
213
205
|
AppendOnlyTreeSnapshot.fromBuffer(reader),
|
|
214
206
|
StateReference.fromBuffer(reader),
|
|
215
207
|
CheckpointConstantData.fromBuffer(reader),
|
|
216
|
-
SpongeBlob.fromBuffer(reader),
|
|
217
208
|
reader.readUInt64(),
|
|
218
209
|
reader.readArray(L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH, Fr),
|
|
219
210
|
reader.readArray(ARCHIVE_HEIGHT, Fr),
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
4
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
5
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
5
6
|
|
|
7
|
+
import { inspect } from 'util';
|
|
8
|
+
|
|
6
9
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
7
10
|
import { GasFees } from '../gas/gas_fees.js';
|
|
8
11
|
|
|
@@ -22,7 +25,7 @@ export class CheckpointConstantData {
|
|
|
22
25
|
/** Identifier of the prover. */
|
|
23
26
|
public proverId: Fr,
|
|
24
27
|
/** Slot number of the checkpoint. */
|
|
25
|
-
public slotNumber:
|
|
28
|
+
public slotNumber: SlotNumber,
|
|
26
29
|
/** Coinbase address of the rollup. */
|
|
27
30
|
public coinbase: EthAddress,
|
|
28
31
|
/** Address to receive fees. */
|
|
@@ -56,7 +59,7 @@ export class CheckpointConstantData {
|
|
|
56
59
|
Fr.ZERO,
|
|
57
60
|
Fr.ZERO,
|
|
58
61
|
Fr.ZERO,
|
|
59
|
-
|
|
62
|
+
SlotNumber.ZERO,
|
|
60
63
|
EthAddress.ZERO,
|
|
61
64
|
AztecAddress.ZERO,
|
|
62
65
|
GasFees.empty(),
|
|
@@ -64,7 +67,17 @@ export class CheckpointConstantData {
|
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
toBuffer() {
|
|
67
|
-
return serializeToBuffer(
|
|
70
|
+
return serializeToBuffer(
|
|
71
|
+
this.chainId,
|
|
72
|
+
this.version,
|
|
73
|
+
this.vkTreeRoot,
|
|
74
|
+
this.protocolContractsHash,
|
|
75
|
+
this.proverId,
|
|
76
|
+
new Fr(this.slotNumber),
|
|
77
|
+
this.coinbase,
|
|
78
|
+
this.feeRecipient,
|
|
79
|
+
this.gasFees,
|
|
80
|
+
);
|
|
68
81
|
}
|
|
69
82
|
|
|
70
83
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
@@ -75,10 +88,36 @@ export class CheckpointConstantData {
|
|
|
75
88
|
Fr.fromBuffer(reader),
|
|
76
89
|
Fr.fromBuffer(reader),
|
|
77
90
|
Fr.fromBuffer(reader),
|
|
78
|
-
Fr.fromBuffer(reader),
|
|
91
|
+
SlotNumber(Fr.fromBuffer(reader).toNumber()),
|
|
79
92
|
reader.readObject(EthAddress),
|
|
80
93
|
reader.readObject(AztecAddress),
|
|
81
94
|
reader.readObject(GasFees),
|
|
82
95
|
);
|
|
83
96
|
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Returns the slot number as a SlotNumber branded type.
|
|
100
|
+
* @deprecated Use slotNumber directly instead.
|
|
101
|
+
*/
|
|
102
|
+
getSlotNumber(): SlotNumber {
|
|
103
|
+
return this.slotNumber;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
toInspect() {
|
|
107
|
+
return {
|
|
108
|
+
chainId: this.chainId.toNumber(),
|
|
109
|
+
version: this.version.toNumber(),
|
|
110
|
+
vkTreeRoot: this.vkTreeRoot.toString(),
|
|
111
|
+
protocolContractsHash: this.protocolContractsHash.toString(),
|
|
112
|
+
proverId: this.proverId.toString(),
|
|
113
|
+
slotNumber: this.slotNumber,
|
|
114
|
+
coinbase: this.coinbase.toString(),
|
|
115
|
+
feeRecipient: this.feeRecipient.toString(),
|
|
116
|
+
gasFees: this.gasFees.toInspect(),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[inspect.custom]() {
|
|
121
|
+
return `CheckpointConstantData ${inspect(this.toInspect())}`;
|
|
122
|
+
}
|
|
84
123
|
}
|