@aztec/stdlib 3.0.0-nightly.20251127 → 3.0.0-nightly.20251201.2
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 +83 -83
- 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/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 +2433 -2431
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.d.ts +16 -43
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.d.ts +175 -173
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_proving_request.d.ts +1660 -1656
- 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 +1 -1
- 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 +4 -10
- package/dest/avm/public_data_write.d.ts.map +1 -1
- 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 +4 -4
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/aztec-address/index.d.ts +1 -1
- package/dest/aztec-address/index.d.ts.map +1 -1
- 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 +5 -2
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +5 -2
- 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 +1 -1
- package/dest/block/l2_block.d.ts +10 -7
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +22 -1
- 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 +3 -2
- package/dest/block/l2_block_header.d.ts +4 -11
- package/dest/block/l2_block_header.d.ts.map +1 -1
- package/dest/block/l2_block_header.js +1 -1
- package/dest/block/l2_block_info.d.ts +9 -9
- package/dest/block/l2_block_new.d.ts +17 -6
- package/dest/block/l2_block_new.d.ts.map +1 -1
- package/dest/block/l2_block_new.js +22 -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 +1 -1
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- 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 +20 -7
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +33 -8
- package/dest/checkpoint/index.d.ts +2 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +1 -0
- 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 +17 -17
- package/dest/contract/contract_deployment_data.d.ts.map +1 -1
- 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 +1 -1
- package/dest/contract/interfaces/contract_class.d.ts +29 -29
- 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 +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/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/gas/gas.d.ts +1 -1
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas_fees.d.ts +1 -1
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_settings.d.ts +1 -1
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_used.d.ts +1 -1
- package/dest/gas/index.d.ts +1 -1
- package/dest/hash/hash.d.ts +2 -2
- package/dest/hash/hash.d.ts.map +1 -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 +1 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +6 -5
- package/dest/interfaces/aztec-node-admin.d.ts +88 -88
- package/dest/interfaces/aztec-node.d.ts +8 -2
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +2 -1
- package/dest/interfaces/block-builder.d.ts +1 -1
- package/dest/interfaces/client.d.ts +1 -1
- package/dest/interfaces/configs.d.ts +21 -21
- package/dest/interfaces/epoch-prover.d.ts +4 -3
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.d.ts +1 -1
- package/dest/interfaces/l2_logs_source.d.ts +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +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 +1273 -1276
- 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 +23 -23
- package/dest/interfaces/validator.d.ts.map +1 -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 +1 -1
- 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 +1 -13
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- 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 +62 -29
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.js +105 -4
- 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 +1 -74
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- 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 +1 -31
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- 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_init_circuit_private_inputs.d.ts +1 -22
- 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 +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 +8 -8
- 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 +8 -8
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- 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 +1 -10
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/public_call_request.d.ts +6 -27
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- 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 +1 -5
- package/dest/keys/public_keys.d.ts.map +1 -1
- 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 +4 -4
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/debug_log.d.ts +1 -1
- package/dest/logs/debug_log.d.ts.map +1 -1
- 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 +2 -4
- 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 +1 -1
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/public_log.d.ts +1 -1
- package/dest/logs/public_log.d.ts.map +1 -1
- 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 +1 -1
- 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 +1 -1
- 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_message.d.ts +21 -21
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/out_hash.d.ts +1 -1
- package/dest/noir/index.d.ts +1 -1
- package/dest/note/comparator.d.ts +1 -1
- package/dest/note/index.d.ts +1 -1
- package/dest/note/note.d.ts +1 -1
- package/dest/note/note.d.ts.map +1 -1
- package/dest/note/note_dao.d.ts +2 -28
- package/dest/note/note_dao.d.ts.map +1 -1
- 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 +4 -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 +9 -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 +1 -1
- package/dest/p2p/gossipable.d.ts.map +1 -1
- 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 +1 -10
- 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 +1 -1
- 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 +1 -45
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +1 -64
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.d.ts +11 -14
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +11 -4
- package/dest/rollup/checkpoint_header.d.ts +12 -15
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +30 -12
- 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 +1 -25
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- 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 +1 -1
- 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 +7 -2
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +2 -0
- 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 +9 -9
- 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 +5 -8
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +13 -22
- 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 +38 -21
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +24 -21
- package/dest/trees/append_only_tree_snapshot.d.ts +1 -16
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +0 -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 +1 -13
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.d.ts +1 -10
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.d.ts +12 -27
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_witness.d.ts +8 -18
- 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 +1 -9
- package/dest/tx/execution_payload.d.ts.map +1 -1
- 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 +35 -24
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +40 -9
- 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 +1 -1
- 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 +1 -7
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +0 -10
- package/dest/tx/private_execution_result.d.ts +6 -28
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- 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 +35 -35
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.d.ts +2 -2
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- 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 +1 -7
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.d.ts +1 -1
- package/dest/tx/public_simulation_output.d.ts.map +1 -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 +7 -12
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +0 -9
- package/dest/tx/tree_snapshots.d.ts +7 -7
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tx.d.ts +2 -17
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +1 -0
- 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 +12 -33
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +4 -2
- 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 +1 -22
- package/dest/vks/verification_key.d.ts.map +1 -1
- 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 +7 -7
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/zkpassport/index.d.ts +1 -1
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/package.json +11 -10
- package/src/block/attestation_info.ts +8 -1
- package/src/block/body.ts +9 -7
- package/src/block/l2_block.ts +29 -2
- package/src/block/l2_block_code_to_purge.ts +3 -2
- package/src/block/l2_block_header.ts +3 -2
- package/src/block/l2_block_new.ts +28 -0
- package/src/block/l2_block_source.ts +9 -8
- package/src/block/published_l2_block.ts +14 -31
- package/src/block/validate_block_result.ts +9 -7
- package/src/checkpoint/checkpoint.ts +48 -7
- package/src/checkpoint/index.ts +1 -0
- package/src/checkpoint/published_checkpoint.ts +91 -0
- package/src/epoch-helpers/index.ts +28 -21
- package/src/interfaces/archiver.ts +6 -5
- package/src/interfaces/aztec-node.ts +12 -3
- package/src/interfaces/epoch-prover.ts +3 -2
- package/src/interfaces/p2p.ts +4 -2
- package/src/interfaces/proving-job.ts +14 -5
- package/src/interfaces/validator.ts +1 -2
- package/src/kernel/private_call_data.ts +130 -3
- 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/rollup/checkpoint_constant_data.ts +24 -5
- package/src/rollup/checkpoint_header.ts +33 -23
- package/src/schemas/schemas.ts +7 -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 +27 -25
- package/src/tests/mocks.ts +32 -26
- package/src/trees/append_only_tree_snapshot.ts +0 -12
- package/src/tx/block_header.ts +16 -3
- package/src/tx/global_variable_builder.ts +2 -1
- package/src/tx/global_variables.ts +44 -10
- package/src/tx/indexed_tx_effect.ts +1 -1
- package/src/tx/partial_state_reference.ts +0 -17
- package/src/tx/state_reference.ts +0 -15
- package/src/tx/tx.ts +2 -1
- package/src/tx/tx_effect.ts +27 -23
- package/src/validators/errors.ts +3 -4
- package/src/validators/schemas.ts +7 -7
- package/src/validators/types.ts +9 -8
|
@@ -1,43 +1,18 @@
|
|
|
1
1
|
// Ignoring import issue to fix portable inferred type issue in zod schema
|
|
2
|
-
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
|
-
import { randomBigInt } from '@aztec/foundation/crypto';
|
|
4
|
-
import { schemas } from '@aztec/foundation/schemas';
|
|
5
2
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
3
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
7
4
|
|
|
8
5
|
import { z } from 'zod';
|
|
9
6
|
|
|
7
|
+
import { L1PublishedData, PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
|
|
10
8
|
import { L2Block } from './l2_block.js';
|
|
11
9
|
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
) {}
|
|
19
|
-
|
|
20
|
-
static get schema() {
|
|
21
|
-
return z.object({
|
|
22
|
-
blockNumber: schemas.BigInt,
|
|
23
|
-
timestamp: schemas.BigInt,
|
|
24
|
-
blockHash: z.string(),
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static random() {
|
|
29
|
-
return new L1PublishedData(
|
|
30
|
-
randomBigInt(1000n) + 1n,
|
|
31
|
-
BigInt(Math.floor(Date.now() / 1000)),
|
|
32
|
-
Buffer32.random().toString(),
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
static fromFields(fields: FieldsOf<L1PublishedData>) {
|
|
37
|
-
return new L1PublishedData(fields.blockNumber, fields.timestamp, fields.blockHash);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated `PublishedCheckpoint` is what will be retrieved from L1.
|
|
13
|
+
* L2 blocks do not need to link to L1PublishedData directly.
|
|
14
|
+
* TODO: Create another type (AttestedL2Block?) for an L2 block and its attestations.
|
|
15
|
+
*/
|
|
41
16
|
export class PublishedL2Block {
|
|
42
17
|
constructor(
|
|
43
18
|
public block: L2Block,
|
|
@@ -79,4 +54,12 @@ export class PublishedL2Block {
|
|
|
79
54
|
this.attestations,
|
|
80
55
|
);
|
|
81
56
|
}
|
|
57
|
+
|
|
58
|
+
public toPublishedCheckpoint() {
|
|
59
|
+
return new PublishedCheckpoint(this.block.toCheckpoint(), this.l1, this.attestations);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static fromPublishedCheckpoint(checkpoint: PublishedCheckpoint) {
|
|
63
|
+
return new PublishedL2Block(L2Block.fromCheckpoint(checkpoint.checkpoint), checkpoint.l1, checkpoint.attestations);
|
|
64
|
+
}
|
|
82
65
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EpochNumber, EpochNumberSchema } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
3
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
3
4
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
@@ -16,7 +17,7 @@ export type ValidateBlockNegativeResult =
|
|
|
16
17
|
/** Committee members at the epoch this block was proposed */
|
|
17
18
|
committee: EthAddress[];
|
|
18
19
|
/** Epoch in which this block was proposed */
|
|
19
|
-
epoch:
|
|
20
|
+
epoch: EpochNumber;
|
|
20
21
|
/** Proposer selection seed for the epoch */
|
|
21
22
|
seed: bigint;
|
|
22
23
|
/** List of committee members who signed this block proposal */
|
|
@@ -33,7 +34,7 @@ export type ValidateBlockNegativeResult =
|
|
|
33
34
|
/** Committee members at the epoch this block was proposed */
|
|
34
35
|
committee: EthAddress[];
|
|
35
36
|
/** Epoch in which this block was proposed */
|
|
36
|
-
epoch:
|
|
37
|
+
epoch: EpochNumber;
|
|
37
38
|
/** Proposer selection seed for the epoch */
|
|
38
39
|
seed: bigint;
|
|
39
40
|
/** List of committee members who signed this block proposal */
|
|
@@ -46,16 +47,17 @@ export type ValidateBlockNegativeResult =
|
|
|
46
47
|
invalidIndex: number;
|
|
47
48
|
};
|
|
48
49
|
|
|
50
|
+
// TODO: Rename to ValidateAttestationsResult
|
|
49
51
|
/** Result type for validating a block attestations */
|
|
50
52
|
export type ValidateBlockResult = { valid: true } | ValidateBlockNegativeResult;
|
|
51
53
|
|
|
52
|
-
export const ValidateBlockResultSchema = z.union([
|
|
54
|
+
export const ValidateBlockResultSchema: ZodFor<ValidateBlockResult> = z.union([
|
|
53
55
|
z.object({ valid: z.literal(true) }),
|
|
54
56
|
z.object({
|
|
55
57
|
valid: z.literal(false),
|
|
56
58
|
block: BlockInfoSchema,
|
|
57
59
|
committee: z.array(schemas.EthAddress),
|
|
58
|
-
epoch:
|
|
60
|
+
epoch: EpochNumberSchema,
|
|
59
61
|
seed: schemas.BigInt,
|
|
60
62
|
attestors: z.array(schemas.EthAddress),
|
|
61
63
|
attestations: z.array(CommitteeAttestation.schema),
|
|
@@ -65,14 +67,14 @@ export const ValidateBlockResultSchema = z.union([
|
|
|
65
67
|
valid: z.literal(false),
|
|
66
68
|
block: BlockInfoSchema,
|
|
67
69
|
committee: z.array(schemas.EthAddress),
|
|
68
|
-
epoch:
|
|
70
|
+
epoch: EpochNumberSchema,
|
|
69
71
|
seed: schemas.BigInt,
|
|
70
72
|
attestors: z.array(schemas.EthAddress),
|
|
71
73
|
attestations: z.array(CommitteeAttestation.schema),
|
|
72
74
|
reason: z.literal('invalid-attestation'),
|
|
73
75
|
invalidIndex: z.number(),
|
|
74
76
|
}),
|
|
75
|
-
])
|
|
77
|
+
]);
|
|
76
78
|
|
|
77
79
|
export function serializeValidateBlockResult(result: ValidateBlockResult): Buffer {
|
|
78
80
|
if (result.valid) {
|
|
@@ -106,7 +108,7 @@ export function deserializeValidateBlockResult(bufferOrReader: Buffer | BufferRe
|
|
|
106
108
|
const reason = reader.readString() as 'insufficient-attestations' | 'invalid-attestation';
|
|
107
109
|
const block = deserializeBlockInfo(reader.readBuffer());
|
|
108
110
|
const committee = reader.readVector(EthAddress);
|
|
109
|
-
const epoch = reader.
|
|
111
|
+
const epoch = EpochNumber(reader.readNumber());
|
|
110
112
|
const seed = reader.readBigInt();
|
|
111
113
|
const attestors = reader.readVector(EthAddress);
|
|
112
114
|
const attestations = reader.readVector(CommitteeAttestation);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { encodeCheckpointBlobDataFromBlocks } from '@aztec/blob-lib/encoding';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
3
4
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
|
+
import type { FieldsOf } from '@aztec/foundation/types';
|
|
4
6
|
|
|
5
7
|
import { z } from 'zod';
|
|
6
8
|
|
|
@@ -16,6 +18,8 @@ export class Checkpoint {
|
|
|
16
18
|
public header: CheckpointHeader,
|
|
17
19
|
/** L2 blocks in the checkpoint. */
|
|
18
20
|
public blocks: L2BlockNew[],
|
|
21
|
+
/** Number of the checkpoint. */
|
|
22
|
+
public number: number,
|
|
19
23
|
) {}
|
|
20
24
|
|
|
21
25
|
static get schema() {
|
|
@@ -24,24 +28,61 @@ export class Checkpoint {
|
|
|
24
28
|
archive: AppendOnlyTreeSnapshot.schema,
|
|
25
29
|
header: CheckpointHeader.schema,
|
|
26
30
|
blocks: z.array(L2BlockNew.schema),
|
|
31
|
+
number: schemas.UInt32,
|
|
27
32
|
})
|
|
28
|
-
.transform(({ archive, header, blocks }) => new Checkpoint(archive, header, blocks));
|
|
33
|
+
.transform(({ archive, header, blocks, number }) => new Checkpoint(archive, header, blocks, number));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static from(fields: FieldsOf<Checkpoint>) {
|
|
37
|
+
return new Checkpoint(...Checkpoint.getFields(fields));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static getFields(fields: FieldsOf<Checkpoint>) {
|
|
41
|
+
return [fields.archive, fields.header, fields.blocks, fields.number] as const;
|
|
29
42
|
}
|
|
30
43
|
|
|
31
44
|
static fromBuffer(buf: Buffer | BufferReader) {
|
|
32
45
|
const reader = BufferReader.asReader(buf);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
return new Checkpoint(
|
|
47
|
+
reader.readObject(AppendOnlyTreeSnapshot),
|
|
48
|
+
reader.readObject(CheckpointHeader),
|
|
49
|
+
reader.readVector(L2BlockNew),
|
|
50
|
+
reader.readNumber(),
|
|
51
|
+
);
|
|
37
52
|
}
|
|
38
53
|
|
|
39
|
-
toBuffer() {
|
|
40
|
-
return serializeToBuffer(this.archive, this.header, this.blocks.length, this.blocks);
|
|
54
|
+
public toBuffer() {
|
|
55
|
+
return serializeToBuffer(this.archive, this.header, this.blocks.length, this.blocks, this.number);
|
|
41
56
|
}
|
|
42
57
|
|
|
43
58
|
public toBlobFields(): Fr[] {
|
|
44
59
|
const blocks = this.blocks.map((block, i) => block.toBlockBlobData(i === 0));
|
|
45
60
|
return encodeCheckpointBlobDataFromBlocks(blocks);
|
|
46
61
|
}
|
|
62
|
+
|
|
63
|
+
public hash(): Fr {
|
|
64
|
+
return this.header.hash();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public getState() {
|
|
68
|
+
return this.blocks.at(-1)!.header.state;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static async random(
|
|
72
|
+
checkpointNumber = 1,
|
|
73
|
+
{
|
|
74
|
+
numBlocks = 1,
|
|
75
|
+
startBlockNumber = 1,
|
|
76
|
+
...options
|
|
77
|
+
}: { numBlocks?: number; startBlockNumber?: number } & Partial<FieldsOf<CheckpointHeader>> &
|
|
78
|
+
Partial<Parameters<typeof L2BlockNew.random>[1]> = {},
|
|
79
|
+
) {
|
|
80
|
+
const header = CheckpointHeader.random(options);
|
|
81
|
+
|
|
82
|
+
const blocks = await Promise.all(
|
|
83
|
+
Array.from({ length: numBlocks }, (_, i) => L2BlockNew.random(startBlockNumber + i, options)),
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
return new Checkpoint(AppendOnlyTreeSnapshot.random(), header, blocks, checkpointNumber);
|
|
87
|
+
}
|
|
47
88
|
}
|
package/src/checkpoint/index.ts
CHANGED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Ignoring import issue to fix portable inferred type issue in zod schema
|
|
2
|
+
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
|
+
import { randomBigInt } from '@aztec/foundation/crypto';
|
|
4
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
5
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
|
+
import type { FieldsOf } from '@aztec/foundation/types';
|
|
7
|
+
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
|
|
10
|
+
import { CommitteeAttestation } from '../block/proposal/committee_attestation.js';
|
|
11
|
+
import { Checkpoint } from './checkpoint.js';
|
|
12
|
+
|
|
13
|
+
export class L1PublishedData {
|
|
14
|
+
constructor(
|
|
15
|
+
public blockNumber: bigint,
|
|
16
|
+
public timestamp: bigint,
|
|
17
|
+
public blockHash: string,
|
|
18
|
+
) {}
|
|
19
|
+
|
|
20
|
+
static get schema() {
|
|
21
|
+
return z.object({
|
|
22
|
+
blockNumber: schemas.BigInt,
|
|
23
|
+
timestamp: schemas.BigInt,
|
|
24
|
+
blockHash: z.string(),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static random() {
|
|
29
|
+
return new L1PublishedData(
|
|
30
|
+
randomBigInt(1000n) + 1n,
|
|
31
|
+
BigInt(Math.floor(Date.now() / 1000)),
|
|
32
|
+
Buffer32.random().toString(),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static fromFields(fields: FieldsOf<L1PublishedData>) {
|
|
37
|
+
return new L1PublishedData(fields.blockNumber, fields.timestamp, fields.blockHash);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class PublishedCheckpoint {
|
|
42
|
+
constructor(
|
|
43
|
+
public checkpoint: Checkpoint,
|
|
44
|
+
public l1: L1PublishedData,
|
|
45
|
+
// The attestations for the last block in the checkpoint.
|
|
46
|
+
public attestations: CommitteeAttestation[],
|
|
47
|
+
) {}
|
|
48
|
+
|
|
49
|
+
static get schema() {
|
|
50
|
+
return z
|
|
51
|
+
.object({
|
|
52
|
+
checkpoint: Checkpoint.schema,
|
|
53
|
+
l1: L1PublishedData.schema,
|
|
54
|
+
attestations: z.array(CommitteeAttestation.schema),
|
|
55
|
+
})
|
|
56
|
+
.transform(obj => PublishedCheckpoint.from(obj));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static getFields(fields: FieldsOf<PublishedCheckpoint>) {
|
|
60
|
+
return [fields.checkpoint, fields.l1, fields.attestations] as const;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static from(fields: FieldsOf<PublishedCheckpoint>) {
|
|
64
|
+
return new PublishedCheckpoint(...PublishedCheckpoint.getFields(fields));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static fromBuffer(bufferOrReader: Buffer | BufferReader): PublishedCheckpoint {
|
|
68
|
+
const reader = BufferReader.asReader(bufferOrReader);
|
|
69
|
+
const checkpoint = reader.readObject(Checkpoint);
|
|
70
|
+
const l1BlockNumber = reader.readBigInt();
|
|
71
|
+
const l1BlockHash = reader.readString();
|
|
72
|
+
const l1Timestamp = reader.readBigInt();
|
|
73
|
+
const attestations = reader.readVector(CommitteeAttestation);
|
|
74
|
+
return new PublishedCheckpoint(
|
|
75
|
+
checkpoint,
|
|
76
|
+
new L1PublishedData(l1BlockNumber, l1Timestamp, l1BlockHash),
|
|
77
|
+
attestations,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
public toBuffer(): Buffer {
|
|
82
|
+
return serializeToBuffer(
|
|
83
|
+
this.checkpoint,
|
|
84
|
+
this.l1.blockNumber,
|
|
85
|
+
this.l1.blockHash,
|
|
86
|
+
this.l1.timestamp,
|
|
87
|
+
this.attestations.length,
|
|
88
|
+
this.attestations,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
|
|
3
5
|
import { type ZodFor, schemas } from '../schemas/index.js';
|
|
@@ -31,37 +33,42 @@ export const L1RollupConstantsSchema = z.object({
|
|
|
31
33
|
|
|
32
34
|
/** Returns the timestamp for a given L2 slot. */
|
|
33
35
|
export function getTimestampForSlot(
|
|
34
|
-
slot:
|
|
36
|
+
slot: SlotNumber,
|
|
35
37
|
constants: Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration'>,
|
|
36
38
|
) {
|
|
37
|
-
return constants.l1GenesisTime + slot * BigInt(constants.slotDuration);
|
|
39
|
+
return constants.l1GenesisTime + BigInt(slot) * BigInt(constants.slotDuration);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
/** Returns the slot number for a given timestamp. */
|
|
41
|
-
export function getSlotAtTimestamp(
|
|
42
|
-
|
|
43
|
+
export function getSlotAtTimestamp(
|
|
44
|
+
ts: bigint,
|
|
45
|
+
constants: Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration'>,
|
|
46
|
+
): SlotNumber {
|
|
47
|
+
return ts < constants.l1GenesisTime
|
|
48
|
+
? SlotNumber.ZERO
|
|
49
|
+
: SlotNumber.fromBigInt((ts - constants.l1GenesisTime) / BigInt(constants.slotDuration));
|
|
43
50
|
}
|
|
44
51
|
|
|
45
52
|
/** Returns the epoch number for a given timestamp. */
|
|
46
53
|
export function getEpochNumberAtTimestamp(
|
|
47
54
|
ts: bigint,
|
|
48
55
|
constants: Pick<L1RollupConstants, 'epochDuration' | 'slotDuration' | 'l1GenesisTime'>,
|
|
49
|
-
) {
|
|
56
|
+
): EpochNumber {
|
|
50
57
|
return getEpochAtSlot(getSlotAtTimestamp(ts, constants), constants);
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
/** Returns the epoch number for a given slot. */
|
|
54
|
-
export function getEpochAtSlot(slot:
|
|
55
|
-
return slot / BigInt(constants.epochDuration);
|
|
61
|
+
export function getEpochAtSlot(slot: SlotNumber, constants: Pick<L1RollupConstants, 'epochDuration'>): EpochNumber {
|
|
62
|
+
return EpochNumber.fromBigInt(BigInt(slot) / BigInt(constants.epochDuration));
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
/** Returns the range of L2 slots (inclusive) for a given epoch number. */
|
|
59
66
|
export function getSlotRangeForEpoch(
|
|
60
|
-
epochNumber:
|
|
67
|
+
epochNumber: EpochNumber,
|
|
61
68
|
constants: Pick<L1RollupConstants, 'epochDuration'>,
|
|
62
|
-
): [
|
|
63
|
-
const startSlot = epochNumber *
|
|
64
|
-
return [startSlot, startSlot +
|
|
69
|
+
): [SlotNumber, SlotNumber] {
|
|
70
|
+
const startSlot = SlotNumber(epochNumber * constants.epochDuration);
|
|
71
|
+
return [startSlot, SlotNumber(startSlot + constants.epochDuration - 1)];
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
/**
|
|
@@ -69,15 +76,15 @@ export function getSlotRangeForEpoch(
|
|
|
69
76
|
* Note that the endTimestamp is the start timestamp of the last L1 slot for the epoch.
|
|
70
77
|
*/
|
|
71
78
|
export function getTimestampRangeForEpoch(
|
|
72
|
-
epochNumber:
|
|
79
|
+
epochNumber: EpochNumber,
|
|
73
80
|
constants: Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration' | 'epochDuration' | 'ethereumSlotDuration'>,
|
|
74
81
|
): [bigint, bigint] {
|
|
75
82
|
const [startSlot, endSlot] = getSlotRangeForEpoch(epochNumber, constants);
|
|
76
83
|
const ethereumSlotsPerL2Slot = constants.slotDuration / constants.ethereumSlotDuration;
|
|
77
84
|
return [
|
|
78
|
-
constants.l1GenesisTime + startSlot * BigInt(constants.slotDuration),
|
|
85
|
+
constants.l1GenesisTime + BigInt(startSlot) * BigInt(constants.slotDuration),
|
|
79
86
|
constants.l1GenesisTime +
|
|
80
|
-
endSlot * BigInt(constants.slotDuration) +
|
|
87
|
+
BigInt(endSlot) * BigInt(constants.slotDuration) +
|
|
81
88
|
BigInt((ethereumSlotsPerL2Slot - 1) * constants.ethereumSlotDuration),
|
|
82
89
|
];
|
|
83
90
|
}
|
|
@@ -86,7 +93,7 @@ export function getTimestampRangeForEpoch(
|
|
|
86
93
|
* Returns the start timestamp for a given epoch number.
|
|
87
94
|
*/
|
|
88
95
|
export function getStartTimestampForEpoch(
|
|
89
|
-
epochNumber:
|
|
96
|
+
epochNumber: EpochNumber,
|
|
90
97
|
constants: Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration' | 'epochDuration'>,
|
|
91
98
|
) {
|
|
92
99
|
const [startSlot] = getSlotRangeForEpoch(epochNumber, constants);
|
|
@@ -98,10 +105,10 @@ export function getStartTimestampForEpoch(
|
|
|
98
105
|
* See l1-contracts/src/core/libraries/TimeLib.sol
|
|
99
106
|
*/
|
|
100
107
|
export function getProofSubmissionDeadlineEpoch(
|
|
101
|
-
epochNumber:
|
|
108
|
+
epochNumber: EpochNumber,
|
|
102
109
|
constants: Pick<L1RollupConstants, 'proofSubmissionEpochs'>,
|
|
103
|
-
) {
|
|
104
|
-
return epochNumber +
|
|
110
|
+
): EpochNumber {
|
|
111
|
+
return EpochNumber(epochNumber + constants.proofSubmissionEpochs + 1);
|
|
105
112
|
}
|
|
106
113
|
|
|
107
114
|
/**
|
|
@@ -109,7 +116,7 @@ export function getProofSubmissionDeadlineEpoch(
|
|
|
109
116
|
* Computed as the start of the given epoch plus the proof submission window.
|
|
110
117
|
*/
|
|
111
118
|
export function getProofSubmissionDeadlineTimestamp(
|
|
112
|
-
epochNumber:
|
|
119
|
+
epochNumber: EpochNumber,
|
|
113
120
|
constants: Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration' | 'epochDuration' | 'proofSubmissionEpochs'>,
|
|
114
121
|
) {
|
|
115
122
|
// See l1-contracts/src/core/libraries/TimeLib.sol:
|
|
@@ -121,8 +128,8 @@ export function getProofSubmissionDeadlineTimestamp(
|
|
|
121
128
|
|
|
122
129
|
/** Returns the timestamp to start building a block for a given L2 slot. Computed as the start timestamp of the slot minus one L1 slot duration. */
|
|
123
130
|
export function getSlotStartBuildTimestamp(
|
|
124
|
-
slotNumber:
|
|
131
|
+
slotNumber: SlotNumber,
|
|
125
132
|
constants: Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration' | 'ethereumSlotDuration'>,
|
|
126
133
|
): number {
|
|
127
|
-
return Number(constants.l1GenesisTime) +
|
|
134
|
+
return Number(constants.l1GenesisTime) + slotNumber * constants.slotDuration - constants.ethereumSlotDuration;
|
|
128
135
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { L1ContractAddresses } from '@aztec/ethereum';
|
|
2
|
+
import { EpochNumberSchema } from '@aztec/foundation/branded-types';
|
|
2
3
|
import type { ApiSchemaFor } from '@aztec/foundation/schemas';
|
|
3
4
|
|
|
4
5
|
import { z } from 'zod';
|
|
@@ -93,11 +94,11 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
93
94
|
getBlockHeaderByArchive: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
|
|
94
95
|
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
95
96
|
getSettledTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema.optional()),
|
|
96
|
-
getL2SlotNumber: z.function().args().returns(schemas.
|
|
97
|
-
getL2EpochNumber: z.function().args().returns(
|
|
98
|
-
getBlocksForEpoch: z.function().args(
|
|
99
|
-
getBlockHeadersForEpoch: z.function().args(
|
|
100
|
-
isEpochComplete: z.function().args(
|
|
97
|
+
getL2SlotNumber: z.function().args().returns(schemas.SlotNumber.optional()),
|
|
98
|
+
getL2EpochNumber: z.function().args().returns(EpochNumberSchema.optional()),
|
|
99
|
+
getBlocksForEpoch: z.function().args(EpochNumberSchema).returns(z.array(L2Block.schema)),
|
|
100
|
+
getBlockHeadersForEpoch: z.function().args(EpochNumberSchema).returns(z.array(BlockHeader.schema)),
|
|
101
|
+
isEpochComplete: z.function().args(EpochNumberSchema).returns(z.boolean()),
|
|
101
102
|
getL2Tips: z.function().args().returns(L2TipsSchema),
|
|
102
103
|
getPrivateLogs: z.function().args(z.number(), z.number()).returns(z.array(PrivateLog.schema)),
|
|
103
104
|
getLogsByTags: z
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
PUBLIC_DATA_TREE_HEIGHT,
|
|
8
8
|
} from '@aztec/constants';
|
|
9
9
|
import { type L1ContractAddresses, L1ContractAddressesSchema } from '@aztec/ethereum/l1-contract-addresses';
|
|
10
|
+
import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
10
11
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
11
12
|
import type { Fr } from '@aztec/foundation/fields';
|
|
12
13
|
import { createSafeJsonRpcClient, makeFetch } from '@aztec/foundation/json-rpc/client';
|
|
@@ -278,6 +279,12 @@ export interface AztecNode
|
|
|
278
279
|
*/
|
|
279
280
|
getCurrentBaseFees(): Promise<GasFees>;
|
|
280
281
|
|
|
282
|
+
/**
|
|
283
|
+
* Method to fetch the current max priority fee of txs in the mempool.
|
|
284
|
+
* @returns The current max priority fees.
|
|
285
|
+
*/
|
|
286
|
+
getMaxPriorityFees(): Promise<GasFees>;
|
|
287
|
+
|
|
281
288
|
/**
|
|
282
289
|
* Method to fetch the version of the package.
|
|
283
290
|
* @returns The node package version
|
|
@@ -434,8 +441,8 @@ export interface AztecNode
|
|
|
434
441
|
/** Returns stats for a single validator if enabled. */
|
|
435
442
|
getValidatorStats(
|
|
436
443
|
validatorAddress: EthAddress,
|
|
437
|
-
fromSlot?:
|
|
438
|
-
toSlot?:
|
|
444
|
+
fromSlot?: SlotNumber,
|
|
445
|
+
toSlot?: SlotNumber,
|
|
439
446
|
): Promise<SingleValidatorStats | undefined>;
|
|
440
447
|
|
|
441
448
|
/**
|
|
@@ -575,6 +582,8 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
575
582
|
|
|
576
583
|
getCurrentBaseFees: z.function().returns(GasFees.schema),
|
|
577
584
|
|
|
585
|
+
getMaxPriorityFees: z.function().returns(GasFees.schema),
|
|
586
|
+
|
|
578
587
|
getNodeVersion: z.function().returns(z.string()),
|
|
579
588
|
|
|
580
589
|
getVersion: z.function().returns(z.number()),
|
|
@@ -636,7 +645,7 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
636
645
|
|
|
637
646
|
getValidatorStats: z
|
|
638
647
|
.function()
|
|
639
|
-
.args(schemas.EthAddress, optional(schemas.
|
|
648
|
+
.args(schemas.EthAddress, optional(schemas.SlotNumber), optional(schemas.SlotNumber))
|
|
640
649
|
.returns(SingleValidatorStatsSchema.optional()),
|
|
641
650
|
|
|
642
651
|
simulatePublicCalls: z.function().args(Tx.schema, optional(z.boolean())).returns(PublicSimulationOutput.schema),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib';
|
|
1
|
+
import type { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib/types';
|
|
2
|
+
import type { EpochNumber } from '@aztec/foundation/branded-types';
|
|
2
3
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
4
|
import type { Fr } from '@aztec/foundation/fields';
|
|
4
5
|
|
|
@@ -19,7 +20,7 @@ export interface EpochProver extends Omit<IBlockFactory, 'setBlockCompleted' | '
|
|
|
19
20
|
* @param finalBlobBatchingChallenges - The final blob batching challenges for the epoch.
|
|
20
21
|
**/
|
|
21
22
|
startNewEpoch(
|
|
22
|
-
epochNumber:
|
|
23
|
+
epochNumber: EpochNumber,
|
|
23
24
|
totalNumCheckpoints: number,
|
|
24
25
|
finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
25
26
|
): void;
|
package/src/interfaces/p2p.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
|
|
3
5
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
@@ -56,7 +58,7 @@ export interface P2PApiWithAttestations extends P2PApiWithoutAttestations {
|
|
|
56
58
|
* @param proposalId - the proposal id to query, or undefined to query all proposals for the slot
|
|
57
59
|
* @returns BlockAttestations
|
|
58
60
|
*/
|
|
59
|
-
getAttestationsForSlot(slot:
|
|
61
|
+
getAttestationsForSlot(slot: SlotNumber, proposalId?: string): Promise<BlockAttestation[]>;
|
|
60
62
|
|
|
61
63
|
/** Deletes a given attestation manually from the p2p client attestation pool. */
|
|
62
64
|
deleteAttestation(attestation: BlockAttestation): Promise<void>;
|
|
@@ -78,7 +80,7 @@ export type P2PApiFull<T extends P2PClientType = P2PClientType.Full> = T extends
|
|
|
78
80
|
export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
|
|
79
81
|
getAttestationsForSlot: z
|
|
80
82
|
.function()
|
|
81
|
-
.args(schemas.
|
|
83
|
+
.args(schemas.SlotNumber, optional(z.string()))
|
|
82
84
|
.returns(z.array(BlockAttestation.schema)),
|
|
83
85
|
getPendingTxs: z
|
|
84
86
|
.function()
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
5
5
|
RECURSIVE_PROOF_LENGTH,
|
|
6
6
|
} from '@aztec/constants';
|
|
7
|
+
import { EpochNumber, EpochNumberSchema } from '@aztec/foundation/branded-types';
|
|
7
8
|
import type { ZodFor } from '@aztec/foundation/schemas';
|
|
8
9
|
|
|
9
10
|
import { z } from 'zod';
|
|
@@ -400,24 +401,32 @@ export const ProofUri = z.string().brand('ProvingJobUri');
|
|
|
400
401
|
export type ProofUri = z.infer<typeof ProofUri>;
|
|
401
402
|
|
|
402
403
|
export type ProvingJobId = z.infer<typeof ProvingJobId>;
|
|
403
|
-
|
|
404
|
+
|
|
405
|
+
type ProvingJobShape = {
|
|
406
|
+
id: ProvingJobId;
|
|
407
|
+
type: ProvingRequestType;
|
|
408
|
+
epochNumber: EpochNumber;
|
|
409
|
+
inputsUri: ProofUri;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
export const ProvingJob: z.ZodType<ProvingJobShape, z.ZodTypeDef, any> = z.object({
|
|
404
413
|
id: ProvingJobId,
|
|
405
414
|
type: z.nativeEnum(ProvingRequestType),
|
|
406
|
-
epochNumber:
|
|
415
|
+
epochNumber: EpochNumberSchema,
|
|
407
416
|
inputsUri: ProofUri,
|
|
408
417
|
});
|
|
409
418
|
|
|
410
|
-
export const makeProvingJobId = (epochNumber:
|
|
419
|
+
export const makeProvingJobId = (epochNumber: EpochNumber, type: ProvingRequestType, inputsHash: string) => {
|
|
411
420
|
return `${epochNumber}:${ProvingRequestType[type]}:${inputsHash}`;
|
|
412
421
|
};
|
|
413
422
|
|
|
414
|
-
export const getEpochFromProvingJobId = (id: ProvingJobId) => {
|
|
423
|
+
export const getEpochFromProvingJobId = (id: ProvingJobId): EpochNumber => {
|
|
415
424
|
const components = id.split(':');
|
|
416
425
|
const epochNumber = components.length < 1 ? Number.NaN : parseInt(components[0], 10);
|
|
417
426
|
if (!Number.isSafeInteger(epochNumber) || epochNumber < 0) {
|
|
418
427
|
throw new Error(`Proving Job ID ${id} does not contain valid epoch`);
|
|
419
428
|
}
|
|
420
|
-
return epochNumber;
|
|
429
|
+
return EpochNumber(epochNumber);
|
|
421
430
|
};
|
|
422
431
|
|
|
423
432
|
export type ProvingJob = z.infer<typeof ProvingJob>;
|
|
@@ -5,7 +5,7 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
5
5
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
6
6
|
import type { SequencerConfig, SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
7
7
|
import type { BlockAttestation, BlockProposal, BlockProposalOptions } from '@aztec/stdlib/p2p';
|
|
8
|
-
import type {
|
|
8
|
+
import type { Tx } from '@aztec/stdlib/tx';
|
|
9
9
|
|
|
10
10
|
import type { PeerId } from '@libp2p/interface';
|
|
11
11
|
import { z } from 'zod';
|
|
@@ -83,7 +83,6 @@ export interface Validator {
|
|
|
83
83
|
blockNumber: number,
|
|
84
84
|
header: CheckpointHeader,
|
|
85
85
|
archive: Fr,
|
|
86
|
-
stateReference: StateReference,
|
|
87
86
|
txs: Tx[],
|
|
88
87
|
proposerAddress: EthAddress | undefined,
|
|
89
88
|
options: BlockProposalOptions,
|