@aztec/stdlib 0.86.0-starknet.1 → 0.87.0
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 +3 -5
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/buffer.d.ts +0 -2
- package/dest/abi/buffer.d.ts.map +1 -1
- package/dest/abi/contract_artifact.d.ts +0 -2
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +3 -16
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +1 -1
- package/dest/abi/encoder.d.ts.map +1 -1
- package/dest/abi/encoder.js +1 -1
- package/dest/abi/event_selector.d.ts +0 -2
- package/dest/abi/event_selector.d.ts.map +1 -1
- package/dest/abi/function_selector.d.ts +0 -2
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/note_selector.d.ts +0 -2
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/selector.d.ts +0 -3
- package/dest/abi/selector.d.ts.map +1 -1
- package/dest/abi/utils.d.ts +0 -2
- package/dest/abi/utils.d.ts.map +1 -1
- package/dest/auth_witness/auth_witness.d.ts +1 -3
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/avm/avm.d.ts +39 -40
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +5 -5
- package/dest/avm/avm_accumulated_data.d.ts +4 -4
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +18 -2
- package/dest/avm/avm_circuit_public_inputs.d.ts +2 -4
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +26 -1
- package/dest/avm/avm_proving_request.d.ts +15 -17
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.d.ts +1 -3
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +1 -3
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/message_pack.d.ts +0 -2
- package/dest/avm/message_pack.d.ts.map +1 -1
- package/dest/avm/message_pack.js +7 -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_hint.d.ts +1 -3
- package/dest/avm/public_data_hint.d.ts.map +1 -1
- package/dest/avm/public_data_read.d.ts +1 -3
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.d.ts +1 -4
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_write.d.ts +4 -3
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_data_write.js +19 -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/public_inner_call_request.js +1 -1
- package/dest/avm/revert_code.d.ts +0 -3
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/aztec-address/index.d.ts +1 -4
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/block/block_hash.d.ts +1 -3
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/body.d.ts +1 -4
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +5 -11
- package/dest/block/l2_block.d.ts +1 -3
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +1 -1
- package/dest/block/l2_block_code_to_purge.d.ts +0 -2
- package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
- package/dest/block/l2_block_source.d.ts +0 -1
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/config/{config.d.ts → chain-config.d.ts} +1 -1
- package/dest/config/chain-config.d.ts.map +1 -0
- package/dest/config/index.d.ts +2 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +2 -1
- package/dest/config/node-rpc-config.d.ts +7 -0
- package/dest/config/node-rpc-config.d.ts.map +1 -0
- package/dest/config/node-rpc-config.js +8 -0
- package/dest/contract/artifact_hash.d.ts +1 -3
- package/dest/contract/artifact_hash.d.ts.map +1 -1
- package/dest/contract/artifact_hash.js +3 -2
- package/dest/contract/complete_address.d.ts +0 -2
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/contract_class_id.d.ts +0 -2
- package/dest/contract/contract_class_id.d.ts.map +1 -1
- package/dest/contract/contract_instance.d.ts +1 -3
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance_update.d.ts +1 -3
- package/dest/contract/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_class.d.ts +17 -19
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.d.ts +2 -2
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/private_function.d.ts +0 -2
- package/dest/contract/private_function.d.ts.map +1 -1
- package/dest/database-version/version_manager.d.ts +0 -4
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/errors/proving_error.d.ts.map +1 -1
- package/dest/errors/simulation_error.d.ts.map +1 -1
- package/dest/file-store/factory.js +1 -1
- package/dest/file-store/gcs.d.ts +0 -2
- package/dest/file-store/gcs.d.ts.map +1 -1
- package/dest/file-store/http.d.ts +1 -2
- package/dest/file-store/http.d.ts.map +1 -1
- package/dest/file-store/http.js +32 -16
- package/dest/file-store/interface.d.ts +0 -2
- package/dest/file-store/interface.d.ts.map +1 -1
- package/dest/file-store/local.d.ts +0 -2
- package/dest/file-store/local.d.ts.map +1 -1
- package/dest/gas/gas.d.ts +1 -4
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas_fees.d.ts +1 -4
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_settings.d.ts +1 -3
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.d.ts +10 -0
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +4 -1
- package/dest/interfaces/aztec-node.d.ts +1 -2
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +7 -2
- package/dest/interfaces/configs.d.ts +5 -0
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +1 -0
- package/dest/interfaces/merkle_tree_operations.d.ts +0 -2
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p.d.ts +2 -0
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +1 -0
- package/dest/interfaces/private_kernel_prover.d.ts +0 -2
- package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/proving-job.d.ts +15 -17
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/pxe.d.ts +2 -3
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +2 -2
- package/dest/interfaces/service.d.ts +2 -3
- package/dest/interfaces/service.d.ts.map +1 -1
- package/dest/interfaces/world_state.d.ts +4 -1
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/kernel/combined_constant_data.d.ts +1 -3
- package/dest/kernel/combined_constant_data.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_hint.d.ts +1 -3
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +1 -3
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +1 -3
- 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 +0 -2
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts +0 -2
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +1 -3
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/read_request.d.ts +0 -2
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request_hints.d.ts +4 -6
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/rollup_validation_requests.d.ts +1 -3
- package/dest/kernel/hints/rollup_validation_requests.d.ts.map +1 -1
- package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts +1 -3
- package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_index_hint.d.ts +0 -3
- package/dest/kernel/hints/transient_data_index_hint.d.ts.map +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts +0 -2
- package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
- package/dest/kernel/log_hash.d.ts +27 -9
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/log_hash.js +72 -13
- package/dest/kernel/note_hash.d.ts +0 -2
- package/dest/kernel/note_hash.d.ts.map +1 -1
- package/dest/kernel/nullifier.d.ts +0 -2
- package/dest/kernel/nullifier.d.ts.map +1 -1
- package/dest/kernel/private_accumulated_data.d.ts +4 -6
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_accumulated_data.js +3 -3
- package/dest/kernel/private_call_data.d.ts +0 -2
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_request.d.ts +1 -3
- package/dest/kernel/private_call_request.d.ts.map +1 -1
- package/dest/kernel/private_call_request.js +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +5 -7
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +4 -4
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +2 -4
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_data.d.ts +1 -3
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +1 -3
- 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 -3
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_prover_output.d.ts +5 -7
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +2 -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 -3
- package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/private_kernel_simulated_output.d.ts +0 -2
- package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +1 -3
- 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 +8 -8
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +4 -2
- package/dest/kernel/private_log_data.d.ts +1 -4
- package/dest/kernel/private_log_data.d.ts.map +1 -1
- package/dest/kernel/private_log_data.js +4 -2
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +3 -5
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +7 -0
- package/dest/kernel/private_to_public_accumulated_data.d.ts +1 -4
- package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +1 -3
- 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 +2 -5
- 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 +2 -4
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.d.ts +1 -4
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +1 -1
- package/dest/kernel/public_call_request.d.ts +2 -5
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/utils/optional_number.d.ts +1 -3
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/keys/public_keys.d.ts +0 -2
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +0 -1
- package/dest/logs/contract_class_log.d.ts +53 -12
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +129 -66
- package/dest/logs/extended_contract_class_log.d.ts +0 -2
- package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
- package/dest/logs/extended_public_log.d.ts +0 -2
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/indexed_tagging_secret.d.ts.map +1 -1
- package/dest/logs/log_id.d.ts +0 -2
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_with_tx_data.d.ts.map +1 -1
- package/dest/logs/log_with_tx_data.js +8 -3
- package/dest/logs/private_log.d.ts +13 -7
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +44 -30
- package/dest/logs/public_log.d.ts +9 -9
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +45 -32
- package/dest/logs/tx_scoped_l2_log.d.ts +8 -6
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/logs/tx_scoped_l2_log.js +1 -2
- package/dest/messaging/inbox_leaf.d.ts +5 -2
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/inbox_leaf.js +11 -0
- package/dest/messaging/l1_actor.d.ts +0 -2
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.d.ts +0 -2
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l2_actor.d.ts +0 -2
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.d.ts +0 -2
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/note/extended_note.d.ts +3 -5
- package/dest/note/extended_note.d.ts.map +1 -1
- package/dest/note/note.d.ts +5 -13
- package/dest/note/note.d.ts.map +1 -1
- package/dest/p2p/block_attestation.d.ts +1 -3
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_attestation.js +1 -1
- package/dest/p2p/block_proposal.d.ts +12 -6
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +25 -9
- package/dest/p2p/consensus_payload.d.ts +2 -3
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +3 -0
- package/dest/p2p/gossipable.d.ts +14 -4
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +43 -0
- package/dest/p2p/signature_utils.d.ts +0 -2
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/topic_type.d.ts.map +1 -1
- package/dest/p2p/topic_type.js +5 -0
- package/dest/parity/base_parity_inputs.d.ts +2 -4
- package/dest/parity/base_parity_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.d.ts +2 -4
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/root_parity_input.d.ts +4 -6
- package/dest/parity/root_parity_input.d.ts.map +1 -1
- package/dest/parity/root_parity_inputs.d.ts +2 -4
- package/dest/parity/root_parity_inputs.d.ts.map +1 -1
- package/dest/proofs/client_ivc_proof.d.ts +2 -4
- package/dest/proofs/client_ivc_proof.d.ts.map +1 -1
- package/dest/proofs/proof.d.ts +1 -3
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/recursive_proof.d.ts +4 -6
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.d.ts +1 -3
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts +2 -4
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.d.ts +9 -11
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +5 -5
- package/dest/rollup/block_merge_rollup.d.ts +2 -4
- package/dest/rollup/block_merge_rollup.d.ts.map +1 -1
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts +3 -5
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup.d.ts +8 -10
- package/dest/rollup/block_root_rollup.d.ts.map +1 -1
- package/dest/rollup/constant_rollup_data.d.ts +1 -3
- package/dest/rollup/constant_rollup_data.d.ts.map +1 -1
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts +2 -4
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts.map +1 -1
- package/dest/rollup/merge_rollup.d.ts +2 -4
- package/dest/rollup/merge_rollup.d.ts.map +1 -1
- package/dest/rollup/previous_rollup_block_data.d.ts +0 -2
- package/dest/rollup/previous_rollup_block_data.d.ts.map +1 -1
- package/dest/rollup/previous_rollup_data.d.ts +0 -2
- package/dest/rollup/previous_rollup_data.d.ts.map +1 -1
- package/dest/rollup/private_base_rollup_inputs.d.ts +2 -4
- package/dest/rollup/private_base_rollup_inputs.d.ts.map +1 -1
- package/dest/rollup/private_tube_data.d.ts +1 -3
- package/dest/rollup/private_tube_data.d.ts.map +1 -1
- package/dest/rollup/public_base_rollup_inputs.d.ts +2 -4
- package/dest/rollup/public_base_rollup_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tube_data.d.ts +1 -3
- package/dest/rollup/public_tube_data.d.ts.map +1 -1
- package/dest/rollup/root_rollup.d.ts +4 -6
- package/dest/rollup/root_rollup.d.ts.map +1 -1
- package/dest/rollup/state_diff_hints.d.ts +0 -2
- package/dest/rollup/state_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tube_inputs.d.ts +2 -4
- package/dest/rollup/tube_inputs.d.ts.map +1 -1
- package/dest/schemas/schemas.d.ts +4 -6
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/shared_mutable/scheduled_delay_change.d.ts.map +1 -1
- package/dest/shared_mutable/scheduled_value_change.d.ts.map +1 -1
- package/dest/shared_mutable/shared_mutable_values.d.ts +0 -2
- package/dest/shared_mutable/shared_mutable_values.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +0 -2
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +17 -14
- package/dest/tests/mocks.d.ts +1 -0
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +1 -1
- package/dest/trees/append_only_tree_snapshot.d.ts +1 -4
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.d.ts +0 -2
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.d.ts +4 -6
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/protocol_contract_leaf.d.ts +0 -2
- package/dest/trees/protocol_contract_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.d.ts +1 -3
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_witness.d.ts +4 -6
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/tx/block_header.d.ts +1 -4
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/call_context.d.ts +1 -4
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/capsule.d.ts +1 -3
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/content_commitment.d.ts +10 -12
- package/dest/tx/content_commitment.d.ts.map +1 -1
- package/dest/tx/function_data.d.ts +0 -2
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +1 -4
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/hashed_values.d.ts +1 -3
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/max_block_number.d.ts +1 -3
- package/dest/tx/max_block_number.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.d.ts +1 -3
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/private_execution_result.d.ts +8 -8
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +3 -2
- package/dest/tx/profiling.d.ts +8 -0
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +31 -0
- package/dest/tx/proposed_block_header.d.ts +1 -4
- package/dest/tx/proposed_block_header.d.ts.map +1 -1
- package/dest/tx/proposed_block_header.js +2 -1
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.d.ts +1 -4
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/state_reference.d.ts +1 -4
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/tree_snapshots.d.ts +1 -4
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tx.d.ts +6 -11
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +18 -15
- package/dest/tx/tx_constant_data.d.ts +1 -3
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_context.d.ts +1 -3
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_effect.d.ts +1 -4
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +33 -63
- package/dest/tx/tx_execution_request.d.ts +13 -6
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_execution_request.js +14 -7
- package/dest/tx/tx_hash.d.ts +2 -4
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +1 -1
- package/dest/tx/tx_request.d.ts +7 -5
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/tx_request.js +8 -5
- package/dest/tx/validator/error_texts.d.ts +1 -1
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +1 -1
- package/dest/types/shared.d.ts +1 -3
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/update-checker/index.d.ts +2 -0
- package/dest/update-checker/index.d.ts.map +1 -0
- package/dest/update-checker/index.js +1 -0
- package/dest/update-checker/update-checker.d.ts +48 -0
- package/dest/update-checker/update-checker.d.ts.map +1 -0
- package/dest/update-checker/update-checker.js +121 -0
- package/dest/versioning/versioning.d.ts +1 -1
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/vks/verification_key.d.ts +7 -9
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/vk_witness_data.d.ts +1 -3
- package/dest/vks/vk_witness_data.d.ts.map +1 -1
- package/package.json +16 -13
- package/src/abi/abi.ts +2 -2
- package/src/abi/contract_artifact.ts +3 -17
- package/src/abi/decoder.ts +10 -3
- package/src/abi/encoder.ts +5 -2
- package/src/avm/avm.ts +13 -7
- package/src/avm/avm_accumulated_data.ts +30 -2
- package/src/avm/avm_circuit_public_inputs.ts +26 -0
- package/src/avm/message_pack.ts +7 -1
- package/src/avm/public_data_write.ts +21 -1
- package/src/avm/public_inner_call_request.ts +1 -1
- package/src/avm/revert_code.ts +5 -5
- package/src/block/body.ts +5 -11
- package/src/block/l2_block.ts +1 -1
- package/src/config/index.ts +2 -1
- package/src/config/node-rpc-config.ts +14 -0
- package/src/contract/artifact_hash.ts +5 -3
- package/src/contract/private_function.ts +4 -2
- package/src/errors/proving_error.ts +5 -1
- package/src/file-store/factory.ts +1 -1
- package/src/file-store/http.ts +27 -18
- package/src/gas/gas.ts +4 -1
- package/src/interfaces/aztec-node-admin.ts +16 -0
- package/src/interfaces/aztec-node.ts +4 -2
- package/src/interfaces/configs.ts +3 -0
- package/src/interfaces/p2p.ts +4 -0
- package/src/interfaces/prover-client.ts +4 -1
- package/src/interfaces/pxe.ts +3 -4
- package/src/interfaces/service.ts +2 -3
- package/src/interfaces/world_state.ts +6 -1
- package/src/kernel/hints/note_hash_read_request_hints.ts +4 -1
- package/src/kernel/hints/nullifier_read_request_hints.ts +4 -1
- package/src/kernel/hints/read_request.ts +4 -1
- package/src/kernel/hints/read_request_hints.ts +12 -3
- package/src/kernel/hints/transient_data_index_hint.ts +4 -1
- package/src/kernel/hints/tree_leaf_read_request.ts +4 -1
- package/src/kernel/log_hash.ts +86 -14
- package/src/kernel/note_hash.ts +8 -2
- package/src/kernel/nullifier.ts +9 -2
- package/src/kernel/private_accumulated_data.ts +4 -4
- package/src/kernel/private_call_request.ts +1 -1
- package/src/kernel/private_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +13 -2
- package/src/kernel/private_log_data.ts +13 -4
- package/src/kernel/private_to_avm_accumulated_data.ts +9 -1
- package/src/kernel/private_validation_requests.ts +1 -1
- package/src/kernel/public_call_request.ts +4 -1
- package/src/keys/public_keys.ts +1 -1
- package/src/logs/contract_class_log.ts +156 -57
- package/src/logs/indexed_tagging_secret.ts +4 -1
- package/src/logs/log_with_tx_data.ts +7 -2
- package/src/logs/private_log.ts +52 -30
- package/src/logs/public_log.ts +62 -38
- package/src/logs/tx_scoped_l2_log.ts +1 -2
- package/src/messaging/inbox_leaf.ts +10 -0
- package/src/messaging/l2_to_l1_message.ts +9 -2
- package/src/p2p/block_attestation.ts +1 -1
- package/src/p2p/block_proposal.ts +36 -5
- package/src/p2p/consensus_payload.ts +4 -0
- package/src/p2p/gossipable.ts +44 -2
- package/src/p2p/topic_type.ts +2 -0
- package/src/rollup/base_rollup_hints.ts +7 -7
- package/src/rollup/block_root_or_block_merge_public_inputs.ts +4 -1
- package/src/rollup/private_base_rollup_inputs.ts +4 -1
- package/src/rollup/tube_inputs.ts +4 -1
- package/src/shared_mutable/scheduled_delay_change.ts +5 -1
- package/src/shared_mutable/scheduled_value_change.ts +5 -1
- package/src/shared_mutable/shared_mutable_values.ts +4 -1
- package/src/tests/factories.ts +31 -18
- package/src/tests/mocks.ts +2 -1
- package/src/tx/content_commitment.ts +6 -1
- package/src/tx/private_execution_result.ts +9 -5
- package/src/tx/profiling.ts +39 -1
- package/src/tx/proposed_block_header.ts +2 -1
- package/src/tx/tx.ts +18 -17
- package/src/tx/tx_effect.ts +36 -76
- package/src/tx/tx_execution_request.ts +11 -0
- package/src/tx/tx_receipt.ts +1 -1
- package/src/tx/tx_request.ts +12 -3
- package/src/tx/validator/error_texts.ts +1 -1
- package/src/update-checker/index.ts +1 -0
- package/src/update-checker/update-checker.ts +152 -0
- package/src/versioning/versioning.ts +1 -1
- package/src/vks/verification_key.ts +8 -2
- package/dest/config/config.d.ts.map +0 -1
- /package/dest/config/{config.js → chain-config.js} +0 -0
- /package/src/config/{config.ts → chain-config.ts} +0 -0
package/src/avm/revert_code.ts
CHANGED
|
@@ -13,10 +13,10 @@ export enum RevertCodeEnum {
|
|
|
13
13
|
|
|
14
14
|
function isRevertCodeEnum(value: number): value is RevertCodeEnum {
|
|
15
15
|
return (
|
|
16
|
-
value === RevertCodeEnum.OK ||
|
|
17
|
-
value === RevertCodeEnum.APP_LOGIC_REVERTED ||
|
|
18
|
-
value === RevertCodeEnum.TEARDOWN_REVERTED ||
|
|
19
|
-
value === RevertCodeEnum.BOTH_REVERTED
|
|
16
|
+
(value as RevertCodeEnum) === RevertCodeEnum.OK ||
|
|
17
|
+
(value as RevertCodeEnum) === RevertCodeEnum.APP_LOGIC_REVERTED ||
|
|
18
|
+
(value as RevertCodeEnum) === RevertCodeEnum.TEARDOWN_REVERTED ||
|
|
19
|
+
(value as RevertCodeEnum) === RevertCodeEnum.BOTH_REVERTED
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -46,7 +46,7 @@ export class RevertCode {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
public getDescription() {
|
|
49
|
-
switch (this.code) {
|
|
49
|
+
switch (this.code as RevertCodeEnum) {
|
|
50
50
|
case RevertCodeEnum.OK:
|
|
51
51
|
return 'OK';
|
|
52
52
|
case RevertCodeEnum.APP_LOGIC_REVERTED:
|
package/src/block/body.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BLOBS_PER_BLOCK, FIELDS_PER_BLOB } from '@aztec/constants';
|
|
2
2
|
import { timesParallel } from '@aztec/foundation/collection';
|
|
3
3
|
import type { Fr } from '@aztec/foundation/fields';
|
|
4
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
+
import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
5
|
|
|
6
6
|
import { inspect } from 'util';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -73,17 +73,11 @@ export class Body {
|
|
|
73
73
|
* Decodes a block from blob fields.
|
|
74
74
|
*/
|
|
75
75
|
static fromBlobFields(fields: Fr[]) {
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
while (
|
|
79
|
-
|
|
80
|
-
throw new Error('Invalid fields given to Body.fromBlobFields(): First field invalid.');
|
|
81
|
-
}
|
|
82
|
-
const len = TxEffect.decodeFirstField(fields[checkedFields]).length;
|
|
83
|
-
txEffectsFields.push(fields.slice(checkedFields, checkedFields + len));
|
|
84
|
-
checkedFields += len;
|
|
76
|
+
const txEffects: TxEffect[] = [];
|
|
77
|
+
const reader = new FieldReader(fields);
|
|
78
|
+
while (!reader.isFinished()) {
|
|
79
|
+
txEffects.push(TxEffect.fromBlobFields(reader));
|
|
85
80
|
}
|
|
86
|
-
const txEffects = txEffectsFields.filter(effect => effect.length).map(effect => TxEffect.fromBlobFields(effect));
|
|
87
81
|
return new this(txEffects);
|
|
88
82
|
}
|
|
89
83
|
|
package/src/block/l2_block.ts
CHANGED
|
@@ -130,7 +130,7 @@ export class L2Block {
|
|
|
130
130
|
),
|
|
131
131
|
contractClassLogSize: this.body.txEffects.reduce(
|
|
132
132
|
(totalLogSize, txEffect) =>
|
|
133
|
-
totalLogSize + txEffect.contractClassLogs.reduce((
|
|
133
|
+
totalLogSize + txEffect.contractClassLogs.reduce((acc, log) => acc + log.emittedLength, 0),
|
|
134
134
|
0,
|
|
135
135
|
),
|
|
136
136
|
};
|
package/src/config/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './config.js';
|
|
1
|
+
export * from './chain-config.js';
|
|
2
|
+
export * from './node-rpc-config.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ConfigMappingsType, numberConfigHelper } from '@aztec/foundation/config';
|
|
2
|
+
|
|
3
|
+
export const nodeRpcConfigMappings: ConfigMappingsType<NodeRPCConfig> = {
|
|
4
|
+
rpcSimulatePublicMaxGasLimit: {
|
|
5
|
+
env: 'RPC_SIMULATE_PUBLIC_MAX_GAS_LIMIT',
|
|
6
|
+
description: 'Maximum gas limit for public tx simulation in the node on `simulatePublicCalls`.',
|
|
7
|
+
...numberConfigHelper(10e9),
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type NodeRPCConfig = {
|
|
12
|
+
/** Maximum gas limit for public tx simulation in the node on `simulatePublicCalls`. */
|
|
13
|
+
rpcSimulatePublicMaxGasLimit: number;
|
|
14
|
+
};
|
|
@@ -4,6 +4,8 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
4
4
|
import { numToUInt8 } from '@aztec/foundation/serialize';
|
|
5
5
|
import { MerkleTree, MerkleTreeCalculator } from '@aztec/foundation/trees';
|
|
6
6
|
|
|
7
|
+
import deterministicStringify from 'json-stringify-deterministic';
|
|
8
|
+
|
|
7
9
|
import { type ContractArtifact, type FunctionArtifact, FunctionSelector, FunctionType } from '../abi/index.js';
|
|
8
10
|
|
|
9
11
|
const VERSION = 1;
|
|
@@ -58,7 +60,7 @@ export async function computeArtifactHashPreimage(artifact: ContractArtifact) {
|
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
export function computeArtifactMetadataHash(artifact: ContractArtifact) {
|
|
61
|
-
return sha256Fr(Buffer.from(
|
|
63
|
+
return sha256Fr(Buffer.from(deterministicStringify({ name: artifact.name, outputs: artifact.outputs }), 'utf-8'));
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
export async function computeArtifactFunctionTreeRoot(artifact: ContractArtifact, fnType: FunctionType) {
|
|
@@ -103,7 +105,7 @@ export async function computeFunctionArtifactHash(
|
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
export function computeFunctionMetadataHash(fn: FunctionArtifact) {
|
|
106
|
-
return sha256Fr(Buffer.from(
|
|
108
|
+
return sha256Fr(Buffer.from(deterministicStringify(fn.returnTypes), 'utf8'));
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
function getLogger() {
|
|
@@ -111,5 +113,5 @@ function getLogger() {
|
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
export function getArtifactMerkleTreeHasher() {
|
|
114
|
-
return (l: Buffer, r: Buffer) => Promise.resolve(sha256Fr(Buffer.concat([l, r])).toBuffer());
|
|
116
|
+
return (l: Buffer, r: Buffer) => Promise.resolve(sha256Fr(Buffer.concat([l, r])).toBuffer() as Buffer<ArrayBuffer>);
|
|
115
117
|
}
|
|
@@ -36,11 +36,13 @@ export async function computePrivateFunctionLeaf(fn: PrivateFunction): Promise<B
|
|
|
36
36
|
|
|
37
37
|
async function getPrivateFunctionTreeCalculator(): Promise<MerkleTreeCalculator> {
|
|
38
38
|
if (!privateFunctionTreeCalculator) {
|
|
39
|
-
const functionTreeZeroLeaf = (
|
|
39
|
+
const functionTreeZeroLeaf = (
|
|
40
|
+
await pedersenHash(new Array(PRIVATE_FUNCTION_SIZE).fill(0))
|
|
41
|
+
).toBuffer() as Buffer<ArrayBuffer>;
|
|
40
42
|
privateFunctionTreeCalculator = await MerkleTreeCalculator.create(
|
|
41
43
|
FUNCTION_TREE_HEIGHT,
|
|
42
44
|
functionTreeZeroLeaf,
|
|
43
|
-
async (left, right) => (await poseidon2Hash([left, right])).toBuffer()
|
|
45
|
+
async (left, right) => (await poseidon2Hash([left, right])).toBuffer() as Buffer<ArrayBuffer>,
|
|
44
46
|
);
|
|
45
47
|
}
|
|
46
48
|
return privateFunctionTreeCalculator;
|
|
@@ -10,7 +10,11 @@ export class ProvingError extends Error {
|
|
|
10
10
|
* @param cause - The cause of the error.
|
|
11
11
|
* @param retry - Whether the proof should be retried.
|
|
12
12
|
*/
|
|
13
|
-
constructor(
|
|
13
|
+
constructor(
|
|
14
|
+
message: string,
|
|
15
|
+
cause?: unknown,
|
|
16
|
+
public readonly retry: boolean = false,
|
|
17
|
+
) {
|
|
14
18
|
super(message);
|
|
15
19
|
this.name = ProvingError.NAME;
|
|
16
20
|
this.cause = cause;
|
|
@@ -36,7 +36,7 @@ export async function createFileStore(
|
|
|
36
36
|
const store = new GoogleCloudFileStore(bucket, path);
|
|
37
37
|
await store.checkCredentials();
|
|
38
38
|
return store;
|
|
39
|
-
} catch
|
|
39
|
+
} catch {
|
|
40
40
|
throw new Error(`Invalid google cloud store definition: '${config}'.`);
|
|
41
41
|
}
|
|
42
42
|
} else {
|
package/src/file-store/http.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
3
3
|
|
|
4
|
+
import axios, { type AxiosInstance, type AxiosRequestConfig, type AxiosResponse } from 'axios';
|
|
4
5
|
import { createWriteStream } from 'fs';
|
|
5
6
|
import { mkdir } from 'fs/promises';
|
|
6
7
|
import { dirname } from 'path';
|
|
@@ -10,13 +11,18 @@ import { finished } from 'stream/promises';
|
|
|
10
11
|
import type { ReadOnlyFileStore } from './interface.js';
|
|
11
12
|
|
|
12
13
|
export class HttpFileStore implements ReadOnlyFileStore {
|
|
13
|
-
private readonly
|
|
14
|
+
private readonly axiosInstance: AxiosInstance;
|
|
15
|
+
private readonly fetch: <T>(config: AxiosRequestConfig) => Promise<AxiosResponse<T>>;
|
|
14
16
|
|
|
15
|
-
constructor(
|
|
16
|
-
|
|
17
|
+
constructor(
|
|
18
|
+
private readonly baseUrl: string,
|
|
19
|
+
private readonly log: Logger = createLogger('stdlib:http-file-store'),
|
|
20
|
+
) {
|
|
21
|
+
this.axiosInstance = axios.create();
|
|
22
|
+
this.fetch = async <T>(config: AxiosRequestConfig) => {
|
|
17
23
|
return await retry(
|
|
18
|
-
() =>
|
|
19
|
-
`Fetching ${
|
|
24
|
+
() => this.axiosInstance.request<T>(config),
|
|
25
|
+
`Fetching ${config.url}`,
|
|
20
26
|
makeBackoff([1, 1, 3]),
|
|
21
27
|
this.log,
|
|
22
28
|
/*failSilently=*/ true,
|
|
@@ -26,30 +32,33 @@ export class HttpFileStore implements ReadOnlyFileStore {
|
|
|
26
32
|
|
|
27
33
|
public async read(pathOrUrl: string): Promise<Buffer> {
|
|
28
34
|
const url = this.getUrl(pathOrUrl);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return Buffer.from(
|
|
32
|
-
}
|
|
33
|
-
throw new Error(`Error fetching file from ${url}: ${
|
|
35
|
+
try {
|
|
36
|
+
const response = await this.fetch<ArrayBuffer>({ url, method: 'GET', responseType: 'arraybuffer' });
|
|
37
|
+
return Buffer.from(response.data);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
throw new Error(`Error fetching file from ${url}: ${error instanceof Error ? error.message : String(error)}`);
|
|
34
40
|
}
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
public async download(pathOrUrl: string, destPath: string): Promise<void> {
|
|
38
44
|
const url = this.getUrl(pathOrUrl);
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
try {
|
|
46
|
+
const response = await this.fetch<Readable>({ url, method: 'GET', responseType: 'stream' });
|
|
41
47
|
await mkdir(dirname(destPath), { recursive: true });
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
throw new Error(`Error fetching file from ${url}: ${response.statusText}`);
|
|
48
|
+
await finished(response.data.pipe(createWriteStream(destPath)));
|
|
49
|
+
} catch (error) {
|
|
50
|
+
throw new Error(`Error fetching file from ${url}: ${error instanceof Error ? error.message : String(error)}`);
|
|
46
51
|
}
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
public async exists(pathOrUrl: string): Promise<boolean> {
|
|
50
55
|
const url = this.getUrl(pathOrUrl);
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
try {
|
|
57
|
+
await this.fetch<unknown>({ url, method: 'HEAD' });
|
|
58
|
+
return true;
|
|
59
|
+
} catch {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
53
62
|
}
|
|
54
63
|
|
|
55
64
|
private getUrl(path: string): string {
|
package/src/gas/gas.ts
CHANGED
|
@@ -14,7 +14,10 @@ export type GasDimensions = (typeof GasDimensions)[number];
|
|
|
14
14
|
|
|
15
15
|
/** Gas amounts in each dimension. */
|
|
16
16
|
export class Gas {
|
|
17
|
-
constructor(
|
|
17
|
+
constructor(
|
|
18
|
+
public readonly daGas: UInt32,
|
|
19
|
+
public readonly l2Gas: UInt32,
|
|
20
|
+
) {}
|
|
18
21
|
|
|
19
22
|
static get schema() {
|
|
20
23
|
return z
|
|
@@ -28,12 +28,28 @@ export interface AztecNodeAdmin {
|
|
|
28
28
|
* @param location - The location to upload the snapshot to.
|
|
29
29
|
*/
|
|
30
30
|
startSnapshotUpload(location: string): Promise<void>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Pauses syncing and rolls back the database to the target L2 block number.
|
|
34
|
+
* @param targetBlockNumber - The block number to roll back to.
|
|
35
|
+
* @param force - If true, clears the world state db and p2p dbs if rolling back to behind the finalized block.
|
|
36
|
+
*/
|
|
37
|
+
rollbackTo(targetBlockNumber: number, force?: boolean): Promise<void>;
|
|
38
|
+
|
|
39
|
+
/** Pauses archiver and world state syncing. */
|
|
40
|
+
pauseSync(): Promise<void>;
|
|
41
|
+
|
|
42
|
+
/** Resumes archiver and world state syncing. */
|
|
43
|
+
resumeSync(): Promise<void>;
|
|
31
44
|
}
|
|
32
45
|
|
|
33
46
|
export const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin> = {
|
|
34
47
|
setConfig: z.function().args(SequencerConfigSchema.merge(ProverConfigSchema).partial()).returns(z.void()),
|
|
35
48
|
flushTxs: z.function().returns(z.void()),
|
|
36
49
|
startSnapshotUpload: z.function().args(z.string()).returns(z.void()),
|
|
50
|
+
rollbackTo: z.function().args(z.number()).returns(z.void()),
|
|
51
|
+
pauseSync: z.function().returns(z.void()),
|
|
52
|
+
resumeSync: z.function().returns(z.void()),
|
|
37
53
|
};
|
|
38
54
|
|
|
39
55
|
export function createAztecNodeAdminClient(
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '@aztec/constants';
|
|
8
8
|
import { type L1ContractAddresses, L1ContractAddressesSchema } from '@aztec/ethereum/l1-contract-addresses';
|
|
9
9
|
import type { Fr } from '@aztec/foundation/fields';
|
|
10
|
-
import { createSafeJsonRpcClient,
|
|
10
|
+
import { createSafeJsonRpcClient, makeFetch } from '@aztec/foundation/json-rpc/client';
|
|
11
11
|
import { SiblingPath } from '@aztec/foundation/trees';
|
|
12
12
|
|
|
13
13
|
import { z } from 'zod';
|
|
@@ -551,11 +551,13 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
551
551
|
export function createAztecNodeClient(
|
|
552
552
|
url: string,
|
|
553
553
|
versions: Partial<ComponentsVersions> = {},
|
|
554
|
-
fetch =
|
|
554
|
+
fetch = makeFetch([1, 2, 3], false),
|
|
555
|
+
batchWindowMS = 0,
|
|
555
556
|
): AztecNode {
|
|
556
557
|
return createSafeJsonRpcClient<AztecNode>(url, AztecNodeApiSchema, {
|
|
557
558
|
namespaceMethods: 'node',
|
|
558
559
|
fetch,
|
|
560
|
+
batchWindowMS,
|
|
559
561
|
onResponse: getVersioningResponseHandler(versions),
|
|
560
562
|
});
|
|
561
563
|
}
|
|
@@ -16,6 +16,8 @@ export interface SequencerConfig {
|
|
|
16
16
|
maxTxsPerBlock?: number;
|
|
17
17
|
/** The minimum number of txs to include in a block. */
|
|
18
18
|
minTxsPerBlock?: number;
|
|
19
|
+
/** Whether to publish txs with the block proposals */
|
|
20
|
+
publishTxsWithProposals?: boolean;
|
|
19
21
|
/** The maximum L2 block gas. */
|
|
20
22
|
maxL2BlockGas?: number;
|
|
21
23
|
/** The maximum DA block gas. */
|
|
@@ -45,6 +47,7 @@ export const SequencerConfigSchema = z.object({
|
|
|
45
47
|
maxTxsPerBlock: z.number().optional(),
|
|
46
48
|
minTxsPerBlock: z.number().optional(),
|
|
47
49
|
maxL2BlockGas: z.number().optional(),
|
|
50
|
+
publishTxsWithProposals: z.boolean().optional(),
|
|
48
51
|
maxDABlockGas: z.number().optional(),
|
|
49
52
|
coinbase: schemas.EthAddress.optional(),
|
|
50
53
|
feeRecipient: schemas.AztecAddress.optional(),
|
package/src/interfaces/p2p.ts
CHANGED
|
@@ -30,6 +30,9 @@ export interface P2PApiWithoutAttestations {
|
|
|
30
30
|
*/
|
|
31
31
|
getPendingTxs(): Promise<Tx[]>;
|
|
32
32
|
|
|
33
|
+
/** Returns the number of pending txs in the p2p tx pool. */
|
|
34
|
+
getPendingTxCount(): Promise<number>;
|
|
35
|
+
|
|
33
36
|
/**
|
|
34
37
|
* Returns the ENR for this node, if any.
|
|
35
38
|
*/
|
|
@@ -65,6 +68,7 @@ export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
|
|
|
65
68
|
.args(schemas.BigInt, optional(z.string()))
|
|
66
69
|
.returns(z.array(BlockAttestation.schema)),
|
|
67
70
|
getPendingTxs: z.function().returns(z.array(Tx.schema)),
|
|
71
|
+
getPendingTxCount: z.function().returns(schemas.Integer),
|
|
68
72
|
getEncodedEnr: z.function().returns(z.string().optional()),
|
|
69
73
|
getPeers: z.function().args(optional(z.boolean())).returns(z.array(PeerInfoSchema)),
|
|
70
74
|
addAttestation: z.function().args(BlockAttestation.schema).returns(z.void()),
|
|
@@ -113,7 +113,10 @@ export class BlockProofError extends Error {
|
|
|
113
113
|
static #name = 'BlockProofError';
|
|
114
114
|
override name = BlockProofError.#name;
|
|
115
115
|
|
|
116
|
-
constructor(
|
|
116
|
+
constructor(
|
|
117
|
+
message: string,
|
|
118
|
+
public readonly txHashes: TxHash[],
|
|
119
|
+
) {
|
|
117
120
|
super(message);
|
|
118
121
|
}
|
|
119
122
|
|
package/src/interfaces/pxe.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { SiblingPath } from '@aztec/foundation/trees';
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
8
8
|
import { type AbiType, AbiTypeSchema, type ContractArtifact, ContractArtifactSchema } from '../abi/abi.js';
|
|
9
|
-
import type { AbiDecoded } from '../abi/decoder.js';
|
|
10
9
|
import type { EventSelector } from '../abi/event_selector.js';
|
|
11
10
|
import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
12
11
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
@@ -38,7 +37,7 @@ import {
|
|
|
38
37
|
TxSimulationResult,
|
|
39
38
|
indexedTxSchema,
|
|
40
39
|
} from '../tx/index.js';
|
|
41
|
-
import { TxProfileResult } from '../tx/profiling.js';
|
|
40
|
+
import { TxProfileResult, UtilitySimulationResult } from '../tx/profiling.js';
|
|
42
41
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
43
42
|
import {
|
|
44
43
|
type GetContractClassLogsResponse,
|
|
@@ -291,7 +290,7 @@ export interface PXE {
|
|
|
291
290
|
authwits?: AuthWitness[],
|
|
292
291
|
from?: AztecAddress,
|
|
293
292
|
scopes?: AztecAddress[],
|
|
294
|
-
): Promise<
|
|
293
|
+
): Promise<UtilitySimulationResult>;
|
|
295
294
|
|
|
296
295
|
/**
|
|
297
296
|
* Gets public logs based on the provided filter.
|
|
@@ -510,7 +509,7 @@ export const PXESchema: ApiSchemaFor<PXE> = {
|
|
|
510
509
|
optional(schemas.AztecAddress),
|
|
511
510
|
optional(z.array(schemas.AztecAddress)),
|
|
512
511
|
)
|
|
513
|
-
.returns(
|
|
512
|
+
.returns(UtilitySimulationResult.schema),
|
|
514
513
|
getPublicLogs: z.function().args(LogFilterSchema).returns(GetPublicLogsResponseSchema),
|
|
515
514
|
getContractClassLogs: z.function().args(LogFilterSchema).returns(GetContractClassLogsResponseSchema),
|
|
516
515
|
getBlockNumber: z.function().returns(z.number()),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import type { Maybe } from '@aztec/foundation/types';
|
|
3
2
|
|
|
4
3
|
/** Represents a local service that can be started and stopped. */
|
|
5
4
|
export interface Service {
|
|
@@ -17,7 +16,7 @@ export interface Service {
|
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
/** Tries to call stop on a given object and awaits it. Logs any errors and does not rethrow. */
|
|
20
|
-
export async function tryStop(service
|
|
19
|
+
export async function tryStop(service?: Partial<Service>, logger?: Logger): Promise<void> {
|
|
21
20
|
try {
|
|
22
21
|
return typeof service === 'object' && service && 'stop' in service && typeof service.stop === 'function'
|
|
23
22
|
? await service.stop()
|
|
@@ -27,7 +26,7 @@ export async function tryStop(service: Maybe<Service>, logger?: Logger): Promise
|
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
export function tryRestart(service
|
|
29
|
+
export function tryRestart(service?: Partial<Service>, logger?: Logger) {
|
|
31
30
|
try {
|
|
32
31
|
return typeof service === 'object' && service && 'restart' in service && typeof service.restart === 'function'
|
|
33
32
|
? service.restart()
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PromiseWithResolvers } from '@aztec/foundation/promise';
|
|
2
|
+
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
|
|
3
5
|
import type { SnapshotDataKeys } from '../snapshots/types.js';
|
|
@@ -52,7 +54,7 @@ export interface ForkMerkleTreeOperations {
|
|
|
52
54
|
/** Defines the interface for a world state synchronizer. */
|
|
53
55
|
export interface WorldStateSynchronizer extends ForkMerkleTreeOperations {
|
|
54
56
|
/** Starts the synchronizer. */
|
|
55
|
-
start(): void
|
|
57
|
+
start(): Promise<void | PromiseWithResolvers<void>>;
|
|
56
58
|
|
|
57
59
|
/** Returns the current status of the synchronizer. */
|
|
58
60
|
status(): Promise<WorldStateSynchronizerStatus>;
|
|
@@ -76,6 +78,9 @@ export interface WorldStateSynchronizer extends ForkMerkleTreeOperations {
|
|
|
76
78
|
|
|
77
79
|
/** Returns an instance of MerkleTreeAdminOperations that will not include uncommitted data. */
|
|
78
80
|
getCommitted(): MerkleTreeReadOperations;
|
|
81
|
+
|
|
82
|
+
/** Deletes the db */
|
|
83
|
+
clear(): Promise<void>;
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
export const WorldStateSyncStatusSchema = z.object({
|
|
@@ -42,7 +42,10 @@ export class NoteHashReadRequestHintsBuilder<PENDING extends number, SETTLED ext
|
|
|
42
42
|
public numPendingReadHints = 0;
|
|
43
43
|
public numSettledReadHints = 0;
|
|
44
44
|
|
|
45
|
-
constructor(
|
|
45
|
+
constructor(
|
|
46
|
+
public readonly maxPending: PENDING,
|
|
47
|
+
public readonly maxSettled: SETTLED,
|
|
48
|
+
) {
|
|
46
49
|
this.hints = new ReadRequestResetHints(
|
|
47
50
|
makeTuple(MAX_NOTE_HASH_READ_REQUESTS_PER_TX, ReadRequestStatus.nada),
|
|
48
51
|
makeTuple(maxPending, () => PendingReadHint.nada(MAX_NOTE_HASH_READ_REQUESTS_PER_TX)),
|
|
@@ -40,7 +40,10 @@ export class NullifierReadRequestHintsBuilder<PENDING extends number, SETTLED ex
|
|
|
40
40
|
private numPendingReadHints = 0;
|
|
41
41
|
private numSettledReadHints = 0;
|
|
42
42
|
|
|
43
|
-
constructor(
|
|
43
|
+
constructor(
|
|
44
|
+
public readonly maxPending: PENDING,
|
|
45
|
+
public readonly maxSettled: SETTLED,
|
|
46
|
+
) {
|
|
44
47
|
this.hints = new ReadRequestResetHints(
|
|
45
48
|
makeTuple(MAX_NULLIFIER_READ_REQUESTS_PER_TX, ReadRequestStatus.nada),
|
|
46
49
|
makeTuple(maxPending, () => PendingReadHint.nada(MAX_NULLIFIER_READ_REQUESTS_PER_TX)),
|
|
@@ -71,7 +71,10 @@ export class ReadRequest {
|
|
|
71
71
|
* ReadRequest with context of the contract emitting the request.
|
|
72
72
|
*/
|
|
73
73
|
export class ScopedReadRequest {
|
|
74
|
-
constructor(
|
|
74
|
+
constructor(
|
|
75
|
+
public readRequest: ReadRequest,
|
|
76
|
+
public contractAddress: AztecAddress,
|
|
77
|
+
) {}
|
|
75
78
|
|
|
76
79
|
get value() {
|
|
77
80
|
return this.readRequest.value;
|
|
@@ -9,7 +9,10 @@ export enum ReadRequestState {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export class ReadRequestStatus {
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(
|
|
13
|
+
public state: ReadRequestState,
|
|
14
|
+
public hintIndex: number,
|
|
15
|
+
) {}
|
|
13
16
|
|
|
14
17
|
static nada() {
|
|
15
18
|
return new ReadRequestStatus(ReadRequestState.NADA, 0);
|
|
@@ -34,7 +37,10 @@ export class ReadRequestStatus {
|
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
export class PendingReadHint {
|
|
37
|
-
constructor(
|
|
40
|
+
constructor(
|
|
41
|
+
public readRequestIndex: number,
|
|
42
|
+
public pendingValueIndex: number,
|
|
43
|
+
) {}
|
|
38
44
|
|
|
39
45
|
static nada(readRequestLen: number) {
|
|
40
46
|
return new PendingReadHint(readRequestLen, 0);
|
|
@@ -154,7 +160,10 @@ export class ReadRequestResetHints<
|
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
export class ReadRequestResetStates<NUM_READS extends number> {
|
|
157
|
-
constructor(
|
|
163
|
+
constructor(
|
|
164
|
+
public states: Tuple<ReadRequestState, NUM_READS>,
|
|
165
|
+
public pendingReadHints: PendingReadHint[],
|
|
166
|
+
) {}
|
|
158
167
|
|
|
159
168
|
static empty<NUM_READS extends number>(numReads: NUM_READS) {
|
|
160
169
|
return new ReadRequestResetStates(
|
|
@@ -4,7 +4,10 @@ import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/
|
|
|
4
4
|
import { inspect } from 'util';
|
|
5
5
|
|
|
6
6
|
export class TransientDataIndexHint {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(
|
|
8
|
+
public nullifierIndex: number,
|
|
9
|
+
public noteHashIndex: number,
|
|
10
|
+
) {}
|
|
8
11
|
|
|
9
12
|
toFields(): Fr[] {
|
|
10
13
|
return [new Fr(this.nullifierIndex), new Fr(this.noteHashIndex)];
|
|
@@ -2,7 +2,10 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
2
2
|
import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
3
|
|
|
4
4
|
export class TreeLeafReadRequest {
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(
|
|
6
|
+
public value: Fr,
|
|
7
|
+
public leafIndex: Fr,
|
|
8
|
+
) {}
|
|
6
9
|
|
|
7
10
|
toBuffer(): Buffer {
|
|
8
11
|
return serializeToBuffer(this.value, this.leafIndex);
|