@aztec/pxe 5.0.0-private.20260319 → 5.0.0-rc.2
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 +45 -111
- 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 +51 -0
- package/dest/bin/oracle_version_helpers.d.ts.map +1 -0
- package/dest/bin/oracle_version_helpers.js +254 -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 +37 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts +20 -14
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +78 -28
- package/dest/config/index.d.ts +8 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +13 -14
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +19 -19
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +57 -32
- 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 +2 -2
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +5 -9
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +3 -7
- package/dest/contract_function_simulator/index.d.ts +24 -6
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +11 -4
- package/dest/contract_function_simulator/noir-structs/bounded_vec.d.ts +29 -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 +30 -0
- package/dest/contract_function_simulator/noir-structs/contract_class_log_data.d.ts +9 -0
- package/dest/contract_function_simulator/noir-structs/contract_class_log_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/contract_class_log_data.js +1 -0
- package/dest/contract_function_simulator/noir-structs/embedded_curve_point.d.ts +7 -0
- package/dest/contract_function_simulator/noir-structs/embedded_curve_point.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/embedded_curve_point.js +1 -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 +5 -5
- 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 +7 -9
- package/dest/contract_function_simulator/noir-structs/fact.d.ts +16 -0
- package/dest/contract_function_simulator/noir-structs/fact.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/fact.js +6 -0
- package/dest/contract_function_simulator/noir-structs/fact_collection.d.ts +27 -0
- package/dest/contract_function_simulator/noir-structs/fact_collection.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/fact_collection.js +29 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +19 -10
- 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 +12 -24
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +5 -9
- 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 +2 -61
- 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 +5 -5
- 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 +8 -10
- package/dest/contract_function_simulator/noir-structs/option.d.ts +59 -0
- package/dest/contract_function_simulator/noir-structs/option.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/option.js +67 -0
- package/dest/contract_function_simulator/noir-structs/origin_block.d.ts +11 -0
- package/dest/contract_function_simulator/noir-structs/origin_block.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/origin_block.js +5 -0
- package/dest/contract_function_simulator/noir-structs/provided_secret.d.ts +8 -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 +1 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.d.ts +21 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.js +33 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tx.d.ts +21 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tx.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tx.js +50 -0
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.d.ts +14 -0
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.js +5 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +6 -11
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/utility_context.js +1 -20
- package/dest/contract_function_simulator/oracle/acir_callback.d.ts +16 -0
- package/dest/contract_function_simulator/oracle/acir_callback.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/acir_callback.js +71 -0
- package/dest/contract_function_simulator/oracle/index.d.ts +2 -13
- package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/index.js +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +15 -103
- 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 +3 -14
- 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 -24
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +2 -2
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts +135 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.js +976 -0
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +183 -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 +1222 -0
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +3 -4
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +44 -42
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +147 -59
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +143 -71
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +485 -187
- package/dest/contract_function_simulator/pick_notes.d.ts +1 -1
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +20 -3
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.js +35 -64
- package/dest/contract_function_simulator/transient_array_service.d.ts +31 -0
- package/dest/contract_function_simulator/transient_array_service.d.ts.map +1 -0
- package/dest/contract_function_simulator/transient_array_service.js +62 -0
- package/dest/contract_logging.d.ts +9 -4
- package/dest/contract_logging.d.ts.map +1 -1
- package/dest/contract_logging.js +21 -6
- package/dest/contract_sync/contract_sync_service.d.ts +11 -9
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -1
- package/dest/contract_sync/contract_sync_service.js +73 -51
- package/dest/contract_sync/helpers.d.ts +8 -9
- package/dest/contract_sync/helpers.d.ts.map +1 -1
- package/dest/contract_sync/helpers.js +23 -30
- package/dest/debug/pxe_debug_utils.d.ts +3 -8
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/debug/pxe_debug_utils.js +0 -6
- 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 +2 -2
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +18 -5
- 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 +18 -5
- package/dest/entrypoints/pxe_creation_options.d.ts +16 -2
- 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 +2 -3
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +1 -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 +20 -6
- package/dest/error_enriching.js +1 -1
- package/dest/events/event_service.d.ts +15 -6
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +44 -11
- package/dest/events/private_event_filter_validator.d.ts +3 -2
- package/dest/events/private_event_filter_validator.d.ts.map +1 -1
- package/dest/events/private_event_filter_validator.js +15 -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 +51 -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/hooks/resolve_tagging_secret_strategy.d.ts +41 -0
- package/dest/hooks/resolve_tagging_secret_strategy.d.ts.map +1 -0
- package/dest/hooks/resolve_tagging_secret_strategy.js +3 -0
- package/dest/logs/log_service.d.ts +12 -12
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +169 -81
- package/dest/messages/tx_resolver_service.d.ts +17 -0
- package/dest/messages/tx_resolver_service.d.ts.map +1 -0
- package/dest/messages/tx_resolver_service.js +55 -0
- package/dest/notes/note_service.d.ts +27 -6
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +80 -56
- package/dest/notes_filter.d.ts +2 -3
- package/dest/notes_filter.d.ts.map +1 -1
- package/dest/oracle_version.d.ts +4 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +20 -10
- 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/private_kernel_reset_private_inputs_builder.js +1 -1
- package/dest/private_kernel/hints/test_utils.d.ts +1 -1
- package/dest/private_kernel/hints/test_utils.d.ts.map +1 -1
- package/dest/private_kernel/hints/test_utils.js +3 -4
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +6 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +152 -59
- package/dest/private_kernel/private_kernel_oracle.d.ts +10 -10
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +24 -22
- package/dest/pxe.d.ts +104 -27
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +229 -130
- package/dest/storage/allowed_scopes.d.ts +6 -0
- package/dest/storage/allowed_scopes.d.ts.map +1 -0
- package/dest/storage/allowed_scopes.js +7 -0
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts +9 -6
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -1
- package/dest/storage/anchor_block_store/anchor_block_store.js +9 -7
- 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 +647 -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 +47 -0
- package/dest/storage/capsule_store/capsule_store.d.ts +9 -9
- package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
- package/dest/storage/capsule_store/capsule_store.js +36 -28
- package/dest/storage/capsule_store/index.d.ts +2 -1
- package/dest/storage/capsule_store/index.d.ts.map +1 -1
- package/dest/storage/capsule_store/index.js +1 -0
- package/dest/storage/contract_store/contract_store.d.ts +1 -1
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +11 -28
- package/dest/storage/fact_store/fact_service.d.ts +20 -0
- package/dest/storage/fact_store/fact_service.d.ts.map +1 -0
- package/dest/storage/fact_store/fact_service.js +30 -0
- package/dest/storage/fact_store/fact_store.d.ts +95 -0
- package/dest/storage/fact_store/fact_store.d.ts.map +1 -0
- package/dest/storage/fact_store/fact_store.js +408 -0
- package/dest/storage/fact_store/fact_store_keys.d.ts +34 -0
- package/dest/storage/fact_store/fact_store_keys.d.ts.map +1 -0
- package/dest/storage/fact_store/fact_store_keys.js +50 -0
- package/dest/storage/fact_store/index.d.ts +5 -0
- package/dest/storage/fact_store/index.d.ts.map +1 -0
- package/dest/storage/fact_store/index.js +3 -0
- package/dest/storage/fact_store/stored_fact.d.ts +32 -0
- package/dest/storage/fact_store/stored_fact.d.ts.map +1 -0
- package/dest/storage/fact_store/stored_fact.js +64 -0
- package/dest/storage/index.d.ts +3 -2
- package/dest/storage/index.d.ts.map +1 -1
- package/dest/storage/index.js +2 -1
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/metadata.js +1 -1
- package/dest/storage/note_store/note_store.d.ts +42 -33
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +199 -170
- package/dest/storage/note_store/stored_note.d.ts +3 -8
- package/dest/storage/note_store/stored_note.d.ts.map +1 -1
- package/dest/storage/note_store/stored_note.js +4 -20
- package/dest/storage/open_pxe_stores.d.ts +35 -0
- package/dest/storage/open_pxe_stores.d.ts.map +1 -0
- package/dest/storage/open_pxe_stores.js +29 -0
- package/dest/storage/private_event_store/private_event_store.d.ts +13 -16
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +43 -43
- package/dest/storage/private_event_store/stored_private_event.js +1 -1
- package/dest/storage/tagging_store/index.d.ts +2 -2
- package/dest/storage/tagging_store/index.d.ts.map +1 -1
- package/dest/storage/tagging_store/index.js +1 -1
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts +6 -6
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.d.ts +5 -5
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.js +3 -3
- package/dest/storage/tagging_store/tagging_secret_sources_store.d.ts +40 -0
- package/dest/storage/tagging_store/tagging_secret_sources_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/tagging_secret_sources_store.js +92 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts +34 -10
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -1
- package/dest/tagging/get_all_logs_by_tags.js +36 -37
- package/dest/tagging/index.d.ts +5 -4
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +4 -3
- 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 +69 -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 +203 -0
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts +3 -3
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts.map +1 -1
- 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 +4 -5
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +26 -14
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -6
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -1
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +21 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +4 -4
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +2 -2
- package/package.json +20 -17
- package/src/bin/check_oracle_version.ts +51 -133
- package/src/bin/index.ts +5 -0
- package/src/bin/oracle_version_helpers.ts +311 -0
- package/src/block_synchronizer/block_stream_source.ts +42 -0
- package/src/block_synchronizer/block_synchronizer.ts +93 -38
- package/src/config/index.ts +15 -8
- package/src/contract_function_simulator/contract_function_simulator.ts +86 -48
- package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
- package/src/contract_function_simulator/execution_note_cache.ts +1 -1
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +5 -9
- package/src/contract_function_simulator/index.ts +63 -5
- package/src/contract_function_simulator/noir-structs/bounded_vec.ts +43 -0
- package/src/contract_function_simulator/noir-structs/contract_class_log_data.ts +9 -0
- package/src/contract_function_simulator/noir-structs/embedded_curve_point.ts +4 -0
- package/src/contract_function_simulator/noir-structs/ephemeral_array.ts +66 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +5 -7
- package/src/contract_function_simulator/noir-structs/fact.ts +13 -0
- package/src/contract_function_simulator/noir-structs/fact_collection.ts +59 -0
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +27 -20
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +8 -61
- package/src/contract_function_simulator/noir-structs/note_data.ts +27 -0
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +6 -8
- package/src/contract_function_simulator/noir-structs/option.ts +75 -0
- package/src/contract_function_simulator/noir-structs/origin_block.ts +8 -0
- package/src/contract_function_simulator/noir-structs/provided_secret.ts +5 -0
- package/src/contract_function_simulator/noir-structs/resolved_tagging_strategy.ts +45 -0
- package/src/contract_function_simulator/noir-structs/resolved_tx.ts +53 -0
- package/src/contract_function_simulator/noir-structs/tx_effect_data.ts +15 -0
- package/src/contract_function_simulator/noir-structs/utility_context.ts +5 -17
- package/src/contract_function_simulator/oracle/acir_callback.ts +108 -0
- package/src/contract_function_simulator/oracle/index.ts +1 -15
- package/src/contract_function_simulator/oracle/interfaces.ts +11 -176
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +6 -21
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +3 -3
- package/src/contract_function_simulator/oracle/oracle_registry.ts +681 -0
- package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +947 -0
- package/src/contract_function_simulator/oracle/private_execution.ts +3 -4
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +182 -79
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +743 -295
- package/src/contract_function_simulator/pick_notes.ts +22 -3
- package/src/contract_function_simulator/proxied_contract_data_source.ts +41 -64
- package/src/contract_function_simulator/transient_array_service.ts +91 -0
- package/src/contract_logging.ts +18 -5
- package/src/contract_sync/contract_sync_service.ts +101 -87
- package/src/contract_sync/helpers.ts +24 -43
- package/src/debug/pxe_debug_utils.ts +3 -11
- package/src/entrypoints/client/bundle/index.ts +0 -1
- package/src/entrypoints/client/bundle/utils.ts +17 -5
- package/src/entrypoints/client/lazy/index.ts +0 -1
- package/src/entrypoints/client/lazy/utils.ts +17 -5
- package/src/entrypoints/pxe_creation_options.ts +21 -1
- package/src/entrypoints/server/index.ts +1 -2
- package/src/entrypoints/server/utils.ts +24 -7
- package/src/error_enriching.ts +1 -1
- package/src/events/event_service.ts +69 -21
- package/src/events/private_event_filter_validator.ts +21 -1
- package/src/hooks/authorize_utility_call.ts +44 -0
- package/src/hooks/execution_hooks.ts +57 -0
- package/src/hooks/index.ts +11 -0
- package/src/hooks/resolve_tagging_secret_strategy.ts +46 -0
- package/src/logs/log_service.ts +204 -146
- package/src/messages/tx_resolver_service.ts +69 -0
- package/src/notes/note_service.ts +119 -85
- package/src/notes_filter.ts +1 -3
- package/src/oracle_version.ts +20 -10
- package/src/private_kernel/batch_planner.ts +169 -0
- package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +1 -1
- package/src/private_kernel/hints/test_utils.ts +3 -10
- package/src/private_kernel/private_kernel_execution_prover.ts +240 -82
- package/src/private_kernel/private_kernel_oracle.ts +35 -25
- package/src/pxe.ts +369 -138
- package/src/storage/allowed_scopes.ts +14 -0
- package/src/storage/anchor_block_store/anchor_block_store.ts +9 -7
- 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__/FactStore.json +40 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/KeyStore.json +52 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/L2TipsKVStore.json +40 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/NoteStore.json +56 -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__/SenderTaggingStore.json +22 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/TaggingSecretSourcesStore.json +30 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/opened_stores.json +117 -0
- package/src/storage/backwards_compatibility_tests/kv_store_snapshot.ts +122 -0
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +769 -0
- package/src/storage/backwards_compatibility_tests/store_spy.ts +73 -0
- package/src/storage/capsule_store/capsule_service.ts +85 -0
- package/src/storage/capsule_store/capsule_store.ts +44 -26
- package/src/storage/capsule_store/index.ts +1 -0
- package/src/storage/contract_store/contract_store.ts +16 -37
- package/src/storage/fact_store/fact_service.ts +45 -0
- package/src/storage/fact_store/fact_store.ts +487 -0
- package/src/storage/fact_store/fact_store_keys.ts +75 -0
- package/src/storage/fact_store/index.ts +4 -0
- package/src/storage/fact_store/stored_fact.ts +80 -0
- package/src/storage/index.ts +2 -1
- package/src/storage/metadata.ts +1 -1
- package/src/storage/note_store/note_store.ts +228 -192
- package/src/storage/note_store/stored_note.ts +5 -27
- package/src/storage/open_pxe_stores.ts +52 -0
- package/src/storage/private_event_store/private_event_store.ts +52 -54
- package/src/storage/private_event_store/stored_private_event.ts +1 -1
- package/src/storage/tagging_store/index.ts +1 -1
- package/src/storage/tagging_store/recipient_tagging_store.ts +5 -9
- package/src/storage/tagging_store/sender_tagging_store.ts +6 -6
- package/src/storage/tagging_store/tagging_secret_sources_store.ts +117 -0
- package/src/tagging/get_all_logs_by_tags.ts +78 -50
- package/src/tagging/index.ts +4 -3
- package/src/tagging/persist_sender_tagging_index_ranges.ts +57 -0
- package/src/tagging/recipient_sync/sync_tagged_private_logs.ts +301 -0
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +2 -2
- package/src/tagging/reconcile_tagging_index_ranges.ts +102 -0
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +41 -19
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +23 -8
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +4 -5
- package/dest/access_scopes.d.ts +0 -9
- package/dest/access_scopes.d.ts.map +0 -1
- package/dest/access_scopes.js +0 -6
- package/dest/contract_function_simulator/noir-structs/message_tx_context.d.ts +0 -16
- package/dest/contract_function_simulator/noir-structs/message_tx_context.d.ts.map +0 -1
- package/dest/contract_function_simulator/noir-structs/message_tx_context.js +0 -57
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts +0 -9
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts.map +0 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.js +0 -42
- package/dest/contract_function_simulator/oracle/oracle.d.ts +0 -61
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +0 -1
- package/dest/contract_function_simulator/oracle/oracle.js +0 -437
- package/dest/messages/message_context_service.d.ts +0 -17
- package/dest/messages/message_context_service.d.ts.map +0 -1
- package/dest/messages/message_context_service.js +0 -36
- package/dest/storage/tagging_store/sender_address_book_store.d.ts +0 -14
- package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +0 -1
- package/dest/storage/tagging_store/sender_address_book_store.js +0 -36
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +0 -14
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +0 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +0 -99
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +0 -14
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +0 -1
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +0 -33
- package/src/access_scopes.ts +0 -9
- package/src/contract_function_simulator/noir-structs/message_tx_context.ts +0 -55
- package/src/contract_function_simulator/oracle/legacy_oracle_mappings.ts +0 -135
- package/src/contract_function_simulator/oracle/oracle.ts +0 -675
- package/src/messages/message_context_service.ts +0 -45
- package/src/storage/tagging_store/sender_address_book_store.ts +0 -48
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +0 -140
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +0 -44
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
+
import { Semaphore } from '@aztec/foundation/queue';
|
|
4
|
+
import type { AztecAsyncKVStore, AztecAsyncMap, AztecAsyncMultiMap } from '@aztec/kv-store';
|
|
5
|
+
|
|
6
|
+
import type { StagedStore } from '../../job_coordinator/job_coordinator.js';
|
|
7
|
+
import { FactCollectionKey, type FactCollectionTypeKey, type OriginBlock } from './fact_store_keys.js';
|
|
8
|
+
import { type Fact, StoredFact, factKeyStrOf } from './stored_fact.js';
|
|
9
|
+
|
|
10
|
+
type JobId = string;
|
|
11
|
+
type BlockNum = number;
|
|
12
|
+
type FactBuffer = Buffer;
|
|
13
|
+
type FactCollectionTypeKeyStr = string;
|
|
14
|
+
type FactCollectionKeyStr = string;
|
|
15
|
+
type FactKeyStr = string;
|
|
16
|
+
|
|
17
|
+
/** A fact collection as returned by the store. */
|
|
18
|
+
export type FactCollection = { key: FactCollectionKey; facts: Fact[] };
|
|
19
|
+
|
|
20
|
+
/** Internal auxiliary type assembling a collection. */
|
|
21
|
+
type CollectionWithFacts = { key: FactCollectionKey; facts: Map<FactKeyStr, Fact> };
|
|
22
|
+
|
|
23
|
+
/** A pending operation for a job: record a fact, or delete a fact collection. */
|
|
24
|
+
type StagedOp = { kind: 'recordFact'; fact: StoredFact } | { kind: 'deleteFactCollection'; key: FactCollectionKey };
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Stores immutable facts grouped into collections, isolated by contract and scope.
|
|
28
|
+
*
|
|
29
|
+
* A fact collection is a contract-defined bag of facts identified by a {@link FactCollectionKey} (contract, scope,
|
|
30
|
+
* collection type, and id). A fact is a contract-defined immutable, typed datum in a collection. Collections are
|
|
31
|
+
* implicit: one comes into being when its first fact is recorded and ceases to exist once it has no facts left.
|
|
32
|
+
*
|
|
33
|
+
* What makes this store different to, for example, the `CapsuleStore`, is that it is designed to support use cases
|
|
34
|
+
* where resilience to reorgs is needed, via what we call _retractability_.
|
|
35
|
+
*
|
|
36
|
+
* Facts can be retractable or non-retractable. They are retractable if they are associated to an origin block.
|
|
37
|
+
* Retractable facts are removed from the store when their origin block is pruned (typically due to a reorg).
|
|
38
|
+
* Non-retractable facts survive reorgs: they must then be explicitly deleted, so as not to keep consuming resources
|
|
39
|
+
* (storage and compute) indefinitely.
|
|
40
|
+
*
|
|
41
|
+
* Fact collections are isolated by scope.
|
|
42
|
+
*
|
|
43
|
+
* This store is designed to enable Aztec.nr to implement complex workflows such as offchain reception or partial note
|
|
44
|
+
* processing by storing structured data that is guaranteed to exist conditionally to specific blocks being included in
|
|
45
|
+
* the chain, while leaving the complexity of ensuring said guarantees to PXE.
|
|
46
|
+
*
|
|
47
|
+
* A key design driver is that PXE knows nothing about the actual fact contents: it just manages enough metadata to
|
|
48
|
+
* provide the guarantees mentioned above. That way, concepts such as offchain delivery or partial notes are completely
|
|
49
|
+
* defined by Aztec.nr, opening the door to further extension without the need for ad-hoc PXE support.
|
|
50
|
+
*
|
|
51
|
+
* As with most other PXE stores, writes are staged per-job and flushed atomically on commit.
|
|
52
|
+
*/
|
|
53
|
+
export class FactStore implements StagedStore {
|
|
54
|
+
readonly storeName: string = 'fact';
|
|
55
|
+
|
|
56
|
+
#store: AztecAsyncKVStore;
|
|
57
|
+
|
|
58
|
+
/** Primary index of fact records. */
|
|
59
|
+
#facts: AztecAsyncMap<FactKeyStr, FactBuffer>;
|
|
60
|
+
|
|
61
|
+
/** Index for per-collection fact enumeration and by-type collection discovery. */
|
|
62
|
+
#factsByCollection: AztecAsyncMultiMap<FactCollectionKeyStr, FactKeyStr>;
|
|
63
|
+
|
|
64
|
+
/** Index for delete-on-prune of retractable facts (those with an origin block). */
|
|
65
|
+
#factsByBlock: AztecAsyncMultiMap<BlockNum, FactKeyStr>;
|
|
66
|
+
|
|
67
|
+
/** Job uncommitted data */
|
|
68
|
+
#opsForJob: Map<JobId, StagedOp[]>;
|
|
69
|
+
|
|
70
|
+
/** Per-job locks */
|
|
71
|
+
#jobLocks: Map<JobId, Semaphore>;
|
|
72
|
+
|
|
73
|
+
logger = createLogger('fact_store');
|
|
74
|
+
|
|
75
|
+
constructor(store: AztecAsyncKVStore) {
|
|
76
|
+
this.#store = store;
|
|
77
|
+
this.#facts = store.openMap('facts');
|
|
78
|
+
this.#factsByCollection = store.openMultiMap('facts_by_collection');
|
|
79
|
+
this.#factsByBlock = store.openMultiMap('facts_by_block');
|
|
80
|
+
this.#opsForJob = new Map();
|
|
81
|
+
this.#jobLocks = new Map();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Records a fact in a collection.
|
|
86
|
+
*
|
|
87
|
+
* The collection is created implicitly on the first fact recorded for its key: recording into an existing collection
|
|
88
|
+
* just adds to it.
|
|
89
|
+
*
|
|
90
|
+
* If `originBlock === undefined`, the fact is non-retractable: it survives reorgs. A defined origin block makes the
|
|
91
|
+
* fact retractable: on a prune below its block, it will be deleted.
|
|
92
|
+
*
|
|
93
|
+
* Idempotent: re-recording an identical fact (same collection, fact type, payload, and origin block) is a no-op.
|
|
94
|
+
* The same payload tied to a different origin block is a distinct fact.
|
|
95
|
+
*/
|
|
96
|
+
recordFact(
|
|
97
|
+
factCollectionKey: FactCollectionKey,
|
|
98
|
+
factTypeId: Fr,
|
|
99
|
+
payload: Fr[],
|
|
100
|
+
originBlock: OriginBlock | undefined,
|
|
101
|
+
jobId: string,
|
|
102
|
+
): Promise<void> {
|
|
103
|
+
return this.#withJobLock(jobId, () => {
|
|
104
|
+
this.#stagedOpsFor(jobId).push({
|
|
105
|
+
kind: 'recordFact',
|
|
106
|
+
fact: new StoredFact(factCollectionKey, factTypeId, payload, originBlock),
|
|
107
|
+
});
|
|
108
|
+
return Promise.resolve();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Deletes a fact collection: removes every fact under the (scope-qualified) collection key.
|
|
114
|
+
*
|
|
115
|
+
* Idempotent: deleting a collection that does not exist is a no-op.
|
|
116
|
+
*/
|
|
117
|
+
deleteFactCollection(factCollectionKey: FactCollectionKey, jobId: string): Promise<void> {
|
|
118
|
+
return this.#withJobLock(jobId, () => {
|
|
119
|
+
this.#stagedOpsFor(jobId).push({ kind: 'deleteFactCollection', key: factCollectionKey });
|
|
120
|
+
return Promise.resolve();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Returns the fact collection for the (scope-qualified) key, or undefined if it has no facts.
|
|
126
|
+
*/
|
|
127
|
+
async getFactCollection(factCollectionKey: FactCollectionKey, jobId: string): Promise<FactCollection | undefined> {
|
|
128
|
+
const collectionKey = factCollectionKey.toString();
|
|
129
|
+
const committed = await this.#store.transactionAsync(() => this.#readCollectionsFromDb([factCollectionKey]));
|
|
130
|
+
|
|
131
|
+
const collection = this.#foldStagedOps(committed, jobId).get(collectionKey);
|
|
132
|
+
if (!collection) {
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
const facts = [...collection.facts.values()];
|
|
136
|
+
return facts.length > 0 ? { key: factCollectionKey, facts } : undefined;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Returns every fact collection of the given type for the queried scope, each holding its facts.
|
|
141
|
+
*/
|
|
142
|
+
async getFactCollectionsByType(
|
|
143
|
+
factCollectionTypeKey: FactCollectionTypeKey,
|
|
144
|
+
jobId: string,
|
|
145
|
+
): Promise<FactCollection[]> {
|
|
146
|
+
const typeKey = factCollectionTypeKey.toString();
|
|
147
|
+
const committed = await this.#readCollectionsFromDbByType(typeKey);
|
|
148
|
+
|
|
149
|
+
return Array.from(this.#foldStagedOps(committed, jobId, typeKey).values())
|
|
150
|
+
.map(collection => ({ key: collection.key, facts: [...collection.facts.values()] }))
|
|
151
|
+
.filter(collection => collection.facts.length > 0);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Commits all staged operations for the given job to persistent storage.
|
|
156
|
+
*
|
|
157
|
+
* Must be called inside a transaction owned by the caller (JobCoordinator wraps all commits in a single
|
|
158
|
+
* transactionAsync, and IndexedDB does not support nested transactions).
|
|
159
|
+
*
|
|
160
|
+
* DO NOT call `#withJobLock` here: awaiting the lock creates a microtask boundary that causes IndexedDB to
|
|
161
|
+
* auto-commit the outer transaction.
|
|
162
|
+
*/
|
|
163
|
+
async commit(jobId: string): Promise<void> {
|
|
164
|
+
for (const op of this.#stagedOpsFor(jobId)) {
|
|
165
|
+
switch (op.kind) {
|
|
166
|
+
case 'recordFact':
|
|
167
|
+
await this.#commitFact(op.fact);
|
|
168
|
+
break;
|
|
169
|
+
case 'deleteFactCollection':
|
|
170
|
+
await this.#deleteCollection(op.key.toString());
|
|
171
|
+
break;
|
|
172
|
+
default: {
|
|
173
|
+
const _exhaustive: never = op;
|
|
174
|
+
throw new Error(`Unhandled FactStore staged op kind: ${JSON.stringify(_exhaustive)}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
this.#clearJobData(jobId);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** Discards all staged operations for the given job without persisting them. */
|
|
182
|
+
discardStaged(jobId: string): Promise<void> {
|
|
183
|
+
this.#clearJobData(jobId);
|
|
184
|
+
return Promise.resolve();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Removes every retractable fact originating from blocks over height `toBlock`, across all scopes.
|
|
189
|
+
*
|
|
190
|
+
* Non-retractable facts are untouched. Must run inside a caller-owned transaction (because it needs to share the
|
|
191
|
+
* transaction with other stores and IndexedDB has no nested transactions).
|
|
192
|
+
*
|
|
193
|
+
* Throws if any job is in flight (has accessed the store and not yet committed or discarded), since rolling back
|
|
194
|
+
* mid-job could re-introduce records originating from deleted blocks or change state underneath a job's view.
|
|
195
|
+
*/
|
|
196
|
+
async rollback(toBlock: BlockNum): Promise<void> {
|
|
197
|
+
if (this.#opsForJob.size > 0) {
|
|
198
|
+
throw new Error('PXE fact store rollback is not allowed while jobs are running');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const removedFacts = await this.#retractFacts(toBlock);
|
|
202
|
+
|
|
203
|
+
this.logger.verbose('rolled back fact store', { removedFacts, toBlock });
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Deletes retractable facts originating above `toBlock`, returning the number of by-block entries scanned.
|
|
208
|
+
* Retraction is scope-agnostic: a reorg invalidates a fact regardless of which scope's collection it belongs to.
|
|
209
|
+
*
|
|
210
|
+
* Requires to be run in a transactionAsync context.
|
|
211
|
+
*/
|
|
212
|
+
async #retractFacts(toBlock: BlockNum): Promise<number> {
|
|
213
|
+
// Snapshot the orphaned fact keys before mutating so we never delete from the cursor we are iterating, kicking off
|
|
214
|
+
// each fact-body read during the scan so a DB request stays pending across the cursor-to-delete boundary (a drained
|
|
215
|
+
// cursor with no read in flight would let the transaction auto-commit before the deletes).
|
|
216
|
+
const factReads = new Map<FactKeyStr, Promise<FactBuffer | undefined>>();
|
|
217
|
+
for await (const [, factKey] of this.#factsByBlock.entriesAsync({ start: toBlock + 1 })) {
|
|
218
|
+
factReads.set(factKey, this.#facts.getAsync(factKey));
|
|
219
|
+
}
|
|
220
|
+
await Promise.all(
|
|
221
|
+
Array.from(factReads, async ([factKey, read]) => {
|
|
222
|
+
const buf = await read;
|
|
223
|
+
if (!buf) {
|
|
224
|
+
// The by-block index just yielded this factKey, so a missing primary record means the indexes are out of
|
|
225
|
+
// sync. Log as this should be unreachable unless there is a bug.
|
|
226
|
+
this.logger.warn('Skipping retraction of a fact missing from the primary store: by-block index is stale', {
|
|
227
|
+
factKey,
|
|
228
|
+
});
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
await this.#deleteFact(factKey, StoredFact.fromBuffer(buf));
|
|
232
|
+
}),
|
|
233
|
+
);
|
|
234
|
+
return factReads.size;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Reads the given collections (their facts) by key into a Map keyed by collection key, skipping
|
|
239
|
+
* keys with no committed facts.
|
|
240
|
+
*
|
|
241
|
+
* Reads are not wrapped in a transaction: the caller owns the transaction boundary.
|
|
242
|
+
*/
|
|
243
|
+
async #readCollectionsFromDb(keys: FactCollectionKey[]): Promise<Map<FactCollectionKeyStr, CollectionWithFacts>> {
|
|
244
|
+
const result = new Map<FactCollectionKeyStr, CollectionWithFacts>();
|
|
245
|
+
for (const key of keys) {
|
|
246
|
+
const collection = await this.#loadCommittedCollection(key);
|
|
247
|
+
if (collection) {
|
|
248
|
+
result.set(key.toString(), collection);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return result;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
#readCollectionsFromDbByType(typeKey: FactCollectionTypeKeyStr) {
|
|
255
|
+
return this.#store.transactionAsync(async () => {
|
|
256
|
+
const factReadsByCollection = new Map<FactCollectionKeyStr, Map<FactKeyStr, Promise<FactBuffer | undefined>>>();
|
|
257
|
+
for await (const [collectionKey, factKey] of this.#factsByCollection.entriesAsync({
|
|
258
|
+
start: `${typeKey}:`,
|
|
259
|
+
end: `${typeKey};`,
|
|
260
|
+
})) {
|
|
261
|
+
let reads = factReadsByCollection.get(collectionKey);
|
|
262
|
+
if (!reads) {
|
|
263
|
+
reads = new Map<FactKeyStr, Promise<FactBuffer | undefined>>();
|
|
264
|
+
factReadsByCollection.set(collectionKey, reads);
|
|
265
|
+
}
|
|
266
|
+
reads.set(factKey, this.#facts.getAsync(factKey));
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const result = new Map<FactCollectionKeyStr, CollectionWithFacts>();
|
|
270
|
+
for (const [collectionKey, reads] of factReadsByCollection) {
|
|
271
|
+
const collection = await this.#assembleCollection(FactCollectionKey.fromString(collectionKey), reads);
|
|
272
|
+
result.set(collectionKey, collection);
|
|
273
|
+
}
|
|
274
|
+
return result;
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
async #loadCommittedCollection(collectionKey: FactCollectionKey): Promise<CollectionWithFacts | undefined> {
|
|
279
|
+
// Kick off each fact read while iterating the index so a DB request is always pending. Draining the cursor and only
|
|
280
|
+
// then reading the facts one `await` at a time would let the IndexedDB transaction auto-commit at the boundary
|
|
281
|
+
// (IndexedDB auto-commits once control returns to the event loop with no pending request), throwing mid-read on the
|
|
282
|
+
// browser backend.
|
|
283
|
+
const factReads = new Map<FactKeyStr, Promise<FactBuffer | undefined>>();
|
|
284
|
+
for await (const factKey of this.#factsByCollection.getValuesAsync(collectionKey.toString())) {
|
|
285
|
+
factReads.set(factKey, this.#facts.getAsync(factKey));
|
|
286
|
+
}
|
|
287
|
+
if (factReads.size === 0) {
|
|
288
|
+
return undefined;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return this.#assembleCollection(collectionKey, factReads);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Assemble a collection's facts from a set of in-flight DB reads.
|
|
296
|
+
*/
|
|
297
|
+
async #assembleCollection(
|
|
298
|
+
collectionKey: FactCollectionKey,
|
|
299
|
+
reads: Map<FactKeyStr, Promise<FactBuffer | undefined>>,
|
|
300
|
+
): Promise<CollectionWithFacts> {
|
|
301
|
+
const factKeys = [...reads.keys()];
|
|
302
|
+
const bufs = await Promise.all(reads.values());
|
|
303
|
+
|
|
304
|
+
// Await-free tail: deserialize. No DB ops from here on.
|
|
305
|
+
const facts = new Map<FactKeyStr, Fact>();
|
|
306
|
+
for (let i = 0; i < factKeys.length; i++) {
|
|
307
|
+
const factKey = factKeys[i];
|
|
308
|
+
const buf = bufs[i];
|
|
309
|
+
if (!buf) {
|
|
310
|
+
// Defensive: a #factsByCollection entry must always reference a live #facts entry. A missing one means the
|
|
311
|
+
// indexes are corrupt.
|
|
312
|
+
throw new Error(`Fact not found for factKey ${factKey}`);
|
|
313
|
+
}
|
|
314
|
+
const stored = StoredFact.fromBuffer(buf);
|
|
315
|
+
if (stored.factCollectionKey.toString() !== collectionKey.toString()) {
|
|
316
|
+
// Defensive: every read fact must belong to the collection being assembled. A mismatch means the indexes are
|
|
317
|
+
// corrupt.
|
|
318
|
+
throw new Error(`Fact ${factKey} does not belong to collection ${collectionKey}`);
|
|
319
|
+
}
|
|
320
|
+
facts.set(factKey, stored.toFact());
|
|
321
|
+
}
|
|
322
|
+
return { key: collectionKey, facts };
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Assembles the current view of a collection of collections together with their facts, combining the committed with
|
|
327
|
+
* staged data.
|
|
328
|
+
*
|
|
329
|
+
* When `typeKey` is given, staged records of other types are ignored, so the result holds only that type.
|
|
330
|
+
*/
|
|
331
|
+
#foldStagedOps(
|
|
332
|
+
committed: Map<FactCollectionKeyStr, CollectionWithFacts>,
|
|
333
|
+
jobId: string,
|
|
334
|
+
typeKey?: FactCollectionTypeKeyStr,
|
|
335
|
+
): Map<FactCollectionKeyStr, CollectionWithFacts> {
|
|
336
|
+
const result = new Map<FactCollectionKeyStr, CollectionWithFacts>();
|
|
337
|
+
|
|
338
|
+
// Copy to avoid mutating the contents of `committed`.
|
|
339
|
+
for (const [collectionKey, { key, facts }] of committed) {
|
|
340
|
+
result.set(collectionKey, { key, facts: new Map(facts) });
|
|
341
|
+
}
|
|
342
|
+
for (const op of this.#stagedOpsFor(jobId)) {
|
|
343
|
+
switch (op.kind) {
|
|
344
|
+
case 'recordFact':
|
|
345
|
+
this.#foldRecordFact(result, op, typeKey);
|
|
346
|
+
break;
|
|
347
|
+
case 'deleteFactCollection':
|
|
348
|
+
this.#foldDeleteFactCollection(result, op);
|
|
349
|
+
break;
|
|
350
|
+
default: {
|
|
351
|
+
const _exhaustive: never = op;
|
|
352
|
+
throw new Error(`Unhandled FactStore staged op kind: ${JSON.stringify(_exhaustive)}`);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return result;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Folds a staged `recordFact` op into view.
|
|
361
|
+
*
|
|
362
|
+
* When `typeKey` is given, an op of another type is ignored, keeping the view limited to that type.
|
|
363
|
+
*/
|
|
364
|
+
#foldRecordFact(
|
|
365
|
+
result: Map<FactCollectionKeyStr, CollectionWithFacts>,
|
|
366
|
+
op: Extract<StagedOp, { kind: 'recordFact' }>,
|
|
367
|
+
typeKey?: FactCollectionTypeKeyStr,
|
|
368
|
+
): void {
|
|
369
|
+
const key = op.fact.factCollectionKey;
|
|
370
|
+
|
|
371
|
+
// Type filter doesn't match, nothing to do with this fact
|
|
372
|
+
if (typeKey !== undefined && key.factCollectionTypeKey().toString() !== typeKey) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
const collectionKey = key.toString();
|
|
377
|
+
let collection = result.get(collectionKey);
|
|
378
|
+
|
|
379
|
+
// Collection didn't exist before this point, the created fact brings it into existence
|
|
380
|
+
if (!collection) {
|
|
381
|
+
collection = { key, facts: new Map<FactKeyStr, Fact>() };
|
|
382
|
+
result.set(collectionKey, collection);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const fKey = factKeyStrOf(op.fact);
|
|
386
|
+
if (!collection.facts.has(fKey)) {
|
|
387
|
+
collection.facts.set(fKey, op.fact.toFact());
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Folds a staged `deleteFactCollection` op into the view: the scope-qualified collection is removed outright.
|
|
393
|
+
*/
|
|
394
|
+
#foldDeleteFactCollection(
|
|
395
|
+
result: Map<FactCollectionKeyStr, CollectionWithFacts>,
|
|
396
|
+
op: Extract<StagedOp, { kind: 'deleteFactCollection' }>,
|
|
397
|
+
): void {
|
|
398
|
+
result.delete(op.key.toString());
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Writes a fact to persistent storage. Idempotent: an identical fact (same scope-qualified key) is left untouched.
|
|
403
|
+
*/
|
|
404
|
+
async #commitFact(fact: StoredFact): Promise<void> {
|
|
405
|
+
const factKey = factKeyStrOf(fact);
|
|
406
|
+
if (await this.#facts.hasAsync(factKey)) {
|
|
407
|
+
this.logger.debug(`Ignoring already recorded fact`, { factKey });
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
await this.#facts.set(factKey, fact.toBuffer());
|
|
411
|
+
await this.#factsByCollection.set(fact.factCollectionKey.toString(), factKey);
|
|
412
|
+
if (fact.originBlock !== undefined) {
|
|
413
|
+
await this.#factsByBlock.set(fact.originBlock.blockNumber, factKey);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Deletes every fact under the (scope-qualified) collection key.
|
|
419
|
+
*
|
|
420
|
+
* Caller must wrap in a transaction.
|
|
421
|
+
*/
|
|
422
|
+
async #deleteCollection(collectionKey: FactCollectionKeyStr): Promise<void> {
|
|
423
|
+
// Snapshot the fact index before mutating so we never delete from the cursor we are iterating, kicking off each
|
|
424
|
+
// fact-body read during the scan so a DB request stays pending across the cursor-to-mutation boundary (a drained
|
|
425
|
+
// cursor with no read in flight would let the transaction auto-commit before the deletes).
|
|
426
|
+
const factReads = new Map<FactKeyStr, Promise<FactBuffer | undefined>>();
|
|
427
|
+
for await (const factKey of this.#factsByCollection.getValuesAsync(collectionKey)) {
|
|
428
|
+
factReads.set(factKey, this.#facts.getAsync(factKey));
|
|
429
|
+
}
|
|
430
|
+
await Promise.all(
|
|
431
|
+
Array.from(factReads, async ([factKey, read]) => {
|
|
432
|
+
const buf = await read;
|
|
433
|
+
if (!buf) {
|
|
434
|
+
// A #factsByCollection entry must always reference a live #facts entry, a missing one means the indexes are
|
|
435
|
+
// corrupt.
|
|
436
|
+
throw new Error(`Fact not found for factKey ${factKey}`);
|
|
437
|
+
}
|
|
438
|
+
await this.#deleteFact(factKey, StoredFact.fromBuffer(buf));
|
|
439
|
+
}),
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Deletes a fact from the primary store and all its indexes (`#factsByCollection`, plus `#factsByBlock` if
|
|
445
|
+
* retractable).
|
|
446
|
+
*
|
|
447
|
+
* Caller must wrap in a transaction.
|
|
448
|
+
*/
|
|
449
|
+
async #deleteFact(factKey: FactKeyStr, fact: StoredFact): Promise<void> {
|
|
450
|
+
await this.#facts.delete(factKey);
|
|
451
|
+
await this.#factsByCollection.deleteValue(fact.factCollectionKey.toString(), factKey);
|
|
452
|
+
if (fact.originBlock !== undefined) {
|
|
453
|
+
await this.#factsByBlock.deleteValue(fact.originBlock.blockNumber, factKey);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Returns the job's staged-ops array, creating it on first access.
|
|
459
|
+
* */
|
|
460
|
+
#stagedOpsFor(jobId: string): StagedOp[] {
|
|
461
|
+
let ops = this.#opsForJob.get(jobId);
|
|
462
|
+
if (ops === undefined) {
|
|
463
|
+
ops = [];
|
|
464
|
+
this.#opsForJob.set(jobId, ops);
|
|
465
|
+
}
|
|
466
|
+
return ops;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
#clearJobData(jobId: string) {
|
|
470
|
+
this.#opsForJob.delete(jobId);
|
|
471
|
+
this.#jobLocks.delete(jobId);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
async #withJobLock<T>(jobId: string, fn: () => Promise<T>): Promise<T> {
|
|
475
|
+
let lock = this.#jobLocks.get(jobId);
|
|
476
|
+
if (!lock) {
|
|
477
|
+
lock = new Semaphore(1);
|
|
478
|
+
this.#jobLocks.set(jobId, lock);
|
|
479
|
+
}
|
|
480
|
+
await lock.acquire();
|
|
481
|
+
try {
|
|
482
|
+
return await fn();
|
|
483
|
+
} finally {
|
|
484
|
+
lock.release();
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The block a retractable fact originates from.
|
|
7
|
+
*/
|
|
8
|
+
export type OriginBlock = { blockNumber: number; blockHash: Fr };
|
|
9
|
+
|
|
10
|
+
/** Facts are always tied to a real scope; the zero address is not a valid fact scope. */
|
|
11
|
+
function assertNonZeroScope(scope: AztecAddress): void {
|
|
12
|
+
if (scope.equals(AztecAddress.ZERO)) {
|
|
13
|
+
throw new Error('scope must not be the zero address');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Identifies all fact collections of one type within a contract, for one scope. */
|
|
18
|
+
export class FactCollectionTypeKey {
|
|
19
|
+
constructor(
|
|
20
|
+
public readonly contractAddress: AztecAddress,
|
|
21
|
+
public readonly scope: AztecAddress,
|
|
22
|
+
public readonly factCollectionTypeId: Fr,
|
|
23
|
+
) {
|
|
24
|
+
assertNonZeroScope(scope);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static from(fields: FieldsOf<FactCollectionTypeKey>): FactCollectionTypeKey {
|
|
28
|
+
return new FactCollectionTypeKey(fields.contractAddress, fields.scope, fields.factCollectionTypeId);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
toString(): string {
|
|
32
|
+
return `${this.contractAddress}:${this.scope}:${this.factCollectionTypeId}`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Uniquely identifies a single fact collection, isolated by scope; all its facts share this key. */
|
|
37
|
+
export class FactCollectionKey {
|
|
38
|
+
constructor(
|
|
39
|
+
public readonly contractAddress: AztecAddress,
|
|
40
|
+
public readonly scope: AztecAddress,
|
|
41
|
+
public readonly factCollectionTypeId: Fr,
|
|
42
|
+
public readonly factCollectionId: Fr,
|
|
43
|
+
) {
|
|
44
|
+
assertNonZeroScope(scope);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static from(fields: FieldsOf<FactCollectionKey>): FactCollectionKey {
|
|
48
|
+
return new FactCollectionKey(
|
|
49
|
+
fields.contractAddress,
|
|
50
|
+
fields.scope,
|
|
51
|
+
fields.factCollectionTypeId,
|
|
52
|
+
fields.factCollectionId,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Inverse of toString */
|
|
57
|
+
static fromString(str: string): FactCollectionKey {
|
|
58
|
+
const [contractAddress, scope, factCollectionTypeId, factCollectionId] = str.split(':');
|
|
59
|
+
return new FactCollectionKey(
|
|
60
|
+
AztecAddress.fromStringUnsafe(contractAddress),
|
|
61
|
+
AztecAddress.fromStringUnsafe(scope),
|
|
62
|
+
Fr.fromString(factCollectionTypeId),
|
|
63
|
+
Fr.fromString(factCollectionId),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** The key grouping this collection with the other collections of its type within the same contract and scope. */
|
|
68
|
+
factCollectionTypeKey(): FactCollectionTypeKey {
|
|
69
|
+
return new FactCollectionTypeKey(this.contractAddress, this.scope, this.factCollectionTypeId);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
toString(): string {
|
|
73
|
+
return `${this.contractAddress}:${this.scope}:${this.factCollectionTypeId}:${this.factCollectionId}`;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { sha256ToField } from '@aztec/foundation/crypto/sha256';
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
|
|
6
|
+
import { FactCollectionKey, type OriginBlock } from './fact_store_keys.js';
|
|
7
|
+
|
|
8
|
+
/** A fact as returned by the fact store. */
|
|
9
|
+
export type Fact = { factTypeId: Fr; payload: Fr[]; originBlock: OriginBlock | undefined };
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A single immutable fact belonging to a fact collection.
|
|
13
|
+
*/
|
|
14
|
+
export class StoredFact {
|
|
15
|
+
constructor(
|
|
16
|
+
public readonly factCollectionKey: FactCollectionKey,
|
|
17
|
+
public readonly factTypeId: Fr,
|
|
18
|
+
public readonly payload: Fr[],
|
|
19
|
+
public readonly originBlock: OriginBlock | undefined,
|
|
20
|
+
) {}
|
|
21
|
+
|
|
22
|
+
/** Whether this fact is deleted on block pruning (true) or survives reorgs (false). */
|
|
23
|
+
get isRetractable(): boolean {
|
|
24
|
+
return this.originBlock !== undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Stable digest of the payload, used for fact idempotency. */
|
|
28
|
+
payloadHash(): Fr {
|
|
29
|
+
return sha256ToField([this.payload.length, ...this.payload]);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Returns the externally facing view of this fact. */
|
|
33
|
+
toFact(): Fact {
|
|
34
|
+
return { factTypeId: this.factTypeId, payload: this.payload, originBlock: this.originBlock };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
toBuffer(): Buffer {
|
|
38
|
+
return serializeToBuffer(
|
|
39
|
+
this.factCollectionKey.contractAddress,
|
|
40
|
+
this.factCollectionKey.scope,
|
|
41
|
+
this.factCollectionKey.factCollectionTypeId,
|
|
42
|
+
this.factCollectionKey.factCollectionId,
|
|
43
|
+
this.factTypeId,
|
|
44
|
+
this.payload.length,
|
|
45
|
+
...this.payload,
|
|
46
|
+
this.originBlock !== undefined,
|
|
47
|
+
this.originBlock ? this.originBlock.blockNumber : 0,
|
|
48
|
+
this.originBlock ? this.originBlock.blockHash : Fr.ZERO,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static fromBuffer(buffer: Buffer | BufferReader): StoredFact {
|
|
53
|
+
const reader = BufferReader.asReader(buffer);
|
|
54
|
+
const contractAddress = reader.readObject(AztecAddress);
|
|
55
|
+
const scope = reader.readObject(AztecAddress);
|
|
56
|
+
const factCollectionTypeId = reader.readObject(Fr);
|
|
57
|
+
const factCollectionId = reader.readObject(Fr);
|
|
58
|
+
const factTypeId = reader.readObject(Fr);
|
|
59
|
+
const payloadLen = reader.readNumber();
|
|
60
|
+
const payload = reader.readArray(payloadLen, Fr);
|
|
61
|
+
const hasOriginBlock = reader.readBoolean();
|
|
62
|
+
const blockNumber = reader.readNumber();
|
|
63
|
+
const blockHash = reader.readObject(Fr);
|
|
64
|
+
const originBlock = hasOriginBlock ? { blockNumber, blockHash } : undefined;
|
|
65
|
+
return new StoredFact(
|
|
66
|
+
new FactCollectionKey(contractAddress, scope, factCollectionTypeId, factCollectionId),
|
|
67
|
+
factTypeId,
|
|
68
|
+
[...payload],
|
|
69
|
+
originBlock,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Builds the serialized key that identifies a fact in the store.
|
|
76
|
+
*/
|
|
77
|
+
export function factKeyStrOf(fact: StoredFact): string {
|
|
78
|
+
const origin = fact.originBlock ? `${fact.originBlock.blockNumber}:${fact.originBlock.blockHash}` : 'none';
|
|
79
|
+
return `${fact.factCollectionKey}:${fact.factTypeId}:${fact.payloadHash()}:${origin}`;
|
|
80
|
+
}
|
package/src/storage/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export * from './address_store/index.js';
|
|
2
|
+
export * from './anchor_block_store/index.js';
|
|
2
3
|
export * from './capsule_store/index.js';
|
|
3
4
|
export * from './contract_store/index.js';
|
|
5
|
+
export * from './fact_store/index.js';
|
|
4
6
|
export * from './note_store/index.js';
|
|
5
|
-
export * from './anchor_block_store/index.js';
|
|
6
7
|
export * from './tagging_store/index.js';
|
|
7
8
|
export * from './metadata.js';
|
|
8
9
|
export * from './private_event_store/private_event_store.js';
|
package/src/storage/metadata.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PXE_DATA_SCHEMA_VERSION =
|
|
1
|
+
export const PXE_DATA_SCHEMA_VERSION = 9;
|