@aztec/pxe 0.0.1-commit.993d240 → 0.0.1-commit.9a89641
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bin/check_oracle_version.d.ts +2 -12
- package/dest/bin/check_oracle_version.d.ts.map +1 -1
- package/dest/bin/check_oracle_version.js +9 -122
- package/dest/bin/index.d.ts +2 -2
- package/dest/bin/index.d.ts.map +1 -1
- package/dest/bin/index.js +1 -1
- package/dest/bin/oracle_version_helpers.d.ts +20 -0
- package/dest/bin/oracle_version_helpers.d.ts.map +1 -0
- package/dest/bin/oracle_version_helpers.js +25 -0
- package/dest/block_synchronizer/block_stream_source.d.ts +5 -5
- package/dest/block_synchronizer/block_stream_source.d.ts.map +1 -1
- package/dest/block_synchronizer/block_stream_source.js +4 -29
- package/dest/block_synchronizer/block_synchronizer.d.ts +17 -15
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +41 -18
- package/dest/config/index.d.ts +2 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -0
- package/dest/config/package_info.js +1 -1
- package/dest/contract/contract_class_service.d.ts +24 -0
- package/dest/contract/contract_class_service.d.ts.map +1 -0
- package/dest/contract/contract_class_service.js +36 -0
- package/dest/contract/contract_sync_service.d.ts +48 -0
- package/dest/contract/contract_sync_service.d.ts.map +1 -0
- package/dest/{contract_sync → contract}/contract_sync_service.js +26 -45
- package/dest/contract/helpers.d.ts +7 -0
- package/dest/contract/helpers.d.ts.map +1 -0
- package/dest/contract/helpers.js +20 -0
- package/dest/contract/skip_sync_contracts.d.ts +11 -0
- package/dest/contract/skip_sync_contracts.d.ts.map +1 -0
- package/dest/contract/skip_sync_contracts.js +18 -0
- package/dest/contract_function_simulator/anchored_contract_data.d.ts +36 -0
- package/dest/contract_function_simulator/anchored_contract_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/anchored_contract_data.js +54 -0
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +19 -25
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +63 -49
- package/dest/contract_function_simulator/execution_note_cache.d.ts +4 -10
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +8 -28
- 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 +9 -4
- package/dest/contract_function_simulator/noir-structs/bounded_vec.d.ts +8 -27
- package/dest/contract_function_simulator/noir-structs/bounded_vec.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/bounded_vec.js +8 -23
- 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 +3 -2
- 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 +2 -2
- 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 +31 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +11 -12
- 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 +6 -49
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +10 -8
- 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 -60
- 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 +3 -2
- 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 +3 -3
- package/dest/contract_function_simulator/noir-structs/option.d.ts +9 -11
- package/dest/contract_function_simulator/noir-structs/option.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/option.js +18 -13
- 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/pending_tagged_log.d.ts +11 -0
- package/dest/contract_function_simulator/noir-structs/pending_tagged_log.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/pending_tagged_log.js +4 -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 +28 -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 +50 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tx.d.ts +19 -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 +9 -0
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.d.ts +15 -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 +21 -0
- package/dest/contract_function_simulator/oracle/acir_callback.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/acir_callback.js +115 -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 -114
- 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/legacy_oracle_registry.d.ts +39 -0
- package/dest/contract_function_simulator/oracle/legacy_oracle_registry.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/legacy_oracle_registry.js +107 -0
- 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/oracle_registry.d.ts +92 -100
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle_registry.js +296 -479
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +274 -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 +1253 -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 +2 -3
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +32 -21
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +152 -49
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +97 -37
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +376 -138
- 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/debug/pxe_debug_utils.d.ts +2 -2
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.d.ts +2 -1
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +1 -0
- 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 +17 -6
- package/dest/entrypoints/client/lazy/index.d.ts +2 -1
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +1 -0
- package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +17 -6
- package/dest/entrypoints/client/store.d.ts +14 -0
- package/dest/entrypoints/client/store.d.ts.map +1 -0
- package/dest/entrypoints/client/store.js +42 -0
- package/dest/entrypoints/pxe_creation_options.d.ts +9 -3
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/server/index.d.ts +6 -3
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +4 -2
- package/dest/entrypoints/server/store.d.ts +18 -0
- package/dest/entrypoints/server/store.d.ts.map +1 -0
- package/dest/entrypoints/server/store.js +28 -0
- 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 +16 -4
- package/dest/error_enriching.d.ts +5 -3
- package/dest/error_enriching.d.ts.map +1 -1
- package/dest/error_enriching.js +13 -11
- package/dest/events/event_service.d.ts +13 -6
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +13 -13
- package/dest/hooks/execution_hooks.d.ts +31 -11
- package/dest/hooks/execution_hooks.d.ts.map +1 -1
- package/dest/hooks/execution_hooks.js +3 -3
- package/dest/hooks/index.d.ts +4 -3
- package/dest/hooks/index.d.ts.map +1 -1
- package/dest/hooks/index.js +1 -0
- package/dest/hooks/resolve_custom_request.d.ts +23 -0
- package/dest/hooks/resolve_custom_request.d.ts.map +1 -0
- package/dest/hooks/resolve_custom_request.js +3 -0
- package/dest/hooks/resolve_tagging_secret_strategy.d.ts +50 -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 +18 -8
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +93 -45
- package/dest/messages/tx_resolver_service.d.ts +28 -0
- package/dest/messages/tx_resolver_service.d.ts.map +1 -0
- package/dest/messages/tx_resolver_service.js +61 -0
- package/dest/node/benchmarked_node.d.ts +20 -0
- package/dest/node/benchmarked_node.d.ts.map +1 -0
- package/dest/node/benchmarked_node.js +94 -0
- package/dest/node/caching_aztec_node.d.ts +24 -0
- package/dest/node/caching_aztec_node.d.ts.map +1 -0
- package/dest/node/caching_aztec_node.js +267 -0
- package/dest/notes/note_service.d.ts +13 -7
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +10 -10
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.js +8 -8
- package/dest/private_kernel/batch_planner.d.ts +1 -1
- package/dest/private_kernel/batch_planner.d.ts.map +1 -1
- package/dest/private_kernel/batch_planner.js +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.js +6 -2
- package/dest/private_kernel/hints/test_utils.js +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +61 -40
- package/dest/private_kernel/private_kernel_oracle.d.ts +4 -2
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +17 -5
- package/dest/pxe.d.ts +114 -48
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +251 -148
- 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 +8 -6
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts +1 -1
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts.map +1 -1
- package/dest/storage/backwards_compatibility_tests/schema_tests.js +129 -49
- package/dest/storage/capsule_store/capsule_service.d.ts +1 -1
- package/dest/storage/capsule_store/capsule_service.d.ts.map +1 -1
- package/dest/storage/capsule_store/capsule_service.js +6 -9
- package/dest/storage/contract_store/contract_store.d.ts +27 -24
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +66 -77
- package/dest/storage/fact_store/fact_service.d.ts +22 -0
- package/dest/storage/fact_store/fact_service.d.ts.map +1 -0
- package/dest/storage/fact_store/fact_service.js +45 -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 +6 -0
- package/dest/storage/fact_store/index.d.ts.map +1 -0
- package/dest/storage/fact_store/index.js +4 -0
- package/dest/storage/fact_store/origin_state.d.ts +59 -0
- package/dest/storage/fact_store/origin_state.d.ts.map +1 -0
- package/dest/storage/fact_store/origin_state.js +60 -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 +2 -2
- package/dest/storage/metadata.d.ts.map +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 +197 -168
- 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 +5 -3
- package/dest/storage/open_pxe_stores.d.ts.map +1 -1
- package/dest/storage/open_pxe_stores.js +5 -3
- 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 +40 -43
- package/dest/storage/store_identity.d.ts +35 -0
- package/dest/storage/store_identity.d.ts.map +1 -0
- package/dest/storage/store_identity.js +44 -0
- 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/sender_tagging_store.d.ts +41 -10
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.js +81 -29
- package/dest/storage/tagging_store/tagging_secret_sources_store.d.ts +51 -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 +105 -0
- package/dest/tagging/constants.d.ts +11 -2
- package/dest/tagging/constants.d.ts.map +1 -1
- package/dest/tagging/constants.js +38 -10
- package/dest/tagging/get_all_logs_by_tags.d.ts +29 -8
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -1
- package/dest/tagging/get_all_logs_by_tags.js +29 -10
- package/dest/tagging/index.d.ts +3 -3
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +2 -2
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts +27 -9
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.js +104 -33
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +6 -3
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +23 -36
- package/dest/tagging/sender_sync/utils/classify_pending_txs.d.ts +22 -0
- package/dest/tagging/sender_sync/utils/classify_pending_txs.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/classify_pending_txs.js +61 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +15 -5
- 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 +36 -35
- package/dest/tagging/sender_sync/utils/resolve_pending_txs.d.ts +29 -0
- package/dest/tagging/sender_sync/utils/resolve_pending_txs.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/resolve_pending_txs.js +41 -0
- package/dest/tagging/sender_sync/utils/test_utils.d.ts +16 -0
- package/dest/tagging/sender_sync/utils/test_utils.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/test_utils.js +24 -0
- package/dest/tagging/testing/tag_query_test_utils.d.ts +6 -0
- package/dest/tagging/testing/tag_query_test_utils.d.ts.map +1 -0
- package/dest/tagging/testing/tag_query_test_utils.js +10 -0
- package/package.json +17 -17
- package/src/bin/check_oracle_version.ts +8 -151
- package/src/bin/index.ts +1 -1
- package/src/bin/oracle_version_helpers.ts +30 -0
- package/src/block_synchronizer/block_stream_source.ts +6 -45
- package/src/block_synchronizer/block_synchronizer.ts +54 -30
- package/src/config/index.ts +1 -0
- package/src/config/package_info.ts +1 -1
- package/src/contract/contract_class_service.ts +45 -0
- package/src/{contract_sync → contract}/contract_sync_service.ts +37 -50
- package/src/contract/helpers.ts +35 -0
- package/src/contract/skip_sync_contracts.ts +23 -0
- package/src/contract_function_simulator/anchored_contract_data.ts +74 -0
- package/src/contract_function_simulator/contract_function_simulator.ts +96 -59
- package/src/contract_function_simulator/execution_note_cache.ts +8 -29
- package/src/contract_function_simulator/index.ts +87 -5
- package/src/contract_function_simulator/noir-structs/bounded_vec.ts +12 -24
- 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 +3 -3
- package/src/contract_function_simulator/noir-structs/fact.ts +13 -0
- package/src/contract_function_simulator/noir-structs/fact_collection.ts +64 -0
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +20 -46
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +13 -60
- package/src/contract_function_simulator/noir-structs/note_data.ts +27 -0
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +4 -4
- package/src/contract_function_simulator/noir-structs/option.ts +17 -11
- package/src/contract_function_simulator/noir-structs/origin_block.ts +8 -0
- package/src/contract_function_simulator/noir-structs/pending_tagged_log.ts +12 -0
- package/src/contract_function_simulator/noir-structs/provided_secret.ts +5 -0
- package/src/contract_function_simulator/noir-structs/resolved_tagging_strategy.ts +66 -0
- package/src/contract_function_simulator/noir-structs/resolved_tx.ts +19 -0
- package/src/contract_function_simulator/noir-structs/tx_effect_data.ts +16 -0
- package/src/contract_function_simulator/noir-structs/utility_context.ts +5 -17
- package/src/contract_function_simulator/oracle/acir_callback.ts +154 -0
- package/src/contract_function_simulator/oracle/index.ts +1 -15
- package/src/contract_function_simulator/oracle/interfaces.ts +11 -189
- package/src/contract_function_simulator/oracle/legacy_oracle_registry.ts +147 -0
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +6 -21
- package/src/contract_function_simulator/oracle/oracle_registry.ts +289 -483
- package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +1067 -0
- package/src/contract_function_simulator/oracle/private_execution.ts +2 -3
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +190 -61
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +556 -174
- package/src/contract_function_simulator/transient_array_service.ts +91 -0
- package/src/debug/pxe_debug_utils.ts +1 -1
- package/src/entrypoints/client/bundle/index.ts +1 -0
- package/src/entrypoints/client/bundle/utils.ts +24 -5
- package/src/entrypoints/client/lazy/index.ts +1 -0
- package/src/entrypoints/client/lazy/utils.ts +24 -5
- package/src/entrypoints/client/store.ts +54 -0
- package/src/entrypoints/pxe_creation_options.ts +8 -2
- package/src/entrypoints/server/index.ts +6 -2
- package/src/entrypoints/server/store.ts +47 -0
- package/src/entrypoints/server/utils.ts +31 -9
- package/src/error_enriching.ts +27 -11
- package/src/events/event_service.ts +24 -14
- package/src/hooks/execution_hooks.ts +32 -12
- package/src/hooks/index.ts +8 -2
- package/src/hooks/resolve_custom_request.ts +24 -0
- package/src/hooks/resolve_tagging_secret_strategy.ts +60 -0
- package/src/logs/log_service.ts +122 -61
- package/src/messages/tx_resolver_service.ts +80 -0
- package/src/node/benchmarked_node.ts +140 -0
- package/src/node/caching_aztec_node.ts +406 -0
- package/src/notes/note_service.ts +20 -14
- package/src/oracle_version.ts +8 -8
- package/src/private_kernel/batch_planner.ts +0 -1
- package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +11 -1
- package/src/private_kernel/hints/test_utils.ts +1 -1
- package/src/private_kernel/private_kernel_execution_prover.ts +112 -56
- package/src/private_kernel/private_kernel_oracle.ts +23 -4
- package/src/pxe.ts +357 -172
- package/src/storage/allowed_scopes.ts +14 -0
- package/src/storage/anchor_block_store/anchor_block_store.ts +8 -6
- package/src/storage/backwards_compatibility_tests/__snapshots__/AddressStore.json +6 -6
- package/src/storage/backwards_compatibility_tests/__snapshots__/ContractStore.json +1 -1
- package/src/storage/backwards_compatibility_tests/__snapshots__/FactStore.json +40 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/KeyStore.json +12 -12
- package/src/storage/backwards_compatibility_tests/__snapshots__/L2TipsKVStore.json +9 -15
- package/src/storage/backwards_compatibility_tests/__snapshots__/NoteStore.json +24 -4
- package/src/storage/backwards_compatibility_tests/__snapshots__/RecipientTaggingStore.json +11 -3
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderTaggingStore.json +12 -4
- package/src/storage/backwards_compatibility_tests/__snapshots__/TaggingSecretSourcesStore.json +30 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/opened_stores.json +29 -9
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +141 -50
- package/src/storage/capsule_store/capsule_service.ts +8 -13
- package/src/storage/contract_store/contract_store.ts +88 -94
- package/src/storage/fact_store/fact_service.ts +69 -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 +15 -0
- package/src/storage/fact_store/origin_state.ts +84 -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 +226 -187
- package/src/storage/note_store/stored_note.ts +5 -27
- package/src/storage/open_pxe_stores.ts +6 -3
- package/src/storage/private_event_store/private_event_store.ts +49 -55
- package/src/storage/store_identity.ts +72 -0
- package/src/storage/tagging_store/index.ts +1 -1
- package/src/storage/tagging_store/sender_tagging_store.ts +113 -41
- package/src/storage/tagging_store/tagging_secret_sources_store.ts +138 -0
- package/src/tagging/constants.ts +42 -10
- package/src/tagging/get_all_logs_by_tags.ts +47 -11
- package/src/tagging/index.ts +7 -2
- package/src/tagging/recipient_sync/sync_tagged_private_logs.ts +161 -46
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +27 -57
- package/src/tagging/sender_sync/utils/classify_pending_txs.ts +91 -0
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +46 -40
- package/src/tagging/sender_sync/utils/resolve_pending_txs.ts +64 -0
- package/src/tagging/sender_sync/utils/test_utils.ts +46 -0
- package/src/tagging/testing/tag_query_test_utils.ts +11 -0
- package/dest/contract_function_simulator/benchmarked_node.d.ts +0 -9
- package/dest/contract_function_simulator/benchmarked_node.d.ts.map +0 -1
- package/dest/contract_function_simulator/benchmarked_node.js +0 -77
- package/dest/contract_function_simulator/oracle/oracle.d.ts +0 -89
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +0 -1
- package/dest/contract_function_simulator/oracle/oracle.js +0 -552
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +0 -6
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +0 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.js +0 -51
- package/dest/contract_sync/contract_sync_service.d.ts +0 -42
- package/dest/contract_sync/contract_sync_service.d.ts.map +0 -1
- package/dest/contract_sync/helpers.d.ts +0 -27
- package/dest/contract_sync/helpers.d.ts.map +0 -1
- package/dest/contract_sync/helpers.js +0 -53
- 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 -38
- 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/sender_sync/utils/get_status_change_of_pending.d.ts +0 -17
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +0 -1
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +0 -60
- package/src/contract_function_simulator/benchmarked_node.ts +0 -103
- package/src/contract_function_simulator/oracle/oracle.ts +0 -711
- package/src/contract_function_simulator/proxied_contract_data_source.ts +0 -60
- package/src/contract_sync/helpers.ts +0 -86
- package/src/messages/message_context_service.ts +0 -45
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderAddressBookStore.json +0 -16
- package/src/storage/tagging_store/sender_address_book_store.ts +0 -48
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +0 -66
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { isProtocolContract } from '@aztec/protocol-contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the contract class id that an address runs at a given anchor block, as tracked by the chain.
|
|
4
|
+
*
|
|
5
|
+
* PXE does not store a contract's current class id: it is mutable, chain-derived state that changes when a contract is
|
|
6
|
+
* upgraded and can be undone by a reorg. Instead this service asks the node for the current class at an anchor block,
|
|
7
|
+
* falling back to a local instance if no upgrades were scheduled.
|
|
8
|
+
*/ export class ContractClassService {
|
|
9
|
+
node;
|
|
10
|
+
contractStore;
|
|
11
|
+
constructor(node, contractStore){
|
|
12
|
+
this.node = node;
|
|
13
|
+
this.contractStore = contractStore;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Returns the class id that corresponds to `address` as of `anchorBlockHeader`, or `undefined` if no instance is
|
|
17
|
+
* registered for `address`. A missing instance is an absence the caller decides how to handle, not an error; genuine
|
|
18
|
+
* failures (e.g. the node being unreachable) still throw.
|
|
19
|
+
*/ async getCurrentClassId(address, anchorBlockHeader) {
|
|
20
|
+
// Protocol contracts are not in the registry and cannot be upgraded, so their original class is always current.
|
|
21
|
+
// Short-circuiting avoids a node round-trip.
|
|
22
|
+
if (isProtocolContract(address)) {
|
|
23
|
+
const instance = await this.contractStore.getContractInstance(address);
|
|
24
|
+
return instance?.originalContractClassId;
|
|
25
|
+
}
|
|
26
|
+
// The node resolves the current class from the same scheduled value change the AVM enforces against the public
|
|
27
|
+
// data tree. If the contract was upgraded the node returns a non-undefined instance; an undefined result means no
|
|
28
|
+
// upgrade happened (or the node has no record of it, e.g. it was never publicly deployed), so the original class
|
|
29
|
+
// is current.
|
|
30
|
+
const nodeInstance = await this.node.getContract(address, await anchorBlockHeader.hash());
|
|
31
|
+
if (nodeInstance) {
|
|
32
|
+
return nodeInstance.currentContractClassId;
|
|
33
|
+
}
|
|
34
|
+
return (await this.contractStore.getContractInstance(address))?.originalContractClassId;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
+
import type { FunctionCall, FunctionSelector } from '@aztec/stdlib/abi';
|
|
3
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
5
|
+
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
6
|
+
import type { StagedStore } from '../job_coordinator/job_coordinator.js';
|
|
7
|
+
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
8
|
+
import type { NoteStore } from '../storage/note_store/note_store.js';
|
|
9
|
+
import type { ContractClassService } from './contract_class_service.js';
|
|
10
|
+
/**
|
|
11
|
+
* Maximum number of scope syncs running concurrently within a single sync call. Sized to trade off parallelism
|
|
12
|
+
* on non-ACIR work (node RPC, note store reads) against memory pressure from concurrent circuit execution.
|
|
13
|
+
*/
|
|
14
|
+
export declare const MAX_CONCURRENT_SCOPE_SYNCS = 5;
|
|
15
|
+
/**
|
|
16
|
+
* Service for syncing the private state of contracts. It uses a cache to avoid redundant sync operations - the cache
|
|
17
|
+
* is wiped when the anchor block changes.
|
|
18
|
+
*
|
|
19
|
+
* TODO: The StagedStore naming is broken here. Figure out a better name.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ContractSyncService implements StagedStore {
|
|
22
|
+
#private;
|
|
23
|
+
private aztecNode;
|
|
24
|
+
private contractStore;
|
|
25
|
+
private contractClassService;
|
|
26
|
+
private noteStore;
|
|
27
|
+
private log;
|
|
28
|
+
readonly storeName = "contract_sync";
|
|
29
|
+
private syncedContracts;
|
|
30
|
+
constructor(aztecNode: AztecNode, contractStore: ContractStore, contractClassService: ContractClassService, noteStore: NoteStore, log: Logger);
|
|
31
|
+
/**
|
|
32
|
+
* Ensures a contract's private state is synchronized.
|
|
33
|
+
* Uses a cache to avoid redundant sync operations - the cache is wiped when the anchor block changes.
|
|
34
|
+
* @param contractAddress - The address of the contract to sync.
|
|
35
|
+
* @param functionToInvokeAfterSync - The function selector that will be called after sync (used to validate it's
|
|
36
|
+
* not sync_state itself).
|
|
37
|
+
* @param utilityExecutor - Executor function for running the sync_state utility function.
|
|
38
|
+
* @param scopes - Access scopes to pass through to the utility executor (affects whose account's private state is discovered).
|
|
39
|
+
*/
|
|
40
|
+
ensureContractSynced(contractAddress: AztecAddress, functionToInvokeAfterSync: FunctionSelector | null, utilityExecutor: (call: FunctionCall, scopes: AztecAddress[]) => Promise<any>, anchorBlockHeader: BlockHeader, jobId: string, scopes: AztecAddress[]): Promise<void>;
|
|
41
|
+
/** Clears sync cache entries for the given scopes of a contract. */
|
|
42
|
+
invalidateContractForScopes(contractAddress: AztecAddress, scopes: AztecAddress[]): void;
|
|
43
|
+
/** Clears sync cache. Called by BlockSynchronizer when anchor block changes. */
|
|
44
|
+
wipe(): void;
|
|
45
|
+
commit(_jobId: string): Promise<void>;
|
|
46
|
+
discardStaged(_jobId: string): Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3Rfc3luY19zZXJ2aWNlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3QvY29udHJhY3Rfc3luY19zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBR3BELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3hFLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRXBELE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLHVDQUF1QyxDQUFDO0FBRXpFLE9BQU8sS0FBSyxFQUFFLGFBQWEsRUFBRSxNQUFNLDZDQUE2QyxDQUFDO0FBQ2pGLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBQ3JFLE9BQU8sS0FBSyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sNkJBQTZCLENBQUM7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AAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACjB;IAEJ;;;;;;;;OAQG;IACG,oBAAoB,CACxB,eAAe,EAAE,YAAY,EAC7B,yBAAyB,EAAE,gBAAgB,GAAG,IAAI,EAClD,eAAe,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC7E,iBAAiB,EAAE,WAAW,EAC9B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,YAAY,EAAE,GACrB,OAAO,CAAC,IAAI,CAAC,CAcf;IAED,oEAAoE;IACpE,2BAA2B,CAAC,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAKvF;IAED,gFAAgF;IAChF,IAAI,IAAI,IAAI,CAGX;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpC;IAED,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK3C;CA+DF"}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { Semaphore } from '@aztec/foundation/queue';
|
|
2
2
|
import { isProtocolContract } from '@aztec/protocol-contracts';
|
|
3
3
|
import { NoteService } from '../notes/note_service.js';
|
|
4
|
-
import { syncScope
|
|
5
|
-
/** Maximum number of scope syncs running concurrently across the PXE. */ const MAX_CONCURRENT_SCOPE_SYNCS = 5;
|
|
4
|
+
import { syncScope } from './helpers.js';
|
|
6
5
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Maximum number of scope syncs running concurrently within a single sync call. Sized to trade off parallelism
|
|
7
|
+
* on non-ACIR work (node RPC, note store reads) against memory pressure from concurrent circuit execution.
|
|
8
|
+
*/ export const MAX_CONCURRENT_SCOPE_SYNCS = 5;
|
|
9
|
+
/**
|
|
10
|
+
* Service for syncing the private state of contracts. It uses a cache to avoid redundant sync operations - the cache
|
|
11
|
+
* is wiped when the anchor block changes.
|
|
9
12
|
*
|
|
10
13
|
* TODO: The StagedStore naming is broken here. Figure out a better name.
|
|
11
14
|
*/ export class ContractSyncService {
|
|
12
15
|
aztecNode;
|
|
13
16
|
contractStore;
|
|
17
|
+
contractClassService;
|
|
14
18
|
noteStore;
|
|
15
19
|
log;
|
|
16
20
|
storeName;
|
|
@@ -18,25 +22,17 @@ import { syncScope, verifyCurrentClassId } from './helpers.js';
|
|
|
18
22
|
// (`contractAddress:scopeAddress`), or `contractAddress:*` for all scopes (all accounts).
|
|
19
23
|
// The value is a promise that resolves when the contract is synced.
|
|
20
24
|
syncedContracts;
|
|
21
|
-
|
|
22
|
-
// class ID verification is scope-independent. Cleared on wipe/discard.
|
|
23
|
-
classIdVerificationCache;
|
|
24
|
-
// Bounds the number of scope syncs running concurrently. Scopes beyond this limit queue here. Sized to trade off
|
|
25
|
-
// parallelism on non-ACIR work (node RPC, note store reads) against memory pressure from concurrent circuit
|
|
26
|
-
// execution.
|
|
27
|
-
#syncSlot;
|
|
28
|
-
constructor(aztecNode, contractStore, noteStore, log){
|
|
25
|
+
constructor(aztecNode, contractStore, contractClassService, noteStore, log){
|
|
29
26
|
this.aztecNode = aztecNode;
|
|
30
27
|
this.contractStore = contractStore;
|
|
28
|
+
this.contractClassService = contractClassService;
|
|
31
29
|
this.noteStore = noteStore;
|
|
32
30
|
this.log = log;
|
|
33
31
|
this.storeName = 'contract_sync';
|
|
34
32
|
this.syncedContracts = new Map();
|
|
35
|
-
this.classIdVerificationCache = new Map();
|
|
36
|
-
this.#syncSlot = new Semaphore(MAX_CONCURRENT_SCOPE_SYNCS);
|
|
37
33
|
}
|
|
38
34
|
/**
|
|
39
|
-
* Ensures a contract's private state is synchronized
|
|
35
|
+
* Ensures a contract's private state is synchronized.
|
|
40
36
|
* Uses a cache to avoid redundant sync operations - the cache is wiped when the anchor block changes.
|
|
41
37
|
* @param contractAddress - The address of the contract to sync.
|
|
42
38
|
* @param functionToInvokeAfterSync - The function selector that will be called after sync (used to validate it's
|
|
@@ -44,7 +40,7 @@ import { syncScope, verifyCurrentClassId } from './helpers.js';
|
|
|
44
40
|
* @param utilityExecutor - Executor function for running the sync_state utility function.
|
|
45
41
|
* @param scopes - Access scopes to pass through to the utility executor (affects whose account's private state is discovered).
|
|
46
42
|
*/ async ensureContractSynced(contractAddress, functionToInvokeAfterSync, utilityExecutor, anchorBlockHeader, jobId, scopes) {
|
|
47
|
-
this.#startSyncIfNeeded(contractAddress, scopes, anchorBlockHeader, jobId, (scope)=>syncScope(contractAddress, this.contractStore, functionToInvokeAfterSync, utilityExecutor, scope));
|
|
43
|
+
this.#startSyncIfNeeded(contractAddress, scopes, anchorBlockHeader, jobId, (scope)=>syncScope(contractAddress, this.contractStore, this.contractClassService, anchorBlockHeader, functionToInvokeAfterSync, utilityExecutor, scope));
|
|
48
44
|
await this.#awaitSync(contractAddress, scopes);
|
|
49
45
|
}
|
|
50
46
|
/** Clears sync cache entries for the given scopes of a contract. */ invalidateContractForScopes(contractAddress, scopes) {
|
|
@@ -56,7 +52,6 @@ import { syncScope, verifyCurrentClassId } from './helpers.js';
|
|
|
56
52
|
/** Clears sync cache. Called by BlockSynchronizer when anchor block changes. */ wipe() {
|
|
57
53
|
this.log.debug(`Wiping contract sync cache (${this.syncedContracts.size} entries)`);
|
|
58
54
|
this.syncedContracts.clear();
|
|
59
|
-
this.classIdVerificationCache.clear();
|
|
60
55
|
}
|
|
61
56
|
commit(_jobId) {
|
|
62
57
|
return Promise.resolve();
|
|
@@ -65,28 +60,27 @@ import { syncScope, verifyCurrentClassId } from './helpers.js';
|
|
|
65
60
|
// We clear the synced contracts cache here because, when the job is discarded, any associated database writes from
|
|
66
61
|
// the sync are also undone.
|
|
67
62
|
this.syncedContracts.clear();
|
|
68
|
-
this.classIdVerificationCache.clear();
|
|
69
63
|
return Promise.resolve();
|
|
70
64
|
}
|
|
71
65
|
/**
|
|
72
66
|
* For each unsynced scope, creates a promise that waits on:
|
|
73
|
-
* 1.
|
|
74
|
-
* 2.
|
|
75
|
-
* 3. Per-scope sync (individual, semaphore-bounded).
|
|
67
|
+
* 1. Note nullifier sync (shared, batched across all unsynced scopes).
|
|
68
|
+
* 2. Per-scope sync (individual, semaphore-bounded).
|
|
76
69
|
*/ #startSyncIfNeeded(contractAddress, scopes, anchorBlockHeader, jobId, syncScopeFn) {
|
|
77
70
|
const scopesToSync = scopes.filter((scope)=>!this.syncedContracts.has(toKey(contractAddress, scope)));
|
|
78
71
|
if (scopesToSync.length === 0) {
|
|
79
72
|
return;
|
|
80
73
|
}
|
|
81
74
|
this.log.debug(`Syncing contract ${contractAddress} for ${scopesToSync.length} scope(s)`);
|
|
82
|
-
const verifyPromise = this.#verifyClassId(contractAddress, anchorBlockHeader);
|
|
83
75
|
const syncNullifiersPromise = this.#syncNoteNullifiers(contractAddress, anchorBlockHeader, jobId, scopesToSync);
|
|
76
|
+
// We build a new semaphore for each sync call, so it rate-limits the scopes within that single call. We do
|
|
77
|
+
// this so that if these scope syncs trigger nested syncs, the nested ones can execute without causing a deadlock.
|
|
78
|
+
const syncSlot = new Semaphore(MAX_CONCURRENT_SCOPE_SYNCS);
|
|
84
79
|
for (const scope of scopesToSync){
|
|
85
80
|
const key = toKey(contractAddress, scope);
|
|
86
81
|
const promise = Promise.all([
|
|
87
|
-
verifyPromise,
|
|
88
82
|
syncNullifiersPromise,
|
|
89
|
-
|
|
83
|
+
runBounded(syncSlot, ()=>syncScopeFn(scope))
|
|
90
84
|
]).then(()=>{}).catch((err)=>{
|
|
91
85
|
this.syncedContracts.delete(key);
|
|
92
86
|
throw err;
|
|
@@ -94,19 +88,6 @@ import { syncScope, verifyCurrentClassId } from './helpers.js';
|
|
|
94
88
|
this.syncedContracts.set(key, promise);
|
|
95
89
|
}
|
|
96
90
|
}
|
|
97
|
-
/** Verifies the local class ID matches the on-chain value (cached, evicts on failure so retries re-verify). */ #verifyClassId(contractAddress, anchorBlockHeader) {
|
|
98
|
-
const contractKey = contractAddress.toString();
|
|
99
|
-
const cached = this.classIdVerificationCache.get(contractKey);
|
|
100
|
-
if (cached) {
|
|
101
|
-
return cached;
|
|
102
|
-
}
|
|
103
|
-
const promise = verifyCurrentClassId(contractAddress, this.aztecNode, this.contractStore, anchorBlockHeader).catch((err)=>{
|
|
104
|
-
this.classIdVerificationCache.delete(contractKey);
|
|
105
|
-
throw err;
|
|
106
|
-
});
|
|
107
|
-
this.classIdVerificationCache.set(contractKey, promise);
|
|
108
|
-
return promise;
|
|
109
|
-
}
|
|
110
91
|
/** Syncs note nullifiers across all unsynced scopes in a single batched call. */ async #syncNoteNullifiers(contractAddress, anchorBlockHeader, jobId, scopes) {
|
|
111
92
|
// Protocol contracts don't have private state to sync
|
|
112
93
|
if (isProtocolContract(contractAddress)) {
|
|
@@ -117,14 +98,6 @@ import { syncScope, verifyCurrentClassId } from './helpers.js';
|
|
|
117
98
|
const noteService = new NoteService(this.noteStore, this.aztecNode, anchorBlockHeader, jobId);
|
|
118
99
|
await noteService.syncNoteNullifiers(contractAddress, scopes);
|
|
119
100
|
}
|
|
120
|
-
/** Runs fn while holding a slot in #syncSlot, bounding total concurrent scope syncs. */ async #runBounded(fn) {
|
|
121
|
-
await this.#syncSlot.acquire();
|
|
122
|
-
try {
|
|
123
|
-
return await fn();
|
|
124
|
-
} finally{
|
|
125
|
-
this.#syncSlot.release();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
101
|
/** Collects all relevant scope promises (including in-flight ones from concurrent calls) and awaits them. */ async #awaitSync(contractAddress, scopes) {
|
|
129
102
|
const promises = scopes.map((scope)=>this.syncedContracts.get(toKey(contractAddress, scope))).filter((p)=>p !== undefined);
|
|
130
103
|
await Promise.all(promises);
|
|
@@ -133,3 +106,11 @@ import { syncScope, verifyCurrentClassId } from './helpers.js';
|
|
|
133
106
|
function toKey(contract, scope) {
|
|
134
107
|
return `${contract.toString()}:${scope.toString()}`;
|
|
135
108
|
}
|
|
109
|
+
/** Runs fn while holding a slot in the given semaphore, bounding concurrent scope syncs within a single call. */ async function runBounded(syncSlot, fn) {
|
|
110
|
+
await syncSlot.acquire();
|
|
111
|
+
try {
|
|
112
|
+
return await fn();
|
|
113
|
+
} finally{
|
|
114
|
+
syncSlot.release();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionCall, FunctionSelector } from '@aztec/stdlib/abi';
|
|
2
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
4
|
+
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
5
|
+
import type { ContractClassService } from './contract_class_service.js';
|
|
6
|
+
export declare function syncScope(contractAddress: AztecAddress, contractStore: ContractStore, contractClassService: ContractClassService, anchorBlockHeader: BlockHeader, functionToInvokeAfterSync: FunctionSelector | null, utilityExecutor: (privateSyncCall: FunctionCall, scopes: AztecAddress[]) => Promise<any>, scope: AztecAddress): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0L2hlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDeEUsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFcEQsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sNkNBQTZDLENBQUM7QUFDakYsT0FBTyxLQUFLLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUd4RSx3QkFBc0IsU0FBUyxDQUM3QixlQUFlLEVBQUUsWUFBWSxFQUM3QixhQUFhLEVBQUUsYUFBYSxFQUM1QixvQkFBb0IsRUFBRSxvQkFBb0IsRUFDMUMsaUJBQWlCLEVBQUUsV0FBVyxFQUM5Qix5QkFBeUIsRUFBRSxnQkFBZ0IsR0FBRyxJQUFJLEVBQ2xELGVBQWUsRUFBRSxDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxLQUFLLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFDeEYsS0FBSyxFQUFFLFlBQVksaUJBbUJwQiJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/contract/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,wBAAsB,SAAS,CAC7B,eAAe,EAAE,YAAY,EAC7B,aAAa,EAAE,aAAa,EAC5B,oBAAoB,EAAE,oBAAoB,EAC1C,iBAAiB,EAAE,WAAW,EAC9B,yBAAyB,EAAE,gBAAgB,GAAG,IAAI,EAClD,eAAe,EAAE,CAAC,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EACxF,KAAK,EAAE,YAAY,iBAmBpB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isSkipSyncContract } from './skip_sync_contracts.js';
|
|
2
|
+
export async function syncScope(contractAddress, contractStore, contractClassService, anchorBlockHeader, functionToInvokeAfterSync, utilityExecutor, scope) {
|
|
3
|
+
// Some canonical contracts hold no private state, so there is nothing to sync (see `skipSyncContracts`).
|
|
4
|
+
if (isSkipSyncContract(contractAddress)) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
const classId = await contractClassService.getCurrentClassId(contractAddress, anchorBlockHeader);
|
|
8
|
+
if (!classId) {
|
|
9
|
+
throw new Error(`Cannot sync contract ${contractAddress}: its instance is not registered nor published.`);
|
|
10
|
+
}
|
|
11
|
+
const syncStateFunctionCall = await contractStore.getFunctionCall('sync_state', [
|
|
12
|
+
scope
|
|
13
|
+
], contractAddress, classId);
|
|
14
|
+
if (functionToInvokeAfterSync && functionToInvokeAfterSync.equals(syncStateFunctionCall.selector)) {
|
|
15
|
+
throw new Error('Forbidden `sync_state` invocation. `sync_state` can only be invoked by PXE, manual execution can lead to inconsistencies.');
|
|
16
|
+
}
|
|
17
|
+
await utilityExecutor(syncStateFunctionCall, [
|
|
18
|
+
scope
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
|
+
/**
|
|
3
|
+
* Canonical contracts that hold no private state and are therefore never synced.
|
|
4
|
+
*
|
|
5
|
+
* The protocol contracts (registries, fee juice) plus the standard AuthRegistry, MultiCallEntrypoint and PublicChecks
|
|
6
|
+
* declare no notes and no events, so their macro-generated `sync_state` has nothing to discover.
|
|
7
|
+
*/
|
|
8
|
+
export declare const skipSyncContracts: AztecAddress[];
|
|
9
|
+
/** Returns whether the given contract should be skipped during private state synchronization. */
|
|
10
|
+
export declare function isSkipSyncContract(address: AztecAddress): boolean;
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcF9zeW5jX2NvbnRyYWN0cy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0L3NraXBfc3luY19jb250cmFjdHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUEsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFFaEU7Ozs7O0dBS0c7QUFDSCxlQUFPLE1BQU0saUJBQWlCLEVBQUUsWUFBWSxFQUszQyxDQUFDO0FBRUYsaUdBQWlHO0FBQ2pHLHdCQUFnQixrQkFBa0IsQ0FBQyxPQUFPLEVBQUUsWUFBWSxHQUFHLE9BQU8sQ0FFakUifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skip_sync_contracts.d.ts","sourceRoot":"","sources":["../../src/contract/skip_sync_contracts.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAK3C,CAAC;AAEF,iGAAiG;AACjG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAEjE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
2
|
+
import { STANDARD_AUTH_REGISTRY_ADDRESS } from '@aztec/standard-contracts/auth-registry/constants';
|
|
3
|
+
import { STANDARD_MULTI_CALL_ENTRYPOINT_ADDRESS } from '@aztec/standard-contracts/multi-call-entrypoint/constants';
|
|
4
|
+
import { STANDARD_PUBLIC_CHECKS_ADDRESS } from '@aztec/standard-contracts/public-checks/constants';
|
|
5
|
+
/**
|
|
6
|
+
* Canonical contracts that hold no private state and are therefore never synced.
|
|
7
|
+
*
|
|
8
|
+
* The protocol contracts (registries, fee juice) plus the standard AuthRegistry, MultiCallEntrypoint and PublicChecks
|
|
9
|
+
* declare no notes and no events, so their macro-generated `sync_state` has nothing to discover.
|
|
10
|
+
*/ export const skipSyncContracts = [
|
|
11
|
+
...Object.values(ProtocolContractAddress),
|
|
12
|
+
STANDARD_AUTH_REGISTRY_ADDRESS,
|
|
13
|
+
STANDARD_MULTI_CALL_ENTRYPOINT_ADDRESS,
|
|
14
|
+
STANDARD_PUBLIC_CHECKS_ADDRESS
|
|
15
|
+
];
|
|
16
|
+
/** Returns whether the given contract should be skipped during private state synchronization. */ export function isSkipSyncContract(address) {
|
|
17
|
+
return skipSyncContracts.some((a)=>a.equals(address));
|
|
18
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import type { FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
|
|
3
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
import type { ContractInstancePreimageWithAddress } from '@aztec/stdlib/contract';
|
|
5
|
+
import type { BlockHeader, ContractOverrides } from '@aztec/stdlib/tx';
|
|
6
|
+
import type { ContractClassService } from '../contract/contract_class_service.js';
|
|
7
|
+
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
8
|
+
/**
|
|
9
|
+
* Per-run view of contract data for a single simulation, bound to its anchor block.
|
|
10
|
+
*
|
|
11
|
+
* The {@link ContractStore} is pure class-id-keyed storage and has no notion of which class an address runs. This
|
|
12
|
+
* class bridges that gap: it resolves an address to its current class id (via the {@link ContractClassService}
|
|
13
|
+
* at the run's anchor block) and then serves artifacts from the store. It is also the single place contract
|
|
14
|
+
* overrides are applied — when an address is overridden, both its instance and its class id come from the override
|
|
15
|
+
* rather than the chain, so a simulation can execute different bytecode at that address. Overrides are only set for
|
|
16
|
+
* `simulateTx` (which skips the kernels), so the override path never reaches proving.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AnchoredContractData {
|
|
19
|
+
private readonly store;
|
|
20
|
+
private readonly contractClassService;
|
|
21
|
+
private readonly anchorBlockHeader;
|
|
22
|
+
private readonly overrides?;
|
|
23
|
+
constructor(store: ContractStore, contractClassService: ContractClassService, anchorBlockHeader: BlockHeader, overrides?: ContractOverrides | undefined);
|
|
24
|
+
/** Returns the address preimage of the instance at `address`, from the override if any, else from storage. */
|
|
25
|
+
getContractInstance(address: AztecAddress): Promise<ContractInstancePreimageWithAddress | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Resolves the class id `address` runs in this simulation: the override's class if overridden, else resolved against
|
|
28
|
+
* the chain at the anchor block.
|
|
29
|
+
*/
|
|
30
|
+
getCurrentClassId(address: AztecAddress): Promise<Fr | undefined>;
|
|
31
|
+
getFunctionArtifact(address: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifactWithContractName | undefined>;
|
|
32
|
+
getFunctionArtifactWithDebugMetadata(address: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifactWithContractName | undefined>;
|
|
33
|
+
getDebugContractName(address: AztecAddress): Promise<string | undefined>;
|
|
34
|
+
getDebugFunctionName(address: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jaG9yZWRfY29udHJhY3RfZGF0YS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9hbmNob3JlZF9jb250cmFjdF9kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3pELE9BQU8sS0FBSyxFQUFFLGdDQUFnQyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDNUYsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUsbUNBQW1DLEVBQUUsTUFBTSx3QkFBd0IsQ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A8G;IAC9G,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,mCAAmC,GAAG,SAAS,CAAC,CAMnG;IAED;;;OAGG;IACH,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC,CAMhE;IAEK,mBAAmB,CACvB,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,gCAAgC,GAAG,SAAS,CAAC,CAGvD;IAEK,oCAAoC,CACxC,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,gCAAgC,GAAG,SAAS,CAAC,CAGvD;IAEK,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG7E;IAEK,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAG7F;CACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-run view of contract data for a single simulation, bound to its anchor block.
|
|
3
|
+
*
|
|
4
|
+
* The {@link ContractStore} is pure class-id-keyed storage and has no notion of which class an address runs. This
|
|
5
|
+
* class bridges that gap: it resolves an address to its current class id (via the {@link ContractClassService}
|
|
6
|
+
* at the run's anchor block) and then serves artifacts from the store. It is also the single place contract
|
|
7
|
+
* overrides are applied — when an address is overridden, both its instance and its class id come from the override
|
|
8
|
+
* rather than the chain, so a simulation can execute different bytecode at that address. Overrides are only set for
|
|
9
|
+
* `simulateTx` (which skips the kernels), so the override path never reaches proving.
|
|
10
|
+
*/ export class AnchoredContractData {
|
|
11
|
+
store;
|
|
12
|
+
contractClassService;
|
|
13
|
+
anchorBlockHeader;
|
|
14
|
+
overrides;
|
|
15
|
+
constructor(store, contractClassService, anchorBlockHeader, overrides){
|
|
16
|
+
this.store = store;
|
|
17
|
+
this.contractClassService = contractClassService;
|
|
18
|
+
this.anchorBlockHeader = anchorBlockHeader;
|
|
19
|
+
this.overrides = overrides;
|
|
20
|
+
}
|
|
21
|
+
/** Returns the address preimage of the instance at `address`, from the override if any, else from storage. */ getContractInstance(address) {
|
|
22
|
+
const override = this.overrides?.[address.toString()];
|
|
23
|
+
if (override) {
|
|
24
|
+
return Promise.resolve(override.instance);
|
|
25
|
+
}
|
|
26
|
+
return this.store.getContractInstance(address);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the class id `address` runs in this simulation: the override's class if overridden, else resolved against
|
|
30
|
+
* the chain at the anchor block.
|
|
31
|
+
*/ getCurrentClassId(address) {
|
|
32
|
+
const override = this.overrides?.[address.toString()];
|
|
33
|
+
if (override) {
|
|
34
|
+
return Promise.resolve(override.instance.currentContractClassId);
|
|
35
|
+
}
|
|
36
|
+
return this.contractClassService.getCurrentClassId(address, this.anchorBlockHeader);
|
|
37
|
+
}
|
|
38
|
+
async getFunctionArtifact(address, selector) {
|
|
39
|
+
const classId = await this.getCurrentClassId(address);
|
|
40
|
+
return classId ? this.store.getFunctionArtifact(classId, selector) : undefined;
|
|
41
|
+
}
|
|
42
|
+
async getFunctionArtifactWithDebugMetadata(address, selector) {
|
|
43
|
+
const classId = await this.getCurrentClassId(address);
|
|
44
|
+
return classId ? this.store.getFunctionArtifactWithDebugMetadata(classId, selector) : undefined;
|
|
45
|
+
}
|
|
46
|
+
async getDebugContractName(address) {
|
|
47
|
+
const classId = await this.getCurrentClassId(address);
|
|
48
|
+
return classId ? this.store.getDebugContractName(classId) : undefined;
|
|
49
|
+
}
|
|
50
|
+
async getDebugFunctionName(address, selector) {
|
|
51
|
+
const classId = await this.getCurrentClassId(address);
|
|
52
|
+
return classId ? this.store.getDebugFunctionName(classId, selector) : `${address}:${selector}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -8,24 +8,22 @@ import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
|
8
8
|
import type { L2TipsProvider } from '@aztec/stdlib/block';
|
|
9
9
|
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
10
10
|
import { type PrivateKernelExecutionProofOutput, PrivateKernelTailCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
11
|
-
import { BlockHeader, type OffchainEffect, PrivateExecutionResult, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
12
|
-
import type {
|
|
11
|
+
import { BlockHeader, type ContractOverrides, type OffchainEffect, PrivateExecutionResult, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
12
|
+
import type { ContractClassService } from '../contract/contract_class_service.js';
|
|
13
|
+
import type { ContractSyncService } from '../contract/contract_sync_service.js';
|
|
13
14
|
import type { ExecutionHooks } from '../hooks/index.js';
|
|
14
|
-
import type {
|
|
15
|
+
import type { TxResolverService } from '../messages/tx_resolver_service.js';
|
|
15
16
|
import type { AddressStore } from '../storage/address_store/address_store.js';
|
|
16
17
|
import type { CapsuleStore } from '../storage/capsule_store/capsule_store.js';
|
|
17
18
|
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
19
|
+
import type { FactStore } from '../storage/fact_store/index.js';
|
|
18
20
|
import type { NoteStore } from '../storage/note_store/note_store.js';
|
|
19
21
|
import type { PrivateEventStore } from '../storage/private_event_store/private_event_store.js';
|
|
20
22
|
import type { RecipientTaggingStore } from '../storage/tagging_store/recipient_tagging_store.js';
|
|
21
|
-
import type { SenderAddressBookStore } from '../storage/tagging_store/sender_address_book_store.js';
|
|
22
23
|
import type { SenderTaggingStore } from '../storage/tagging_store/sender_tagging_store.js';
|
|
24
|
+
import type { TaggingSecretSourcesStore } from '../storage/tagging_store/tagging_secret_sources_store.js';
|
|
23
25
|
/** Options for ContractFunctionSimulator.run. */
|
|
24
26
|
export type ContractSimulatorRunOpts = {
|
|
25
|
-
/** The address of the contract (should match request.origin). */
|
|
26
|
-
contractAddress: AztecAddress;
|
|
27
|
-
/** The function selector of the entry point. */
|
|
28
|
-
selector: FunctionSelector;
|
|
29
27
|
/** The address calling the function. Can be replaced to simulate a call from another contract or account. */
|
|
30
28
|
msgSender?: AztecAddress;
|
|
31
29
|
/** The block header to use as base state for this run. */
|
|
@@ -40,6 +38,9 @@ export type ContractSimulatorRunOpts = {
|
|
|
40
38
|
/** Args for ContractFunctionSimulator constructor. */
|
|
41
39
|
export type ContractFunctionSimulatorArgs = {
|
|
42
40
|
contractStore: ContractStore;
|
|
41
|
+
contractClassService: ContractClassService;
|
|
42
|
+
/** Per-simulation contract overrides. */
|
|
43
|
+
overrides?: ContractOverrides;
|
|
43
44
|
noteStore: NoteStore;
|
|
44
45
|
keyStore: KeyStore;
|
|
45
46
|
addressStore: AddressStore;
|
|
@@ -47,12 +48,13 @@ export type ContractFunctionSimulatorArgs = {
|
|
|
47
48
|
l2TipsStore: L2TipsProvider;
|
|
48
49
|
senderTaggingStore: SenderTaggingStore;
|
|
49
50
|
recipientTaggingStore: RecipientTaggingStore;
|
|
50
|
-
|
|
51
|
+
taggingSecretSourcesStore: TaggingSecretSourcesStore;
|
|
51
52
|
capsuleStore: CapsuleStore;
|
|
53
|
+
factStore: FactStore;
|
|
52
54
|
privateEventStore: PrivateEventStore;
|
|
53
55
|
simulator: CircuitSimulator;
|
|
54
56
|
contractSyncService: ContractSyncService;
|
|
55
|
-
|
|
57
|
+
txResolver: TxResolverService;
|
|
56
58
|
hooks?: ExecutionHooks;
|
|
57
59
|
};
|
|
58
60
|
/**
|
|
@@ -61,6 +63,8 @@ export type ContractFunctionSimulatorArgs = {
|
|
|
61
63
|
export declare class ContractFunctionSimulator {
|
|
62
64
|
private readonly log;
|
|
63
65
|
private readonly contractStore;
|
|
66
|
+
private readonly contractClassService;
|
|
67
|
+
private readonly overrides;
|
|
64
68
|
private readonly noteStore;
|
|
65
69
|
private readonly keyStore;
|
|
66
70
|
private readonly addressStore;
|
|
@@ -68,39 +72,29 @@ export declare class ContractFunctionSimulator {
|
|
|
68
72
|
private readonly l2TipsStore;
|
|
69
73
|
private readonly senderTaggingStore;
|
|
70
74
|
private readonly recipientTaggingStore;
|
|
71
|
-
private readonly
|
|
75
|
+
private readonly taggingSecretSourcesStore;
|
|
72
76
|
private readonly capsuleStore;
|
|
77
|
+
private readonly factStore;
|
|
73
78
|
private readonly privateEventStore;
|
|
74
79
|
private readonly simulator;
|
|
75
80
|
private readonly contractSyncService;
|
|
76
|
-
private readonly
|
|
81
|
+
private readonly txResolver;
|
|
77
82
|
private readonly hooks;
|
|
78
83
|
constructor(args: ContractFunctionSimulatorArgs);
|
|
79
84
|
/**
|
|
80
85
|
* Runs a private function.
|
|
81
86
|
* @param request - The transaction request.
|
|
82
87
|
*/
|
|
83
|
-
run(request: TxExecutionRequest, {
|
|
88
|
+
run(request: TxExecutionRequest, { msgSender, anchorBlockHeader, senderForTags, scopes, jobId }: ContractSimulatorRunOpts): Promise<PrivateExecutionResult>;
|
|
84
89
|
/**
|
|
85
90
|
* Runs a utility function.
|
|
86
91
|
* @param call - The function call to execute.
|
|
87
|
-
* @param authwits - Authentication witnesses required for the function call.
|
|
88
|
-
* @param anchorBlockHeader - The block header to use as base state for this run.
|
|
89
|
-
* @param scopes - Optional array of account addresses whose notes can be accessed in this call. Defaults to all
|
|
90
|
-
* accounts if not specified.
|
|
91
92
|
* @returns A return value of the utility function in a form as returned by the simulator (Noir fields)
|
|
92
93
|
*/
|
|
93
94
|
runUtility(call: FunctionCall, authwits: AuthWitness[], anchorBlockHeader: BlockHeader, scopes: AztecAddress[], jobId: string): Promise<{
|
|
94
95
|
result: Fr[];
|
|
95
96
|
offchainEffects: OffchainEffect[];
|
|
96
97
|
}>;
|
|
97
|
-
/**
|
|
98
|
-
* Returns the execution statistics collected during the simulator run.
|
|
99
|
-
* @returns The execution statistics.
|
|
100
|
-
*/
|
|
101
|
-
getStats(): {
|
|
102
|
-
nodeRPCCalls: import("@aztec/stdlib/tx").NodeStats;
|
|
103
|
-
};
|
|
104
98
|
}
|
|
105
99
|
/**
|
|
106
100
|
* Generates the final public inputs of the tail kernel circuit, an empty Chonk proof
|
|
@@ -116,4 +110,4 @@ export declare class ContractFunctionSimulator {
|
|
|
116
110
|
* @returns The simulated proving result.
|
|
117
111
|
*/
|
|
118
112
|
export declare function generateSimulatedProvingResult(privateExecutionResult: PrivateExecutionResult, debugFunctionNameGetter: (contractAddress: AztecAddress, functionSelector: FunctionSelector) => Promise<string>, node: AztecNode, minRevertibleSideEffectCounterOverride?: number): Promise<PrivateKernelExecutionProofOutput<PrivateKernelTailCircuitPublicInputs>>;
|
|
119
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
113
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQkEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBR3BELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBR2pELE9BQU8sRUFDTCxLQUFLLGdCQUFnQixFQU90QixNQUFNLHlCQUF5QixDQUFDO0FBQ2pDLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3RELE9BQU8sRUFBRSxnQkFBZ0IsRUFBZ0IsTUFBTSxtQkFBbUIsQ0FBQztBQUNuRSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDM0QsT0FBTyxLQUFLLEVBQWtCLGNBQWMsRUFBRSxNQU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JsRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_function_simulator.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/contract_function_simulator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract_function_simulator.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/contract_function_simulator.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAGpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EACL,KAAK,gBAAgB,EAOtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAkB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAU1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAKL,KAAK,iCAAiC,EACtC,oCAAoC,EAarC,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EACL,WAAW,EAEX,KAAK,iBAAiB,EAEtB,KAAK,cAAc,EACnB,sBAAsB,EAEtB,kBAAkB,EAInB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9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