@aztec/stdlib 0.86.0 → 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 +291 -241
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +14 -14
- 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 -20
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +1 -41
- 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/block/published_l2_block.d.ts +2 -1
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +5 -18
- 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/errors/simulation_error.js +2 -2
- 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 +6 -6
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +4 -4
- 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 +31 -7
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/kernel/private_kernel_prover_output.js +5 -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 +6 -5
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_attestation.js +12 -11
- package/dest/p2p/block_proposal.d.ts +17 -8
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +29 -13
- package/dest/p2p/consensus_payload.d.ts +185 -12
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +24 -14
- 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/proof.js +5 -5
- 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 +11 -5
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_or_block_merge_public_inputs.js +6 -2
- 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 +9 -8
- package/dest/rollup/root_rollup.d.ts.map +1 -1
- package/dest/rollup/root_rollup.js +12 -3
- 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/snapshots/download.d.ts +1 -1
- package/dest/snapshots/download.d.ts.map +1 -1
- package/dest/snapshots/download.js +3 -3
- package/dest/snapshots/index.d.ts +1 -1
- package/dest/snapshots/index.d.ts.map +1 -1
- package/dest/snapshots/index.js +1 -1
- package/dest/snapshots/types.d.ts +27 -4
- package/dest/snapshots/types.d.ts.map +1 -1
- package/dest/snapshots/types.js +8 -0
- package/dest/snapshots/upload.d.ts +6 -3
- package/dest/snapshots/upload.d.ts.map +1 -1
- package/dest/snapshots/upload.js +10 -6
- package/dest/tests/factories.d.ts +0 -2
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +19 -16
- package/dest/tests/mocks.d.ts +13 -3
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +40 -8
- 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 +3 -4
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +5 -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/index.d.ts +2 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +2 -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 +18 -9
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +12 -3
- package/dest/tx/profiling.d.ts +110 -0
- package/dest/tx/profiling.d.ts.map +1 -0
- package/dest/tx/profiling.js +97 -0
- package/dest/tx/proposed_block_header.d.ts +80 -0
- package/dest/tx/proposed_block_header.d.ts.map +1 -0
- package/dest/tx/proposed_block_header.js +130 -0
- package/dest/tx/proven_tx.d.ts +73 -1
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/proven_tx.js +7 -2
- 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 +5 -3
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +10 -5
- 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 +4 -2
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +4 -2
- package/dest/types/shared.d.ts +5 -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/validators/schemas.d.ts +24 -24
- package/dest/validators/schemas.js +1 -1
- package/dest/validators/types.d.ts +2 -2
- package/dest/validators/types.d.ts.map +1 -1
- 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 +29 -12
- 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 -61
- package/src/block/published_l2_block.ts +8 -16
- 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/errors/simulation_error.ts +2 -2
- 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 +12 -7
- 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_prover_output.ts +10 -0
- 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 +16 -12
- package/src/p2p/block_proposal.ts +42 -11
- package/src/p2p/consensus_payload.ts +33 -16
- package/src/p2p/gossipable.ts +44 -2
- package/src/p2p/topic_type.ts +2 -0
- package/src/proofs/proof.ts +5 -5
- package/src/rollup/base_rollup_hints.ts +7 -7
- package/src/rollup/block_root_or_block_merge_public_inputs.ts +10 -1
- package/src/rollup/private_base_rollup_inputs.ts +4 -1
- package/src/rollup/root_rollup.ts +12 -0
- 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/snapshots/download.ts +3 -4
- package/src/snapshots/index.ts +1 -1
- package/src/snapshots/types.ts +12 -0
- package/src/snapshots/upload.ts +19 -11
- package/src/tests/factories.ts +35 -18
- package/src/tests/mocks.ts +69 -10
- package/src/tx/block_header.ts +16 -2
- package/src/tx/content_commitment.ts +6 -1
- package/src/tx/index.ts +2 -1
- package/src/tx/private_execution_result.ts +14 -5
- package/src/tx/profiling.ts +126 -0
- package/src/tx/proposed_block_header.ts +169 -0
- package/src/tx/proven_tx.ts +4 -0
- package/src/tx/simulated_tx.ts +12 -2
- 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 +4 -2
- package/src/types/shared.ts +5 -0
- package/src/update-checker/index.ts +1 -0
- package/src/update-checker/update-checker.ts +152 -0
- package/src/validators/schemas.ts +1 -1
- package/src/validators/types.ts +2 -2
- 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/tx/profiled_tx.d.ts +0 -9
- package/dest/tx/profiled_tx.d.ts.map +0 -1
- package/dest/tx/profiled_tx.js +0 -28
- package/src/tx/profiled_tx.ts +0 -28
- /package/dest/config/{config.js → chain-config.js} +0 -0
- /package/src/config/{config.ts → chain-config.ts} +0 -0
|
@@ -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/
|
|
40
|
+
import { TxProfileResult, UtilitySimulationResult } from '../tx/profiling.js';
|
|
42
41
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
43
42
|
import {
|
|
44
43
|
type GetContractClassLogsResponse,
|
|
@@ -139,12 +138,13 @@ export interface PXE {
|
|
|
139
138
|
* (where validators prove the public portion).
|
|
140
139
|
*
|
|
141
140
|
* @param txRequest - An authenticated tx request ready for proving
|
|
142
|
-
* @param privateExecutionResult - The result of the private execution of the transaction
|
|
141
|
+
* @param privateExecutionResult - (optional) The result of the private execution of the transaction. The txRequest
|
|
142
|
+
* will be executed if not provided
|
|
143
143
|
* @returns A result containing the proof and public inputs of the tail circuit.
|
|
144
144
|
* @throws If contract code not found, or public simulation reverts.
|
|
145
145
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
146
146
|
*/
|
|
147
|
-
proveTx(txRequest: TxExecutionRequest, privateExecutionResult
|
|
147
|
+
proveTx(txRequest: TxExecutionRequest, privateExecutionResult?: PrivateExecutionResult): Promise<TxProvingResult>;
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* Simulates a transaction based on the provided preauthenticated execution request.
|
|
@@ -188,6 +188,7 @@ export interface PXE {
|
|
|
188
188
|
profileTx(
|
|
189
189
|
txRequest: TxExecutionRequest,
|
|
190
190
|
profileMode: 'gates' | 'execution-steps' | 'full',
|
|
191
|
+
skipProofGeneration?: boolean,
|
|
191
192
|
msgSender?: AztecAddress,
|
|
192
193
|
): Promise<TxProfileResult>;
|
|
193
194
|
|
|
@@ -289,7 +290,7 @@ export interface PXE {
|
|
|
289
290
|
authwits?: AuthWitness[],
|
|
290
291
|
from?: AztecAddress,
|
|
291
292
|
scopes?: AztecAddress[],
|
|
292
|
-
): Promise<
|
|
293
|
+
): Promise<UtilitySimulationResult>;
|
|
293
294
|
|
|
294
295
|
/**
|
|
295
296
|
* Gets public logs based on the provided filter.
|
|
@@ -455,12 +456,16 @@ export const PXESchema: ApiSchemaFor<PXE> = {
|
|
|
455
456
|
.returns(z.void()),
|
|
456
457
|
updateContract: z.function().args(schemas.AztecAddress, ContractArtifactSchema).returns(z.void()),
|
|
457
458
|
getContracts: z.function().returns(z.array(schemas.AztecAddress)),
|
|
458
|
-
proveTx: z
|
|
459
|
+
proveTx: z
|
|
460
|
+
.function()
|
|
461
|
+
.args(TxExecutionRequest.schema, optional(PrivateExecutionResult.schema))
|
|
462
|
+
.returns(TxProvingResult.schema),
|
|
459
463
|
profileTx: z
|
|
460
464
|
.function()
|
|
461
465
|
.args(
|
|
462
466
|
TxExecutionRequest.schema,
|
|
463
467
|
z.union([z.literal('gates'), z.literal('full'), z.literal('execution-steps')]),
|
|
468
|
+
optional(z.boolean()),
|
|
464
469
|
optional(schemas.AztecAddress),
|
|
465
470
|
)
|
|
466
471
|
.returns(TxProfileResult.schema),
|
|
@@ -504,7 +509,7 @@ export const PXESchema: ApiSchemaFor<PXE> = {
|
|
|
504
509
|
optional(schemas.AztecAddress),
|
|
505
510
|
optional(z.array(schemas.AztecAddress)),
|
|
506
511
|
)
|
|
507
|
-
.returns(
|
|
512
|
+
.returns(UtilitySimulationResult.schema),
|
|
508
513
|
getPublicLogs: z.function().args(LogFilterSchema).returns(GetPublicLogsResponseSchema),
|
|
509
514
|
getContractClassLogs: z.function().args(LogFilterSchema).returns(GetContractClassLogsResponseSchema),
|
|
510
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);
|
package/src/kernel/log_hash.ts
CHANGED
|
@@ -1,42 +1,49 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
+
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
4
|
|
|
4
5
|
import { inspect } from 'util';
|
|
5
6
|
|
|
6
7
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
7
|
-
import type { Ordered } from './utils/interfaces.js';
|
|
8
8
|
|
|
9
|
-
export class LogHash
|
|
10
|
-
constructor(
|
|
9
|
+
export class LogHash {
|
|
10
|
+
constructor(
|
|
11
|
+
public value: Fr,
|
|
12
|
+
public length: number,
|
|
13
|
+
) {}
|
|
14
|
+
|
|
15
|
+
static from(fields: FieldsOf<LogHash>) {
|
|
16
|
+
return new LogHash(fields.value, fields.length);
|
|
17
|
+
}
|
|
11
18
|
|
|
12
19
|
toFields(): Fr[] {
|
|
13
|
-
return [this.value, new Fr(this.
|
|
20
|
+
return [this.value, new Fr(this.length)];
|
|
14
21
|
}
|
|
15
22
|
|
|
16
23
|
static fromFields(fields: Fr[] | FieldReader) {
|
|
17
24
|
const reader = FieldReader.asReader(fields);
|
|
18
|
-
return new LogHash(reader.readField(), reader.readU32()
|
|
25
|
+
return new LogHash(reader.readField(), reader.readU32());
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
isEmpty() {
|
|
22
|
-
return this.value.isZero() && !this.length
|
|
29
|
+
return this.value.isZero() && !this.length;
|
|
23
30
|
}
|
|
24
31
|
|
|
25
32
|
static empty() {
|
|
26
|
-
return new LogHash(Fr.zero(), 0
|
|
33
|
+
return new LogHash(Fr.zero(), 0);
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
toBuffer(): Buffer {
|
|
30
|
-
return serializeToBuffer(this.value, this.
|
|
37
|
+
return serializeToBuffer(this.value, this.length);
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
34
41
|
const reader = BufferReader.asReader(buffer);
|
|
35
|
-
return new LogHash(Fr.fromBuffer(reader), reader.readNumber()
|
|
42
|
+
return new LogHash(Fr.fromBuffer(reader), reader.readNumber());
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
toString(): string {
|
|
39
|
-
return `value=${this.value}
|
|
46
|
+
return `value=${this.value} length=${this.length}`;
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
scope(contractAddress: AztecAddress) {
|
|
@@ -48,13 +55,45 @@ export class LogHash implements Ordered {
|
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
|
|
51
|
-
export class
|
|
52
|
-
constructor(
|
|
58
|
+
export class CountedLogHash {
|
|
59
|
+
constructor(
|
|
60
|
+
public logHash: LogHash,
|
|
61
|
+
public counter: number,
|
|
62
|
+
) {}
|
|
63
|
+
|
|
64
|
+
toFields(): Fr[] {
|
|
65
|
+
return [...this.logHash.toFields(), new Fr(this.counter)];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static fromFields(fields: Fr[] | FieldReader) {
|
|
69
|
+
const reader = FieldReader.asReader(fields);
|
|
70
|
+
return new CountedLogHash(reader.readObject(LogHash), reader.readU32());
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
isEmpty() {
|
|
74
|
+
return this.logHash.isEmpty() && !this.counter;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
static empty() {
|
|
78
|
+
return new CountedLogHash(LogHash.empty(), 0);
|
|
79
|
+
}
|
|
53
80
|
|
|
54
|
-
|
|
55
|
-
return this.logHash.counter;
|
|
81
|
+
toBuffer(): Buffer {
|
|
82
|
+
return serializeToBuffer(this.logHash, this.counter);
|
|
56
83
|
}
|
|
57
84
|
|
|
85
|
+
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
86
|
+
const reader = BufferReader.asReader(buffer);
|
|
87
|
+
return new CountedLogHash(LogHash.fromBuffer(reader), reader.readNumber());
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export class ScopedLogHash {
|
|
92
|
+
constructor(
|
|
93
|
+
public logHash: LogHash,
|
|
94
|
+
public contractAddress: AztecAddress,
|
|
95
|
+
) {}
|
|
96
|
+
|
|
58
97
|
get value() {
|
|
59
98
|
return this.logHash.value;
|
|
60
99
|
}
|
|
@@ -89,3 +128,36 @@ export class ScopedLogHash implements Ordered {
|
|
|
89
128
|
return `logHash=${this.logHash} contractAddress=${this.contractAddress}`;
|
|
90
129
|
}
|
|
91
130
|
}
|
|
131
|
+
|
|
132
|
+
export class ScopedCountedLogHash {
|
|
133
|
+
constructor(
|
|
134
|
+
public inner: CountedLogHash,
|
|
135
|
+
public contractAddress: AztecAddress,
|
|
136
|
+
) {}
|
|
137
|
+
|
|
138
|
+
toFields(): Fr[] {
|
|
139
|
+
return [...this.inner.toFields(), this.contractAddress.toField()];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static fromFields(fields: Fr[] | FieldReader) {
|
|
143
|
+
const reader = FieldReader.asReader(fields);
|
|
144
|
+
return new ScopedCountedLogHash(reader.readObject(CountedLogHash), AztecAddress.fromField(reader.readField()));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
toBuffer(): Buffer {
|
|
148
|
+
return serializeToBuffer(this.inner, this.contractAddress);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
152
|
+
const reader = BufferReader.asReader(buffer);
|
|
153
|
+
return new ScopedCountedLogHash(CountedLogHash.fromBuffer(reader), AztecAddress.fromBuffer(reader));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
isEmpty() {
|
|
157
|
+
return this.inner.isEmpty() && this.contractAddress.isZero();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
static empty() {
|
|
161
|
+
return new ScopedCountedLogHash(CountedLogHash.empty(), AztecAddress.ZERO);
|
|
162
|
+
}
|
|
163
|
+
}
|
package/src/kernel/note_hash.ts
CHANGED
|
@@ -5,7 +5,10 @@ import { AztecAddress } from '../aztec-address/index.js';
|
|
|
5
5
|
import type { Ordered } from './utils/interfaces.js';
|
|
6
6
|
|
|
7
7
|
export class NoteHash {
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(
|
|
9
|
+
public value: Fr,
|
|
10
|
+
public counter: number,
|
|
11
|
+
) {}
|
|
9
12
|
|
|
10
13
|
toFields(): Fr[] {
|
|
11
14
|
return [this.value, new Fr(this.counter)];
|
|
@@ -43,7 +46,10 @@ export class NoteHash {
|
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
export class ScopedNoteHash implements Ordered {
|
|
46
|
-
constructor(
|
|
49
|
+
constructor(
|
|
50
|
+
public noteHash: NoteHash,
|
|
51
|
+
public contractAddress: AztecAddress,
|
|
52
|
+
) {}
|
|
47
53
|
|
|
48
54
|
get counter() {
|
|
49
55
|
return this.noteHash.counter;
|
package/src/kernel/nullifier.ts
CHANGED
|
@@ -5,7 +5,11 @@ import { AztecAddress } from '../aztec-address/index.js';
|
|
|
5
5
|
import type { Ordered } from './utils/interfaces.js';
|
|
6
6
|
|
|
7
7
|
export class Nullifier implements Ordered {
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(
|
|
9
|
+
public value: Fr,
|
|
10
|
+
public counter: number,
|
|
11
|
+
public noteHash: Fr,
|
|
12
|
+
) {}
|
|
9
13
|
|
|
10
14
|
toFields(): Fr[] {
|
|
11
15
|
return [this.value, new Fr(this.counter), this.noteHash];
|
|
@@ -43,7 +47,10 @@ export class Nullifier implements Ordered {
|
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
export class ScopedNullifier implements Ordered {
|
|
46
|
-
constructor(
|
|
50
|
+
constructor(
|
|
51
|
+
public nullifier: Nullifier,
|
|
52
|
+
public contractAddress: AztecAddress,
|
|
53
|
+
) {}
|
|
47
54
|
|
|
48
55
|
get counter() {
|
|
49
56
|
return this.nullifier.counter;
|
|
@@ -12,7 +12,7 @@ import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/s
|
|
|
12
12
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
13
13
|
|
|
14
14
|
import { ScopedL2ToL1Message } from '../messaging/l2_to_l1_message.js';
|
|
15
|
-
import {
|
|
15
|
+
import { ScopedCountedLogHash } from './log_hash.js';
|
|
16
16
|
import { ScopedNoteHash } from './note_hash.js';
|
|
17
17
|
import { ScopedNullifier } from './nullifier.js';
|
|
18
18
|
import { PrivateCallRequest } from './private_call_request.js';
|
|
@@ -45,7 +45,7 @@ export class PrivateAccumulatedData {
|
|
|
45
45
|
* Accumulated contract class logs from all the previous kernel iterations.
|
|
46
46
|
* Note: Truncated to 31 bytes to fit in Fr.
|
|
47
47
|
*/
|
|
48
|
-
public contractClassLogsHashes: Tuple<
|
|
48
|
+
public contractClassLogsHashes: Tuple<ScopedCountedLogHash, typeof MAX_CONTRACT_CLASS_LOGS_PER_TX>,
|
|
49
49
|
/**
|
|
50
50
|
* Accumulated public call requests from all the previous kernel iterations.
|
|
51
51
|
*/
|
|
@@ -84,7 +84,7 @@ export class PrivateAccumulatedData {
|
|
|
84
84
|
reader.readArray(MAX_NULLIFIERS_PER_TX, ScopedNullifier),
|
|
85
85
|
reader.readArray(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message),
|
|
86
86
|
reader.readArray(MAX_PRIVATE_LOGS_PER_TX, ScopedPrivateLogData),
|
|
87
|
-
reader.readArray(MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
87
|
+
reader.readArray(MAX_CONTRACT_CLASS_LOGS_PER_TX, ScopedCountedLogHash),
|
|
88
88
|
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, CountedPublicCallRequest),
|
|
89
89
|
reader.readArray(MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX, PrivateCallRequest),
|
|
90
90
|
);
|
|
@@ -105,7 +105,7 @@ export class PrivateAccumulatedData {
|
|
|
105
105
|
makeTuple(MAX_NULLIFIERS_PER_TX, ScopedNullifier.empty),
|
|
106
106
|
makeTuple(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message.empty),
|
|
107
107
|
makeTuple(MAX_PRIVATE_LOGS_PER_TX, ScopedPrivateLogData.empty),
|
|
108
|
-
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
108
|
+
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ScopedCountedLogHash.empty),
|
|
109
109
|
makeTuple(MAX_ENQUEUED_CALLS_PER_TX, CountedPublicCallRequest.empty),
|
|
110
110
|
makeTuple(MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX, PrivateCallRequest.empty),
|
|
111
111
|
);
|
|
@@ -94,6 +94,6 @@ export class PrivateCallRequest {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
toString() {
|
|
97
|
-
return `PrivateCallRequest(callContext: ${this.callContext}, argsHash: ${this.argsHash}, returnsHash: ${this.returnsHash}, startSideEffectCounter: ${this.startSideEffectCounter}, endSideEffectCounter: ${this.endSideEffectCounter})`;
|
|
97
|
+
return `PrivateCallRequest(contractAddress: ${this.callContext.contractAddress}, selector: ${this.callContext.functionSelector}, msgSender: ${this.callContext.msgSender}, isStatic: ${this.callContext.isEmpty}, argsHash: ${this.argsHash}, returnsHash: ${this.returnsHash}, startSideEffectCounter: ${this.startSideEffectCounter}, endSideEffectCounter: ${this.endSideEffectCounter})`;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
25
25
|
|
|
26
26
|
import { KeyValidationRequestAndGenerator } from '../kernel/hints/key_validation_request_and_generator.js';
|
|
27
|
-
import {
|
|
27
|
+
import { CountedLogHash } from '../kernel/log_hash.js';
|
|
28
28
|
import { PrivateCallRequest } from '../kernel/private_call_request.js';
|
|
29
29
|
import { PrivateLogData } from '../kernel/private_log_data.js';
|
|
30
30
|
import { L2ToL1Message } from '../messaging/l2_to_l1_message.js';
|
|
@@ -113,7 +113,7 @@ export class PrivateCircuitPublicInputs {
|
|
|
113
113
|
/**
|
|
114
114
|
* Hash of the contract class logs emitted in this function call.
|
|
115
115
|
*/
|
|
116
|
-
public contractClassLogsHashes: Tuple<
|
|
116
|
+
public contractClassLogsHashes: Tuple<CountedLogHash, typeof MAX_CONTRACT_CLASS_LOGS_PER_CALL>,
|
|
117
117
|
/**
|
|
118
118
|
* The side effect counter at the start of this call.
|
|
119
119
|
*/
|
|
@@ -169,7 +169,7 @@ export class PrivateCircuitPublicInputs {
|
|
|
169
169
|
reader.readObject(PublicCallRequest),
|
|
170
170
|
reader.readArray(MAX_L2_TO_L1_MSGS_PER_CALL, L2ToL1Message),
|
|
171
171
|
reader.readArray(MAX_PRIVATE_LOGS_PER_CALL, PrivateLogData),
|
|
172
|
-
reader.readArray(MAX_CONTRACT_CLASS_LOGS_PER_CALL,
|
|
172
|
+
reader.readArray(MAX_CONTRACT_CLASS_LOGS_PER_CALL, CountedLogHash),
|
|
173
173
|
reader.readObject(Fr),
|
|
174
174
|
reader.readObject(Fr),
|
|
175
175
|
reader.readObject(BlockHeader),
|
|
@@ -196,7 +196,7 @@ export class PrivateCircuitPublicInputs {
|
|
|
196
196
|
reader.readObject(PublicCallRequest),
|
|
197
197
|
reader.readArray(MAX_L2_TO_L1_MSGS_PER_CALL, L2ToL1Message),
|
|
198
198
|
reader.readArray(MAX_PRIVATE_LOGS_PER_CALL, PrivateLogData),
|
|
199
|
-
reader.readArray(MAX_CONTRACT_CLASS_LOGS_PER_CALL,
|
|
199
|
+
reader.readArray(MAX_CONTRACT_CLASS_LOGS_PER_CALL, CountedLogHash),
|
|
200
200
|
reader.readField(),
|
|
201
201
|
reader.readField(),
|
|
202
202
|
reader.readObject(BlockHeader),
|
|
@@ -226,7 +226,7 @@ export class PrivateCircuitPublicInputs {
|
|
|
226
226
|
PublicCallRequest.empty(),
|
|
227
227
|
makeTuple(MAX_L2_TO_L1_MSGS_PER_CALL, L2ToL1Message.empty),
|
|
228
228
|
makeTuple(MAX_PRIVATE_LOGS_PER_CALL, PrivateLogData.empty),
|
|
229
|
-
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_CALL,
|
|
229
|
+
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_CALL, CountedLogHash.empty),
|
|
230
230
|
Fr.ZERO,
|
|
231
231
|
Fr.ZERO,
|
|
232
232
|
BlockHeader.empty(),
|
|
@@ -15,6 +15,10 @@ export const PrivateExecutionStepSchema = z.object({
|
|
|
15
15
|
bytecode: bufferSchema,
|
|
16
16
|
witness: mapSchema(z.number(), z.string()),
|
|
17
17
|
vk: bufferSchema,
|
|
18
|
+
timings: z.object({
|
|
19
|
+
witgen: z.number(),
|
|
20
|
+
gateCount: z.number().optional(),
|
|
21
|
+
}),
|
|
18
22
|
});
|
|
19
23
|
|
|
20
24
|
/**
|
|
@@ -27,6 +31,10 @@ export interface PrivateExecutionStep {
|
|
|
27
31
|
witness: WitnessMap;
|
|
28
32
|
/* TODO(https://github.com/AztecProtocol/barretenberg/issues/1328) this should get its own proper class. */
|
|
29
33
|
vk: Buffer;
|
|
34
|
+
timings: {
|
|
35
|
+
witgen: number;
|
|
36
|
+
gateCount?: number;
|
|
37
|
+
};
|
|
30
38
|
}
|
|
31
39
|
|
|
32
40
|
/** Represents the output of proven PrivateKernelSimulateOutput.*/
|
|
@@ -45,6 +53,8 @@ export interface PrivateKernelExecutionProofOutput<
|
|
|
45
53
|
* If simulate is ran with profiling mode, also includes gate counts.
|
|
46
54
|
*/
|
|
47
55
|
executionSteps: PrivateExecutionStep[];
|
|
56
|
+
/** Performance metrics */
|
|
57
|
+
timings?: { proving: number };
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
export function serializePrivateExecutionSteps(steps: PrivateExecutionStep[]) {
|