@aztec/pxe 0.0.1-commit.d3ec352c → 0.0.1-commit.d6f2b3f94
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.js +105 -15
- package/dest/block_synchronizer/block_synchronizer.d.ts +45 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
- package/dest/block_synchronizer/block_synchronizer.js +153 -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 +6 -4
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +17 -0
- 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 +42 -14
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +74 -33
- package/dest/contract_function_simulator/execution_note_cache.d.ts +21 -12
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +48 -31
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +1 -1
- 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 +2 -2
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +5 -4
- 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 +6 -3
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +5 -4
- 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 +7 -6
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +2 -2
- 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 +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +3 -3
- 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 +1 -1
- 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/interfaces.d.ts +22 -18
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +4 -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 +11 -7
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +14 -10
- package/dest/contract_function_simulator/oracle/oracle.d.ts +11 -9
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +82 -48
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +2 -28
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +2 -38
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +34 -25
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +41 -45
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +88 -32
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +201 -74
- 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 +1 -1
- 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 +23 -5
- package/dest/contract_sync/contract_sync_service.d.ts +41 -0
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
- package/dest/contract_sync/contract_sync_service.js +82 -0
- package/dest/contract_sync/helpers.d.ts +28 -0
- package/dest/contract_sync/helpers.d.ts.map +1 -0
- package/dest/contract_sync/helpers.js +55 -0
- package/dest/debug/pxe_debug_utils.d.ts +44 -0
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
- package/dest/debug/pxe_debug_utils.js +48 -0
- package/dest/entrypoints/client/bundle/index.d.ts +1 -2
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +0 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +23 -8
- package/dest/entrypoints/client/lazy/index.d.ts +1 -2
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +0 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +24 -9
- package/dest/entrypoints/pxe_creation_options.d.ts +7 -3
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/server/index.d.ts +4 -2
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +3 -1
- package/dest/entrypoints/server/utils.d.ts +1 -1
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +30 -15
- 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 +15 -0
- package/dest/events/event_service.d.ts.map +1 -0
- package/dest/events/event_service.js +44 -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 +38 -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 +28 -0
- package/dest/logs/log_service.d.ts.map +1 -0
- package/dest/logs/log_service.js +123 -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 +147 -0
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +4 -3
- package/dest/private_kernel/hints/index.d.ts +2 -2
- package/dest/private_kernel/hints/index.d.ts.map +1 -1
- package/dest/private_kernel/hints/index.js +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +28 -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} +13 -7
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +3 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +10 -11
- package/dest/private_kernel/private_kernel_oracle.d.ts +26 -29
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +90 -2
- package/dest/pxe.d.ts +56 -81
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +209 -217
- 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/{sync_data_provider/sync_data_provider.js → anchor_block_store/anchor_block_store.js} +10 -10
- package/dest/storage/{sync_data_provider → anchor_block_store}/index.d.ts +2 -2
- 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/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 +253 -0
- package/dest/storage/capsule_store/index.d.ts +2 -0
- package/dest/storage/capsule_store/index.d.ts.map +1 -0
- package/dest/storage/capsule_store/index.js +1 -0
- package/dest/storage/{contract_data_provider/contract_data_provider.d.ts → contract_store/contract_store.d.ts} +7 -5
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
- package/dest/storage/{contract_data_provider/contract_data_provider.js → contract_store/contract_store.js} +56 -16
- 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 +1 -1
- 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 +344 -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/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 +273 -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 +77 -0
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/sender_tagging_store.js +348 -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 +24 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
- package/dest/tagging/get_all_logs_by_tags.js +46 -0
- package/dest/tagging/index.d.ts +16 -6
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +15 -5
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +15 -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/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 +15 -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 +32 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +21 -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 +74 -0
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -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 +29 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +21 -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 +60 -0
- package/package.json +27 -18
- package/src/bin/check_oracle_version.ts +131 -20
- package/src/block_synchronizer/block_synchronizer.ts +178 -0
- package/src/block_synchronizer/index.ts +1 -0
- package/src/config/index.ts +17 -3
- 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 +117 -34
- package/src/contract_function_simulator/execution_note_cache.ts +51 -29
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +1 -1
- package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
- package/src/contract_function_simulator/index.ts +1 -1
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +6 -2
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +6 -5
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +1 -1
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +2 -2
- package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
- package/src/contract_function_simulator/oracle/interfaces.ts +27 -17
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +27 -13
- package/src/contract_function_simulator/oracle/oracle.ts +97 -51
- package/src/contract_function_simulator/oracle/private_execution.ts +2 -69
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +121 -59
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +294 -91
- package/src/contract_function_simulator/pick_notes.ts +1 -1
- package/src/contract_function_simulator/proxied_contract_data_source.ts +24 -7
- package/src/contract_sync/contract_sync_service.ts +129 -0
- package/src/contract_sync/helpers.ts +93 -0
- package/src/debug/pxe_debug_utils.ts +91 -0
- package/src/entrypoints/client/bundle/index.ts +0 -1
- package/src/entrypoints/client/bundle/utils.ts +15 -16
- package/src/entrypoints/client/lazy/index.ts +0 -1
- package/src/entrypoints/client/lazy/utils.ts +16 -17
- package/src/entrypoints/pxe_creation_options.ts +6 -2
- package/src/entrypoints/server/index.ts +3 -1
- package/src/entrypoints/server/utils.ts +26 -34
- package/src/error_enriching.ts +7 -15
- package/src/events/event_service.ts +71 -0
- package/src/events/index.ts +1 -0
- package/src/events/private_event_filter_validator.ts +46 -0
- package/src/job_coordinator/job_coordinator.ts +150 -0
- package/src/logs/log_service.ts +220 -0
- package/src/notes/index.ts +1 -0
- package/src/notes/note_service.ts +195 -0
- package/src/oracle_version.ts +4 -3
- package/src/private_kernel/hints/index.ts +1 -1
- package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +34 -23
- package/src/private_kernel/private_kernel_execution_prover.ts +13 -12
- package/src/private_kernel/private_kernel_oracle.ts +118 -37
- package/src/pxe.ts +299 -280
- 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} +10 -12
- package/src/storage/anchor_block_store/index.ts +1 -0
- package/src/storage/capsule_store/capsule_store.ts +315 -0
- package/src/storage/capsule_store/index.ts +1 -0
- package/src/storage/{contract_data_provider/contract_data_provider.ts → contract_store/contract_store.ts} +67 -14
- 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/private_event_store/private_event_store.ts +384 -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 +429 -0
- package/src/tagging/constants.ts +10 -2
- package/src/tagging/get_all_logs_by_tags.ts +68 -0
- package/src/tagging/index.ts +18 -5
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +143 -0
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +49 -0
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +99 -0
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +36 -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 -267
- 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 -123
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +0 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.js +0 -696
- 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/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.map +0 -1
- 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_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 -314
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -37
- 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 -105
- 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 -11
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
- 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 -36
- package/dest/synchronizer/synchronizer.d.ts.map +0 -1
- package/dest/synchronizer/synchronizer.js +0 -102
- 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 -342
- package/src/contract_function_simulator/proxied_node.ts +0 -33
- package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1023
- 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/index.ts +0 -1
- package/src/storage/note_data_provider/index.ts +0 -2
- package/src/storage/note_data_provider/note_data_provider.ts +0 -403
- package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -143
- 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 -121
- 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,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,49 @@
|
|
|
1
|
+
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import type { BlockHash } from '@aztec/stdlib/block';
|
|
4
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
5
|
+
import type { DirectionalAppTaggingSecret, PreTag, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
6
|
+
import { SiloedTag, Tag } from '@aztec/stdlib/logs';
|
|
7
|
+
|
|
8
|
+
import { getAllPrivateLogsByTags } from '../../get_all_logs_by_tags.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Gets private logs with their corresponding block timestamps and tagging indexes for the given index range, `app` and
|
|
12
|
+
* `secret`. At most load logs from blocks up to and including `anchorBlockNumber`. `start` is inclusive and `end` is
|
|
13
|
+
* exclusive.
|
|
14
|
+
*/
|
|
15
|
+
export async function loadLogsForRange(
|
|
16
|
+
secret: DirectionalAppTaggingSecret,
|
|
17
|
+
app: AztecAddress,
|
|
18
|
+
aztecNode: AztecNode,
|
|
19
|
+
start: number,
|
|
20
|
+
end: number,
|
|
21
|
+
anchorBlockNumber: BlockNumber,
|
|
22
|
+
anchorBlockHash: BlockHash,
|
|
23
|
+
): Promise<Array<{ log: TxScopedL2Log; taggingIndex: number }>> {
|
|
24
|
+
// Derive tags for the window
|
|
25
|
+
const preTags: PreTag[] = Array(end - start)
|
|
26
|
+
.fill(0)
|
|
27
|
+
.map((_, i) => ({ secret, index: start + i }));
|
|
28
|
+
const siloedTags = await Promise.all(preTags.map(preTag => Tag.compute(preTag))).then(tags =>
|
|
29
|
+
Promise.all(tags.map(tag => SiloedTag.compute(tag, app))),
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
// We use the utility function below to retrieve all logs for the tags across all pages, so we don't need to handle
|
|
33
|
+
// pagination here.
|
|
34
|
+
const logs = await getAllPrivateLogsByTags(aztecNode, siloedTags, anchorBlockHash);
|
|
35
|
+
|
|
36
|
+
// Pair logs with their corresponding tagging indexes
|
|
37
|
+
const logsWithIndexes: Array<{ log: TxScopedL2Log; taggingIndex: number }> = [];
|
|
38
|
+
for (let i = 0; i < logs.length; i++) {
|
|
39
|
+
const logsForTag = logs[i];
|
|
40
|
+
const taggingIndex = preTags[i].index;
|
|
41
|
+
for (const log of logsForTag) {
|
|
42
|
+
if (log.blockNumber <= anchorBlockNumber) {
|
|
43
|
+
logsWithIndexes.push({ log, taggingIndex });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return logsWithIndexes;
|
|
49
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
|
+
import type { BlockHash } from '@aztec/stdlib/block';
|
|
3
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
4
|
+
import type { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
|
|
5
|
+
|
|
6
|
+
import type { SenderTaggingStore } from '../../storage/tagging_store/sender_tagging_store.js';
|
|
7
|
+
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../constants.js';
|
|
8
|
+
import { getStatusChangeOfPending } from './utils/get_status_change_of_pending.js';
|
|
9
|
+
import { loadAndStoreNewTaggingIndexes } from './utils/load_and_store_new_tagging_indexes.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Syncs tagging indexes. This function needs to be called whenever a private log is being sent.
|
|
13
|
+
*
|
|
14
|
+
* @param secret - The secret that's unique for (sender, recipient, contract) tuple while the direction of
|
|
15
|
+
* sender -> recipient matters.
|
|
16
|
+
* @param app - The address of the contract that the logs are tagged for. Needs to be provided because we perform
|
|
17
|
+
* second round of siloing in this function which is necessary because kernels do it as well (they silo first field
|
|
18
|
+
* of the private log which corresponds to the tag).
|
|
19
|
+
* @remarks When syncing the indexes as sender we don't care about the log contents - we only care about the highest
|
|
20
|
+
* pending and highest finalized indexes as that guides the next index choice when sending a log. The next index choice
|
|
21
|
+
* is simply the highest pending index plus one (or finalized if pending is undefined).
|
|
22
|
+
* @dev This function looks for new indexes, adds them to pending, then it checks status of each pending index and
|
|
23
|
+
* updates its status accordingly.
|
|
24
|
+
*/
|
|
25
|
+
export async function syncSenderTaggingIndexes(
|
|
26
|
+
secret: DirectionalAppTaggingSecret,
|
|
27
|
+
app: AztecAddress,
|
|
28
|
+
aztecNode: AztecNode,
|
|
29
|
+
taggingStore: SenderTaggingStore,
|
|
30
|
+
anchorBlockHash: BlockHash,
|
|
31
|
+
jobId: string,
|
|
32
|
+
): Promise<void> {
|
|
33
|
+
// # Explanation of how syncing works
|
|
34
|
+
//
|
|
35
|
+
// When choosing an index, we select: highest pending index + 1 (or highest finalized index + 1 if no pending).
|
|
36
|
+
// If the chosen index is more than WINDOW_LEN from the highest finalized index, we throw an error. By having this
|
|
37
|
+
// hard limit we give a guarantee to a recipient that he doesn't need to look further than WINDOW_LEN ahead of the
|
|
38
|
+
// highest finalized index.
|
|
39
|
+
//
|
|
40
|
+
// This function synchronizes the finalized and pending indexes by iteratively querying the node for a window of
|
|
41
|
+
// indexes at a time, storing all those indexes as pending, and then checking the status of each pending index to
|
|
42
|
+
// update its finalization status accordingly. If we stumble upon a window with no indexes, we stop the loop.
|
|
43
|
+
//
|
|
44
|
+
// Stopping at that point is safe because of the limit described above - there can never be an index that is more
|
|
45
|
+
// than WINDOW_LEN from the highest finalized index.
|
|
46
|
+
//
|
|
47
|
+
// # Note on performance
|
|
48
|
+
// Each window advance requires two queries (logs + tx status). For example, syncing indexes 0–500 with a window of
|
|
49
|
+
// 100 takes at least 10 round trips (5 windows × 2 queries).
|
|
50
|
+
|
|
51
|
+
const finalizedIndex = await taggingStore.getLastFinalizedIndex(secret, jobId);
|
|
52
|
+
|
|
53
|
+
let start = finalizedIndex === undefined ? 0 : finalizedIndex + 1;
|
|
54
|
+
let end = start + UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN;
|
|
55
|
+
|
|
56
|
+
let previousFinalizedIndex = finalizedIndex;
|
|
57
|
+
let newFinalizedIndex = undefined;
|
|
58
|
+
|
|
59
|
+
while (true) {
|
|
60
|
+
// Load and store indexes for the current window. These indexes may already exist in the database if txs using
|
|
61
|
+
// them were previously sent from this PXE. Any duplicates are handled by the tagging data provider.
|
|
62
|
+
await loadAndStoreNewTaggingIndexes(secret, app, start, end, aztecNode, taggingStore, anchorBlockHash, jobId);
|
|
63
|
+
|
|
64
|
+
// Retrieve all indexes within the current window from storage and update their status accordingly.
|
|
65
|
+
const pendingTxHashes = await taggingStore.getTxHashesOfPendingIndexes(secret, start, end, jobId);
|
|
66
|
+
if (pendingTxHashes.length === 0) {
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const { txHashesToFinalize, txHashesToDrop } = await getStatusChangeOfPending(pendingTxHashes, aztecNode);
|
|
71
|
+
|
|
72
|
+
await taggingStore.dropPendingIndexes(txHashesToDrop, jobId);
|
|
73
|
+
await taggingStore.finalizePendingIndexes(txHashesToFinalize, jobId);
|
|
74
|
+
|
|
75
|
+
// We check if the finalized index has been updated.
|
|
76
|
+
newFinalizedIndex = await taggingStore.getLastFinalizedIndex(secret, jobId);
|
|
77
|
+
if (previousFinalizedIndex !== newFinalizedIndex) {
|
|
78
|
+
// A new finalized index was found, so we'll run the loop again. For example:
|
|
79
|
+
// - Previous finalized index: 10
|
|
80
|
+
// - New finalized index: 13
|
|
81
|
+
// - Window length: 10
|
|
82
|
+
//
|
|
83
|
+
// In the last iteration, we processed indexes 11-20. To avoid reprocessing the same logs,
|
|
84
|
+
// we'll only look at the new indexes 21-23:
|
|
85
|
+
//
|
|
86
|
+
// Previous window: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
|
87
|
+
// New window: [21, 22, 23]
|
|
88
|
+
|
|
89
|
+
const previousEnd = end;
|
|
90
|
+
// Add 1 because `end` is exclusive and the known finalized index is not included in the window.
|
|
91
|
+
end = newFinalizedIndex! + UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN + 1;
|
|
92
|
+
start = previousEnd;
|
|
93
|
+
previousFinalizedIndex = newFinalizedIndex;
|
|
94
|
+
} else {
|
|
95
|
+
// No new finalized index was found, so we don't need to process the next window.
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.
|
|
13
|
+
const receipts = await Promise.all(pending.map(pendingTxHash => aztecNode.getTxReceipt(pendingTxHash)));
|
|
14
|
+
|
|
15
|
+
const txHashesToFinalize: TxHash[] = [];
|
|
16
|
+
const txHashesToDrop: TxHash[] = [];
|
|
17
|
+
|
|
18
|
+
for (let i = 0; i < receipts.length; i++) {
|
|
19
|
+
const receipt = receipts[i];
|
|
20
|
+
const txHash = pending[i];
|
|
21
|
+
|
|
22
|
+
if (receipt.status === TxStatus.FINALIZED && receipt.hasExecutionSucceeded()) {
|
|
23
|
+
// Tx has been included in a block and the corresponding block is finalized --> we mark the indexes as
|
|
24
|
+
// finalized.
|
|
25
|
+
txHashesToFinalize.push(txHash);
|
|
26
|
+
} else if (receipt.isDropped() || receipt.hasExecutionReverted()) {
|
|
27
|
+
// Tx was dropped or reverted --> we drop the corresponding pending indexes.
|
|
28
|
+
// TODO(#17615): Don't drop pending indexes corresponding to non-revertible phases.
|
|
29
|
+
txHashesToDrop.push(txHash);
|
|
30
|
+
} else {
|
|
31
|
+
// Tx is still pending, not yet finalized, or was mined successfully but not yet finalized --> we don't do anything.
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return { txHashesToFinalize, txHashesToDrop };
|
|
36
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
|
+
import type { BlockHash } from '@aztec/stdlib/block';
|
|
3
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
4
|
+
import type { DirectionalAppTaggingSecret, PreTag } from '@aztec/stdlib/logs';
|
|
5
|
+
import { SiloedTag, Tag } from '@aztec/stdlib/logs';
|
|
6
|
+
import { TxHash } from '@aztec/stdlib/tx';
|
|
7
|
+
|
|
8
|
+
import type { SenderTaggingStore } from '../../../storage/tagging_store/sender_tagging_store.js';
|
|
9
|
+
import { getAllPrivateLogsByTags } from '../../get_all_logs_by_tags.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Loads tagging indexes from the Aztec node and stores them in the tagging data provider.
|
|
13
|
+
* @remarks This function is one of two places by which a pending index can get to the tagging data provider. The other
|
|
14
|
+
* place is when a tx is being sent from this PXE.
|
|
15
|
+
* @param secret - The directional app tagging secret that's unique for (sender, recipient, contract) tuple.
|
|
16
|
+
* @param app - The address of the contract that the logs are tagged for. Used for siloing tags to match
|
|
17
|
+
* kernel circuit behavior.
|
|
18
|
+
* @param start - The starting index (inclusive) of the window to process.
|
|
19
|
+
* @param end - The ending index (exclusive) of the window to process.
|
|
20
|
+
* @param aztecNode - The Aztec node instance to query for logs.
|
|
21
|
+
* @param taggingStore - The data provider to store pending indexes.
|
|
22
|
+
* @param jobId - Job identifier, used to keep writes in-memory until they can be persisted in a data integrity
|
|
23
|
+
* preserving way.
|
|
24
|
+
*/
|
|
25
|
+
export async function loadAndStoreNewTaggingIndexes(
|
|
26
|
+
secret: DirectionalAppTaggingSecret,
|
|
27
|
+
app: AztecAddress,
|
|
28
|
+
start: number,
|
|
29
|
+
end: number,
|
|
30
|
+
aztecNode: AztecNode,
|
|
31
|
+
taggingStore: SenderTaggingStore,
|
|
32
|
+
anchorBlockHash: BlockHash,
|
|
33
|
+
jobId: string,
|
|
34
|
+
) {
|
|
35
|
+
// We compute the tags for the current window of indexes
|
|
36
|
+
const preTagsForWindow: PreTag[] = Array(end - start)
|
|
37
|
+
.fill(0)
|
|
38
|
+
.map((_, i) => ({ secret, index: start + i }));
|
|
39
|
+
const siloedTagsForWindow = await Promise.all(
|
|
40
|
+
preTagsForWindow.map(async preTag => SiloedTag.compute(await Tag.compute(preTag), app)),
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const txsForTags = await getTxsContainingTags(siloedTagsForWindow, aztecNode, anchorBlockHash);
|
|
44
|
+
const highestIndexMap = getTxHighestIndexMap(txsForTags, preTagsForWindow);
|
|
45
|
+
|
|
46
|
+
// Now we iterate over the map, reconstruct the preTags and tx hash and store them in the db.
|
|
47
|
+
for (const [txHashStr, highestIndex] of highestIndexMap.entries()) {
|
|
48
|
+
const txHash = TxHash.fromString(txHashStr);
|
|
49
|
+
await taggingStore.storePendingIndexes([{ secret, index: highestIndex }], txHash, jobId);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Returns txs that used the given tags. A tag might have been used in multiple txs and for this reason we return
|
|
54
|
+
// an array for each tag.
|
|
55
|
+
async function getTxsContainingTags(
|
|
56
|
+
tags: SiloedTag[],
|
|
57
|
+
aztecNode: AztecNode,
|
|
58
|
+
anchorBlockHash: BlockHash,
|
|
59
|
+
): Promise<TxHash[][]> {
|
|
60
|
+
// We use the utility function below to retrieve all logs for the tags across all pages, so we don't need to handle
|
|
61
|
+
// pagination here.
|
|
62
|
+
const allLogs = await getAllPrivateLogsByTags(aztecNode, tags, anchorBlockHash);
|
|
63
|
+
return allLogs.map(logs => logs.map(log => log.txHash));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Returns a map of txHash to the highest index for that txHash.
|
|
67
|
+
function getTxHighestIndexMap(txHashesForTags: TxHash[][], preTagsForWindow: PreTag[]): Map<string, number> {
|
|
68
|
+
if (txHashesForTags.length !== preTagsForWindow.length) {
|
|
69
|
+
throw new Error(
|
|
70
|
+
`Number of tx hashes arrays does not match number of pre-tags. ${txHashesForTags.length} !== ${preTagsForWindow.length}`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const highestIndexMap = new Map<string, number>();
|
|
75
|
+
for (let i = 0; i < txHashesForTags.length; i++) {
|
|
76
|
+
const taggingIndex = preTagsForWindow[i].index;
|
|
77
|
+
const txHashesForTag = txHashesForTags[i];
|
|
78
|
+
for (const txHash of txHashesForTag) {
|
|
79
|
+
const key = txHash.toString();
|
|
80
|
+
highestIndexMap.set(key, Math.max(highestIndexMap.get(key) ?? 0, taggingIndex));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return highestIndexMap;
|
|
84
|
+
}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import type { Fr, Point } from '@aztec/foundation/fields';
|
|
4
|
-
import type { FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
|
|
5
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
-
import type { L2Block } from '@aztec/stdlib/block';
|
|
7
|
-
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
8
|
-
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
9
|
-
import type { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
|
|
10
|
-
import type { NoteStatus } from '@aztec/stdlib/note';
|
|
11
|
-
import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
12
|
-
import type { BlockHeader, NodeStats } from '@aztec/stdlib/tx';
|
|
13
|
-
import type { NoteData } from './oracle/interfaces.js';
|
|
14
|
-
import type { MessageLoadOracleInputs } from './oracle/message_load_oracle_inputs.js';
|
|
15
|
-
/**
|
|
16
|
-
* Error thrown when a contract is not found in the database.
|
|
17
|
-
*/
|
|
18
|
-
export declare class ContractNotFoundError extends Error {
|
|
19
|
-
constructor(contractAddress: string);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Error thrown when a contract class is not found in the database.
|
|
23
|
-
*/
|
|
24
|
-
export declare class ContractClassNotFoundError extends Error {
|
|
25
|
-
constructor(contractClassId: string);
|
|
26
|
-
}
|
|
27
|
-
export type ExecutionStats = {
|
|
28
|
-
/**
|
|
29
|
-
* Contains an entry for each RPC call performed during the execution
|
|
30
|
-
*/
|
|
31
|
-
nodeRPCCalls: NodeStats;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* The interface for the data layer required to perform private and utility execution.
|
|
35
|
-
*/
|
|
36
|
-
export interface ExecutionDataProvider {
|
|
37
|
-
/**
|
|
38
|
-
* Returns a contract instance associated with an address, if available.
|
|
39
|
-
* @param address - Address.
|
|
40
|
-
* @returns A contract instance.
|
|
41
|
-
*/
|
|
42
|
-
getContractInstance(address: AztecAddress): Promise<ContractInstance>;
|
|
43
|
-
/**
|
|
44
|
-
* Retrieve the complete address associated to a given address.
|
|
45
|
-
* @param account - The account address.
|
|
46
|
-
* @returns A complete address associated with the input address.
|
|
47
|
-
* @throws An error if the account is not registered in the database.
|
|
48
|
-
*/
|
|
49
|
-
getCompleteAddress(account: AztecAddress): Promise<CompleteAddress>;
|
|
50
|
-
/**
|
|
51
|
-
* Retrieve keys associated with a specific master public key and app address.
|
|
52
|
-
* @param pkMHash - The master public key hash.
|
|
53
|
-
* @returns A Promise that resolves to nullifier keys.
|
|
54
|
-
* @throws If the keys are not registered in the key store.
|
|
55
|
-
*/
|
|
56
|
-
getKeyValidationRequest(pkMHash: Fr, contractAddress: AztecAddress): Promise<KeyValidationRequest>;
|
|
57
|
-
/**
|
|
58
|
-
* Retrieves a set of notes stored in the database for a given contract address and storage slot.
|
|
59
|
-
* The query result is paginated using 'limit' and 'offset' values.
|
|
60
|
-
* Returns an object containing an array of note data.
|
|
61
|
-
*
|
|
62
|
-
* @param contractAddress - The contract address of the notes.
|
|
63
|
-
* @param owner - The owner of the notes.
|
|
64
|
-
* @param storageSlot - The storage slot of the notes.
|
|
65
|
-
* @param status - The status of notes to fetch.
|
|
66
|
-
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
67
|
-
* @returns A Promise that resolves to an array of note data.
|
|
68
|
-
*/
|
|
69
|
-
getNotes(contractAddress: AztecAddress, owner: AztecAddress, storageSlot: Fr, status: NoteStatus, scopes?: AztecAddress[]): Promise<NoteData[]>;
|
|
70
|
-
/**
|
|
71
|
-
* Retrieve the artifact information of a specific function within a contract.
|
|
72
|
-
* The function is identified by its selector, which is a unique identifier generated from the function signature.
|
|
73
|
-
*
|
|
74
|
-
* @param contractAddress - The contract address.
|
|
75
|
-
* @param selector - The corresponding function selector.
|
|
76
|
-
* @returns A Promise that resolves to a FunctionArtifact object.
|
|
77
|
-
*/
|
|
78
|
-
getFunctionArtifact(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifactWithContractName>;
|
|
79
|
-
/**
|
|
80
|
-
* Generates a stable function name for debug purposes.
|
|
81
|
-
* @param contractAddress - The contract address.
|
|
82
|
-
* @param selector - The corresponding function selector.
|
|
83
|
-
*/
|
|
84
|
-
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
85
|
-
/**
|
|
86
|
-
* Gets the index of a nullifier in the nullifier tree.
|
|
87
|
-
* @param nullifier - The nullifier.
|
|
88
|
-
* @returns - The index of the nullifier. Undefined if it does not exist in the tree.
|
|
89
|
-
*/
|
|
90
|
-
getNullifierIndex(nullifier: Fr): Promise<bigint | undefined>;
|
|
91
|
-
/**
|
|
92
|
-
* Returns a nullifier membership witness for the given nullifier or undefined if not found.
|
|
93
|
-
* REFACTOR: Same as getL1ToL2MembershipWitness, can be combined with aztec-node method that does almost the same thing.
|
|
94
|
-
* @param nullifier - Nullifier we're looking for.
|
|
95
|
-
*/
|
|
96
|
-
getNullifierMembershipWitnessAtLatestBlock(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
97
|
-
/**
|
|
98
|
-
* Fetches a message from the db, given its key.
|
|
99
|
-
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
100
|
-
* @param messageHash - Hash of the message.
|
|
101
|
-
* @param secret - Secret used to compute a nullifier.
|
|
102
|
-
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
103
|
-
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
104
|
-
*/
|
|
105
|
-
getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
|
|
106
|
-
/**
|
|
107
|
-
* Retrieve the latest block header synchronized by the execution data provider. This block header is referred
|
|
108
|
-
* to as the anchor block header in Aztec terminology and it defines the state that is used during private function
|
|
109
|
-
* execution.
|
|
110
|
-
* @returns The anchor block header.
|
|
111
|
-
*/
|
|
112
|
-
getAnchorBlockHeader(): Promise<BlockHeader>;
|
|
113
|
-
/**
|
|
114
|
-
* Fetches the index and sibling path of a leaf at a given block from a given tree.
|
|
115
|
-
* @param blockNumber - The block number at which to get the membership witness.
|
|
116
|
-
* @param treeId - Id of the tree to get the sibling path from.
|
|
117
|
-
* @param leafValue - The leaf value
|
|
118
|
-
* @returns The index and sibling path concatenated [index, sibling_path]
|
|
119
|
-
*/
|
|
120
|
-
getMembershipWitness(blockNumber: BlockNumber, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
|
|
121
|
-
/**
|
|
122
|
-
* Returns a nullifier membership witness for a given nullifier at a given block.
|
|
123
|
-
* @param blockNumber - The block number at which to get the index.
|
|
124
|
-
* @param nullifier - Nullifier we try to find witness for.
|
|
125
|
-
* @returns The nullifier membership witness (if found).
|
|
126
|
-
*/
|
|
127
|
-
getNullifierMembershipWitness(blockNumber: BlockNumber, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
128
|
-
/**
|
|
129
|
-
* Returns a low nullifier membership witness for a given nullifier at a given block.
|
|
130
|
-
* @param blockNumber - The block number at which to get the index.
|
|
131
|
-
* @param nullifier - Nullifier we try to find the low nullifier witness for.
|
|
132
|
-
* @returns The low nullifier membership witness (if found).
|
|
133
|
-
* @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
|
|
134
|
-
* list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
|
|
135
|
-
* we are trying to prove non-inclusion for.
|
|
136
|
-
*/
|
|
137
|
-
getLowNullifierMembershipWitness(blockNumber: BlockNumber, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
138
|
-
/**
|
|
139
|
-
* Returns a witness for a given slot of the public data tree at a given block.
|
|
140
|
-
* @param blockNumber - The block number at which to get the witness.
|
|
141
|
-
* @param leafSlot - The slot of the public data in the public data tree.
|
|
142
|
-
*/
|
|
143
|
-
getPublicDataWitness(blockNumber: BlockNumber, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
144
|
-
/**
|
|
145
|
-
* Gets the storage value at the given contract storage slot.
|
|
146
|
-
*
|
|
147
|
-
* @remarks The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree.
|
|
148
|
-
* Aztec's version of `eth_getStorageAt`.
|
|
149
|
-
*
|
|
150
|
-
* @param blockNumber - The block number at which to get the data.
|
|
151
|
-
* @param contract - Address of the contract to query.
|
|
152
|
-
* @param slot - Slot to query.
|
|
153
|
-
* @returns Storage value at the given contract slot.
|
|
154
|
-
* @throws If the contract is not deployed.
|
|
155
|
-
*/
|
|
156
|
-
getPublicStorageAt(blockNumber: BlockNumber, contract: AztecAddress, slot: Fr): Promise<Fr>;
|
|
157
|
-
/**
|
|
158
|
-
* Fetch a block corresponding to the given block number.
|
|
159
|
-
* @param blockNumber - The block number of a block to fetch.
|
|
160
|
-
* @returns - The block corresponding to the given block number. Undefined if it does not exist.
|
|
161
|
-
*/
|
|
162
|
-
getBlock(blockNumber: BlockNumber): Promise<L2Block | undefined>;
|
|
163
|
-
/**
|
|
164
|
-
* Assert that the oracle version is compatible with the expected version.
|
|
165
|
-
* @param version - The expected version.
|
|
166
|
-
*/
|
|
167
|
-
assertCompatibleOracleVersion(version: number): void;
|
|
168
|
-
/**
|
|
169
|
-
* Calculates the directional app tagging secret for a given contract, sender and recipient.
|
|
170
|
-
* @param contractAddress - The contract address to silo the secret for
|
|
171
|
-
* @param sender - The address sending the note
|
|
172
|
-
* @param recipient - The address receiving the note
|
|
173
|
-
* @returns The directional app tagging secret
|
|
174
|
-
*/
|
|
175
|
-
calculateDirectionalAppTaggingSecret(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<DirectionalAppTaggingSecret>;
|
|
176
|
-
/**
|
|
177
|
-
* Updates the local index of the shared tagging secret of a (sender, recipient, contract) tuple if a log with
|
|
178
|
-
* a larger index is found from the node.
|
|
179
|
-
* @param secret - The secret that's unique for (sender, recipient, contract) tuple while the direction
|
|
180
|
-
* of sender -> recipient matters.
|
|
181
|
-
* @param contractAddress - The address of the contract that the logs are tagged for. Needs to be provided to store
|
|
182
|
-
* because the function performs second round of siloing which is necessary because kernels do it as well (they silo
|
|
183
|
-
* first field of the private log which corresponds to the tag).
|
|
184
|
-
*/
|
|
185
|
-
syncTaggedLogsAsSender(secret: DirectionalAppTaggingSecret, contractAddress: AztecAddress): Promise<void>;
|
|
186
|
-
/**
|
|
187
|
-
* Returns the last used index when sending a log with a given secret.
|
|
188
|
-
* @param secret - The directional app tagging secret.
|
|
189
|
-
* @returns The last used index for the given directional app tagging secret, or undefined if we never sent a log
|
|
190
|
-
* from this sender to a recipient in a given contract (implicitly included in the secret).
|
|
191
|
-
*/
|
|
192
|
-
getLastUsedIndexAsSender(secret: DirectionalAppTaggingSecret): Promise<number | undefined>;
|
|
193
|
-
/**
|
|
194
|
-
* Synchronizes the private logs tagged with scoped addresses and all the senders in the address book. Stores the found
|
|
195
|
-
* logs in CapsuleArray ready for a later retrieval in Aztec.nr.
|
|
196
|
-
* @param contractAddress - The address of the contract that the logs are tagged for.
|
|
197
|
-
* @param pendingTaggedLogArrayBaseSlot - The base slot of the pending tagged log capsule array in which found logs will be stored.
|
|
198
|
-
* @param scopes - The scoped addresses to sync logs for. If not provided, all accounts in the address book will be
|
|
199
|
-
* synced.
|
|
200
|
-
*/
|
|
201
|
-
syncTaggedLogs(contractAddress: AztecAddress, pendingTaggedLogArrayBaseSlot: Fr, scopes?: AztecAddress[]): Promise<void>;
|
|
202
|
-
/**
|
|
203
|
-
* Validates all note and event validation requests enqueued via `enqueue_note_for_validation` and
|
|
204
|
-
* `enqueue_event_for_validation`, inserting them into the note database and event store respectively, making them
|
|
205
|
-
* queryable via `get_notes` and `getPrivateEvents`.
|
|
206
|
-
*
|
|
207
|
-
* This automatically clears both validation request queues, so no further work needs to be done by the caller.
|
|
208
|
-
* @param contractAddress - The address of the contract that the logs are tagged for.
|
|
209
|
-
* @param noteValidationRequestsArrayBaseSlot - The base slot of capsule array containing note validation requests.
|
|
210
|
-
* @param eventValidationRequestsArrayBaseSlot - The base slot of capsule array containing event validation requests.
|
|
211
|
-
*/
|
|
212
|
-
validateEnqueuedNotesAndEvents(contractAddress: AztecAddress, noteValidationRequestsArrayBaseSlot: Fr, eventValidationRequestsArrayBaseSlot: Fr): Promise<void>;
|
|
213
|
-
bulkRetrieveLogs(contractAddress: AztecAddress, logRetrievalRequestsArrayBaseSlot: Fr, logRetrievalResponsesArrayBaseSlot: Fr): Promise<void>;
|
|
214
|
-
/**
|
|
215
|
-
* Looks for nullifiers of active contract notes and marks them as nullified in the db if a nullifier is found.
|
|
216
|
-
*/
|
|
217
|
-
syncNoteNullifiers(contractAddress: AztecAddress): Promise<void>;
|
|
218
|
-
/**
|
|
219
|
-
* Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `loadCapsule`.
|
|
220
|
-
* * If data was already stored at this slot, it is overwritten.
|
|
221
|
-
* @param contractAddress - The contract address to scope the data under.
|
|
222
|
-
* @param slot - The slot in the database in which to store the value. Slots need not be contiguous.
|
|
223
|
-
* @param capsule - An array of field elements representing the capsule.
|
|
224
|
-
* @remarks A capsule is a "blob" of data that is passed to the contract through an oracle. It works similarly
|
|
225
|
-
* to public contract storage in that it's indexed by the contract address and storage slot but instead of the global
|
|
226
|
-
* network state it's backed by local PXE db.
|
|
227
|
-
*/
|
|
228
|
-
storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
|
|
229
|
-
/**
|
|
230
|
-
* Returns data previously stored via `storeCapsule` in the per-contract non-volatile database.
|
|
231
|
-
* @param contractAddress - The contract address under which the data is scoped.
|
|
232
|
-
* @param slot - The slot in the database to read.
|
|
233
|
-
* @returns The stored data or `null` if no data is stored under the slot.
|
|
234
|
-
*/
|
|
235
|
-
loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
|
|
236
|
-
/**
|
|
237
|
-
* Deletes data in the per-contract non-volatile database. Does nothing if no data was present.
|
|
238
|
-
* @param contractAddress - The contract address under which the data is scoped.
|
|
239
|
-
* @param slot - The slot in the database to delete.
|
|
240
|
-
*/
|
|
241
|
-
deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
|
|
242
|
-
/**
|
|
243
|
-
* Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data
|
|
244
|
-
* structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.
|
|
245
|
-
* Supports overlapping source and destination regions (which will result in the overlapped source values being
|
|
246
|
-
* overwritten). All copied slots must exist in the database (i.e. have been stored and not deleted)
|
|
247
|
-
*
|
|
248
|
-
* @param contractAddress - The contract address under which the data is scoped.
|
|
249
|
-
* @param srcSlot - The first slot to copy from.
|
|
250
|
-
* @param dstSlot - The first slot to copy to.
|
|
251
|
-
* @param numEntries - The number of entries to copy.
|
|
252
|
-
*/
|
|
253
|
-
copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
|
|
254
|
-
/**
|
|
255
|
-
* Retrieves the shared secret for a given address and ephemeral public key.
|
|
256
|
-
* @param address - The address to get the secret for.
|
|
257
|
-
* @param ephPk - The ephemeral public key to get the secret for.
|
|
258
|
-
* @returns The secret for the given address.
|
|
259
|
-
*/
|
|
260
|
-
getSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point>;
|
|
261
|
-
/**
|
|
262
|
-
* Returns the execution statistics collected during the simulator run.
|
|
263
|
-
* @returns The execution statistics.
|
|
264
|
-
*/
|
|
265
|
-
getStats(): ExecutionStats;
|
|
266
|
-
}
|
|
267
|
-
//# sourceMappingURL=data:application/json;base64,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QUUsRUFBRSxHQUFHLElBQUksQ0FBQyxDQUFDO0lBRTNFOzs7O09BSUc7SUFDSCxhQUFhLENBQUMsZUFBZSxFQUFFLFlBQVksRUFBRSxJQUFJLEVBQUUsRUFBRSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUV0RTs7Ozs7Ozs7OztPQVVHO0lBQ0gsV0FBVyxDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsT0FBTyxFQUFFLEVBQUUsRUFBRSxPQUFPLEVBQUUsRUFBRSxFQUFFLFVBQVUsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBRXhHOzs7OztPQUtHO0lBQ0gsZUFBZSxDQUFDLE9BQU8sRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLEtBQUssR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUM7SUFFckU7OztPQUdHO0lBQ0gsUUFBUSxJQUFJLGNBQWMsQ0FBQztDQUM1QiJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution_data_provider.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,oB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OASG;IACH,YAAY,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpF;;;;;OAKG;IACH,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;IAE3E;;;;OAIG;IACH,aAAa,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtE;;;;;;;;;;OAUG;IACH,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExG;;;;;OAKG;IACH,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAErE;;;OAGG;IACH,QAAQ,IAAI,cAAc,CAAC;CAC5B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error thrown when a contract is not found in the database.
|
|
3
|
-
*/ export class ContractNotFoundError extends Error {
|
|
4
|
-
constructor(contractAddress){
|
|
5
|
-
super(`DB has no contract with address ${contractAddress}`);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Error thrown when a contract class is not found in the database.
|
|
10
|
-
*/ export class ContractClassNotFoundError extends Error {
|
|
11
|
-
constructor(contractClassId){
|
|
12
|
-
super(`DB has no contract class with id ${contractClassId}`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
|
-
import type { NodeStats } from '@aztec/stdlib/tx';
|
|
3
|
-
export type ProxiedNode = AztecNode & {
|
|
4
|
-
getStats(): NodeStats;
|
|
5
|
-
};
|
|
6
|
-
export declare class ProxiedNodeFactory {
|
|
7
|
-
static create(node: AztecNode): ProxiedNode;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJveGllZF9ub2RlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL3Byb3hpZWRfbm9kZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNqRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUtsRCxNQUFNLE1BQU0sV0FBVyxHQUFHLFNBQVMsR0FBRztJQUFFLFFBQVEsSUFBSSxTQUFTLENBQUE7Q0FBRSxDQUFDO0FBRWhFLHFCQUFhLGtCQUFrQjtJQUM3QixNQUFNLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxTQUFTLGVBcUI1QjtDQUNGIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxied_node.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/proxied_node.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG;IAAE,QAAQ,IAAI,SAAS,CAAA;CAAE,CAAC;AAEhE,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,eAqB5B;CACF"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Timer } from '@aztec/foundation/timer';
|
|
2
|
-
export class ProxiedNodeFactory {
|
|
3
|
-
static create(node) {
|
|
4
|
-
const stats = {};
|
|
5
|
-
return new Proxy(node, {
|
|
6
|
-
get (target, prop) {
|
|
7
|
-
if (prop === 'getStats') {
|
|
8
|
-
return ()=>{
|
|
9
|
-
return stats;
|
|
10
|
-
};
|
|
11
|
-
} else {
|
|
12
|
-
return async function(...args) {
|
|
13
|
-
if (!stats[prop]) {
|
|
14
|
-
stats[prop] = {
|
|
15
|
-
times: []
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const timer = new Timer();
|
|
19
|
-
const result = await target[prop].apply(target, args);
|
|
20
|
-
stats[prop].times.push(timer.ms());
|
|
21
|
-
return result;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|