@aztec/pxe 0.0.0-test.0 → 0.0.1-commit.03f7ef2
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/README.md +5 -5
- package/dest/bin/check_oracle_version.d.ts +2 -0
- package/dest/bin/check_oracle_version.d.ts.map +1 -0
- package/dest/bin/check_oracle_version.js +129 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts +39 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
- package/dest/{synchronizer/synchronizer.js → block_synchronizer/block_synchronizer.js} +36 -32
- package/dest/block_synchronizer/index.d.ts +2 -0
- package/dest/block_synchronizer/index.d.ts.map +1 -0
- package/dest/block_synchronizer/index.js +1 -0
- package/dest/config/index.d.ts +11 -24
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +18 -33
- package/dest/config/package_info.d.ts +1 -1
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +83 -0
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -0
- package/dest/contract_function_simulator/contract_function_simulator.js +325 -0
- package/dest/contract_function_simulator/execution_note_cache.d.ts +95 -0
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/execution_note_cache.js +191 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +16 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +26 -0
- package/dest/contract_function_simulator/hashed_values_cache.d.ts +28 -0
- package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/hashed_values_cache.js +36 -0
- package/dest/contract_function_simulator/index.d.ts +14 -0
- package/dest/contract_function_simulator/index.d.ts.map +1 -0
- package/dest/contract_function_simulator/index.js +12 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +20 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +37 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +16 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +26 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +17 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +65 -0
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +24 -0
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +51 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +22 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.js +33 -0
- package/dest/contract_function_simulator/oracle/index.d.ts +14 -0
- package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/index.js +2 -0
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +103 -0
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/interfaces.js +4 -0
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +17 -0
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +24 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +28 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +54 -0
- package/dest/contract_function_simulator/oracle/oracle.d.ts +58 -0
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/oracle.js +345 -0
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +47 -0
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/private_execution.js +123 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +240 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +439 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +195 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +372 -0
- package/dest/contract_function_simulator/pick_notes.d.ts +85 -0
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -0
- package/dest/contract_function_simulator/pick_notes.js +51 -0
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +6 -0
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -0
- package/dest/contract_function_simulator/proxied_contract_data_source.js +80 -0
- package/dest/contract_function_simulator/proxied_node.d.ts +9 -0
- package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -0
- package/dest/contract_function_simulator/proxied_node.js +27 -0
- package/dest/debug/pxe_debug_utils.d.ts +31 -0
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
- package/dest/debug/pxe_debug_utils.js +37 -0
- package/dest/entrypoints/client/bundle/index.d.ts +4 -3
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +2 -2
- package/dest/entrypoints/client/bundle/utils.d.ts +10 -10
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +18 -12
- package/dest/entrypoints/client/lazy/index.d.ts +4 -3
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts +9 -9
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +17 -11
- package/dest/entrypoints/pxe_creation_options.d.ts +16 -0
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -0
- package/dest/entrypoints/server/index.d.ts +6 -4
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +4 -3
- package/dest/entrypoints/server/utils.d.ts +8 -16
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +31 -36
- package/dest/error_enriching.d.ts +11 -0
- package/dest/error_enriching.d.ts.map +1 -0
- package/dest/{pxe_service/error_enriching.js → error_enriching.js} +26 -18
- package/dest/events/event_service.d.ts +15 -0
- package/dest/events/event_service.d.ts.map +1 -0
- package/dest/events/event_service.js +47 -0
- package/dest/events/index.d.ts +2 -0
- package/dest/events/index.d.ts.map +1 -0
- package/dest/events/index.js +1 -0
- package/dest/events/private_event_filter_validator.d.ts +9 -0
- package/dest/events/private_event_filter_validator.d.ts.map +1 -0
- package/dest/events/private_event_filter_validator.js +39 -0
- package/dest/logs/log_service.d.ts +43 -0
- package/dest/logs/log_service.d.ts.map +1 -0
- package/dest/logs/log_service.js +239 -0
- package/dest/notes/index.d.ts +2 -0
- package/dest/notes/index.d.ts.map +1 -0
- package/dest/notes/index.js +1 -0
- package/dest/notes/note_service.d.ts +48 -0
- package/dest/notes/note_service.d.ts.map +1 -0
- package/dest/notes/note_service.js +152 -0
- package/dest/oracle_version.d.ts +3 -0
- package/dest/oracle_version.d.ts.map +1 -0
- package/dest/oracle_version.js +10 -0
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +28 -0
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -0
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +271 -0
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +4 -0
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +1 -0
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +41 -0
- package/dest/private_kernel/hints/index.d.ts +3 -0
- package/dest/private_kernel/hints/index.d.ts.map +1 -0
- package/dest/{kernel_prover → private_kernel}/hints/index.js +1 -0
- package/dest/private_kernel/index.d.ts +3 -0
- package/dest/private_kernel/index.d.ts.map +1 -0
- package/dest/private_kernel/index.js +2 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +44 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -0
- package/dest/private_kernel/private_kernel_execution_prover.js +286 -0
- package/dest/private_kernel/private_kernel_oracle.d.ts +63 -0
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -0
- package/dest/private_kernel/private_kernel_oracle.js +4 -0
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts +46 -0
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -0
- package/dest/{kernel_oracle/index.js → private_kernel/private_kernel_oracle_impl.js} +19 -9
- package/dest/public_storage/public_storage_service.d.ts +24 -0
- package/dest/public_storage/public_storage_service.d.ts.map +1 -0
- package/dest/public_storage/public_storage_service.js +26 -0
- package/dest/pxe.d.ts +231 -0
- package/dest/pxe.d.ts.map +1 -0
- package/dest/pxe.js +756 -0
- package/dest/storage/address_data_provider/address_data_provider.d.ts +2 -4
- package/dest/storage/address_data_provider/address_data_provider.d.ts.map +1 -1
- package/dest/storage/address_data_provider/address_data_provider.js +0 -3
- package/dest/storage/address_data_provider/index.d.ts +1 -1
- package/dest/storage/anchor_block_data_provider/anchor_block_data_provider.d.ts +9 -0
- package/dest/storage/anchor_block_data_provider/anchor_block_data_provider.d.ts.map +1 -0
- package/dest/storage/{sync_data_provider/sync_data_provider.js → anchor_block_data_provider/anchor_block_data_provider.js} +2 -12
- package/dest/storage/anchor_block_data_provider/index.d.ts +2 -0
- package/dest/storage/anchor_block_data_provider/index.d.ts.map +1 -0
- package/dest/storage/anchor_block_data_provider/index.js +1 -0
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +48 -7
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +1 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.js +117 -28
- package/dest/storage/capsule_data_provider/index.d.ts +1 -1
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts +16 -59
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +1 -1
- package/dest/storage/contract_data_provider/contract_data_provider.js +121 -80
- package/dest/storage/contract_data_provider/index.d.ts +1 -2
- package/dest/storage/contract_data_provider/index.d.ts.map +1 -1
- package/dest/storage/contract_data_provider/index.js +0 -1
- package/dest/storage/contract_data_provider/private_functions_tree.d.ts +3 -42
- package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +1 -1
- package/dest/storage/contract_data_provider/private_functions_tree.js +10 -62
- package/dest/storage/index.d.ts +4 -5
- package/dest/storage/index.d.ts.map +1 -1
- package/dest/storage/index.js +3 -4
- package/dest/storage/metadata.d.ts +2 -0
- package/dest/storage/metadata.d.ts.map +1 -0
- package/dest/storage/metadata.js +1 -0
- package/dest/storage/note_data_provider/index.d.ts +2 -2
- package/dest/storage/note_data_provider/index.d.ts.map +1 -1
- package/dest/storage/note_data_provider/index.js +1 -1
- package/dest/storage/note_data_provider/note_data_provider.d.ts +75 -11
- package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
- package/dest/storage/note_data_provider/note_data_provider.js +155 -82
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +51 -0
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +1 -0
- package/dest/storage/private_event_data_provider/private_event_data_provider.js +115 -0
- package/dest/storage/tagging_data_provider/index.d.ts +3 -2
- package/dest/storage/tagging_data_provider/index.d.ts.map +1 -1
- package/dest/storage/tagging_data_provider/index.js +2 -1
- package/dest/storage/tagging_data_provider/recipient_tagging_data_provider.d.ts +31 -0
- package/dest/storage/tagging_data_provider/recipient_tagging_data_provider.d.ts.map +1 -0
- package/dest/storage/tagging_data_provider/recipient_tagging_data_provider.js +65 -0
- package/dest/storage/tagging_data_provider/sender_tagging_data_provider.d.ts +67 -0
- package/dest/storage/tagging_data_provider/sender_tagging_data_provider.d.ts.map +1 -0
- package/dest/storage/tagging_data_provider/sender_tagging_data_provider.js +196 -0
- package/dest/tagging/constants.d.ts +2 -0
- package/dest/tagging/constants.d.ts.map +1 -0
- package/dest/tagging/constants.js +3 -0
- package/dest/tagging/index.d.ts +5 -0
- package/dest/tagging/index.d.ts.map +1 -0
- package/dest/tagging/index.js +3 -0
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +14 -0
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +99 -0
- package/dest/tagging/recipient_sync/new_recipient_tagging_data_provider.d.ts +21 -0
- package/dest/tagging/recipient_sync/new_recipient_tagging_data_provider.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/new_recipient_tagging_data_provider.js +42 -0
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts +12 -0
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +20 -0
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +14 -0
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +29 -0
- package/dest/tagging/sync/sync_sender_tagging_indexes.d.ts +21 -0
- package/dest/tagging/sync/sync_sender_tagging_indexes.d.ts.map +1 -0
- package/dest/tagging/sync/sync_sender_tagging_indexes.js +89 -0
- package/dest/tagging/sync/utils/get_status_change_of_pending.d.ts +11 -0
- package/dest/tagging/sync/utils/get_status_change_of_pending.d.ts.map +1 -0
- package/dest/tagging/sync/utils/get_status_change_of_pending.js +32 -0
- package/dest/tagging/sync/utils/load_and_store_new_tagging_indexes.d.ts +18 -0
- package/dest/tagging/sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
- package/dest/tagging/sync/utils/load_and_store_new_tagging_indexes.js +55 -0
- package/dest/tagging/utils.d.ts +18 -0
- package/dest/tagging/utils.d.ts.map +1 -0
- package/dest/tagging/utils.js +25 -0
- package/dest/tree_membership/tree_membership_service.d.ts +52 -0
- package/dest/tree_membership/tree_membership_service.d.ts.map +1 -0
- package/dest/tree_membership/tree_membership_service.js +84 -0
- package/package.json +37 -34
- package/src/bin/check_oracle_version.ts +160 -0
- package/src/{synchronizer/synchronizer.ts → block_synchronizer/block_synchronizer.ts} +39 -35
- package/src/block_synchronizer/index.ts +1 -0
- package/src/config/index.ts +27 -55
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +618 -0
- package/src/contract_function_simulator/execution_note_cache.ts +233 -0
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +32 -0
- package/src/contract_function_simulator/hashed_values_cache.ts +47 -0
- package/src/contract_function_simulator/index.ts +13 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +47 -0
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +28 -0
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +69 -0
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +64 -0
- package/src/contract_function_simulator/noir-structs/utility_context.ts +42 -0
- package/src/contract_function_simulator/oracle/index.ts +16 -0
- package/src/contract_function_simulator/oracle/interfaces.ts +175 -0
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +23 -0
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +68 -0
- package/src/contract_function_simulator/oracle/oracle.ts +605 -0
- package/src/contract_function_simulator/oracle/private_execution.ts +209 -0
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +704 -0
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +532 -0
- package/src/contract_function_simulator/pick_notes.ts +141 -0
- package/src/contract_function_simulator/proxied_contract_data_source.ts +83 -0
- package/src/contract_function_simulator/proxied_node.ts +33 -0
- package/src/debug/pxe_debug_utils.ts +48 -0
- package/src/entrypoints/client/bundle/index.ts +3 -2
- package/src/entrypoints/client/bundle/utils.ts +36 -36
- package/src/entrypoints/client/lazy/index.ts +3 -2
- package/src/entrypoints/client/lazy/utils.ts +36 -31
- package/src/entrypoints/pxe_creation_options.ts +12 -0
- package/src/entrypoints/server/index.ts +5 -3
- package/src/entrypoints/server/utils.ts +59 -51
- package/src/{pxe_service/error_enriching.ts → error_enriching.ts} +36 -27
- package/src/events/event_service.ts +77 -0
- package/src/events/index.ts +1 -0
- package/src/events/private_event_filter_validator.ts +48 -0
- package/src/logs/log_service.ts +364 -0
- package/src/notes/index.ts +1 -0
- package/src/notes/note_service.ts +200 -0
- package/src/oracle_version.ts +11 -0
- package/src/{kernel_prover → private_kernel}/hints/build_private_kernel_reset_private_inputs.ts +159 -147
- package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +58 -0
- package/src/{kernel_prover → private_kernel}/hints/index.ts +1 -0
- package/src/private_kernel/index.ts +2 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +432 -0
- package/src/{kernel_prover/proving_data_oracle.ts → private_kernel/private_kernel_oracle.ts} +19 -30
- package/src/{kernel_oracle/index.ts → private_kernel/private_kernel_oracle_impl.ts} +33 -17
- package/src/public_storage/public_storage_service.ts +33 -0
- package/src/pxe.ts +1063 -0
- package/src/storage/address_data_provider/address_data_provider.ts +1 -7
- package/src/storage/{sync_data_provider/sync_data_provider.ts → anchor_block_data_provider/anchor_block_data_provider.ts} +2 -17
- package/src/storage/anchor_block_data_provider/index.ts +1 -0
- package/src/storage/capsule_data_provider/capsule_data_provider.ts +130 -31
- package/src/storage/contract_data_provider/contract_data_provider.ts +152 -94
- package/src/storage/contract_data_provider/index.ts +0 -1
- package/src/storage/contract_data_provider/private_functions_tree.ts +12 -76
- package/src/storage/index.ts +3 -5
- package/src/storage/metadata.ts +1 -0
- package/src/storage/note_data_provider/index.ts +1 -1
- package/src/storage/note_data_provider/note_data_provider.ts +188 -121
- package/src/storage/private_event_data_provider/private_event_data_provider.ts +162 -0
- package/src/storage/tagging_data_provider/index.ts +2 -1
- package/src/storage/tagging_data_provider/recipient_tagging_data_provider.ts +86 -0
- package/src/storage/tagging_data_provider/sender_tagging_data_provider.ts +244 -0
- package/src/tagging/constants.ts +3 -0
- package/src/tagging/index.ts +4 -0
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +129 -0
- package/src/tagging/recipient_sync/new_recipient_tagging_data_provider.ts +53 -0
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +43 -0
- package/src/tagging/sync/sync_sender_tagging_indexes.ts +112 -0
- package/src/tagging/sync/utils/get_status_change_of_pending.ts +44 -0
- package/src/tagging/sync/utils/load_and_store_new_tagging_indexes.ts +72 -0
- package/src/tagging/utils.ts +32 -0
- package/src/tree_membership/tree_membership_service.ts +112 -0
- package/dest/bin/index.d.ts +0 -3
- package/dest/bin/index.d.ts.map +0 -1
- package/dest/bin/index.js +0 -28
- package/dest/entrypoints/client/pxe_creation_options.d.ts +0 -11
- package/dest/entrypoints/client/pxe_creation_options.d.ts.map +0 -1
- package/dest/kernel_oracle/index.d.ts +0 -45
- package/dest/kernel_oracle/index.d.ts.map +0 -1
- package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
- package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
- package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.js +0 -270
- package/dest/kernel_prover/hints/index.d.ts +0 -2
- package/dest/kernel_prover/hints/index.d.ts.map +0 -1
- package/dest/kernel_prover/index.d.ts +0 -3
- package/dest/kernel_prover/index.d.ts.map +0 -1
- package/dest/kernel_prover/index.js +0 -2
- package/dest/kernel_prover/kernel_prover.d.ts +0 -38
- package/dest/kernel_prover/kernel_prover.d.ts.map +0 -1
- package/dest/kernel_prover/kernel_prover.js +0 -217
- package/dest/kernel_prover/proving_data_oracle.d.ts +0 -73
- package/dest/kernel_prover/proving_data_oracle.d.ts.map +0 -1
- package/dest/kernel_prover/proving_data_oracle.js +0 -4
- package/dest/note_decryption_utils/add_public_values_to_payload.d.ts +0 -11
- package/dest/note_decryption_utils/add_public_values_to_payload.d.ts.map +0 -1
- package/dest/note_decryption_utils/add_public_values_to_payload.js +0 -47
- package/dest/pxe_http/index.d.ts +0 -2
- package/dest/pxe_http/index.d.ts.map +0 -1
- package/dest/pxe_http/index.js +0 -1
- package/dest/pxe_http/pxe_http_server.d.ts +0 -16
- package/dest/pxe_http/pxe_http_server.d.ts.map +0 -1
- package/dest/pxe_http/pxe_http_server.js +0 -27
- package/dest/pxe_oracle_interface/index.d.ts +0 -159
- package/dest/pxe_oracle_interface/index.d.ts.map +0 -1
- package/dest/pxe_oracle_interface/index.js +0 -692
- package/dest/pxe_oracle_interface/tagging_utils.d.ts +0 -17
- package/dest/pxe_oracle_interface/tagging_utils.d.ts.map +0 -1
- package/dest/pxe_oracle_interface/tagging_utils.js +0 -23
- package/dest/pxe_service/error_enriching.d.ts +0 -11
- package/dest/pxe_service/error_enriching.d.ts.map +0 -1
- package/dest/pxe_service/index.d.ts +0 -3
- package/dest/pxe_service/index.d.ts.map +0 -1
- package/dest/pxe_service/index.js +0 -2
- package/dest/pxe_service/pxe_service.d.ts +0 -111
- package/dest/pxe_service/pxe_service.d.ts.map +0 -1
- package/dest/pxe_service/pxe_service.js +0 -664
- package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.d.ts +0 -11
- package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.d.ts.map +0 -1
- package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.js +0 -20
- package/dest/storage/auth_witness_data_provider/index.d.ts +0 -2
- package/dest/storage/auth_witness_data_provider/index.d.ts.map +0 -1
- package/dest/storage/auth_witness_data_provider/index.js +0 -1
- package/dest/storage/data_provider.d.ts +0 -4
- package/dest/storage/data_provider.d.ts.map +0 -1
- package/dest/storage/data_provider.js +0 -1
- package/dest/storage/note_data_provider/note_dao.d.ts +0 -106
- package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
- package/dest/storage/note_data_provider/note_dao.js +0 -106
- package/dest/storage/sync_data_provider/index.d.ts +0 -2
- package/dest/storage/sync_data_provider/index.d.ts.map +0 -1
- package/dest/storage/sync_data_provider/index.js +0 -1
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts +0 -12
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +0 -18
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.js +0 -65
- package/dest/synchronizer/index.d.ts +0 -2
- package/dest/synchronizer/index.d.ts.map +0 -1
- package/dest/synchronizer/index.js +0 -1
- package/dest/synchronizer/synchronizer.d.ts +0 -37
- package/dest/synchronizer/synchronizer.d.ts.map +0 -1
- package/dest/test/pxe_test_suite.d.ts +0 -3
- package/dest/test/pxe_test_suite.d.ts.map +0 -1
- package/dest/test/pxe_test_suite.js +0 -97
- package/src/bin/index.ts +0 -38
- package/src/entrypoints/client/pxe_creation_options.ts +0 -7
- package/src/kernel_prover/index.ts +0 -2
- package/src/kernel_prover/kernel_prover.ts +0 -351
- package/src/note_decryption_utils/add_public_values_to_payload.ts +0 -64
- package/src/pxe_http/index.ts +0 -1
- package/src/pxe_http/pxe_http_server.ts +0 -29
- package/src/pxe_oracle_interface/index.ts +0 -925
- package/src/pxe_oracle_interface/tagging_utils.ts +0 -32
- package/src/pxe_service/index.ts +0 -2
- package/src/pxe_service/pxe_service.ts +0 -949
- package/src/storage/auth_witness_data_provider/auth_witness_data_provider.ts +0 -34
- package/src/storage/auth_witness_data_provider/index.ts +0 -1
- package/src/storage/data_provider.ts +0 -3
- package/src/storage/note_data_provider/note_dao.ts +0 -162
- package/src/storage/sync_data_provider/index.ts +0 -1
- package/src/storage/tagging_data_provider/tagging_data_provider.ts +0 -92
- package/src/synchronizer/index.ts +0 -1
- package/src/test/pxe_test_suite.ts +0 -111
- /package/dest/entrypoints/{client/pxe_creation_options.js → pxe_creation_options.js} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AztecAsyncKVStore, AztecAsyncMap } from '@aztec/kv-store';
|
|
2
|
+
import type { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Data provider of tagging data used when syncing the logs as a recipient. The sender counterpart of this class
|
|
6
|
+
* is called SenderTaggingDataProvider. We have the providers separate for the sender and recipient because
|
|
7
|
+
* the algorithms are completely disjoint and there is not data reuse between the two.
|
|
8
|
+
*
|
|
9
|
+
* @dev Chain reorgs do not need to be handled here because both the finalized and aged indexes refer to finalized
|
|
10
|
+
* blocks, which by definition cannot be affected by reorgs.
|
|
11
|
+
*
|
|
12
|
+
* TODO(benesjan): Rename as to RecipientTaggingDataProvider and relocate once the old tagging sync is purged.
|
|
13
|
+
*/
|
|
14
|
+
export class NewRecipientTaggingDataProvider {
|
|
15
|
+
#store: AztecAsyncKVStore;
|
|
16
|
+
|
|
17
|
+
#highestAgedIndex: AztecAsyncMap<string, number>;
|
|
18
|
+
#highestFinalizedIndex: AztecAsyncMap<string, number>;
|
|
19
|
+
|
|
20
|
+
constructor(store: AztecAsyncKVStore) {
|
|
21
|
+
this.#store = store;
|
|
22
|
+
|
|
23
|
+
this.#highestAgedIndex = this.#store.openMap('highest_aged_index');
|
|
24
|
+
this.#highestFinalizedIndex = this.#store.openMap('highest_finalized_index');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
getHighestAgedIndex(secret: DirectionalAppTaggingSecret): Promise<number | undefined> {
|
|
28
|
+
return this.#highestAgedIndex.getAsync(secret.toString());
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async updateHighestAgedIndex(secret: DirectionalAppTaggingSecret, index: number): Promise<void> {
|
|
32
|
+
const currentIndex = await this.#highestAgedIndex.getAsync(secret.toString());
|
|
33
|
+
if (currentIndex !== undefined && index <= currentIndex) {
|
|
34
|
+
// Log sync should never set a lower highest aged index.
|
|
35
|
+
throw new Error(`New highest aged index (${index}) must be higher than the current one (${currentIndex})`);
|
|
36
|
+
}
|
|
37
|
+
await this.#highestAgedIndex.set(secret.toString(), index);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
getHighestFinalizedIndex(secret: DirectionalAppTaggingSecret): Promise<number | undefined> {
|
|
41
|
+
return this.#highestFinalizedIndex.getAsync(secret.toString());
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async updateHighestFinalizedIndex(secret: DirectionalAppTaggingSecret, index: number): Promise<void> {
|
|
45
|
+
const currentIndex = await this.#highestFinalizedIndex.getAsync(secret.toString());
|
|
46
|
+
if (currentIndex !== undefined && index < currentIndex) {
|
|
47
|
+
// Log sync should never set a lower highest finalized index but it can happen that it would try to set the same
|
|
48
|
+
// one because we are loading logs from highest aged index + 1 and not from the highest finalized index.
|
|
49
|
+
throw new Error(`New highest finalized index (${index}) must be higher than the current one (${currentIndex})`);
|
|
50
|
+
}
|
|
51
|
+
await this.#highestFinalizedIndex.set(secret.toString(), index);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { MAX_INCLUDE_BY_TIMESTAMP_DURATION } from '@aztec/constants';
|
|
2
|
+
import type { TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Finds the highest aged and the highest finalized tagging indexes.
|
|
6
|
+
*/
|
|
7
|
+
export function findHighestIndexes(
|
|
8
|
+
privateLogsWithIndexes: Array<{ log: TxScopedL2Log; taggingIndex: number }>,
|
|
9
|
+
currentTimestamp: bigint,
|
|
10
|
+
finalizedBlockNumber: number,
|
|
11
|
+
): { highestAgedIndex: number | undefined; highestFinalizedIndex: number | undefined } {
|
|
12
|
+
let highestAgedIndex = undefined;
|
|
13
|
+
let highestFinalizedIndex = undefined;
|
|
14
|
+
|
|
15
|
+
for (const { log, taggingIndex } of privateLogsWithIndexes) {
|
|
16
|
+
const ageInSeconds = currentTimestamp - log.blockTimestamp;
|
|
17
|
+
|
|
18
|
+
if (
|
|
19
|
+
ageInSeconds >= BigInt(MAX_INCLUDE_BY_TIMESTAMP_DURATION) &&
|
|
20
|
+
(highestAgedIndex === undefined || taggingIndex > highestAgedIndex)
|
|
21
|
+
) {
|
|
22
|
+
highestAgedIndex = taggingIndex;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (
|
|
26
|
+
log.blockNumber <= finalizedBlockNumber &&
|
|
27
|
+
(highestFinalizedIndex === undefined || taggingIndex > highestFinalizedIndex)
|
|
28
|
+
) {
|
|
29
|
+
highestFinalizedIndex = taggingIndex;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return { highestAgedIndex, highestFinalizedIndex };
|
|
34
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
4
|
+
import type { DirectionalAppTaggingSecret, PreTag, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
5
|
+
import { SiloedTag, Tag } from '@aztec/stdlib/logs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Gets private logs with their corresponding block timestamps and tagging indexes for the given index range, `app` and
|
|
9
|
+
* `secret`. At most load logs from blocks up to and including `anchorBlockNumber`. `start` is inclusive and `end` is
|
|
10
|
+
* exclusive.
|
|
11
|
+
*/
|
|
12
|
+
export async function loadLogsForRange(
|
|
13
|
+
secret: DirectionalAppTaggingSecret,
|
|
14
|
+
app: AztecAddress,
|
|
15
|
+
aztecNode: AztecNode,
|
|
16
|
+
start: number,
|
|
17
|
+
end: number,
|
|
18
|
+
anchorBlockNumber: BlockNumber,
|
|
19
|
+
): Promise<Array<{ log: TxScopedL2Log; taggingIndex: number }>> {
|
|
20
|
+
// Derive tags for the window
|
|
21
|
+
const preTags: PreTag[] = Array(end - start)
|
|
22
|
+
.fill(0)
|
|
23
|
+
.map((_, i) => ({ secret, index: start + i }));
|
|
24
|
+
const siloedTags = await Promise.all(preTags.map(preTag => Tag.compute(preTag))).then(tags =>
|
|
25
|
+
Promise.all(tags.map(tag => SiloedTag.compute(tag, app))),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const logs = await aztecNode.getPrivateLogsByTags(siloedTags);
|
|
29
|
+
|
|
30
|
+
// Pair logs with their corresponding tagging indexes
|
|
31
|
+
const logsWithIndexes: Array<{ log: TxScopedL2Log; taggingIndex: number }> = [];
|
|
32
|
+
for (let i = 0; i < logs.length; i++) {
|
|
33
|
+
const logsForTag = logs[i];
|
|
34
|
+
const taggingIndex = preTags[i].index;
|
|
35
|
+
for (const log of logsForTag) {
|
|
36
|
+
if (log.blockNumber <= anchorBlockNumber) {
|
|
37
|
+
logsWithIndexes.push({ log, taggingIndex });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return logsWithIndexes;
|
|
43
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
3
|
+
import type { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
|
|
4
|
+
|
|
5
|
+
import type { SenderTaggingDataProvider } from '../../storage/tagging_data_provider/sender_tagging_data_provider.js';
|
|
6
|
+
import { getStatusChangeOfPending } from './utils/get_status_change_of_pending.js';
|
|
7
|
+
import { loadAndStoreNewTaggingIndexes } from './utils/load_and_store_new_tagging_indexes.js';
|
|
8
|
+
|
|
9
|
+
// This window has to be as large as the largest expected number of logs emitted in a tx for a given directional app
|
|
10
|
+
// tagging secret. If we get more tag indexes consumed than this window, an error is thrown in `PXE::proveTx` function.
|
|
11
|
+
// This is set to a larger value than MAX_PRIVATE_LOGS_PER_TX (currently 64) because there could be more than
|
|
12
|
+
// MAX_PRIVATE_LOGS_PER_TX indexes consumed in case the logs are squashed. This happens when the log contains a note
|
|
13
|
+
// and the note is nullified in the same tx.
|
|
14
|
+
//
|
|
15
|
+
// Rationale for value 95:
|
|
16
|
+
// - The `e2e_pending_note_hashes_contract` test's "Should handle overflowing the kernel data structures in nested
|
|
17
|
+
// calls" test case hits 95 tagging indexes emitted in a single transaction. This test creates and nullifies many
|
|
18
|
+
// notes recursively to test kernel reset circuit behavior, which causes logs to be squashed but still consume
|
|
19
|
+
// tagging indexes during the sync process. Since this is testing MAX_PRIVATE_LOGS_PER_TX overflow we can be
|
|
20
|
+
// reasonably certain that this value is large enough for standard use cases.
|
|
21
|
+
// - This value is below MAX_RPC_LEN (100) which is the limit for array parameters in the JSON RPC schema for
|
|
22
|
+
// `getLogsByTags`. Any test that would perform sync over JSON RPC (not by having access to the Aztec node instance
|
|
23
|
+
// directly) would error out if that maximum was hit (docs_examples.test.ts is an example of this).
|
|
24
|
+
export const UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN = 95;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Syncs tagging indexes. This function needs to be called whenever a private log is being sent.
|
|
28
|
+
*
|
|
29
|
+
* @param secret - The secret that's unique for (sender, recipient, contract) tuple while the direction of
|
|
30
|
+
* sender -> recipient matters.
|
|
31
|
+
* @param app - The address of the contract that the logs are tagged for. Needs to be provided because we perform
|
|
32
|
+
* second round of siloing in this function which is necessary because kernels do it as well (they silo first field
|
|
33
|
+
* of the private log which corresponds to the tag).
|
|
34
|
+
* @remarks When syncing the indexes as sender we don't care about the log contents - we only care about the highest
|
|
35
|
+
* pending and highest finalized indexes as that guides the next index choice when sending a log. The next index choice
|
|
36
|
+
* is simply the highest pending index plus one (or finalized if pending is undefined).
|
|
37
|
+
* @dev This function looks for new indexes, adds them to pending, then it checks status of each pending index and
|
|
38
|
+
* updates its status accordingly.
|
|
39
|
+
*/
|
|
40
|
+
export async function syncSenderTaggingIndexes(
|
|
41
|
+
secret: DirectionalAppTaggingSecret,
|
|
42
|
+
app: AztecAddress,
|
|
43
|
+
aztecNode: AztecNode,
|
|
44
|
+
taggingDataProvider: SenderTaggingDataProvider,
|
|
45
|
+
): Promise<void> {
|
|
46
|
+
// # Explanation of how syncing works
|
|
47
|
+
//
|
|
48
|
+
// When choosing an index, we select: highest pending index + 1 (or highest finalized index + 1 if no pending).
|
|
49
|
+
// If the chosen index is more than WINDOW_LEN from the highest finalized index, we throw an error. By having this
|
|
50
|
+
// hard limit we give a guarantee to a recipient that he doesn't need to look further than WINDOW_LEN ahead of the
|
|
51
|
+
// highest finalized index.
|
|
52
|
+
//
|
|
53
|
+
// This function synchronizes the finalized and pending indexes by iteratively querying the node for a window of
|
|
54
|
+
// indexes at a time, storing all those indexes as pending, and then checking the status of each pending index to
|
|
55
|
+
// update its finalization status accordingly. If we stumble upon a window with no indexes, we stop the loop.
|
|
56
|
+
//
|
|
57
|
+
// Stopping at that point is safe because of the limit described above - there can never be an index that is more
|
|
58
|
+
// than WINDOW_LEN from the highest finalized index.
|
|
59
|
+
//
|
|
60
|
+
// # Note on performance
|
|
61
|
+
// Each window advance requires two queries (logs + tx status). For example, syncing indexes 0–500 with a window of
|
|
62
|
+
// 100 takes at least 10 round trips (5 windows × 2 queries).
|
|
63
|
+
|
|
64
|
+
const finalizedIndex = await taggingDataProvider.getLastFinalizedIndex(secret);
|
|
65
|
+
|
|
66
|
+
let start = finalizedIndex === undefined ? 0 : finalizedIndex + 1;
|
|
67
|
+
let end = start + UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN;
|
|
68
|
+
|
|
69
|
+
let previousFinalizedIndex = finalizedIndex;
|
|
70
|
+
let newFinalizedIndex = undefined;
|
|
71
|
+
|
|
72
|
+
while (true) {
|
|
73
|
+
// Load and store indexes for the current window. These indexes may already exist in the database if txs using
|
|
74
|
+
// them were previously sent from this PXE. Any duplicates are handled by the tagging data provider.
|
|
75
|
+
await loadAndStoreNewTaggingIndexes(secret, app, start, end, aztecNode, taggingDataProvider);
|
|
76
|
+
|
|
77
|
+
// Retrieve all indexes within the current window from storage and update their status accordingly.
|
|
78
|
+
const pendingTxHashes = await taggingDataProvider.getTxHashesOfPendingIndexes(secret, start, end);
|
|
79
|
+
if (pendingTxHashes.length === 0) {
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const { txHashesToFinalize, txHashesToDrop } = await getStatusChangeOfPending(pendingTxHashes, aztecNode);
|
|
84
|
+
|
|
85
|
+
await taggingDataProvider.dropPendingIndexes(txHashesToDrop);
|
|
86
|
+
await taggingDataProvider.finalizePendingIndexes(txHashesToFinalize);
|
|
87
|
+
|
|
88
|
+
// We check if the finalized index has been updated.
|
|
89
|
+
newFinalizedIndex = await taggingDataProvider.getLastFinalizedIndex(secret);
|
|
90
|
+
if (previousFinalizedIndex !== newFinalizedIndex) {
|
|
91
|
+
// A new finalized index was found, so we'll run the loop again. For example:
|
|
92
|
+
// - Previous finalized index: 10
|
|
93
|
+
// - New finalized index: 13
|
|
94
|
+
// - Window length: 10
|
|
95
|
+
//
|
|
96
|
+
// In the last iteration, we processed indexes 11-20. To avoid reprocessing the same logs,
|
|
97
|
+
// we'll only look at the new indexes 21-23:
|
|
98
|
+
//
|
|
99
|
+
// Previous window: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
|
100
|
+
// New window: [21, 22, 23]
|
|
101
|
+
|
|
102
|
+
const previousEnd = end;
|
|
103
|
+
// Add 1 because `end` is exclusive and the known finalized index is not included in the window.
|
|
104
|
+
end = newFinalizedIndex! + UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN + 1;
|
|
105
|
+
start = previousEnd;
|
|
106
|
+
previousFinalizedIndex = newFinalizedIndex;
|
|
107
|
+
} else {
|
|
108
|
+
// No new finalized index was found, so we don't need to process the next window.
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
2
|
+
import { TxHash, TxStatus } from '@aztec/stdlib/tx';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Based on receipts obtained from `aztecNode` returns which pending transactions changed their status to finalized or
|
|
6
|
+
* dropped.
|
|
7
|
+
*/
|
|
8
|
+
export async function getStatusChangeOfPending(
|
|
9
|
+
pending: TxHash[],
|
|
10
|
+
aztecNode: AztecNode,
|
|
11
|
+
): Promise<{ txHashesToFinalize: TxHash[]; txHashesToDrop: TxHash[] }> {
|
|
12
|
+
// Get receipts for all pending tx hashes and the finalized block number.
|
|
13
|
+
const [receipts, { finalized }] = await Promise.all([
|
|
14
|
+
Promise.all(pending.map(pendingTxHash => aztecNode.getTxReceipt(pendingTxHash))),
|
|
15
|
+
aztecNode.getL2Tips(),
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
const txHashesToFinalize: TxHash[] = [];
|
|
19
|
+
const txHashesToDrop: TxHash[] = [];
|
|
20
|
+
|
|
21
|
+
for (let i = 0; i < receipts.length; i++) {
|
|
22
|
+
const receipt = receipts[i];
|
|
23
|
+
const txHash = pending[i];
|
|
24
|
+
|
|
25
|
+
if (receipt.status === TxStatus.SUCCESS && receipt.blockNumber && receipt.blockNumber <= finalized.number) {
|
|
26
|
+
// Tx has been included in a block and the corresponding block is finalized --> we mark the indexes as
|
|
27
|
+
// finalized.
|
|
28
|
+
txHashesToFinalize.push(txHash);
|
|
29
|
+
} else if (
|
|
30
|
+
receipt.status === TxStatus.DROPPED ||
|
|
31
|
+
receipt.status === TxStatus.APP_LOGIC_REVERTED ||
|
|
32
|
+
receipt.status === TxStatus.TEARDOWN_REVERTED ||
|
|
33
|
+
receipt.status === TxStatus.BOTH_REVERTED
|
|
34
|
+
) {
|
|
35
|
+
// Tx was dropped or reverted --> we drop the corresponding pending indexes.
|
|
36
|
+
// TODO(#17615): Don't drop pending indexes corresponding to non-revertible phases.
|
|
37
|
+
txHashesToDrop.push(txHash);
|
|
38
|
+
} else {
|
|
39
|
+
// Tx is still pending or the corresponding block is not yet finalized --> we don't do anything.
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return { txHashesToFinalize, txHashesToDrop };
|
|
44
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
3
|
+
import type { DirectionalAppTaggingSecret, PreTag } from '@aztec/stdlib/logs';
|
|
4
|
+
import { SiloedTag, Tag } from '@aztec/stdlib/logs';
|
|
5
|
+
import { TxHash } from '@aztec/stdlib/tx';
|
|
6
|
+
|
|
7
|
+
import type { SenderTaggingDataProvider } from '../../../storage/tagging_data_provider/sender_tagging_data_provider.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Loads tagging indexes from the Aztec node and stores them in the tagging data provider.
|
|
11
|
+
* @remarks This function is one of two places by which a pending index can get to the tagging data provider. The other
|
|
12
|
+
* place is when a tx is being sent from this PXE.
|
|
13
|
+
* @param secret - The directional app tagging secret that's unique for (sender, recipient, contract) tuple.
|
|
14
|
+
* @param app - The address of the contract that the logs are tagged for. Used for siloing tags to match
|
|
15
|
+
* kernel circuit behavior.
|
|
16
|
+
* @param start - The starting index (inclusive) of the window to process.
|
|
17
|
+
* @param end - The ending index (exclusive) of the window to process.
|
|
18
|
+
* @param aztecNode - The Aztec node instance to query for logs.
|
|
19
|
+
* @param taggingDataProvider - The data provider to store pending indexes.
|
|
20
|
+
*/
|
|
21
|
+
export async function loadAndStoreNewTaggingIndexes(
|
|
22
|
+
secret: DirectionalAppTaggingSecret,
|
|
23
|
+
app: AztecAddress,
|
|
24
|
+
start: number,
|
|
25
|
+
end: number,
|
|
26
|
+
aztecNode: AztecNode,
|
|
27
|
+
taggingDataProvider: SenderTaggingDataProvider,
|
|
28
|
+
) {
|
|
29
|
+
// We compute the tags for the current window of indexes
|
|
30
|
+
const preTagsForWindow: PreTag[] = Array(end - start)
|
|
31
|
+
.fill(0)
|
|
32
|
+
.map((_, i) => ({ secret, index: start + i }));
|
|
33
|
+
const siloedTagsForWindow = await Promise.all(
|
|
34
|
+
preTagsForWindow.map(async preTag => SiloedTag.compute(await Tag.compute(preTag), app)),
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const txsForTags = await getTxsContainingTags(siloedTagsForWindow, aztecNode);
|
|
38
|
+
const highestIndexMap = getTxHighestIndexMap(txsForTags, preTagsForWindow);
|
|
39
|
+
|
|
40
|
+
// Now we iterate over the map, reconstruct the preTags and tx hash and store them in the db.
|
|
41
|
+
for (const [txHashStr, highestIndex] of highestIndexMap.entries()) {
|
|
42
|
+
const txHash = TxHash.fromString(txHashStr);
|
|
43
|
+
await taggingDataProvider.storePendingIndexes([{ secret, index: highestIndex }], txHash);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Returns txs that used the given tags. A tag might have been used in multiple txs and for this reason we return
|
|
48
|
+
// an array for each tag.
|
|
49
|
+
async function getTxsContainingTags(tags: SiloedTag[], aztecNode: AztecNode): Promise<TxHash[][]> {
|
|
50
|
+
const allLogs = await aztecNode.getPrivateLogsByTags(tags);
|
|
51
|
+
return allLogs.map(logs => logs.map(log => log.txHash));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Returns a map of txHash to the highest index for that txHash.
|
|
55
|
+
function getTxHighestIndexMap(txHashesForTags: TxHash[][], preTagsForWindow: PreTag[]): Map<string, number> {
|
|
56
|
+
if (txHashesForTags.length !== preTagsForWindow.length) {
|
|
57
|
+
throw new Error(
|
|
58
|
+
`Number of tx hashes arrays does not match number of pre-tags. ${txHashesForTags.length} !== ${preTagsForWindow.length}`,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const highestIndexMap = new Map<string, number>();
|
|
63
|
+
for (let i = 0; i < txHashesForTags.length; i++) {
|
|
64
|
+
const taggingIndex = preTagsForWindow[i].index;
|
|
65
|
+
const txHashesForTag = txHashesForTags[i];
|
|
66
|
+
for (const txHash of txHashesForTag) {
|
|
67
|
+
const key = txHash.toString();
|
|
68
|
+
highestIndexMap.set(key, Math.max(highestIndexMap.get(key) ?? 0, taggingIndex));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return highestIndexMap;
|
|
72
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DirectionalAppTaggingSecret, PreTag } from '@aztec/stdlib/logs';
|
|
2
|
+
|
|
3
|
+
// TODO(#17775): If this does not get dropped when implementing the linked issue make this return tags instead. This
|
|
4
|
+
// will move some complexity from syncTaggedLogs to here.
|
|
5
|
+
export function getPreTagsForTheWindow(
|
|
6
|
+
secretsAndWindows: { secret: DirectionalAppTaggingSecret; leftMostIndex: number; rightMostIndex: number }[],
|
|
7
|
+
): PreTag[] {
|
|
8
|
+
const secrets = [];
|
|
9
|
+
for (const secretAndWindow of secretsAndWindows) {
|
|
10
|
+
for (let i = secretAndWindow.leftMostIndex; i <= secretAndWindow.rightMostIndex; i++) {
|
|
11
|
+
secrets.push({ secret: secretAndWindow.secret, index: i });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return secrets;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Creates a map from directional app tagging secret to initial index.
|
|
19
|
+
* @param preTags - The pre-tags to get the initial indexes map from.
|
|
20
|
+
* @returns The map from directional app tagging secret to initial index.
|
|
21
|
+
*/
|
|
22
|
+
export function getInitialIndexesMap(preTags: { secret: DirectionalAppTaggingSecret; index: number | undefined }[]): {
|
|
23
|
+
[k: string]: number;
|
|
24
|
+
} {
|
|
25
|
+
const initialIndexes: { [k: string]: number } = {};
|
|
26
|
+
|
|
27
|
+
for (const preTag of preTags) {
|
|
28
|
+
initialIndexes[preTag.secret.toString()] = preTag.index ?? 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return initialIndexes;
|
|
32
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import type { SiblingPath } from '@aztec/foundation/trees';
|
|
4
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
import type { BlockParameter } from '@aztec/stdlib/block';
|
|
6
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
7
|
+
import { getNonNullifiedL1ToL2MessageWitness } from '@aztec/stdlib/messaging';
|
|
8
|
+
import { MerkleTreeId, NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
9
|
+
|
|
10
|
+
import type { AnchorBlockDataProvider } from '../storage/anchor_block_data_provider/anchor_block_data_provider.js';
|
|
11
|
+
|
|
12
|
+
export class TreeMembershipService {
|
|
13
|
+
constructor(
|
|
14
|
+
private readonly aztecNode: AztecNode,
|
|
15
|
+
private readonly anchorBlockDataProvider: AnchorBlockDataProvider,
|
|
16
|
+
) {}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Gets the index of a nullifier in the nullifier tree.
|
|
20
|
+
* @returns - The index of the nullifier. Undefined if it does not exist in the tree.
|
|
21
|
+
*/
|
|
22
|
+
public getNullifierIndex(nullifier: Fr) {
|
|
23
|
+
return this.#findLeafIndex('latest', MerkleTreeId.NULLIFIER_TREE, nullifier);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Fetches the index and sibling path of a leaf at a given block from a given tree.
|
|
28
|
+
* @param blockNumber - The block number at which to get the membership witness.
|
|
29
|
+
* @param treeId - Id of the tree to get the sibling path from.
|
|
30
|
+
* @param leafValue - The leaf value
|
|
31
|
+
* @returns The index and sibling path concatenated [index, sibling_path]
|
|
32
|
+
*/
|
|
33
|
+
public async getMembershipWitness(blockNumber: BlockParameter, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]> {
|
|
34
|
+
const witness = await this.#tryGetMembershipWitness(blockNumber, treeId, leafValue);
|
|
35
|
+
if (!witness) {
|
|
36
|
+
throw new Error(`Leaf value ${leafValue} not found in tree ${MerkleTreeId[treeId]} at block ${blockNumber}`);
|
|
37
|
+
}
|
|
38
|
+
return witness;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns a low nullifier membership witness for a given nullifier at a given block.
|
|
43
|
+
* @param blockNumber - The block number at which to get the index.
|
|
44
|
+
* @param nullifier - Nullifier we try to find the low nullifier witness for.
|
|
45
|
+
* @returns The low nullifier membership witness (if found).
|
|
46
|
+
* @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
|
|
47
|
+
* list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
|
|
48
|
+
* we are trying to prove non-inclusion for.
|
|
49
|
+
*/
|
|
50
|
+
public async getLowNullifierMembershipWitness(
|
|
51
|
+
blockNumber: BlockParameter,
|
|
52
|
+
nullifier: Fr,
|
|
53
|
+
): Promise<NullifierMembershipWitness | undefined> {
|
|
54
|
+
const anchorBlockNumber = (await this.anchorBlockDataProvider.getBlockHeader()).getBlockNumber();
|
|
55
|
+
if (blockNumber !== 'latest' && blockNumber > anchorBlockNumber) {
|
|
56
|
+
throw new Error(`Block number ${blockNumber} is higher than current block ${anchorBlockNumber}`);
|
|
57
|
+
}
|
|
58
|
+
return this.aztecNode.getLowNullifierMembershipWitness(blockNumber, nullifier);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Returns a witness for a given slot of the public data tree at a given block.
|
|
63
|
+
* @param blockNumber - The block number at which to get the witness.
|
|
64
|
+
* @param leafSlot - The slot of the public data in the public data tree.
|
|
65
|
+
*/
|
|
66
|
+
public async getPublicDataWitness(blockNumber: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined> {
|
|
67
|
+
const anchorBlockNumber = (await this.anchorBlockDataProvider.getBlockHeader()).getBlockNumber();
|
|
68
|
+
if (blockNumber !== 'latest' && blockNumber > anchorBlockNumber) {
|
|
69
|
+
throw new Error(`Block number ${blockNumber} is higher than current block ${anchorBlockNumber}`);
|
|
70
|
+
}
|
|
71
|
+
return await this.aztecNode.getPublicDataWitness(blockNumber, leafSlot);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Looks for the L1 to L2 membership witness of a message at the Aztec node, given its hash.
|
|
76
|
+
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
77
|
+
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages.
|
|
78
|
+
* The message nullifier is computed locally, so the secret is not sent to the node.
|
|
79
|
+
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
80
|
+
*/
|
|
81
|
+
public getL1ToL2MembershipWitness(
|
|
82
|
+
contractAddress: AztecAddress,
|
|
83
|
+
messageHash: Fr,
|
|
84
|
+
secret: Fr,
|
|
85
|
+
): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>]> {
|
|
86
|
+
return getNonNullifiedL1ToL2MessageWitness(this.aztecNode, contractAddress, messageHash, secret);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async #tryGetMembershipWitness(
|
|
90
|
+
blockNumber: BlockParameter,
|
|
91
|
+
treeId: MerkleTreeId,
|
|
92
|
+
value: Fr,
|
|
93
|
+
): Promise<Fr[] | undefined> {
|
|
94
|
+
switch (treeId) {
|
|
95
|
+
case MerkleTreeId.NULLIFIER_TREE:
|
|
96
|
+
return (await this.aztecNode.getNullifierMembershipWitness(blockNumber, value))?.withoutPreimage().toFields();
|
|
97
|
+
case MerkleTreeId.NOTE_HASH_TREE:
|
|
98
|
+
return (await this.aztecNode.getNoteHashMembershipWitness(blockNumber, value))?.toFields();
|
|
99
|
+
case MerkleTreeId.PUBLIC_DATA_TREE:
|
|
100
|
+
return (await this.aztecNode.getPublicDataWitness(blockNumber, value))?.withoutPreimage().toFields();
|
|
101
|
+
case MerkleTreeId.ARCHIVE:
|
|
102
|
+
return (await this.aztecNode.getArchiveMembershipWitness(blockNumber, value))?.toFields();
|
|
103
|
+
default:
|
|
104
|
+
throw new Error('Not implemented');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async #findLeafIndex(blockNumber: BlockParameter, treeId: MerkleTreeId, leafValue: Fr): Promise<bigint | undefined> {
|
|
109
|
+
const [leafIndex] = await this.aztecNode.findLeavesIndexes(blockNumber, treeId, [leafValue]);
|
|
110
|
+
return leafIndex?.data;
|
|
111
|
+
}
|
|
112
|
+
}
|
package/dest/bin/index.d.ts
DELETED
package/dest/bin/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":""}
|
package/dest/bin/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --no-warnings
|
|
2
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
-
import { createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
|
|
4
|
-
import { getPXEServiceConfig } from '../config/index.js';
|
|
5
|
-
import { createPXEService } from '../entrypoints/server/utils.js';
|
|
6
|
-
import { startPXEHttpServer } from '../pxe_http/index.js';
|
|
7
|
-
const { PXE_PORT = 8080, AZTEC_NODE_URL = 'http://localhost:8079' } = process.env;
|
|
8
|
-
const logger = createLogger('pxe:service');
|
|
9
|
-
/**
|
|
10
|
-
* Create and start a new PXE HTTP Server
|
|
11
|
-
*/ async function main() {
|
|
12
|
-
logger.info(`Setting up PXE...`);
|
|
13
|
-
const pxeConfig = getPXEServiceConfig();
|
|
14
|
-
const nodeRpcClient = createAztecNodeClient(AZTEC_NODE_URL, {});
|
|
15
|
-
const pxeService = await createPXEService(nodeRpcClient, pxeConfig);
|
|
16
|
-
const shutdown = ()=>{
|
|
17
|
-
logger.info('Shutting down...');
|
|
18
|
-
process.exit(0);
|
|
19
|
-
};
|
|
20
|
-
process.once('SIGINT', shutdown);
|
|
21
|
-
process.once('SIGTERM', shutdown);
|
|
22
|
-
startPXEHttpServer(pxeService, PXE_PORT);
|
|
23
|
-
logger.info(`PXE listening on port ${PXE_PORT}`);
|
|
24
|
-
}
|
|
25
|
-
main().catch((err)=>{
|
|
26
|
-
logger.error(err);
|
|
27
|
-
process.exit(1);
|
|
28
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
3
|
-
export type PXECreationOptions = {
|
|
4
|
-
loggers: {
|
|
5
|
-
store?: Logger;
|
|
6
|
-
pxe?: Logger;
|
|
7
|
-
prover?: Logger;
|
|
8
|
-
};
|
|
9
|
-
prover?: PrivateKernelProver;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=pxe_creation_options.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/client/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import type { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields';
|
|
3
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
4
|
-
import type { KeyStore } from '@aztec/key-store';
|
|
5
|
-
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
6
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
-
import type { L2BlockNumber } from '@aztec/stdlib/block';
|
|
8
|
-
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
9
|
-
import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
10
|
-
import type { NullifierMembershipWitness } from '@aztec/stdlib/trees';
|
|
11
|
-
import type { VerificationKeyAsFields } from '@aztec/stdlib/vks';
|
|
12
|
-
import type { ContractDataProvider } from '../storage/contract_data_provider/contract_data_provider.js';
|
|
13
|
-
import type { ProvingDataOracle } from './../kernel_prover/proving_data_oracle.js';
|
|
14
|
-
/**
|
|
15
|
-
* A data oracle that provides information needed for simulating a transaction.
|
|
16
|
-
*/
|
|
17
|
-
export declare class KernelOracle implements ProvingDataOracle {
|
|
18
|
-
private contractDataProvider;
|
|
19
|
-
private keyStore;
|
|
20
|
-
private node;
|
|
21
|
-
private blockNumber;
|
|
22
|
-
private log;
|
|
23
|
-
constructor(contractDataProvider: ContractDataProvider, keyStore: KeyStore, node: AztecNode, blockNumber?: L2BlockNumber, log?: import("@aztec/foundation/log").Logger);
|
|
24
|
-
getContractAddressPreimage(address: AztecAddress): Promise<{
|
|
25
|
-
version: 1;
|
|
26
|
-
salt: Fr;
|
|
27
|
-
deployer: AztecAddress;
|
|
28
|
-
currentContractClassId: Fr;
|
|
29
|
-
originalContractClassId: Fr;
|
|
30
|
-
initializationHash: Fr;
|
|
31
|
-
publicKeys: import("@aztec/aztec.js").PublicKeys;
|
|
32
|
-
address: AztecAddress;
|
|
33
|
-
saltedInitializationHash: Fr;
|
|
34
|
-
}>;
|
|
35
|
-
getContractClassIdPreimage(contractClassId: Fr): Promise<import("@aztec/stdlib/contract").ContractClassIdPreimage>;
|
|
36
|
-
getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<5>>;
|
|
37
|
-
getVkMembershipWitness(vk: VerificationKeyAsFields): Promise<MembershipWitness<6>>;
|
|
38
|
-
getNoteHashMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>>;
|
|
39
|
-
getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
40
|
-
getNoteHashTreeRoot(): Promise<Fr>;
|
|
41
|
-
getMasterSecretKey(masterPublicKey: Point): Promise<GrumpkinScalar>;
|
|
42
|
-
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
43
|
-
getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kernel_oracle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAA2C,MAAM,kBAAkB,CAAC;AACvG,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACxG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAInF;;GAEG;AACH,qBAAa,YAAa,YAAW,iBAAiB;IAElD,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,GAAG;gBAJH,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,SAAS,EACf,WAAW,GAAE,aAAwB,EACrC,GAAG,yCAAoC;IAGpC,0BAA0B,CAAC,OAAO,EAAE,YAAY;;;;;;;;;;;IAQhD,0BAA0B,CAAC,eAAe,EAAE,EAAE;IAK9C,4BAA4B,CAAC,eAAe,EAAE,EAAE,EAAE,QAAQ,EAAE,gBAAgB;IAIlF,sBAAsB,CAAC,EAAE,EAAE,uBAAuB;IAKnD,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAS/G,6BAA6B,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC;IAIvF,mBAAmB,IAAI,OAAO,CAAC,EAAE,CAAC;IAQjC,kBAAkB,CAAC,eAAe,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC;IAInE,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAI1F,sBAAsB,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA6BjG"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type PrivateKernelCircuitPublicInputs, PrivateKernelResetCircuitPrivateInputs, type PrivateKernelSimulateOutput } from '@aztec/stdlib/kernel';
|
|
2
|
-
import { type PrivateCallExecutionResult } from '@aztec/stdlib/tx';
|
|
3
|
-
import type { ProvingDataOracle } from '../proving_data_oracle.js';
|
|
4
|
-
export declare class PrivateKernelResetPrivateInputsBuilder {
|
|
5
|
-
private previousKernelOutput;
|
|
6
|
-
private executionStack;
|
|
7
|
-
private noteHashNullifierCounterMap;
|
|
8
|
-
private validationRequestsSplitCounter;
|
|
9
|
-
private previousKernel;
|
|
10
|
-
private nextIteration?;
|
|
11
|
-
private noteHashResetStates;
|
|
12
|
-
private nullifierResetStates;
|
|
13
|
-
private numTransientData?;
|
|
14
|
-
private transientDataIndexHints;
|
|
15
|
-
private requestedDimensions;
|
|
16
|
-
constructor(previousKernelOutput: PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>, executionStack: PrivateCallExecutionResult[], noteHashNullifierCounterMap: Map<number, number>, validationRequestsSplitCounter: number);
|
|
17
|
-
needsReset(): boolean;
|
|
18
|
-
build(oracle: ProvingDataOracle, noteHashLeafIndexMap: Map<bigint, bigint>): Promise<PrivateKernelResetCircuitPrivateInputs>;
|
|
19
|
-
private reduceReadRequestStates;
|
|
20
|
-
private needsResetNoteHashReadRequests;
|
|
21
|
-
private needsResetNullifierReadRequests;
|
|
22
|
-
private needsResetNullifierKeys;
|
|
23
|
-
private needsResetTransientData;
|
|
24
|
-
private needsSiloNoteHashes;
|
|
25
|
-
private needsSiloNullifiers;
|
|
26
|
-
private needsSiloPrivateLogs;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=build_private_kernel_reset_private_inputs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/kernel_prover/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"AAeA,OAAO,EAGL,KAAK,gCAAgC,EAErC,sCAAsC,EAGtC,KAAK,2BAA2B,EAkBjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,0BAA0B,EAAiB,MAAM,kBAAkB,CAAC;AAElF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAiDnE,qBAAa,sCAAsC;IAY/C,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,2BAA2B;IACnC,OAAO,CAAC,8BAA8B;IAdxC,OAAO,CAAC,cAAc,CAAmC;IAEzD,OAAO,CAAC,aAAa,CAAC,CAA6B;IAEnD,OAAO,CAAC,mBAAmB,CAAoE;IAC/F,OAAO,CAAC,oBAAoB,CAAoE;IAChG,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,OAAO,CAAC,uBAAuB,CAA8D;IAC7F,OAAO,CAAC,mBAAmB,CAA+B;gBAGhD,oBAAoB,EAAE,2BAA2B,CAAC,gCAAgC,CAAC,EACnF,cAAc,EAAE,0BAA0B,EAAE,EAC5C,2BAA2B,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChD,8BAA8B,EAAE,MAAM;IAahD,UAAU,IAAI,OAAO;IAwBf,KAAK,CAAC,MAAM,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAgEhF,OAAO,CAAC,uBAAuB;IA2B/B,OAAO,CAAC,8BAA8B;IAoDtC,OAAO,CAAC,+BAA+B;IAoDvC,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,uBAAuB;IAmE/B,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,oBAAoB;CAmB7B"}
|