@aztec/pxe 0.0.1-commit.24de95ac → 0.0.1-commit.2606882
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/bin/check_oracle_version.d.ts +1 -1
- package/dest/bin/check_oracle_version.js +54 -20
- package/dest/bin/index.d.ts +2 -0
- package/dest/bin/index.d.ts.map +1 -0
- package/dest/bin/index.js +1 -0
- package/dest/bin/oracle_version_helpers.d.ts +26 -0
- package/dest/bin/oracle_version_helpers.d.ts.map +1 -0
- package/dest/bin/oracle_version_helpers.js +93 -0
- package/dest/block_synchronizer/block_stream_source.d.ts +10 -0
- package/dest/block_synchronizer/block_stream_source.d.ts.map +1 -0
- package/dest/block_synchronizer/block_stream_source.js +62 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts +49 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
- package/dest/block_synchronizer/block_synchronizer.js +173 -0
- 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 +13 -13
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +24 -15
- package/dest/config/package_info.d.ts +1 -1
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/benchmarked_node.d.ts +9 -0
- package/dest/contract_function_simulator/benchmarked_node.d.ts.map +1 -0
- package/dest/contract_function_simulator/benchmarked_node.js +77 -0
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +89 -26
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +267 -88
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts +28 -0
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts.map +1 -0
- package/dest/contract_function_simulator/ephemeral_array_service.js +78 -0
- package/dest/contract_function_simulator/execution_note_cache.d.ts +26 -15
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +59 -34
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +7 -11
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +19 -15
- package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
- package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.d.ts +15 -3
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +12 -1
- package/dest/contract_function_simulator/noir-structs/bounded_vec.d.ts +48 -0
- package/dest/contract_function_simulator/noir-structs/bounded_vec.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/bounded_vec.js +45 -0
- package/dest/contract_function_simulator/noir-structs/ephemeral_array.d.ts +37 -0
- package/dest/contract_function_simulator/noir-structs/ephemeral_array.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/ephemeral_array.js +59 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +6 -6
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +12 -10
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +16 -5
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +39 -7
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +4 -4
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +3 -5
- package/dest/contract_function_simulator/noir-structs/note_data.d.ts +27 -0
- package/dest/contract_function_simulator/noir-structs/note_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/note_data.js +3 -0
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +7 -7
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +15 -10
- package/dest/contract_function_simulator/noir-structs/option.d.ts +61 -0
- package/dest/contract_function_simulator/noir-structs/option.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/option.js +62 -0
- package/dest/contract_function_simulator/noir-structs/provided_secret.d.ts +11 -0
- package/dest/contract_function_simulator/noir-structs/provided_secret.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/provided_secret.js +24 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +4 -10
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/utility_context.js +7 -18
- package/dest/contract_function_simulator/oracle/index.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +16 -88
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.js +2 -2
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +14 -8
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +17 -12
- package/dest/contract_function_simulator/oracle/oracle.d.ts +75 -43
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +475 -251
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts +127 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.js +786 -0
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +139 -0
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.js +560 -0
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +2 -27
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +6 -40
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +78 -102
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +177 -137
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +189 -60
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +507 -118
- package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +21 -4
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +4 -4
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.js +39 -50
- package/dest/contract_logging.d.ts +27 -0
- package/dest/contract_logging.d.ts.map +1 -0
- package/dest/contract_logging.js +38 -0
- package/dest/contract_sync/contract_sync_service.d.ts +42 -0
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
- package/dest/contract_sync/contract_sync_service.js +135 -0
- package/dest/contract_sync/helpers.d.ts +27 -0
- package/dest/contract_sync/helpers.d.ts.map +1 -0
- package/dest/contract_sync/helpers.js +53 -0
- package/dest/debug/pxe_debug_utils.d.ts +40 -0
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
- package/dest/debug/pxe_debug_utils.js +42 -0
- package/dest/entrypoints/client/bundle/index.d.ts +3 -2
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +2 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +2 -2
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +43 -12
- package/dest/entrypoints/client/lazy/index.d.ts +3 -2
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +2 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +3 -3
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +44 -13
- package/dest/entrypoints/pxe_creation_options.d.ts +15 -3
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/pxe_creation_options.js +3 -1
- package/dest/entrypoints/server/index.d.ts +7 -3
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +6 -2
- package/dest/entrypoints/server/utils.d.ts +4 -3
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +50 -30
- package/dest/error_enriching.d.ts +4 -4
- package/dest/error_enriching.d.ts.map +1 -1
- package/dest/error_enriching.js +6 -6
- package/dest/events/event_service.d.ts +24 -0
- package/dest/events/event_service.d.ts.map +1 -0
- package/dest/events/event_service.js +77 -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 +10 -0
- package/dest/events/private_event_filter_validator.d.ts.map +1 -0
- package/dest/events/private_event_filter_validator.js +53 -0
- package/dest/hooks/authorize_utility_call.d.ts +41 -0
- package/dest/hooks/authorize_utility_call.d.ts.map +1 -0
- package/dest/hooks/authorize_utility_call.js +4 -0
- package/dest/hooks/execution_hooks.d.ts +42 -0
- package/dest/hooks/execution_hooks.d.ts.map +1 -0
- package/dest/hooks/execution_hooks.js +9 -0
- package/dest/hooks/index.d.ts +4 -0
- package/dest/hooks/index.d.ts.map +1 -0
- package/dest/hooks/index.js +1 -0
- package/dest/job_coordinator/job_coordinator.d.ts +75 -0
- package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
- package/dest/job_coordinator/job_coordinator.js +94 -0
- package/dest/logs/log_service.d.ts +29 -0
- package/dest/logs/log_service.d.ts.map +1 -0
- package/dest/logs/log_service.js +172 -0
- package/dest/messages/message_context_service.d.ts +17 -0
- package/dest/messages/message_context_service.d.ts.map +1 -0
- package/dest/messages/message_context_service.js +55 -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 +70 -0
- package/dest/notes/note_service.d.ts.map +1 -0
- package/dest/notes/note_service.js +172 -0
- package/dest/notes_filter.d.ts +24 -0
- package/dest/notes_filter.d.ts.map +1 -0
- package/dest/notes_filter.js +4 -0
- package/dest/oracle_version.d.ts +4 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +20 -9
- package/dest/private_kernel/batch_planner.d.ts +47 -0
- package/dest/private_kernel/batch_planner.d.ts.map +1 -0
- package/dest/private_kernel/batch_planner.js +104 -0
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts +4 -0
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
- package/dest/private_kernel/hints/{compute_tx_include_by_timestamp.js → compute_tx_expiration_timestamp.js} +12 -12
- package/dest/private_kernel/hints/index.d.ts +3 -3
- package/dest/private_kernel/hints/index.d.ts.map +1 -1
- package/dest/private_kernel/hints/index.js +2 -2
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +29 -0
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -0
- package/dest/private_kernel/hints/{build_private_kernel_reset_private_inputs.js → private_kernel_reset_private_inputs_builder.js} +145 -78
- package/dest/private_kernel/hints/test_utils.d.ts +122 -0
- package/dest/private_kernel/hints/test_utils.d.ts.map +1 -0
- package/dest/private_kernel/hints/test_utils.js +202 -0
- package/dest/private_kernel/index.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +7 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +177 -76
- package/dest/private_kernel/private_kernel_oracle.d.ts +30 -29
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +96 -2
- package/dest/pxe.d.ts +170 -103
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +356 -306
- package/dest/storage/address_store/address_store.d.ts +11 -0
- package/dest/storage/address_store/address_store.d.ts.map +1 -0
- package/dest/storage/{address_data_provider/address_data_provider.js → address_store/address_store.js} +13 -12
- package/dest/storage/address_store/index.d.ts +2 -0
- package/dest/storage/address_store/index.d.ts.map +1 -0
- package/dest/storage/address_store/index.js +1 -0
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts +17 -0
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -0
- package/dest/storage/anchor_block_store/anchor_block_store.js +26 -0
- package/dest/storage/anchor_block_store/index.d.ts +2 -0
- package/dest/storage/anchor_block_store/index.d.ts.map +1 -0
- package/dest/storage/anchor_block_store/index.js +1 -0
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.d.ts +42 -0
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.js +93 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts +15 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.js +591 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.d.ts +19 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.js +63 -0
- package/dest/storage/capsule_store/capsule_service.d.ts +21 -0
- package/dest/storage/capsule_store/capsule_service.d.ts.map +1 -0
- package/dest/storage/capsule_store/capsule_service.js +50 -0
- package/dest/storage/capsule_store/capsule_store.d.ts +72 -0
- package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -0
- package/dest/storage/capsule_store/capsule_store.js +261 -0
- package/dest/storage/capsule_store/index.d.ts +3 -0
- package/dest/storage/capsule_store/index.d.ts.map +1 -0
- package/dest/storage/capsule_store/index.js +2 -0
- package/dest/storage/contract_store/contract_store.d.ts +93 -0
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
- package/dest/storage/contract_store/contract_store.js +292 -0
- package/dest/storage/contract_store/index.d.ts +2 -0
- package/dest/storage/contract_store/index.d.ts.map +1 -0
- package/dest/storage/contract_store/index.js +1 -0
- package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.d.ts +1 -1
- package/dest/storage/contract_store/private_functions_tree.d.ts.map +1 -0
- package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.js +1 -1
- package/dest/storage/index.d.ts +8 -8
- package/dest/storage/index.d.ts.map +1 -1
- package/dest/storage/index.js +7 -7
- package/dest/storage/metadata.d.ts +2 -2
- package/dest/storage/metadata.js +1 -1
- package/dest/storage/note_store/index.d.ts +3 -0
- package/dest/storage/note_store/index.d.ts.map +1 -0
- package/dest/storage/note_store/index.js +2 -0
- package/dest/storage/note_store/note_store.d.ts +83 -0
- package/dest/storage/note_store/note_store.d.ts.map +1 -0
- package/dest/storage/note_store/note_store.js +343 -0
- package/dest/storage/note_store/stored_note.d.ts +16 -0
- package/dest/storage/note_store/stored_note.d.ts.map +1 -0
- package/dest/storage/note_store/stored_note.js +43 -0
- package/dest/storage/open_pxe_stores.d.ts +33 -0
- package/dest/storage/open_pxe_stores.d.ts.map +1 -0
- package/dest/storage/open_pxe_stores.js +27 -0
- package/dest/storage/private_event_store/private_event_store.d.ts +91 -0
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -0
- package/dest/storage/private_event_store/private_event_store.js +276 -0
- package/dest/storage/private_event_store/stored_private_event.d.ts +23 -0
- package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -0
- package/dest/storage/private_event_store/stored_private_event.js +56 -0
- package/dest/storage/tagging_store/index.d.ts +4 -0
- package/dest/storage/tagging_store/index.d.ts.map +1 -0
- package/dest/storage/tagging_store/index.js +3 -0
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts +28 -0
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/recipient_tagging_store.js +111 -0
- package/dest/storage/tagging_store/sender_address_book_store.d.ts +14 -0
- package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/sender_address_book_store.js +36 -0
- package/dest/storage/tagging_store/sender_tagging_store.d.ts +78 -0
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/sender_tagging_store.js +374 -0
- package/dest/tagging/constants.d.ts +2 -2
- package/dest/tagging/constants.d.ts.map +1 -1
- package/dest/tagging/constants.js +10 -2
- package/dest/tagging/get_all_logs_by_tags.d.ts +48 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
- package/dest/tagging/get_all_logs_by_tags.js +59 -0
- package/dest/tagging/index.d.ts +18 -7
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +16 -5
- package/dest/tagging/persist_sender_tagging_index_ranges.d.ts +29 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.d.ts.map +1 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.js +42 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts +56 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.js +163 -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/reconcile_tagging_index_ranges.d.ts +36 -0
- package/dest/tagging/reconcile_tagging_index_ranges.d.ts.map +1 -0
- package/dest/tagging/reconcile_tagging_index_ranges.js +74 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +16 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +92 -0
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +17 -0
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +60 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +19 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +72 -0
- package/package.json +33 -20
- package/src/bin/check_oracle_version.ts +63 -25
- package/src/bin/index.ts +1 -0
- package/src/bin/oracle_version_helpers.ts +121 -0
- package/src/block_synchronizer/block_stream_source.ts +81 -0
- package/src/block_synchronizer/block_synchronizer.ts +200 -0
- package/src/block_synchronizer/index.ts +1 -0
- package/src/config/index.ts +31 -26
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/benchmarked_node.ts +103 -0
- package/src/contract_function_simulator/contract_function_simulator.ts +462 -122
- package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
- package/src/contract_function_simulator/execution_note_cache.ts +59 -29
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +19 -18
- package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
- package/src/contract_function_simulator/index.ts +52 -2
- package/src/contract_function_simulator/noir-structs/bounded_vec.ts +55 -0
- package/src/contract_function_simulator/noir-structs/ephemeral_array.ts +66 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +15 -10
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +40 -6
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +4 -7
- package/src/contract_function_simulator/noir-structs/note_data.ts +27 -0
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +17 -10
- package/src/contract_function_simulator/noir-structs/option.ts +69 -0
- package/src/contract_function_simulator/noir-structs/provided_secret.ts +27 -0
- package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
- package/src/contract_function_simulator/oracle/interfaces.ts +12 -151
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +31 -15
- package/src/contract_function_simulator/oracle/oracle.ts +570 -434
- package/src/contract_function_simulator/oracle/oracle_registry.ts +585 -0
- package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +553 -0
- package/src/contract_function_simulator/oracle/private_execution.ts +6 -72
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +230 -188
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +751 -142
- package/src/contract_function_simulator/pick_notes.ts +23 -4
- package/src/contract_function_simulator/proxied_contract_data_source.ts +47 -53
- package/src/contract_logging.ts +52 -0
- package/src/contract_sync/contract_sync_service.ts +189 -0
- package/src/contract_sync/helpers.ts +86 -0
- package/src/debug/pxe_debug_utils.ts +85 -0
- package/src/entrypoints/client/bundle/index.ts +2 -1
- package/src/entrypoints/client/bundle/utils.ts +33 -21
- package/src/entrypoints/client/lazy/index.ts +2 -1
- package/src/entrypoints/client/lazy/utils.ts +35 -23
- package/src/entrypoints/pxe_creation_options.ts +20 -2
- package/src/entrypoints/server/index.ts +6 -2
- package/src/entrypoints/server/utils.ts +47 -60
- package/src/error_enriching.ts +7 -15
- package/src/events/event_service.ts +119 -0
- package/src/events/index.ts +1 -0
- package/src/events/private_event_filter_validator.ts +66 -0
- package/src/hooks/authorize_utility_call.ts +44 -0
- package/src/hooks/execution_hooks.ts +48 -0
- package/src/hooks/index.ts +7 -0
- package/src/job_coordinator/job_coordinator.ts +150 -0
- package/src/logs/log_service.ts +237 -0
- package/src/messages/message_context_service.ts +62 -0
- package/src/notes/index.ts +1 -0
- package/src/notes/note_service.ts +230 -0
- package/src/notes_filter.ts +24 -0
- package/src/oracle_version.ts +20 -9
- package/src/private_kernel/batch_planner.ts +169 -0
- package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +13 -13
- package/src/private_kernel/hints/index.ts +2 -2
- package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +200 -146
- package/src/private_kernel/hints/test_utils.ts +318 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +272 -110
- package/src/private_kernel/private_kernel_oracle.ts +130 -39
- package/src/pxe.ts +606 -414
- package/src/storage/{address_data_provider/address_data_provider.ts → address_store/address_store.ts} +16 -16
- package/src/storage/address_store/index.ts +1 -0
- package/src/storage/{sync_data_provider/sync_data_provider.ts → anchor_block_store/anchor_block_store.ts} +11 -12
- package/src/storage/anchor_block_store/index.ts +1 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/AddressStore.json +22 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/AnchorBlockStore.json +3 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/CapsuleStore.json +16 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/ContractStore.json +28 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/KeyStore.json +52 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/L2TipsKVStore.json +46 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/NoteStore.json +36 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/PrivateEventStore.json +44 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/RecipientTaggingStore.json +18 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderAddressBookStore.json +16 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderTaggingStore.json +22 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/opened_stores.json +97 -0
- package/src/storage/backwards_compatibility_tests/kv_store_snapshot.ts +122 -0
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +712 -0
- package/src/storage/backwards_compatibility_tests/store_spy.ts +73 -0
- package/src/storage/capsule_store/capsule_service.ts +90 -0
- package/src/storage/capsule_store/capsule_store.ts +333 -0
- package/src/storage/capsule_store/index.ts +2 -0
- package/src/storage/contract_store/contract_store.ts +408 -0
- package/src/storage/contract_store/index.ts +1 -0
- package/src/storage/{contract_data_provider → contract_store}/private_functions_tree.ts +1 -1
- package/src/storage/index.ts +7 -7
- package/src/storage/metadata.ts +1 -1
- package/src/storage/note_store/index.ts +2 -0
- package/src/storage/note_store/note_store.ts +415 -0
- package/src/storage/note_store/stored_note.ts +48 -0
- package/src/storage/open_pxe_stores.ts +49 -0
- package/src/storage/private_event_store/private_event_store.ts +388 -0
- package/src/storage/private_event_store/stored_private_event.ts +73 -0
- package/src/storage/tagging_store/index.ts +3 -0
- package/src/storage/tagging_store/recipient_tagging_store.ts +139 -0
- package/src/storage/tagging_store/sender_address_book_store.ts +48 -0
- package/src/storage/tagging_store/sender_tagging_store.ts +476 -0
- package/src/tagging/constants.ts +10 -2
- package/src/tagging/get_all_logs_by_tags.ts +120 -0
- package/src/tagging/index.ts +20 -6
- package/src/tagging/persist_sender_tagging_index_ranges.ts +57 -0
- package/src/tagging/recipient_sync/sync_tagged_private_logs.ts +240 -0
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
- package/src/tagging/reconcile_tagging_index_ranges.ts +102 -0
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +134 -0
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +66 -0
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +84 -0
- package/dest/contract_function_simulator/execution_data_provider.d.ts +0 -274
- package/dest/contract_function_simulator/execution_data_provider.d.ts.map +0 -1
- package/dest/contract_function_simulator/execution_data_provider.js +0 -14
- package/dest/contract_function_simulator/proxied_node.d.ts +0 -9
- package/dest/contract_function_simulator/proxied_node.d.ts.map +0 -1
- package/dest/contract_function_simulator/proxied_node.js +0 -27
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +0 -122
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +0 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.js +0 -701
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +0 -4
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts +0 -45
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +0 -1
- package/dest/private_kernel/private_kernel_oracle_impl.js +0 -86
- package/dest/storage/address_data_provider/address_data_provider.d.ts +0 -11
- package/dest/storage/address_data_provider/address_data_provider.d.ts.map +0 -1
- package/dest/storage/address_data_provider/index.d.ts +0 -2
- package/dest/storage/address_data_provider/index.d.ts.map +0 -1
- package/dest/storage/address_data_provider/index.js +0 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +0 -25
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +0 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.js +0 -118
- package/dest/storage/capsule_data_provider/index.d.ts +0 -2
- package/dest/storage/capsule_data_provider/index.d.ts.map +0 -1
- package/dest/storage/capsule_data_provider/index.js +0 -1
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts +0 -74
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +0 -1
- package/dest/storage/contract_data_provider/contract_data_provider.js +0 -205
- package/dest/storage/contract_data_provider/index.d.ts +0 -2
- package/dest/storage/contract_data_provider/index.d.ts.map +0 -1
- package/dest/storage/contract_data_provider/index.js +0 -1
- package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +0 -1
- package/dest/storage/note_data_provider/index.d.ts +0 -3
- package/dest/storage/note_data_provider/index.d.ts.map +0 -1
- package/dest/storage/note_data_provider/index.js +0 -2
- package/dest/storage/note_data_provider/note_dao.d.ts +0 -100
- package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
- package/dest/storage/note_data_provider/note_dao.js +0 -102
- package/dest/storage/note_data_provider/note_data_provider.d.ts +0 -83
- package/dest/storage/note_data_provider/note_data_provider.d.ts.map +0 -1
- package/dest/storage/note_data_provider/note_data_provider.js +0 -308
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -43
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +0 -1
- package/dest/storage/private_event_data_provider/private_event_data_provider.js +0 -104
- 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 -10
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
- package/dest/storage/sync_data_provider/sync_data_provider.js +0 -26
- package/dest/storage/tagging_data_provider/index.d.ts +0 -2
- package/dest/storage/tagging_data_provider/index.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/index.js +0 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +0 -40
- 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 -89
- 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 -35
- package/dest/synchronizer/synchronizer.d.ts.map +0 -1
- package/dest/synchronizer/synchronizer.js +0 -101
- package/dest/tagging/siloed_tag.d.ts +0 -14
- package/dest/tagging/siloed_tag.d.ts.map +0 -1
- package/dest/tagging/siloed_tag.js +0 -20
- package/dest/tagging/tag.d.ts +0 -12
- package/dest/tagging/tag.d.ts.map +0 -1
- package/dest/tagging/tag.js +0 -17
- package/dest/tagging/utils.d.ts +0 -18
- package/dest/tagging/utils.d.ts.map +0 -1
- package/dest/tagging/utils.js +0 -24
- package/src/contract_function_simulator/execution_data_provider.ts +0 -343
- package/src/contract_function_simulator/proxied_node.ts +0 -33
- package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1019
- package/src/private_kernel/private_kernel_oracle_impl.ts +0 -132
- package/src/storage/address_data_provider/index.ts +0 -1
- package/src/storage/capsule_data_provider/capsule_data_provider.ts +0 -147
- package/src/storage/capsule_data_provider/index.ts +0 -1
- package/src/storage/contract_data_provider/contract_data_provider.ts +0 -294
- package/src/storage/contract_data_provider/index.ts +0 -1
- package/src/storage/note_data_provider/index.ts +0 -2
- package/src/storage/note_data_provider/note_dao.ts +0 -154
- package/src/storage/note_data_provider/note_data_provider.ts +0 -393
- package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -148
- package/src/storage/sync_data_provider/index.ts +0 -1
- package/src/storage/tagging_data_provider/index.ts +0 -1
- package/src/storage/tagging_data_provider/tagging_data_provider.ts +0 -120
- package/src/synchronizer/index.ts +0 -1
- package/src/synchronizer/synchronizer.ts +0 -120
- package/src/tagging/siloed_tag.ts +0 -22
- package/src/tagging/tag.ts +0 -16
- package/src/tagging/utils.ts +0 -31
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
3
|
+
import type { BlockHeader, IndexedTxEffect } from '@aztec/stdlib/tx';
|
|
4
|
+
import type { EventValidationRequest } from '../contract_function_simulator/noir-structs/event_validation_request.js';
|
|
5
|
+
import { PrivateEventStore } from '../storage/private_event_store/private_event_store.js';
|
|
6
|
+
export declare class EventService {
|
|
7
|
+
#private;
|
|
8
|
+
private readonly anchorBlockHeader;
|
|
9
|
+
private readonly aztecNode;
|
|
10
|
+
private readonly privateEventStore;
|
|
11
|
+
private readonly jobId;
|
|
12
|
+
private readonly log;
|
|
13
|
+
constructor(anchorBlockHeader: BlockHeader, aztecNode: AztecNode, privateEventStore: PrivateEventStore, jobId: string, log?: import("@aztec/foundation/log").Logger);
|
|
14
|
+
/**
|
|
15
|
+
* Validates and stores a batch of private events against pre-fetched tx effects.
|
|
16
|
+
*
|
|
17
|
+
* @param requests - The events to validate and store.
|
|
18
|
+
* @param scope - The scope under which the events are being stored.
|
|
19
|
+
* @param txEffects - Pre-fetched tx effects keyed by `TxHash.toString()`. Must contain entries for every request's
|
|
20
|
+
* txHash; missing entries are treated as a node bug and cause an error.
|
|
21
|
+
*/
|
|
22
|
+
validateAndStoreEvents(requests: EventValidationRequest[], scope: AztecAddress, txEffects: Map<string, IndexedTxEffect>): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRfc2VydmljZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V2ZW50cy9ldmVudF9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBRWhFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxlQUFlLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUVyRSxPQUFPLEtBQUssRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHlFQUF5RSxDQUFDO0FBQ3RILE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHVEQUF1RCxDQUFDO0FBRTFGLHFCQUFhLFlBQVk7O0lBRXJCLE9BQU8sQ0FBQyxRQUFRLENBQ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CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG;IALtB,YACmB,iBAAiB,EAAE,WAAW,EAC9B,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,iBAAiB,EACpC,KAAK,EAAE,MAAM,EACb,GAAG,yCAAoC,EACtD;IAEJ;;;;;;;OAOG;IACU,sBAAsB,CACjC,QAAQ,EAAE,sBAAsB,EAAE,EAClC,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,GACtC,OAAO,CAAC,IAAI,CAAC,CAQf;CAgFF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
+
import { computePrivateEventCommitment, siloNullifier } from '@aztec/stdlib/hash';
|
|
3
|
+
export class EventService {
|
|
4
|
+
anchorBlockHeader;
|
|
5
|
+
aztecNode;
|
|
6
|
+
privateEventStore;
|
|
7
|
+
jobId;
|
|
8
|
+
log;
|
|
9
|
+
constructor(anchorBlockHeader, aztecNode, privateEventStore, jobId, log = createLogger('pxe:event_service')){
|
|
10
|
+
this.anchorBlockHeader = anchorBlockHeader;
|
|
11
|
+
this.aztecNode = aztecNode;
|
|
12
|
+
this.privateEventStore = privateEventStore;
|
|
13
|
+
this.jobId = jobId;
|
|
14
|
+
this.log = log;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Validates and stores a batch of private events against pre-fetched tx effects.
|
|
18
|
+
*
|
|
19
|
+
* @param requests - The events to validate and store.
|
|
20
|
+
* @param scope - The scope under which the events are being stored.
|
|
21
|
+
* @param txEffects - Pre-fetched tx effects keyed by `TxHash.toString()`. Must contain entries for every request's
|
|
22
|
+
* txHash; missing entries are treated as a node bug and cause an error.
|
|
23
|
+
*/ async validateAndStoreEvents(requests, scope, txEffects) {
|
|
24
|
+
if (requests.length === 0) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const anchorBlockNumber = this.anchorBlockHeader.getBlockNumber();
|
|
28
|
+
await Promise.all(requests.map((req)=>this.#validateAndStoreEvent(req, scope, txEffects, anchorBlockNumber)));
|
|
29
|
+
}
|
|
30
|
+
async #validateAndStoreEvent(request, scope, txEffects, anchorBlockNumber) {
|
|
31
|
+
const { contractAddress, eventTypeId: selector, randomness, serializedEvent: content, eventCommitment, txHash } = request;
|
|
32
|
+
// Defense-in-depth: the built-in private-event path derives this commitment from content before enqueueing, but
|
|
33
|
+
// unconstrained PXE-side code (e.g. a custom message handler) can reach this oracle with arbitrary
|
|
34
|
+
// (content, commitment) pairs. Without this check it could bind arbitrary content to a legitimate tx nullifier,
|
|
35
|
+
// causing PXE to surface fabricated event data.
|
|
36
|
+
const recomputedCommitment = await computePrivateEventCommitment(randomness, selector.toField(), content);
|
|
37
|
+
if (!recomputedCommitment.equals(eventCommitment)) {
|
|
38
|
+
this.log.warn(`Skipping event whose content does not hash to the provided commitment. contract=${contractAddress}, selector=${selector}, eventCommitment=${eventCommitment}, txHash=${txHash}, recomputedCommitment=${recomputedCommitment}`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
// While using 'latest' block number would be fine for private events since they cannot be accessed from Aztec.nr
|
|
42
|
+
// (and thus we're less concerned about being ahead of the synced block), we use the synced block number to
|
|
43
|
+
// maintain consistent behavior in the PXE. Additionally, events should never be ahead of the synced block here
|
|
44
|
+
// since `fetchTaggedLogs` only processes logs up to the synced block.
|
|
45
|
+
const siloedEventCommitment = await siloNullifier(contractAddress, eventCommitment);
|
|
46
|
+
const txEffect = txEffects.get(txHash.toString());
|
|
47
|
+
if (!txEffect) {
|
|
48
|
+
// We error out instead of just logging a warning and skipping the event because this would indicate a bug. This
|
|
49
|
+
// is because the node has already served info about this tx either when obtaining the log (LogResult carries
|
|
50
|
+
// the tx info) or when getting metadata for the offchain message (before the message got passed to `process_log`).
|
|
51
|
+
throw new Error(`Could not find tx effect for tx hash ${txHash} when processing an event.`);
|
|
52
|
+
}
|
|
53
|
+
if (txEffect.l2BlockNumber > anchorBlockNumber) {
|
|
54
|
+
// We should never process a message from a tx past the anchor block. If we got here, a preprocessing step made
|
|
55
|
+
// a mistake.
|
|
56
|
+
throw new Error(`Obtained a newer tx effect for ${txHash} for an event validation request than the anchor block ${anchorBlockNumber}. This is a bug as smart contracts should not issue event validation requests for events from blocks newer than the anchor block.`);
|
|
57
|
+
}
|
|
58
|
+
// Find the index of the event commitment in the nullifiers array to determine event ordering within the tx
|
|
59
|
+
const eventIndexInTx = txEffect.data.nullifiers.findIndex((n)=>n.equals(siloedEventCommitment));
|
|
60
|
+
if (eventIndexInTx === -1) {
|
|
61
|
+
// Unlike in NoteService, this might not be a bug since the commitment hasn't been verified yet in the message
|
|
62
|
+
// processing pipeline. A malformed or malicious message could trigger this condition. Because of this we don't
|
|
63
|
+
// error out and we just show a warning.
|
|
64
|
+
this.log.warn(`Skipping event whose commitment is not present in its tx. siloedEventCommitment=${siloedEventCommitment}, contract=${contractAddress}, selector=${selector}, eventCommitment=${eventCommitment}, txHash=${txHash}`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
return this.privateEventStore.storePrivateEventLog(selector, randomness, content, siloedEventCommitment, {
|
|
68
|
+
contractAddress,
|
|
69
|
+
scope,
|
|
70
|
+
txHash,
|
|
71
|
+
l2BlockNumber: txEffect.l2BlockNumber,
|
|
72
|
+
l2BlockHash: txEffect.l2BlockHash,
|
|
73
|
+
txIndexInBlock: txEffect.txIndexInBlock,
|
|
74
|
+
eventIndexInTx
|
|
75
|
+
}, this.jobId);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './private_event_filter_validator.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ldmVudHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxxQ0FBcUMsQ0FBQyJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './private_event_filter_validator.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PrivateEventFilter } from '@aztec/aztec.js/wallet';
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import type { PrivateEventStoreFilter } from '../storage/private_event_store/private_event_store.js';
|
|
4
|
+
export declare class PrivateEventFilterValidator {
|
|
5
|
+
private readonly lastBlock;
|
|
6
|
+
private readonly log;
|
|
7
|
+
constructor(lastBlock: BlockNumber);
|
|
8
|
+
validate(filter: PrivateEventFilter): PrivateEventStoreFilter;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9ldmVudF9maWx0ZXJfdmFsaWRhdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnRzL3ByaXZhdGVfZXZlbnRfZmlsdGVyX3ZhbGlkYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRWpFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUc5RCxPQUFPLEtBQUssRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHVEQUF1RCxDQUFDO0FBRXJHLHFCQUFhLDJCQUEyQjtJQUcxQixPQUFPLENBQUMsUUFBUSxDQUFDLFNBQVM7SUFGdEMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQXNEO0lBRTFFLFlBQTZCLFNBQVMsRUFBRSxXQUFXLEVBQUk7SUFFdkQsUUFBUSxDQUFDLE1BQU0sRUFBRSxrQkFBa0IsR0FBRyx1QkFBdUIsQ0FvRDVEO0NBQ0YifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private_event_filter_validator.d.ts","sourceRoot":"","sources":["../../src/events/private_event_filter_validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAErG,qBAAa,2BAA2B;IAG1B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAFtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAsD;IAE1E,YAA6B,SAAS,EAAE,WAAW,EAAI;IAEvD,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,uBAAuB,CAoD5D;CACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
4
|
+
export class PrivateEventFilterValidator {
|
|
5
|
+
lastBlock;
|
|
6
|
+
log;
|
|
7
|
+
constructor(lastBlock){
|
|
8
|
+
this.lastBlock = lastBlock;
|
|
9
|
+
this.log = createLogger('pxe:private_event_filter_validator');
|
|
10
|
+
}
|
|
11
|
+
validate(filter) {
|
|
12
|
+
let { fromBlock, toBlock } = filter;
|
|
13
|
+
// Block range filters in Aztec Node are defined as closed-open intervals [fromBlock, toBlock), so
|
|
14
|
+
// we respect that convention here for consistency.
|
|
15
|
+
// We then default to [INITIAL_L2_BLOCK_NUM, latestKnownBlock + 1), ie: by default return events from
|
|
16
|
+
// the first block to the latest known block.
|
|
17
|
+
if (!fromBlock || !toBlock) {
|
|
18
|
+
fromBlock = fromBlock ?? BlockNumber(INITIAL_L2_BLOCK_NUM);
|
|
19
|
+
toBlock = toBlock ?? BlockNumber(this.lastBlock + 1);
|
|
20
|
+
}
|
|
21
|
+
if (filter.scopes.length === 0) {
|
|
22
|
+
throw new Error('At least one scope is required to get private events');
|
|
23
|
+
}
|
|
24
|
+
if (fromBlock < 1) {
|
|
25
|
+
throw new Error('fromBlock must be greater than or equal to 1');
|
|
26
|
+
}
|
|
27
|
+
if (toBlock < 1) {
|
|
28
|
+
throw new Error('toBlock must be greater than or equal to 1');
|
|
29
|
+
}
|
|
30
|
+
if (fromBlock >= toBlock) {
|
|
31
|
+
throw new Error('toBlock must be strictly greater than fromBlock');
|
|
32
|
+
}
|
|
33
|
+
// Cap the requested range to the synced block range. Without this, callers that pass a large
|
|
34
|
+
// toBlock (e.g. Number.MAX_SAFE_INTEGER as a "give me everything" idiom) would silently receive
|
|
35
|
+
// only the events that happen to be synced and believe they have complete coverage.
|
|
36
|
+
// We warn + cap rather than throw so callers don't need to query the last synced block before
|
|
37
|
+
// every request (which would also be unreliable, as the block can advance between the two calls).
|
|
38
|
+
const syncedUpperBound = BlockNumber(this.lastBlock + 1);
|
|
39
|
+
if (fromBlock >= syncedUpperBound) {
|
|
40
|
+
this.log.warn(`Requested fromBlock ${fromBlock} is past last synced block ${this.lastBlock}; no events will be returned until PXE syncs further.`);
|
|
41
|
+
} else if (toBlock > syncedUpperBound) {
|
|
42
|
+
this.log.warn(`Requested toBlock ${toBlock} exceeds last synced block ${this.lastBlock}; capping to ${syncedUpperBound}. Retry once PXE is further synced for complete coverage.`);
|
|
43
|
+
toBlock = syncedUpperBound;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
contractAddress: filter.contractAddress,
|
|
47
|
+
scopes: filter.scopes,
|
|
48
|
+
txHash: filter.txHash,
|
|
49
|
+
toBlock,
|
|
50
|
+
fromBlock
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
3
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
/** Information about a cross-contract utility call that requires authorization. */
|
|
5
|
+
export type UtilityCallAuthorizationRequest = {
|
|
6
|
+
/** The contract requesting the cross-contract call. */
|
|
7
|
+
caller: AztecAddress;
|
|
8
|
+
/** The contract class ID of the calling contract. */
|
|
9
|
+
callerClassId: Fr;
|
|
10
|
+
/** The target contract being called. */
|
|
11
|
+
target: AztecAddress;
|
|
12
|
+
/** The contract class ID of the target contract. */
|
|
13
|
+
targetClassId: Fr;
|
|
14
|
+
/** The function selector being invoked on the target. */
|
|
15
|
+
functionSelector: FunctionSelector;
|
|
16
|
+
/** The name of the function being called, from the contract artifact. */
|
|
17
|
+
functionName: string;
|
|
18
|
+
/** The serialized arguments passed to the function. */
|
|
19
|
+
args: Fr[];
|
|
20
|
+
/** The execution context from which the call originates. */
|
|
21
|
+
callerContext: 'private' | 'private view' | 'utility';
|
|
22
|
+
};
|
|
23
|
+
/** Authorization was granted. */
|
|
24
|
+
type Authorized = {
|
|
25
|
+
authorized: true;
|
|
26
|
+
};
|
|
27
|
+
/** Authorization was denied. */
|
|
28
|
+
type Denied = {
|
|
29
|
+
authorized: false;
|
|
30
|
+
/** Reason for denial, included in the error message. */
|
|
31
|
+
reason?: string;
|
|
32
|
+
};
|
|
33
|
+
/** Result of an authorization hook evaluation. */
|
|
34
|
+
export type UtilityCallAuthorizationResponse = Authorized | Denied;
|
|
35
|
+
/**
|
|
36
|
+
* Hook called when a utility function attempts a cross-contract call.
|
|
37
|
+
* Returns a response indicating whether the call is authorized and an optional denial reason.
|
|
38
|
+
*/
|
|
39
|
+
export type AuthorizeUtilityCall = (request: UtilityCallAuthorizationRequest) => Promise<Util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AU,GAAG;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE,CAAC;AAEvC,gCAAgC;AAChC,KAAK,MAAM,GAAG;IACZ,UAAU,EAAE,KAAK,CAAC;IAClB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,gCAAgC,GAAG,UAAU,GAAG,MAAM,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,+BAA+B,KACrC,OAAO,CAAC,gCAAgC,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { AuthorizeUtilityCall } from './authorize_utility_call.js';
|
|
2
|
+
/**
|
|
3
|
+
* Hooks that PXE invokes during client-side simulation to gate operations that the protocol
|
|
4
|
+
* does not restrict on its own. They give the wallet a chance to apply custom policies (e.g.
|
|
5
|
+
* prompting the user, consulting a dynamic allowlist, or inspecting call arguments) before the
|
|
6
|
+
* execution proceeds.
|
|
7
|
+
*
|
|
8
|
+
* For example, {@link authorizeUtilityCall} is called whenever a utility function makes a
|
|
9
|
+
* cross-contract call. A call made by a malicious contract could leak private information, so the
|
|
10
|
+
* hook lets the wallet decide, per-call, whether to allow it. A static allowlist would not work
|
|
11
|
+
* here because neither the app nor the wallet can predict ahead of time which contracts will be
|
|
12
|
+
* invoked during execution.
|
|
13
|
+
*
|
|
14
|
+
* Note: hooks are unrelated to authentication witnesses (authwits). Authwits are an on-chain
|
|
15
|
+
* mechanism where a contract verifies that a caller was authorized by a specific account; hooks
|
|
16
|
+
* are a client-side PXE concern that gates execution before it proceeds.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const pxe = await PXE.create({
|
|
21
|
+
* // ...
|
|
22
|
+
* hooks: {
|
|
23
|
+
* authorizeUtilityCall: async (req) => {
|
|
24
|
+
* // Allow calls to a known helper contract, deny everything else.
|
|
25
|
+
* return req.target.equals(trustedHelper)
|
|
26
|
+
* ? { authorized: true }
|
|
27
|
+
* : { authorized: false, reason: 'Unknown target' };
|
|
28
|
+
* },
|
|
29
|
+
* },
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export interface ExecutionHooks {
|
|
34
|
+
/** Called when a contract attempts a cross-contract utility call. */
|
|
35
|
+
authorizeUtilityCall: AuthorizeUtilityCall;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Builds an {@link ExecutionHooks} from individually-constructed hook callbacks. Returns `undefined`
|
|
39
|
+
* when every field is absent, so callers can unconditionally pass the result as `hooks`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function composeHooks(partial: Partial<ExecutionHooks>): ExecutionHooks | undefined;
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uX2hvb2tzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaG9va3MvZXhlY3V0aW9uX2hvb2tzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFFeEU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQThCRztBQUNILE1BQU0sV0FBVyxjQUFjO0lBQzdCLHFFQUFxRTtJQUNyRSxvQkFBb0IsRUFBRSxvQkFBb0IsQ0FBQztDQUM1QztBQUVEOzs7R0FHRztBQUNILHdCQUFnQixZQUFZLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxjQUFjLENBQUMsR0FBRyxjQUFjLEdBQUcsU0FBUyxDQUt6RiJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution_hooks.d.ts","sourceRoot":"","sources":["../../src/hooks/execution_hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,GAAG,SAAS,CAKzF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds an {@link ExecutionHooks} from individually-constructed hook callbacks. Returns `undefined`
|
|
3
|
+
* when every field is absent, so callers can unconditionally pass the result as `hooks`.
|
|
4
|
+
*/ export function composeHooks(partial) {
|
|
5
|
+
if (Object.values(partial).every((v)=>v === undefined)) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
return partial;
|
|
9
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { AuthorizeUtilityCall, UtilityCallAuthorizationRequest, UtilityCallAuthorizationResponse, } from './authorize_utility_call.js';
|
|
2
|
+
export type { ExecutionHooks } from './execution_hooks.js';
|
|
3
|
+
export { composeHooks } from './execution_hooks.js';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ob29rcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLEVBQ1Ysb0JBQW9CLEVBQ3BCLCtCQUErQixFQUMvQixnQ0FBZ0MsR0FDakMsTUFBTSw2QkFBNkIsQ0FBQztBQUNyQyxZQUFZLEVBQUUsY0FBYyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDM0QsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHNCQUFzQixDQUFDIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { composeHooks } from './execution_hooks.js';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type LoggerBindings } from '@aztec/foundation/log';
|
|
2
|
+
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
3
|
+
/**
|
|
4
|
+
* Interface that stores must implement to support staged writes.
|
|
5
|
+
*/
|
|
6
|
+
export interface StagedStore {
|
|
7
|
+
/** Unique name identifying this store (used for tracking staged stores from JobCoordinator) */
|
|
8
|
+
readonly storeName: string;
|
|
9
|
+
/**
|
|
10
|
+
* Commits staged data to main storage.
|
|
11
|
+
* Should be called within a transaction for atomicity.
|
|
12
|
+
*
|
|
13
|
+
* @param jobId - The job identifier
|
|
14
|
+
*/
|
|
15
|
+
commit(jobId: string): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Discards staged data without committing.
|
|
18
|
+
* Called on abort.
|
|
19
|
+
*
|
|
20
|
+
* @param jobId - The job identifier
|
|
21
|
+
*/
|
|
22
|
+
discardStaged(jobId: string): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* JobCoordinator manages job lifecycle and provides crash resilience for PXE operations.
|
|
26
|
+
*
|
|
27
|
+
* It uses a staged writes pattern:
|
|
28
|
+
* 1. When a job begins, a unique job ID is created
|
|
29
|
+
* 2. During the job, all writes go to staging (keyed by job ID)
|
|
30
|
+
* 3. On commit, staging is promoted to main storage
|
|
31
|
+
* 4. On abort, staged data is discarded
|
|
32
|
+
*
|
|
33
|
+
* Note: PXE should only rely on a single JobCoordinator instance, so it can eventually
|
|
34
|
+
* orchestrate concurrent jobs. Right now it doesn't make a difference because we're
|
|
35
|
+
* using a job queue with concurrency=1.
|
|
36
|
+
*/
|
|
37
|
+
export declare class JobCoordinator {
|
|
38
|
+
#private;
|
|
39
|
+
private readonly log;
|
|
40
|
+
/** The underlying KV store */
|
|
41
|
+
kvStore: AztecAsyncKVStore;
|
|
42
|
+
constructor(kvStore: AztecAsyncKVStore, bindings?: LoggerBindings);
|
|
43
|
+
/**
|
|
44
|
+
* Registers a staged store.
|
|
45
|
+
* Must be called during initialization for all stores that need staging support.
|
|
46
|
+
*/
|
|
47
|
+
registerStore(store: StagedStore): void;
|
|
48
|
+
/**
|
|
49
|
+
* Registers multiple staged stores.
|
|
50
|
+
*/
|
|
51
|
+
registerStores(stores: StagedStore[]): void;
|
|
52
|
+
/**
|
|
53
|
+
* Begins a new job and returns a job ID for staged writes.
|
|
54
|
+
*
|
|
55
|
+
* @returns Job ID to pass to store operations
|
|
56
|
+
*/
|
|
57
|
+
beginJob(): string;
|
|
58
|
+
/**
|
|
59
|
+
* Commits a job by promoting all staged data to main storage.
|
|
60
|
+
*
|
|
61
|
+
* @param jobId - The job ID returned from beginJob
|
|
62
|
+
*/
|
|
63
|
+
commitJob(jobId: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Aborts a job by discarding all staged data.
|
|
66
|
+
*
|
|
67
|
+
* @param jobId - The job ID returned from beginJob
|
|
68
|
+
*/
|
|
69
|
+
abortJob(jobId: string): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Checks if there's a job currently in progress.
|
|
72
|
+
*/
|
|
73
|
+
hasJobInProgress(): boolean;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiam9iX2Nvb3JkaW5hdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIu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;;;OAIG;IACG,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc3C;IAED;;OAEG;IACH,gBAAgB,IAAI,OAAO,CAE1B;CACF"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
2
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
+
/**
|
|
4
|
+
* JobCoordinator manages job lifecycle and provides crash resilience for PXE operations.
|
|
5
|
+
*
|
|
6
|
+
* It uses a staged writes pattern:
|
|
7
|
+
* 1. When a job begins, a unique job ID is created
|
|
8
|
+
* 2. During the job, all writes go to staging (keyed by job ID)
|
|
9
|
+
* 3. On commit, staging is promoted to main storage
|
|
10
|
+
* 4. On abort, staged data is discarded
|
|
11
|
+
*
|
|
12
|
+
* Note: PXE should only rely on a single JobCoordinator instance, so it can eventually
|
|
13
|
+
* orchestrate concurrent jobs. Right now it doesn't make a difference because we're
|
|
14
|
+
* using a job queue with concurrency=1.
|
|
15
|
+
*/ export class JobCoordinator {
|
|
16
|
+
log;
|
|
17
|
+
/** The underlying KV store */ kvStore;
|
|
18
|
+
#currentJobId;
|
|
19
|
+
#stores = new Map();
|
|
20
|
+
constructor(kvStore, bindings){
|
|
21
|
+
this.kvStore = kvStore;
|
|
22
|
+
this.log = createLogger('pxe:job_coordinator', bindings);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Registers a staged store.
|
|
26
|
+
* Must be called during initialization for all stores that need staging support.
|
|
27
|
+
*/ registerStore(store) {
|
|
28
|
+
if (this.#stores.has(store.storeName)) {
|
|
29
|
+
throw new Error(`Store "${store.storeName}" is already registered`);
|
|
30
|
+
}
|
|
31
|
+
this.#stores.set(store.storeName, store);
|
|
32
|
+
this.log.debug(`Registered staged store: ${store.storeName}`);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Registers multiple staged stores.
|
|
36
|
+
*/ registerStores(stores) {
|
|
37
|
+
for (const store of stores){
|
|
38
|
+
this.registerStore(store);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Begins a new job and returns a job ID for staged writes.
|
|
43
|
+
*
|
|
44
|
+
* @returns Job ID to pass to store operations
|
|
45
|
+
*/ beginJob() {
|
|
46
|
+
if (this.#currentJobId) {
|
|
47
|
+
throw new Error(`Cannot begin job: job ${this.#currentJobId} is already in progress. ` + `This should not happen - ensure jobs are properly committed or aborted.`);
|
|
48
|
+
}
|
|
49
|
+
const jobId = randomBytes(8).toString('hex');
|
|
50
|
+
this.#currentJobId = jobId;
|
|
51
|
+
this.log.debug(`Started job ${jobId}`);
|
|
52
|
+
return jobId;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Commits a job by promoting all staged data to main storage.
|
|
56
|
+
*
|
|
57
|
+
* @param jobId - The job ID returned from beginJob
|
|
58
|
+
*/ async commitJob(jobId) {
|
|
59
|
+
if (!this.#currentJobId || this.#currentJobId !== jobId) {
|
|
60
|
+
throw new Error(`Cannot commit job ${jobId}: no matching job in progress. ` + `Current job: ${this.#currentJobId ?? 'none'}`);
|
|
61
|
+
}
|
|
62
|
+
this.log.debug(`Committing job ${jobId}`);
|
|
63
|
+
// Commit all stores atomically in a single transaction.
|
|
64
|
+
// Each store's commit is a no-op if it has no staged data (but that's up to each store to handle).
|
|
65
|
+
await this.kvStore.transactionAsync(async ()=>{
|
|
66
|
+
for (const store of this.#stores.values()){
|
|
67
|
+
await store.commit(jobId);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
this.#currentJobId = undefined;
|
|
71
|
+
this.log.debug(`Job ${jobId} committed successfully`);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Aborts a job by discarding all staged data.
|
|
75
|
+
*
|
|
76
|
+
* @param jobId - The job ID returned from beginJob
|
|
77
|
+
*/ async abortJob(jobId) {
|
|
78
|
+
if (!this.#currentJobId || this.#currentJobId !== jobId) {
|
|
79
|
+
// Job may have already been aborted or never started properly
|
|
80
|
+
this.log.warn(`Abort called for job ${jobId} but current job is ${this.#currentJobId ?? 'none'}`);
|
|
81
|
+
}
|
|
82
|
+
this.log.debug(`Aborting job ${jobId}`);
|
|
83
|
+
for (const store of this.#stores.values()){
|
|
84
|
+
await store.discardStaged(jobId);
|
|
85
|
+
}
|
|
86
|
+
this.#currentJobId = undefined;
|
|
87
|
+
this.log.debug(`Job ${jobId} aborted`);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Checks if there's a job currently in progress.
|
|
91
|
+
*/ hasJobInProgress() {
|
|
92
|
+
return this.#currentJobId !== undefined;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type LoggerBindings } from '@aztec/foundation/log';
|
|
2
|
+
import type { KeyStore } from '@aztec/key-store';
|
|
3
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
import type { L2TipsProvider } from '@aztec/stdlib/block';
|
|
5
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
6
|
+
import { AppTaggingSecret, PendingTaggedLog } from '@aztec/stdlib/logs';
|
|
7
|
+
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
8
|
+
import { type LogRetrievalRequest } from '../contract_function_simulator/noir-structs/log_retrieval_request.js';
|
|
9
|
+
import { LogRetrievalResponse } from '../contract_function_simulator/noir-structs/log_retrieval_response.js';
|
|
10
|
+
import { AddressStore } from '../storage/address_store/address_store.js';
|
|
11
|
+
import type { RecipientTaggingStore } from '../storage/tagging_store/recipient_tagging_store.js';
|
|
12
|
+
import type { SenderAddressBookStore } from '../storage/tagging_store/sender_address_book_store.js';
|
|
13
|
+
export declare class LogService {
|
|
14
|
+
#private;
|
|
15
|
+
private readonly aztecNode;
|
|
16
|
+
private readonly anchorBlockHeader;
|
|
17
|
+
private readonly l2TipsStore;
|
|
18
|
+
private readonly keyStore;
|
|
19
|
+
private readonly recipientTaggingStore;
|
|
20
|
+
private readonly senderAddressBookStore;
|
|
21
|
+
private readonly addressStore;
|
|
22
|
+
private readonly jobId;
|
|
23
|
+
private log;
|
|
24
|
+
constructor(aztecNode: AztecNode, anchorBlockHeader: BlockHeader, l2TipsStore: L2TipsProvider, keyStore: KeyStore, recipientTaggingStore: RecipientTaggingStore, senderAddressBookStore: SenderAddressBookStore, addressStore: AddressStore, jobId: string, bindings?: LoggerBindings);
|
|
25
|
+
/** Fetches all logs matching each request's tag, returning an array of log arrays (one per request). */
|
|
26
|
+
fetchLogsByTag(contractAddress: AztecAddress, logRetrievalRequests: LogRetrievalRequest[]): Promise<LogRetrievalResponse[][]>;
|
|
27
|
+
fetchTaggedLogs(contractAddress: AztecAddress, recipient: AztecAddress, providedSecrets: AppTaggingSecret[]): Promise<PendingTaggedLog[]>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nX3NlcnZpY2UuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dzL2xvZ19zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBZSxLQUFLLGNBQWMsRUFBZ0IsTUFBTSx1QkFBdUIsQ0FBQztBQUN2RixPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDM0QsT0FBTyxLQUFLLEVBQWEsY0FBYyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDckUsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDakUsT0FBTyxFQUFFLGdCQUFnQixFQUFrQixnQkFBZ0IsRUFBYSxNQUFNLG9CQUFvQixDQUFDO0FBQ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