@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
|
@@ -53,7 +53,7 @@ export class BlockAttestation extends Gossipable {
|
|
|
53
53
|
.transform(obj => new BlockAttestation(obj.blockNumber, obj.payload, obj.signature));
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
override
|
|
56
|
+
override generateP2PMessageIdentifier(): Promise<Buffer32> {
|
|
57
57
|
return Promise.resolve(new BlockAttestationHash(keccak256(this.signature.toBuffer())));
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -5,6 +5,7 @@ import { Signature } from '@aztec/foundation/eth-signature';
|
|
|
5
5
|
import { Fr } from '@aztec/foundation/fields';
|
|
6
6
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
7
7
|
|
|
8
|
+
import { Tx } from '../tx/tx.js';
|
|
8
9
|
import { ConsensusPayload } from './consensus_payload.js';
|
|
9
10
|
import { Gossipable } from './gossipable.js';
|
|
10
11
|
import {
|
|
@@ -20,6 +21,10 @@ export class BlockProposalHash extends Buffer32 {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
export type BlockProposalOptions = {
|
|
25
|
+
publishFullTxs: boolean;
|
|
26
|
+
};
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
29
|
* BlockProposal
|
|
25
30
|
*
|
|
@@ -40,11 +45,15 @@ export class BlockProposal extends Gossipable {
|
|
|
40
45
|
|
|
41
46
|
/** The signer of the BlockProposal over the header of the new block*/
|
|
42
47
|
public readonly signature: Signature,
|
|
48
|
+
|
|
49
|
+
// Note(md): this is placed after the txs payload in order to be backwards compatible with previous versions
|
|
50
|
+
/** The transactions in the block */
|
|
51
|
+
public readonly txs?: Tx[],
|
|
43
52
|
) {
|
|
44
53
|
super();
|
|
45
54
|
}
|
|
46
55
|
|
|
47
|
-
override
|
|
56
|
+
override generateP2PMessageIdentifier(): Promise<Buffer32> {
|
|
48
57
|
return Promise.resolve(new BlockProposalHash(keccak256(this.signature.toBuffer())));
|
|
49
58
|
}
|
|
50
59
|
|
|
@@ -59,12 +68,14 @@ export class BlockProposal extends Gossipable {
|
|
|
59
68
|
static async createProposalFromSigner(
|
|
60
69
|
blockNumber: Fr,
|
|
61
70
|
payload: ConsensusPayload,
|
|
71
|
+
// Note(md): Provided separately to tx hashes such that this function can be optional
|
|
72
|
+
txs: Tx[] | undefined,
|
|
62
73
|
payloadSigner: (payload: Buffer32) => Promise<Signature>,
|
|
63
74
|
) {
|
|
64
75
|
const hashed = getHashedSignaturePayload(payload, SignatureDomainSeparator.blockProposal);
|
|
65
76
|
const sig = await payloadSigner(hashed);
|
|
66
77
|
|
|
67
|
-
return new BlockProposal(blockNumber, payload, sig);
|
|
78
|
+
return new BlockProposal(blockNumber, payload, sig, txs);
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
/**Get Sender
|
|
@@ -85,15 +96,35 @@ export class BlockProposal extends Gossipable {
|
|
|
85
96
|
}
|
|
86
97
|
|
|
87
98
|
toBuffer(): Buffer {
|
|
88
|
-
|
|
99
|
+
const buffer: any[] = [this.blockNumber, this.payload, this.signature];
|
|
100
|
+
if (this.txs) {
|
|
101
|
+
buffer.push(this.txs.length);
|
|
102
|
+
buffer.push(this.txs);
|
|
103
|
+
}
|
|
104
|
+
return serializeToBuffer(buffer);
|
|
89
105
|
}
|
|
90
106
|
|
|
91
107
|
static fromBuffer(buf: Buffer | BufferReader): BlockProposal {
|
|
92
108
|
const reader = BufferReader.asReader(buf);
|
|
93
|
-
|
|
109
|
+
|
|
110
|
+
const blockNumber = reader.readObject(Fr);
|
|
111
|
+
const payload = reader.readObject(ConsensusPayload);
|
|
112
|
+
const sig = reader.readObject(Signature);
|
|
113
|
+
|
|
114
|
+
if (!reader.isEmpty()) {
|
|
115
|
+
const txs = reader.readArray(reader.readNumber(), Tx);
|
|
116
|
+
return new BlockProposal(blockNumber, payload, sig, txs);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return new BlockProposal(blockNumber, payload, sig);
|
|
94
120
|
}
|
|
95
121
|
|
|
96
122
|
getSize(): number {
|
|
97
|
-
return
|
|
123
|
+
return (
|
|
124
|
+
this.blockNumber.size +
|
|
125
|
+
this.payload.getSize() +
|
|
126
|
+
this.signature.getSize() +
|
|
127
|
+
(this.txs ? this.txs.reduce((acc, tx) => acc + tx.getSize(), 0) : 0)
|
|
128
|
+
);
|
|
98
129
|
}
|
|
99
130
|
}
|
|
@@ -105,4 +105,8 @@ export class ConsensusPayload implements Signable {
|
|
|
105
105
|
this.size = this.toBuffer().length;
|
|
106
106
|
return this.size;
|
|
107
107
|
}
|
|
108
|
+
|
|
109
|
+
toString() {
|
|
110
|
+
return `header: ${this.header.toString()}, archive: ${this.archive.toString()}, stateReference: ${this.stateReference.l1ToL2MessageTree.root.toString()}, txHashes: ${this.txHashes.join(', ')}`;
|
|
111
|
+
}
|
|
108
112
|
}
|
package/src/p2p/gossipable.ts
CHANGED
|
@@ -1,13 +1,43 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
|
+
import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
2
3
|
|
|
3
4
|
import type { TopicType } from './topic_type.js';
|
|
4
5
|
|
|
6
|
+
export class P2PMessage {
|
|
7
|
+
constructor(
|
|
8
|
+
public readonly publishTime: Date,
|
|
9
|
+
public readonly id: Buffer32,
|
|
10
|
+
public readonly payload: Buffer,
|
|
11
|
+
) {}
|
|
12
|
+
|
|
13
|
+
static async fromGossipable(message: Gossipable): Promise<P2PMessage> {
|
|
14
|
+
return new P2PMessage(new Date(), await message.p2pMessageIdentifier(), message.toBuffer());
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static fromMessageData(messageData: Buffer): P2PMessage {
|
|
18
|
+
const reader = new BufferReader(messageData);
|
|
19
|
+
const publishTime = reader.readUInt64();
|
|
20
|
+
const id = Buffer32.fromBuffer(reader);
|
|
21
|
+
const payload = reader.readBuffer();
|
|
22
|
+
return new P2PMessage(new Date(Number(publishTime)), id, payload);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
toMessageData(): Buffer {
|
|
26
|
+
return serializeToBuffer([
|
|
27
|
+
bigintToUInt64BE(BigInt(this.publishTime.getTime())),
|
|
28
|
+
this.id,
|
|
29
|
+
serializeToBuffer(this.payload.length, this.payload),
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
5
34
|
/**
|
|
6
35
|
* Gossipable
|
|
7
36
|
*
|
|
8
37
|
* Any class which extends gossipable will be able to be Gossiped over the p2p network
|
|
9
38
|
*/
|
|
10
39
|
export abstract class Gossipable {
|
|
40
|
+
private cachedId: Buffer32 | undefined;
|
|
11
41
|
/** p2p Topic
|
|
12
42
|
*
|
|
13
43
|
* - The p2p topic identifier, this determines how the message is handled
|
|
@@ -18,7 +48,15 @@ export abstract class Gossipable {
|
|
|
18
48
|
*
|
|
19
49
|
* - A digest of the message information, this key is used for deduplication
|
|
20
50
|
*/
|
|
21
|
-
|
|
51
|
+
async p2pMessageIdentifier(): Promise<Buffer32> {
|
|
52
|
+
if (this.cachedId) {
|
|
53
|
+
return this.cachedId;
|
|
54
|
+
}
|
|
55
|
+
this.cachedId = await this.generateP2PMessageIdentifier();
|
|
56
|
+
return this.cachedId;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
abstract generateP2PMessageIdentifier(): Promise<Buffer32>;
|
|
22
60
|
|
|
23
61
|
/** To Buffer
|
|
24
62
|
*
|
|
@@ -26,6 +64,10 @@ export abstract class Gossipable {
|
|
|
26
64
|
*/
|
|
27
65
|
abstract toBuffer(): Buffer;
|
|
28
66
|
|
|
67
|
+
toMessage(): Buffer {
|
|
68
|
+
return this.toBuffer();
|
|
69
|
+
}
|
|
70
|
+
|
|
29
71
|
/**
|
|
30
72
|
* Get the size of the gossipable object.
|
|
31
73
|
*
|
package/src/p2p/topic_type.ts
CHANGED
|
@@ -22,6 +22,8 @@ export enum TopicType {
|
|
|
22
22
|
export function getTopicTypeForClientType(clientType: P2PClientType) {
|
|
23
23
|
if (clientType === P2PClientType.Full) {
|
|
24
24
|
return Object.values(TopicType);
|
|
25
|
+
} else if (clientType === P2PClientType.Prover) {
|
|
26
|
+
return [TopicType.tx, TopicType.block_proposal];
|
|
25
27
|
}
|
|
26
28
|
return [TopicType.tx];
|
|
27
29
|
}
|
|
@@ -7,7 +7,7 @@ import { MembershipWitness } from '@aztec/foundation/trees';
|
|
|
7
7
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
8
8
|
|
|
9
9
|
import { PublicDataHint } from '../avm/public_data_hint.js';
|
|
10
|
-
import {
|
|
10
|
+
import { ContractClassLogFields } from '../logs/index.js';
|
|
11
11
|
import { PartialStateReference } from '../tx/partial_state_reference.js';
|
|
12
12
|
import { ConstantRollupData } from './constant_rollup_data.js';
|
|
13
13
|
import { PrivateBaseStateDiffHints } from './state_diff_hints.js';
|
|
@@ -39,7 +39,7 @@ export class PrivateBaseRollupHints {
|
|
|
39
39
|
/**
|
|
40
40
|
* Preimages to the kernel's contractClassLogsHashes.
|
|
41
41
|
*/
|
|
42
|
-
public contractClassLogsPreimages: Tuple<
|
|
42
|
+
public contractClassLogsPreimages: Tuple<ContractClassLogFields, typeof MAX_CONTRACT_CLASS_LOGS_PER_TX>,
|
|
43
43
|
/**
|
|
44
44
|
* Data which is not modified by the base rollup circuit.
|
|
45
45
|
*/
|
|
@@ -86,7 +86,7 @@ export class PrivateBaseRollupHints {
|
|
|
86
86
|
reader.readObject(PrivateBaseStateDiffHints),
|
|
87
87
|
reader.readObject(PublicDataHint),
|
|
88
88
|
MembershipWitness.fromBuffer(reader, ARCHIVE_HEIGHT),
|
|
89
|
-
|
|
89
|
+
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, () => reader.readObject(ContractClassLogFields)),
|
|
90
90
|
reader.readObject(ConstantRollupData),
|
|
91
91
|
);
|
|
92
92
|
}
|
|
@@ -102,7 +102,7 @@ export class PrivateBaseRollupHints {
|
|
|
102
102
|
PrivateBaseStateDiffHints.empty(),
|
|
103
103
|
PublicDataHint.empty(),
|
|
104
104
|
MembershipWitness.empty(ARCHIVE_HEIGHT),
|
|
105
|
-
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
105
|
+
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ContractClassLogFields.empty),
|
|
106
106
|
ConstantRollupData.empty(),
|
|
107
107
|
);
|
|
108
108
|
}
|
|
@@ -121,7 +121,7 @@ export class PublicBaseRollupHints {
|
|
|
121
121
|
/**
|
|
122
122
|
* Preimages to the kernel's contractClassLogsHashes.
|
|
123
123
|
*/
|
|
124
|
-
public contractClassLogsPreimages: Tuple<
|
|
124
|
+
public contractClassLogsPreimages: Tuple<ContractClassLogFields, typeof MAX_CONTRACT_CLASS_LOGS_PER_TX>,
|
|
125
125
|
/**
|
|
126
126
|
* Data which is not modified by the base rollup circuit.
|
|
127
127
|
*/
|
|
@@ -162,7 +162,7 @@ export class PublicBaseRollupHints {
|
|
|
162
162
|
return new PublicBaseRollupHints(
|
|
163
163
|
reader.readObject(SpongeBlob),
|
|
164
164
|
MembershipWitness.fromBuffer(reader, ARCHIVE_HEIGHT),
|
|
165
|
-
|
|
165
|
+
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, () => reader.readObject(ContractClassLogFields)),
|
|
166
166
|
reader.readObject(ConstantRollupData),
|
|
167
167
|
);
|
|
168
168
|
}
|
|
@@ -175,7 +175,7 @@ export class PublicBaseRollupHints {
|
|
|
175
175
|
return new PublicBaseRollupHints(
|
|
176
176
|
SpongeBlob.empty(),
|
|
177
177
|
MembershipWitness.empty(ARCHIVE_HEIGHT),
|
|
178
|
-
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
178
|
+
makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ContractClassLogFields.empty),
|
|
179
179
|
ConstantRollupData.empty(),
|
|
180
180
|
);
|
|
181
181
|
}
|
|
@@ -133,7 +133,10 @@ export class BlockRootOrBlockMergePublicInputs {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
export class FeeRecipient {
|
|
136
|
-
constructor(
|
|
136
|
+
constructor(
|
|
137
|
+
public recipient: EthAddress,
|
|
138
|
+
public value: Fr,
|
|
139
|
+
) {}
|
|
137
140
|
|
|
138
141
|
static fromBuffer(buffer: Buffer | BufferReader): FeeRecipient {
|
|
139
142
|
const reader = BufferReader.asReader(buffer);
|
|
@@ -7,7 +7,10 @@ import { PrivateBaseRollupHints } from './base_rollup_hints.js';
|
|
|
7
7
|
import { PrivateTubeData } from './private_tube_data.js';
|
|
8
8
|
|
|
9
9
|
export class PrivateBaseRollupInputs {
|
|
10
|
-
constructor(
|
|
10
|
+
constructor(
|
|
11
|
+
public tubeData: PrivateTubeData,
|
|
12
|
+
public hints: PrivateBaseRollupHints,
|
|
13
|
+
) {}
|
|
11
14
|
|
|
12
15
|
static from(fields: FieldsOf<PrivateBaseRollupInputs>): PrivateBaseRollupInputs {
|
|
13
16
|
return new PrivateBaseRollupInputs(...PrivateBaseRollupInputs.getFields(fields));
|
|
@@ -10,7 +10,10 @@ import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
|
|
|
10
10
|
* 'usePublicTailVk' signifies if we should prove this with the public or private kernel tail client IVC VKs.
|
|
11
11
|
*/
|
|
12
12
|
export class TubeInputs {
|
|
13
|
-
constructor(
|
|
13
|
+
constructor(
|
|
14
|
+
public usePublicTailVk: boolean,
|
|
15
|
+
public clientIVCData: ClientIvcProof,
|
|
16
|
+
) {}
|
|
14
17
|
|
|
15
18
|
static from(fields: FieldsOf<TubeInputs>): TubeInputs {
|
|
16
19
|
return new TubeInputs(...TubeInputs.getFields(fields));
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { UInt32 } from '../types/shared.js';
|
|
2
2
|
|
|
3
3
|
export class ScheduledDelayChange {
|
|
4
|
-
constructor(
|
|
4
|
+
constructor(
|
|
5
|
+
public pre: UInt32 | undefined,
|
|
6
|
+
public post: UInt32 | undefined,
|
|
7
|
+
public blockOfChange: UInt32,
|
|
8
|
+
) {}
|
|
5
9
|
|
|
6
10
|
static empty() {
|
|
7
11
|
return new this(undefined, undefined, 0);
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
|
|
3
3
|
export class ScheduledValueChange {
|
|
4
|
-
constructor(
|
|
4
|
+
constructor(
|
|
5
|
+
public previous: Fr[],
|
|
6
|
+
public post: Fr[],
|
|
7
|
+
public blockOfChange: number,
|
|
8
|
+
) {
|
|
5
9
|
if (this.previous.length !== this.post.length) {
|
|
6
10
|
throw new Error('Previous and post must have the same length');
|
|
7
11
|
}
|
|
@@ -9,7 +9,10 @@ import { ScheduledValueChange } from './scheduled_value_change.js';
|
|
|
9
9
|
export const SHARED_MUTABLE_VALUES_LEN = 2 * UPDATES_VALUE_SIZE + 1;
|
|
10
10
|
|
|
11
11
|
export class SharedMutableValues {
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(
|
|
13
|
+
public svc: ScheduledValueChange,
|
|
14
|
+
public sdc: ScheduledDelayChange,
|
|
15
|
+
) {}
|
|
13
16
|
|
|
14
17
|
static fromFields(fields: Fr[] | FieldReader) {
|
|
15
18
|
const reader = FieldReader.asReader(fields);
|
package/src/tests/factories.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
AVM_PROOF_LENGTH_IN_FIELDS,
|
|
5
5
|
AZTEC_MAX_EPOCH_DURATION,
|
|
6
6
|
BLOBS_PER_BLOCK,
|
|
7
|
-
|
|
7
|
+
CONTRACT_CLASS_LOG_SIZE_IN_FIELDS,
|
|
8
8
|
FIELDS_PER_BLOB,
|
|
9
9
|
FIXED_DA_GAS,
|
|
10
10
|
FIXED_L2_GAS,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
NUM_MSGS_PER_BASE_PARITY,
|
|
37
37
|
PRIVATE_LOG_SIZE_IN_FIELDS,
|
|
38
38
|
PUBLIC_DATA_TREE_HEIGHT,
|
|
39
|
-
|
|
39
|
+
PUBLIC_LOG_SIZE_IN_FIELDS,
|
|
40
40
|
RECURSIVE_PROOF_LENGTH,
|
|
41
41
|
TUBE_PROOF_LENGTH,
|
|
42
42
|
VK_TREE_HEIGHT,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
PrivateToRollupAccumulatedData,
|
|
109
109
|
mergeAccumulatedData,
|
|
110
110
|
} from '../kernel/index.js';
|
|
111
|
-
import { LogHash, ScopedLogHash } from '../kernel/log_hash.js';
|
|
111
|
+
import { CountedLogHash, LogHash, ScopedLogHash } from '../kernel/log_hash.js';
|
|
112
112
|
import { NoteHash } from '../kernel/note_hash.js';
|
|
113
113
|
import { Nullifier } from '../kernel/nullifier.js';
|
|
114
114
|
import { PrivateCallRequest } from '../kernel/private_call_request.js';
|
|
@@ -117,7 +117,7 @@ import { PrivateLogData } from '../kernel/private_log_data.js';
|
|
|
117
117
|
import { PrivateToRollupKernelCircuitPublicInputs } from '../kernel/private_to_rollup_kernel_circuit_public_inputs.js';
|
|
118
118
|
import { CountedPublicCallRequest, PublicCallRequest } from '../kernel/public_call_request.js';
|
|
119
119
|
import { PublicKeys, computeAddress } from '../keys/index.js';
|
|
120
|
-
import {
|
|
120
|
+
import { ContractClassLogFields } from '../logs/index.js';
|
|
121
121
|
import { PrivateLog } from '../logs/private_log.js';
|
|
122
122
|
import { PublicLog } from '../logs/public_log.js';
|
|
123
123
|
import { L2ToL1Message, ScopedL2ToL1Message } from '../messaging/l2_to_l1_message.js';
|
|
@@ -178,7 +178,11 @@ import { mockTx } from './mocks.js';
|
|
|
178
178
|
* @returns A side effect object.
|
|
179
179
|
*/
|
|
180
180
|
function makeLogHash(seed: number) {
|
|
181
|
-
return new LogHash(fr(seed), seed + 1
|
|
181
|
+
return new LogHash(fr(seed), seed + 1);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function makeCountedLogHash(seed: number) {
|
|
185
|
+
return new CountedLogHash(makeLogHash(seed), seed + 0x10);
|
|
182
186
|
}
|
|
183
187
|
|
|
184
188
|
function makeScopedLogHash(seed: number) {
|
|
@@ -193,16 +197,8 @@ function makeNullifier(seed: number) {
|
|
|
193
197
|
return new Nullifier(fr(seed), seed + 1, fr(seed + 2));
|
|
194
198
|
}
|
|
195
199
|
|
|
196
|
-
function makeContractClassLog(seed: number) {
|
|
197
|
-
// The '* 1' removes the 'Type instantiation is excessively deep and possibly infinite. ts(2589)' err
|
|
198
|
-
return new ContractClassLog(
|
|
199
|
-
makeAztecAddress(seed),
|
|
200
|
-
makeTuple(CONTRACT_CLASS_LOG_DATA_SIZE_IN_FIELDS * 1, fr, seed + 1),
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
200
|
function makePrivateLog(seed: number) {
|
|
205
|
-
return new PrivateLog(makeTuple(PRIVATE_LOG_SIZE_IN_FIELDS, fr, seed));
|
|
201
|
+
return new PrivateLog(makeTuple(PRIVATE_LOG_SIZE_IN_FIELDS, fr, seed), PRIVATE_LOG_SIZE_IN_FIELDS);
|
|
206
202
|
}
|
|
207
203
|
|
|
208
204
|
function makePrivateLogData(seed: number) {
|
|
@@ -210,7 +206,11 @@ function makePrivateLogData(seed: number) {
|
|
|
210
206
|
}
|
|
211
207
|
|
|
212
208
|
function makePublicLog(seed: number) {
|
|
213
|
-
return new PublicLog(
|
|
209
|
+
return new PublicLog(
|
|
210
|
+
makeAztecAddress(seed),
|
|
211
|
+
makeTuple(PUBLIC_LOG_SIZE_IN_FIELDS, fr, seed + 1),
|
|
212
|
+
PUBLIC_LOG_SIZE_IN_FIELDS,
|
|
213
|
+
);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
/**
|
|
@@ -548,6 +548,7 @@ export function makeTxRequest(seed = 1): TxRequest {
|
|
|
548
548
|
functionData: new FunctionData(makeSelector(seed + 0x100), /*isPrivate=*/ true),
|
|
549
549
|
argsHash: fr(seed + 0x200),
|
|
550
550
|
txContext: makeTxContext(seed + 0x400),
|
|
551
|
+
salt: fr(seed + 0x500),
|
|
551
552
|
});
|
|
552
553
|
}
|
|
553
554
|
|
|
@@ -577,7 +578,7 @@ export function makePrivateCircuitPublicInputs(seed = 0): PrivateCircuitPublicIn
|
|
|
577
578
|
publicTeardownCallRequest: makePublicCallRequest(seed + 0x800),
|
|
578
579
|
l2ToL1Msgs: makeTuple(MAX_L2_TO_L1_MSGS_PER_CALL, makeL2ToL1Message, seed + 0x800),
|
|
579
580
|
privateLogs: makeTuple(MAX_PRIVATE_LOGS_PER_CALL, makePrivateLogData, seed + 0x875),
|
|
580
|
-
contractClassLogsHashes: makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
581
|
+
contractClassLogsHashes: makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, makeCountedLogHash, seed + 0xa00),
|
|
581
582
|
startSideEffectCounter: fr(seed + 0x849),
|
|
582
583
|
endSideEffectCounter: fr(seed + 0x850),
|
|
583
584
|
historicalHeader: makeHeader(seed + 0xd00, undefined),
|
|
@@ -1081,6 +1082,10 @@ function makePrivateTubeData(seed = 1, kernelPublicInputs?: PrivateToRollupKerne
|
|
|
1081
1082
|
);
|
|
1082
1083
|
}
|
|
1083
1084
|
|
|
1085
|
+
function makeContractClassLogFields(seed = 1) {
|
|
1086
|
+
return new ContractClassLogFields(makeArray(CONTRACT_CLASS_LOG_SIZE_IN_FIELDS, fr, seed));
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1084
1089
|
function makePrivateBaseRollupHints(seed = 1) {
|
|
1085
1090
|
const start = makePartialStateReference(seed + 0x100);
|
|
1086
1091
|
|
|
@@ -1090,7 +1095,11 @@ function makePrivateBaseRollupHints(seed = 1) {
|
|
|
1090
1095
|
|
|
1091
1096
|
const archiveRootMembershipWitness = makeMembershipWitness(ARCHIVE_HEIGHT, seed + 0x9000);
|
|
1092
1097
|
|
|
1093
|
-
const contractClassLogsPreimages = makeTuple(
|
|
1098
|
+
const contractClassLogsPreimages = makeTuple(
|
|
1099
|
+
MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
1100
|
+
makeContractClassLogFields,
|
|
1101
|
+
seed + 0x800,
|
|
1102
|
+
);
|
|
1094
1103
|
|
|
1095
1104
|
const constants = makeConstantRollupData(0x100);
|
|
1096
1105
|
|
|
@@ -1112,7 +1121,11 @@ function makePublicBaseRollupHints(seed = 1) {
|
|
|
1112
1121
|
|
|
1113
1122
|
const archiveRootMembershipWitness = makeMembershipWitness(ARCHIVE_HEIGHT, seed + 0x9000);
|
|
1114
1123
|
|
|
1115
|
-
const contractClassLogsPreimages = makeTuple(
|
|
1124
|
+
const contractClassLogsPreimages = makeTuple(
|
|
1125
|
+
MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
1126
|
+
makeContractClassLogFields,
|
|
1127
|
+
seed + 0x800,
|
|
1128
|
+
);
|
|
1116
1129
|
|
|
1117
1130
|
const constants = makeConstantRollupData(0x100);
|
|
1118
1131
|
|
package/src/tests/mocks.ts
CHANGED
|
@@ -242,6 +242,7 @@ export interface MakeConsensusPayloadOptions {
|
|
|
242
242
|
archive?: Fr;
|
|
243
243
|
stateReference?: StateReference;
|
|
244
244
|
txHashes?: TxHash[];
|
|
245
|
+
txs?: Tx[];
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
const makeAndSignConsensusPayload = (
|
|
@@ -274,7 +275,7 @@ export const makeBlockProposal = (options?: MakeConsensusPayloadOptions): BlockP
|
|
|
274
275
|
SignatureDomainSeparator.blockProposal,
|
|
275
276
|
options,
|
|
276
277
|
);
|
|
277
|
-
return new BlockProposal(blockNumber, payload, signature);
|
|
278
|
+
return new BlockProposal(blockNumber, payload, signature, options?.txs ?? []);
|
|
278
279
|
};
|
|
279
280
|
|
|
280
281
|
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/8028)
|
|
@@ -9,7 +9,12 @@ import { z } from 'zod';
|
|
|
9
9
|
export const NUM_BYTES_PER_SHA256 = 32;
|
|
10
10
|
|
|
11
11
|
export class ContentCommitment {
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(
|
|
13
|
+
public numTxs: Fr,
|
|
14
|
+
public blobsHash: Buffer,
|
|
15
|
+
public inHash: Buffer,
|
|
16
|
+
public outHash: Buffer,
|
|
17
|
+
) {
|
|
13
18
|
// NB: we do not calculate blobHash in the circuit, but we still truncate it so it fits in a field
|
|
14
19
|
if (blobsHash.length !== NUM_BYTES_PER_SHA256) {
|
|
15
20
|
throw new Error(`blobsHash buffer must be ${NUM_BYTES_PER_SHA256} bytes`);
|
|
@@ -9,7 +9,7 @@ import { NoteSelector } from '../abi/note_selector.js';
|
|
|
9
9
|
import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inputs.js';
|
|
10
10
|
import type { IsEmpty } from '../kernel/utils/interfaces.js';
|
|
11
11
|
import { sortByCounter } from '../kernel/utils/order_and_comparison.js';
|
|
12
|
-
import { ContractClassLog } from '../logs/contract_class_log.js';
|
|
12
|
+
import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
|
|
13
13
|
import { Note } from '../note/note.js';
|
|
14
14
|
import { type ZodFor, mapSchema, schemas } from '../schemas/index.js';
|
|
15
15
|
import { HashedValues } from './hashed_values.js';
|
|
@@ -47,7 +47,10 @@ export class NoteAndSlot {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export class CountedContractClassLog implements IsEmpty {
|
|
50
|
-
constructor(
|
|
50
|
+
constructor(
|
|
51
|
+
public log: ContractClassLog,
|
|
52
|
+
public counter: number,
|
|
53
|
+
) {}
|
|
51
54
|
|
|
52
55
|
static get schema(): ZodFor<CountedContractClassLog> {
|
|
53
56
|
return z
|
|
@@ -132,7 +135,8 @@ export class PrivateCallExecutionResult {
|
|
|
132
135
|
public nestedExecutions: PrivateCallExecutionResult[],
|
|
133
136
|
/**
|
|
134
137
|
* Contract class logs emitted during execution of this function call.
|
|
135
|
-
* Note:
|
|
138
|
+
* Note: We only need to collect the ContractClassLogFields as preimages for the tx.
|
|
139
|
+
* But keep them as ContractClassLog so that we can verify the log hashes before submitting the tx (TODO).
|
|
136
140
|
*/
|
|
137
141
|
public contractClassLogs: CountedContractClassLog[],
|
|
138
142
|
public profileResult?: PrivateExecutionProfileResult,
|
|
@@ -223,10 +227,10 @@ function collectContractClassLogs(execResult: PrivateCallExecutionResult): Count
|
|
|
223
227
|
* @param execResult - The topmost execution result.
|
|
224
228
|
* @returns All contract class logs.
|
|
225
229
|
*/
|
|
226
|
-
export function collectSortedContractClassLogs(execResult: PrivateExecutionResult):
|
|
230
|
+
export function collectSortedContractClassLogs(execResult: PrivateExecutionResult): ContractClassLogFields[] {
|
|
227
231
|
const allLogs = collectContractClassLogs(execResult.entrypoint);
|
|
228
232
|
const sortedLogs = sortByCounter(allLogs);
|
|
229
|
-
return sortedLogs.map(l => l.log);
|
|
233
|
+
return sortedLogs.map(l => l.log.fields);
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
export function getFinalMinRevertibleSideEffectCounter(execResult: PrivateExecutionResult): number {
|
package/src/tx/profiling.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
1
2
|
import { type ZodFor, optional } from '@aztec/foundation/schemas';
|
|
2
3
|
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
|
|
6
|
+
import type { AbiDecoded } from '../abi/decoder.js';
|
|
5
7
|
import { type PrivateExecutionStep, PrivateExecutionStepSchema } from '../kernel/private_kernel_prover_output.js';
|
|
8
|
+
import { AbiDecodedSchema } from '../schemas/schemas.js';
|
|
6
9
|
|
|
7
10
|
type FunctionTiming = {
|
|
8
11
|
functionName: string;
|
|
@@ -46,7 +49,10 @@ export const SimulationTimingsSchema = z.object({
|
|
|
46
49
|
});
|
|
47
50
|
|
|
48
51
|
export class TxProfileResult {
|
|
49
|
-
constructor(
|
|
52
|
+
constructor(
|
|
53
|
+
public executionSteps: PrivateExecutionStep[],
|
|
54
|
+
public timings: ProvingTimings,
|
|
55
|
+
) {}
|
|
50
56
|
|
|
51
57
|
static get schema(): ZodFor<TxProfileResult> {
|
|
52
58
|
return z
|
|
@@ -86,3 +92,35 @@ export class TxProfileResult {
|
|
|
86
92
|
);
|
|
87
93
|
}
|
|
88
94
|
}
|
|
95
|
+
|
|
96
|
+
export class UtilitySimulationResult {
|
|
97
|
+
constructor(
|
|
98
|
+
public result: AbiDecoded,
|
|
99
|
+
public timings?: SimulationTimings,
|
|
100
|
+
) {}
|
|
101
|
+
|
|
102
|
+
static get schema(): ZodFor<UtilitySimulationResult> {
|
|
103
|
+
return z
|
|
104
|
+
.object({
|
|
105
|
+
result: AbiDecodedSchema,
|
|
106
|
+
timings: optional(SimulationTimingsSchema),
|
|
107
|
+
})
|
|
108
|
+
.transform(({ result, timings }) => new UtilitySimulationResult(result, timings));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
static random(): UtilitySimulationResult {
|
|
112
|
+
return new UtilitySimulationResult(Fr.random().toBigInt(), {
|
|
113
|
+
sync: 1,
|
|
114
|
+
publicSimulation: 1,
|
|
115
|
+
validation: 1,
|
|
116
|
+
perFunction: [
|
|
117
|
+
{
|
|
118
|
+
functionName: 'random',
|
|
119
|
+
time: 1,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
unaccounted: 1,
|
|
123
|
+
total: 5,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -154,6 +154,7 @@ export class ProposedBlockHeader {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
[inspect.custom]() {
|
|
157
|
+
const gasfees = `da:${this.gasFees.feePerDaGas.toBigInt()}, l2:${this.gasFees.feePerL2Gas.toBigInt()}`;
|
|
157
158
|
return `Header {
|
|
158
159
|
lastArchiveRoot: ${this.lastArchiveRoot.toString()},
|
|
159
160
|
contentCommitment: ${inspect(this.contentCommitment)},
|
|
@@ -161,7 +162,7 @@ export class ProposedBlockHeader {
|
|
|
161
162
|
timestamp: ${this.timestamp},
|
|
162
163
|
coinbase: ${this.coinbase.toString()},
|
|
163
164
|
feeRecipient: ${this.feeRecipient.toString()},
|
|
164
|
-
gasFees: ${
|
|
165
|
+
gasFees: ${gasfees},
|
|
165
166
|
totalManaUsed: ${this.totalManaUsed.toBigInt()},
|
|
166
167
|
}`;
|
|
167
168
|
}
|