@aztec/pxe 5.0.0-rc.1 → 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/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 +13 -11
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +43 -15
- 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/contract_function_simulator/contract_function_simulator.d.ts +11 -16
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +22 -18
- package/dest/contract_function_simulator/index.d.ts +15 -9
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +3 -7
- 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/event_validation_request.js +1 -1
- 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 +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 +4 -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_validation_request.js +2 -2
- 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/provided_secret.d.ts +5 -8
- package/dest/contract_function_simulator/noir-structs/provided_secret.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/provided_secret.js +1 -14
- 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/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 +81 -6
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle_registry.js +128 -9
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +80 -36
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.js +926 -264
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +13 -8
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +80 -11
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +46 -20
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +119 -55
- package/dest/contract_sync/helpers.d.ts +7 -6
- package/dest/contract_sync/helpers.d.ts.map +1 -1
- package/dest/contract_sync/helpers.js +11 -16
- 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 +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 +1 -0
- package/dest/entrypoints/pxe_creation_options.d.ts +8 -2
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/server/index.d.ts +1 -2
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +0 -1
- package/dest/entrypoints/server/utils.d.ts +1 -1
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +3 -1
- package/dest/error_enriching.js +1 -1
- package/dest/hooks/execution_hooks.d.ts +16 -7
- package/dest/hooks/execution_hooks.d.ts.map +1 -1
- package/dest/hooks/execution_hooks.js +3 -3
- package/dest/hooks/index.d.ts +3 -3
- package/dest/hooks/index.d.ts.map +1 -1
- 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 +6 -6
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +62 -28
- package/dest/messages/tx_resolver_service.d.ts +17 -0
- package/dest/messages/tx_resolver_service.d.ts.map +1 -0
- package/dest/messages/{message_context_service.js → tx_resolver_service.js} +8 -8
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +2 -2
- package/dest/private_kernel/hints/test_utils.js +1 -1
- package/dest/pxe.d.ts +46 -19
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +104 -52
- 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/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 +86 -33
- 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.js +2 -2
- 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 +2 -1
- package/dest/storage/index.d.ts.map +1 -1
- package/dest/storage/index.js +1 -0
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/metadata.js +1 -1
- 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/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/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/package.json +17 -17
- package/src/block_synchronizer/block_stream_source.ts +6 -45
- package/src/block_synchronizer/block_synchronizer.ts +56 -23
- package/src/config/index.ts +1 -0
- package/src/contract_function_simulator/contract_function_simulator.ts +32 -31
- package/src/contract_function_simulator/index.ts +17 -8
- 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/event_validation_request.ts +1 -1
- 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 +20 -46
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +7 -60
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +2 -2
- 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/provided_secret.ts +3 -14
- 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/message_load_oracle_inputs.ts +6 -21
- package/src/contract_function_simulator/oracle/oracle_registry.ts +87 -79
- package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +641 -247
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +94 -14
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +206 -66
- package/src/contract_sync/helpers.ts +11 -18
- package/src/entrypoints/client/bundle/utils.ts +1 -0
- package/src/entrypoints/client/lazy/utils.ts +1 -0
- package/src/entrypoints/pxe_creation_options.ts +7 -1
- package/src/entrypoints/server/index.ts +0 -1
- package/src/entrypoints/server/utils.ts +3 -1
- package/src/error_enriching.ts +1 -1
- package/src/hooks/execution_hooks.ts +17 -8
- package/src/hooks/index.ts +6 -2
- package/src/hooks/resolve_tagging_secret_strategy.ts +46 -0
- package/src/logs/log_service.ts +71 -37
- package/src/messages/{message_context_service.ts → tx_resolver_service.ts} +16 -9
- package/src/oracle_version.ts +2 -2
- package/src/private_kernel/hints/test_utils.ts +1 -1
- package/src/pxe.ts +150 -54
- package/src/storage/allowed_scopes.ts +14 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/FactStore.json +40 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/L2TipsKVStore.json +1 -1
- package/src/storage/backwards_compatibility_tests/__snapshots__/TaggingSecretSourcesStore.json +30 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/opened_stores.json +21 -5
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +88 -33
- package/src/storage/capsule_store/capsule_service.ts +8 -13
- package/src/storage/contract_store/contract_store.ts +2 -2
- 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 +1 -0
- package/src/storage/metadata.ts +1 -1
- package/src/storage/open_pxe_stores.ts +6 -3
- package/src/storage/tagging_store/index.ts +1 -1
- package/src/storage/tagging_store/tagging_secret_sources_store.ts +117 -0
- package/dest/messages/message_context_service.d.ts +0 -17
- package/dest/messages/message_context_service.d.ts.map +0 -1
- 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/src/storage/backwards_compatibility_tests/__snapshots__/SenderAddressBookStore.json +0 -16
- package/src/storage/tagging_store/sender_address_book_store.ts +0 -48
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { ARCHIVE_HEIGHT } from '@aztec/constants';
|
|
2
1
|
import { uniqueBy } from '@aztec/foundation/collection';
|
|
3
2
|
import { Aes128 } from '@aztec/foundation/crypto/aes128';
|
|
4
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import { Point } from '@aztec/foundation/curves/grumpkin';
|
|
5
5
|
import { LogLevels, createLogger } from '@aztec/foundation/log';
|
|
6
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
7
6
|
import { ExecutionError, extractCallStack, resolveAssertionMessageFromError, toACVMWitness, witnessMapToFields } from '@aztec/simulator/client';
|
|
8
7
|
import { STANDARD_HANDSHAKE_REGISTRY_ADDRESS } from '@aztec/standard-contracts/handshake-registry/constants';
|
|
9
8
|
import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
10
9
|
import { siloNullifier } from '@aztec/stdlib/hash';
|
|
11
|
-
import {
|
|
12
|
-
import { AppTaggingSecret,
|
|
10
|
+
import { computeAddressSecret, hashPublicKey } from '@aztec/stdlib/keys';
|
|
11
|
+
import { AppTaggingSecret, FlatPublicLogs, deriveAppSiloedSharedSecret } from '@aztec/stdlib/logs';
|
|
13
12
|
import { getNonNullifiedL1ToL2MessageWitness } from '@aztec/stdlib/messaging';
|
|
14
13
|
import { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
15
|
-
import {
|
|
14
|
+
import { CallContext } from '@aztec/stdlib/tx';
|
|
16
15
|
import { createContractLogger, logContractMessage, stripAztecnrLogPrefix } from '../../contract_logging.js';
|
|
17
16
|
import { EventService } from '../../events/event_service.js';
|
|
18
17
|
import { LogService } from '../../logs/log_service.js';
|
|
19
18
|
import { NoteService } from '../../notes/note_service.js';
|
|
20
19
|
import { ORACLE_VERSION_MAJOR } from '../../oracle_version.js';
|
|
20
|
+
import { FactCollectionKey, FactCollectionTypeKey } from '../../storage/fact_store/index.js';
|
|
21
21
|
import { EphemeralArrayService } from '../ephemeral_array_service.js';
|
|
22
22
|
import { BoundedVec } from '../noir-structs/bounded_vec.js';
|
|
23
23
|
import { EphemeralArray } from '../noir-structs/ephemeral_array.js';
|
|
24
|
+
import { emptyFactCollection, toNoirFactCollection } from '../noir-structs/fact_collection.js';
|
|
24
25
|
import { Option } from '../noir-structs/option.js';
|
|
25
|
-
import { UtilityContext } from '../noir-structs/utility_context.js';
|
|
26
26
|
import { pickNotes } from '../pick_notes.js';
|
|
27
27
|
import { buildACIRCallback } from './acir_callback.js';
|
|
28
|
-
import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
29
28
|
/**
|
|
30
29
|
* The oracle for an execution of utility contract functions.
|
|
31
30
|
*/ export class UtilityExecutionOracle {
|
|
@@ -38,7 +37,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
38
37
|
transientArrayService;
|
|
39
38
|
// We store oracle version to be able to show a nice error message when an oracle handler is missing.
|
|
40
39
|
contractOracleVersion;
|
|
41
|
-
|
|
40
|
+
callContext;
|
|
42
41
|
authWitnesses;
|
|
43
42
|
capsules;
|
|
44
43
|
anchorBlockHeader;
|
|
@@ -48,10 +47,11 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
48
47
|
addressStore;
|
|
49
48
|
aztecNode;
|
|
50
49
|
recipientTaggingStore;
|
|
51
|
-
|
|
50
|
+
taggingSecretSourcesStore;
|
|
52
51
|
capsuleService;
|
|
52
|
+
factService;
|
|
53
53
|
privateEventStore;
|
|
54
|
-
|
|
54
|
+
txResolver;
|
|
55
55
|
contractSyncService;
|
|
56
56
|
l2TipsStore;
|
|
57
57
|
jobId;
|
|
@@ -61,7 +61,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
61
61
|
hooks;
|
|
62
62
|
utilityExecutor;
|
|
63
63
|
constructor(args){
|
|
64
|
-
this.
|
|
64
|
+
this.callContext = args.callContext;
|
|
65
65
|
this.authWitnesses = args.authWitnesses;
|
|
66
66
|
this.capsules = args.capsules;
|
|
67
67
|
this.anchorBlockHeader = args.anchorBlockHeader;
|
|
@@ -71,10 +71,11 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
71
71
|
this.addressStore = args.addressStore;
|
|
72
72
|
this.aztecNode = args.aztecNode;
|
|
73
73
|
this.recipientTaggingStore = args.recipientTaggingStore;
|
|
74
|
-
this.
|
|
74
|
+
this.taggingSecretSourcesStore = args.taggingSecretSourcesStore;
|
|
75
75
|
this.capsuleService = args.capsuleService;
|
|
76
|
+
this.factService = args.factService;
|
|
76
77
|
this.privateEventStore = args.privateEventStore;
|
|
77
|
-
this.
|
|
78
|
+
this.txResolver = args.txResolver;
|
|
78
79
|
this.contractSyncService = args.contractSyncService;
|
|
79
80
|
this.l2TipsStore = args.l2TipsStore;
|
|
80
81
|
this.jobId = args.jobId;
|
|
@@ -103,15 +104,20 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
103
104
|
return Fr.random();
|
|
104
105
|
}
|
|
105
106
|
getUtilityContext() {
|
|
106
|
-
return
|
|
107
|
+
return {
|
|
108
|
+
blockHeader: this.anchorBlockHeader,
|
|
109
|
+
contractAddress: this.callContext.contractAddress,
|
|
110
|
+
msgSender: this.callContext.msgSender
|
|
111
|
+
};
|
|
107
112
|
}
|
|
108
113
|
/**
|
|
109
114
|
* Retrieve keys associated with a specific master public key and app address.
|
|
110
115
|
* @param pkMHash - The master public key hash.
|
|
116
|
+
* @param _keyIndex - Sent by the Noir oracle caller but unused here; kept to match the oracle signature.
|
|
111
117
|
* @returns A Promise that resolves to nullifier keys.
|
|
112
118
|
* @throws If the keys are not registered in the key store.
|
|
113
119
|
* @throws If scopes are defined and the account is not in the scopes.
|
|
114
|
-
*/ async getKeyValidationRequest(pkMHash) {
|
|
120
|
+
*/ async getKeyValidationRequest(pkMHash, _keyIndex) {
|
|
115
121
|
let hasAccess = false;
|
|
116
122
|
for(let i = 0; i < this.scopes.length && !hasAccess; i++){
|
|
117
123
|
if (await this.keyStore.accountHasKey(this.scopes[i], pkMHash)) {
|
|
@@ -151,7 +157,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
151
157
|
// hash at all. If the block hash did not exist by the reference block hash, then the node will not return the
|
|
152
158
|
// membership witness as there is none.
|
|
153
159
|
const witness = await this.#queryWithBlockHashNotAfterAnchor(referenceBlockHash, ()=>this.aztecNode.getBlockHashMembershipWitness(referenceBlockHash, blockHash));
|
|
154
|
-
return witness ? Option.some(witness) : Option.none(
|
|
160
|
+
return witness ? Option.some(witness) : Option.none();
|
|
155
161
|
}
|
|
156
162
|
/**
|
|
157
163
|
* Returns a nullifier membership witness for a given nullifier at a given block.
|
|
@@ -218,10 +224,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
218
224
|
*/ async getPublicKeysAndPartialAddress(account) {
|
|
219
225
|
const completeAddress = await this.addressStore.getCompleteAddress(account);
|
|
220
226
|
if (!completeAddress) {
|
|
221
|
-
return Option.none(
|
|
222
|
-
publicKeys: PublicKeys.default(),
|
|
223
|
-
partialAddress: Fr.ZERO
|
|
224
|
-
});
|
|
227
|
+
return Option.none();
|
|
225
228
|
}
|
|
226
229
|
return Option.some({
|
|
227
230
|
publicKeys: completeAddress.publicKeys,
|
|
@@ -232,7 +235,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
232
235
|
const completeAddress = await this.addressStore.getCompleteAddress(account);
|
|
233
236
|
if (!completeAddress) {
|
|
234
237
|
throw new Error(`No public key registered for address ${account}.
|
|
235
|
-
Register it by calling
|
|
238
|
+
Register it by calling wallet.registerSender(...).\nSee docs for context: https://docs.aztec.network/errors/14`);
|
|
236
239
|
}
|
|
237
240
|
return completeAddress;
|
|
238
241
|
}
|
|
@@ -332,7 +335,10 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
332
335
|
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
333
336
|
*/ async getL1ToL2MembershipWitness(contractAddress, messageHash, secret) {
|
|
334
337
|
const [messageIndex, siblingPath] = await getNonNullifiedL1ToL2MessageWitness(this.aztecNode, contractAddress, messageHash, secret, await this.anchorBlockHeader.hash());
|
|
335
|
-
return
|
|
338
|
+
return {
|
|
339
|
+
index: messageIndex,
|
|
340
|
+
siblingPath
|
|
341
|
+
};
|
|
336
342
|
}
|
|
337
343
|
/**
|
|
338
344
|
* Read the public storage data.
|
|
@@ -387,7 +393,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
387
393
|
return EphemeralArray.fromValues(this.ephemeralArrayService, logs);
|
|
388
394
|
}
|
|
389
395
|
#createLogService() {
|
|
390
|
-
return new LogService(this.aztecNode, this.anchorBlockHeader, this.l2TipsStore, this.keyStore, this.recipientTaggingStore, this.
|
|
396
|
+
return new LogService(this.aztecNode, this.anchorBlockHeader, this.l2TipsStore, this.keyStore, this.recipientTaggingStore, this.taggingSecretSourcesStore, this.addressStore, this.jobId, this.logger.getBindings());
|
|
391
397
|
}
|
|
392
398
|
async validateAndStoreEnqueuedNotesAndEvents(noteValidationRequests, eventValidationRequests, scope) {
|
|
393
399
|
await this.#processValidationRequests(noteValidationRequests.readAll(this.ephemeralArrayService), eventValidationRequests.readAll(this.ephemeralArrayService), scope);
|
|
@@ -412,10 +418,10 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
412
418
|
const innerArrays = logRetrievalResponses.map((responses)=>EphemeralArray.fromValues(this.ephemeralArrayService, responses));
|
|
413
419
|
return EphemeralArray.fromValues(this.ephemeralArrayService, innerArrays);
|
|
414
420
|
}
|
|
415
|
-
/**
|
|
421
|
+
/** Given an array of tx hashes, returns an aligned array of tx info if the tx is available. */ async getResolvedTxs(requests) {
|
|
416
422
|
const txHashes = requests.readAll(this.ephemeralArrayService);
|
|
417
|
-
const
|
|
418
|
-
const options =
|
|
423
|
+
const resolved = await this.txResolver.resolveTxs(txHashes, this.anchorBlockHeader.getBlockNumber());
|
|
424
|
+
const options = resolved.map((r)=>r ? Option.some(r) : Option.none());
|
|
419
425
|
return EphemeralArray.fromValues(this.ephemeralArrayService, options);
|
|
420
426
|
}
|
|
421
427
|
/**
|
|
@@ -429,38 +435,69 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
429
435
|
includeTxEffect: true
|
|
430
436
|
});
|
|
431
437
|
if (!receipt.isMined() || !receipt.txEffect || receipt.blockNumber > this.anchorBlockHeader.getBlockNumber()) {
|
|
432
|
-
return Option.none(
|
|
438
|
+
return Option.none();
|
|
433
439
|
}
|
|
434
|
-
|
|
440
|
+
const txEffect = receipt.txEffect;
|
|
441
|
+
return Option.some({
|
|
442
|
+
...txEffect,
|
|
443
|
+
publicLogs: FlatPublicLogs.fromLogs(txEffect.publicLogs),
|
|
444
|
+
contractClassLogs: txEffect.contractClassLogs.map((log)=>({
|
|
445
|
+
contractAddress: log.contractAddress,
|
|
446
|
+
fields: log.fields.toFields(),
|
|
447
|
+
emittedLength: log.emittedLength
|
|
448
|
+
}))
|
|
449
|
+
});
|
|
435
450
|
}
|
|
436
451
|
setCapsule(contractAddress, slot, capsule, scope) {
|
|
437
|
-
|
|
438
|
-
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
439
|
-
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
440
|
-
}
|
|
452
|
+
this.#assertOwnContract(contractAddress);
|
|
441
453
|
this.capsuleService.setCapsule(contractAddress, slot, capsule, this.jobId, scope);
|
|
442
454
|
}
|
|
443
455
|
async getCapsule(contractAddress, slot, tSize, scope) {
|
|
444
|
-
|
|
445
|
-
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
446
|
-
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
447
|
-
}
|
|
456
|
+
this.#assertOwnContract(contractAddress);
|
|
448
457
|
const values = await this.capsuleService.getCapsule(contractAddress, slot, this.jobId, scope, this.capsules);
|
|
449
|
-
return values ? Option.some(values) : Option.none(
|
|
458
|
+
return values ? Option.some(values) : Option.none({
|
|
459
|
+
length: tSize
|
|
460
|
+
});
|
|
450
461
|
}
|
|
451
462
|
deleteCapsule(contractAddress, slot, scope) {
|
|
452
|
-
|
|
453
|
-
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
454
|
-
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
455
|
-
}
|
|
463
|
+
this.#assertOwnContract(contractAddress);
|
|
456
464
|
this.capsuleService.deleteCapsule(contractAddress, slot, this.jobId, scope);
|
|
457
465
|
}
|
|
458
466
|
copyCapsule(contractAddress, srcSlot, dstSlot, numEntries, scope) {
|
|
467
|
+
this.#assertOwnContract(contractAddress);
|
|
468
|
+
return this.capsuleService.copyCapsule(contractAddress, srcSlot, dstSlot, numEntries, this.jobId, scope);
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Asserts the executing contract may only access its own slice of PXE DB.
|
|
472
|
+
*/ #assertOwnContract(contractAddress) {
|
|
459
473
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
460
|
-
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
461
474
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
462
475
|
}
|
|
463
|
-
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Records a fact into a collection. A `Some` origin block makes the fact retractable (pruned on reorg of that
|
|
479
|
+
* block), a `None` origin block makes it non-retractable, surviving reorgs.
|
|
480
|
+
*/ recordFact(contractAddress, scope, factCollectionTypeId, factCollectionId, factTypeId, payload, originBlock) {
|
|
481
|
+
this.#assertOwnContract(contractAddress);
|
|
482
|
+
return this.factService.recordFact(new FactCollectionKey(contractAddress, scope, factCollectionTypeId, factCollectionId), factTypeId, payload.readAll(this.ephemeralArrayService), originBlock.isSome() ? originBlock.value : undefined, this.jobId);
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Deletes a fact collection, removing all its facts. A no-op if no such collection exists.
|
|
486
|
+
*/ deleteFactCollection(contractAddress, scope, factCollectionTypeId, factCollectionId) {
|
|
487
|
+
this.#assertOwnContract(contractAddress);
|
|
488
|
+
return this.factService.deleteFactCollection(new FactCollectionKey(contractAddress, scope, factCollectionTypeId, factCollectionId), this.jobId);
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Returns a fact collection.
|
|
492
|
+
*/ async getFactCollection(contractAddress, scope, factCollectionTypeId, factCollectionId) {
|
|
493
|
+
this.#assertOwnContract(contractAddress);
|
|
494
|
+
const collection = await this.factService.getFactCollection(new FactCollectionKey(contractAddress, scope, factCollectionTypeId, factCollectionId), this.jobId);
|
|
495
|
+
return collection ? Option.some(toNoirFactCollection(this.ephemeralArrayService, contractAddress, scope, factCollectionTypeId, factCollectionId, collection.facts)) : Option.none(emptyFactCollection(this.ephemeralArrayService));
|
|
496
|
+
}
|
|
497
|
+
/** Returns every fact collection of `factCollectionTypeId`. */ async getFactCollectionsByType(contractAddress, scope, factCollectionTypeId) {
|
|
498
|
+
this.#assertOwnContract(contractAddress);
|
|
499
|
+
const collections = await this.factService.getFactCollectionsByType(new FactCollectionTypeKey(contractAddress, scope, factCollectionTypeId), this.jobId);
|
|
500
|
+
return EphemeralArray.fromValues(this.ephemeralArrayService, collections.map((collection)=>toNoirFactCollection(this.ephemeralArrayService, collection.key.contractAddress, collection.key.scope, collection.key.factCollectionTypeId, collection.key.factCollectionId, collection.facts)));
|
|
464
501
|
}
|
|
465
502
|
/**
|
|
466
503
|
* Clears cached sync state for a contract for a set of scopes, forcing re-sync on the next query so that newly
|
|
@@ -484,9 +521,9 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
484
521
|
maxLength: capacity
|
|
485
522
|
}));
|
|
486
523
|
} catch {
|
|
487
|
-
return Option.none(
|
|
524
|
+
return Option.none({
|
|
488
525
|
maxLength: capacity
|
|
489
|
-
})
|
|
526
|
+
});
|
|
490
527
|
}
|
|
491
528
|
}
|
|
492
529
|
/**
|
|
@@ -504,7 +541,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
504
541
|
const ivskM = await this.keyStore.getMasterSecretKey(ivpkMHash);
|
|
505
542
|
const addressSecret = await computeAddressSecret(await recipientCompleteAddress.getPreaddress(), ivskM);
|
|
506
543
|
const ephPkPoints = ephPks.readAll(this.ephemeralArrayService);
|
|
507
|
-
const secrets = await Promise.all(ephPkPoints.map((
|
|
544
|
+
const secrets = await Promise.all(ephPkPoints.map(({ x, y })=>deriveAppSiloedSharedSecret(addressSecret, new Point(x, y), this.contractAddress)));
|
|
508
545
|
return EphemeralArray.fromValues(this.ephemeralArrayService, secrets);
|
|
509
546
|
}
|
|
510
547
|
pushEphemeral(slot, elements) {
|
|
@@ -559,10 +596,8 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
559
596
|
/** Executes another utility function from within this one and returns its serialized return values. */ async callUtilityFunction(targetContractAddress, functionSelector, args) {
|
|
560
597
|
const targetArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(targetContractAddress, functionSelector);
|
|
561
598
|
if (!targetContractAddress.equals(this.contractAddress)) {
|
|
562
|
-
//
|
|
563
|
-
|
|
564
|
-
const isHandshakeRegistryRead = targetContractAddress.equals(STANDARD_HANDSHAKE_REGISTRY_ADDRESS) && functionSelector.equals(await FunctionSelector.fromSignature('get_handshakes((Field),u32)'));
|
|
565
|
-
if (!isHandshakeRegistryRead) {
|
|
599
|
+
// Standard handshake registry reads are authorized by default; every other cross-contract call needs the hook.
|
|
600
|
+
if (!await isStandardHandshakeRegistryUtilityRead(targetContractAddress, functionSelector)) {
|
|
566
601
|
const [callerInstance, targetInstance] = await Promise.all([
|
|
567
602
|
this.getContractInstance(this.contractAddress),
|
|
568
603
|
this.getContractInstance(targetContractAddress)
|
|
@@ -577,9 +612,9 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
577
612
|
args,
|
|
578
613
|
callerContext: this.callerContext
|
|
579
614
|
};
|
|
580
|
-
const response = this.hooks ? await this.hooks.authorizeUtilityCall(request) : {
|
|
615
|
+
const response = this.hooks?.authorizeUtilityCall ? await this.hooks.authorizeUtilityCall(request) : {
|
|
581
616
|
authorized: false,
|
|
582
|
-
reason: 'No
|
|
617
|
+
reason: 'No authorizeUtilityCall hook configured'
|
|
583
618
|
};
|
|
584
619
|
if (!response.authorized) {
|
|
585
620
|
const reason = response.reason ? `: ${response.reason}` : '';
|
|
@@ -590,7 +625,12 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
590
625
|
}
|
|
591
626
|
this.logger.debug(`Calling nested utility function ${targetContractAddress}:${functionSelector} from ${this.contractAddress}`);
|
|
592
627
|
const nestedOracle = new UtilityExecutionOracle({
|
|
593
|
-
|
|
628
|
+
callContext: CallContext.from({
|
|
629
|
+
msgSender: this.contractAddress,
|
|
630
|
+
contractAddress: targetContractAddress,
|
|
631
|
+
functionSelector,
|
|
632
|
+
isStaticCall: true
|
|
633
|
+
}),
|
|
594
634
|
authWitnesses: this.authWitnesses,
|
|
595
635
|
capsules: this.capsules,
|
|
596
636
|
anchorBlockHeader: this.anchorBlockHeader,
|
|
@@ -600,10 +640,11 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
600
640
|
addressStore: this.addressStore,
|
|
601
641
|
aztecNode: this.aztecNode,
|
|
602
642
|
recipientTaggingStore: this.recipientTaggingStore,
|
|
603
|
-
|
|
643
|
+
taggingSecretSourcesStore: this.taggingSecretSourcesStore,
|
|
604
644
|
capsuleService: this.capsuleService,
|
|
645
|
+
factService: this.factService,
|
|
605
646
|
privateEventStore: this.privateEventStore,
|
|
606
|
-
|
|
647
|
+
txResolver: this.txResolver,
|
|
607
648
|
contractSyncService: this.contractSyncService,
|
|
608
649
|
l2TipsStore: this.l2TipsStore,
|
|
609
650
|
jobId: this.jobId,
|
|
@@ -682,4 +723,27 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
682
723
|
/** The execution context of the current call. */ get callerContext() {
|
|
683
724
|
return 'utility';
|
|
684
725
|
}
|
|
726
|
+
/** The address of the contract whose function is being executed, from the call context. */ get contractAddress() {
|
|
727
|
+
return this.callContext.contractAddress;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
const STANDARD_HANDSHAKE_REGISTRY_GET_HANDSHAKES_SIGNATURE = 'get_handshakes((Field),u32)';
|
|
731
|
+
const STANDARD_HANDSHAKE_REGISTRY_GET_APP_SILOED_SECRET_SIGNATURE = 'get_app_siloed_secret((Field),(Field))';
|
|
732
|
+
async function doesSelectorHaveSignature(functionSelector, signature) {
|
|
733
|
+
return functionSelector.equals(await FunctionSelector.fromSignature(signature));
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Whether a cross-contract utility call targets one of the standard handshake registry's read functions.
|
|
737
|
+
*
|
|
738
|
+
* These reads are authorized by PXE for every wallet, without consulting the `authorizeUtilityCall` hook, so that
|
|
739
|
+
* wallets don't need to know the handshake registry exists in order to deliver and discover messages through it.
|
|
740
|
+
*/ async function isStandardHandshakeRegistryUtilityRead(targetContractAddress, functionSelector) {
|
|
741
|
+
if (!targetContractAddress.equals(STANDARD_HANDSHAKE_REGISTRY_ADDRESS)) {
|
|
742
|
+
return false;
|
|
743
|
+
}
|
|
744
|
+
const [isGetHandshakes, isGetAppSiloedSecret] = await Promise.all([
|
|
745
|
+
doesSelectorHaveSignature(functionSelector, STANDARD_HANDSHAKE_REGISTRY_GET_HANDSHAKES_SIGNATURE),
|
|
746
|
+
doesSelectorHaveSignature(functionSelector, STANDARD_HANDSHAKE_REGISTRY_GET_APP_SILOED_SECRET_SIGNATURE)
|
|
747
|
+
]);
|
|
748
|
+
return isGetHandshakes || isGetAppSiloedSecret;
|
|
685
749
|
}
|
|
@@ -5,12 +5,13 @@ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
|
5
5
|
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
6
6
|
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
7
7
|
/**
|
|
8
|
-
* Read the current class id of a contract
|
|
9
|
-
*
|
|
8
|
+
* Read the current class id of a contract as of the given block, as seen by the AztecNode. The node resolves it from
|
|
9
|
+
* the same scheduled value change the AVM enforces against the public data tree. If the node has no record of the
|
|
10
|
+
* instance (e.g. it was never publicly deployed), the original class id from the local instance is used.
|
|
10
11
|
* @param contractAddress - The address of the contract to read the class id for.
|
|
11
|
-
* @param instance - The instance of the contract.
|
|
12
|
-
* @param aztecNode - The Aztec node to query
|
|
13
|
-
* @param header - The header of the block at which to
|
|
12
|
+
* @param instance - The local instance of the contract, used as a fallback when the node doesn't know it.
|
|
13
|
+
* @param aztecNode - The Aztec node to query.
|
|
14
|
+
* @param header - The header of the block at which to resolve the current class id.
|
|
14
15
|
* @returns The current class id.
|
|
15
16
|
*/
|
|
16
17
|
export declare function readCurrentClassId(contractAddress: AztecAddress, instance: ContractInstance, aztecNode: AztecNode, header: BlockHeader): Promise<import("@aztec/foundation/schemas").Fr>;
|
|
@@ -24,4 +25,4 @@ export declare function syncScope(contractAddress: AztecAddress, contractStore:
|
|
|
24
25
|
* @param header - The header of the block at which to verify the current class id.
|
|
25
26
|
*/
|
|
26
27
|
export declare function verifyCurrentClassId(contractAddress: AztecAddress, aztecNode: AztecNode, contractStore: ContractStore, header: BlockHeader): Promise<void>;
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0X3N5bmMvaGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUN4RSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQy9ELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRXBELE9BQU8sS0FBSyxFQUFFLGFBQWEsRUFBRSxNQUFNLDZDQUE2QyxDQUFDO0FBRWpGOzs7Ozs7Ozs7R0FTRztBQUNILHdCQUFzQixrQkFBa0IsQ0FDdEMsZUFBZSxFQUFFLFlBQVksRUFDN0IsUUFBUSxFQUFFLGdCQUFnQixFQUMxQixTQUFTLEVBQUUsU0FBUyxFQUNwQixNQUFNLEVBQUUsV0FBVyxtREFNcEI7QUFFRCx3QkFBc0IsU0FBUyxDQUM3QixlQUFlLEVBQUUsWUFBWSxFQUM3QixhQUFhLEVBQUUsYUFBYSxFQUM1Qix5QkFBeUIsRUFBRSxnQkFBZ0IsR0FBRyxJQUFJLEVBQ2xELGVBQWUsRUFBRSxDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxLQUFLLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFDeEYsS0FBSyxFQUFFLFlBQVksaUJBZXBCO0FBRUQ7Ozs7Ozs7R0FPRztBQUNILHdCQUFzQixvQkFBb0IsQ0FDeEMsZUFBZSxFQUFFLFlBQVksRUFDN0IsU0FBUyxFQUFFLFNBQVMsRUFDcEIsYUFBYSxFQUFFLGFBQWEsRUFDNUIsTUFBTSxFQUFFLFdBQVcsaUJBYXBCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/contract_sync/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/contract_sync/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAEjF;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,WAAW,mDAMpB;AAED,wBAAsB,SAAS,CAC7B,eAAe,EAAE,YAAY,EAC7B,aAAa,EAAE,aAAa,EAC5B,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,iBAepB;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,eAAe,EAAE,YAAY,EAC7B,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,WAAW,iBAapB"}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DelayedPublicMutableValues, DelayedPublicMutableValuesWithHash } from '@aztec/stdlib/delayed-public-mutable';
|
|
1
|
+
import { isProtocolContract } from '@aztec/protocol-contracts';
|
|
3
2
|
/**
|
|
4
|
-
* Read the current class id of a contract
|
|
5
|
-
*
|
|
3
|
+
* Read the current class id of a contract as of the given block, as seen by the AztecNode. The node resolves it from
|
|
4
|
+
* the same scheduled value change the AVM enforces against the public data tree. If the node has no record of the
|
|
5
|
+
* instance (e.g. it was never publicly deployed), the original class id from the local instance is used.
|
|
6
6
|
* @param contractAddress - The address of the contract to read the class id for.
|
|
7
|
-
* @param instance - The instance of the contract.
|
|
8
|
-
* @param aztecNode - The Aztec node to query
|
|
9
|
-
* @param header - The header of the block at which to
|
|
7
|
+
* @param instance - The local instance of the contract, used as a fallback when the node doesn't know it.
|
|
8
|
+
* @param aztecNode - The Aztec node to query.
|
|
9
|
+
* @param header - The header of the block at which to resolve the current class id.
|
|
10
10
|
* @returns The current class id.
|
|
11
11
|
*/ export async function readCurrentClassId(contractAddress, instance, aztecNode, header) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
let currentClassId = delayedPublicMutableValues.svc.getCurrentAt(timestamp)[0];
|
|
17
|
-
if (currentClassId.isZero()) {
|
|
18
|
-
currentClassId = instance.originalContractClassId;
|
|
19
|
-
}
|
|
20
|
-
return currentClassId;
|
|
12
|
+
const nodeInstance = await aztecNode.getContract(contractAddress, await header.hash());
|
|
13
|
+
// If the contract was upgraded then the node WILL know of that and return a non-undefined instance. An undefined
|
|
14
|
+
// result therefore means that no upgrade has happened, and therefore that the original class is the current one.
|
|
15
|
+
return nodeInstance?.currentContractClassId ?? instance.originalContractClassId;
|
|
21
16
|
}
|
|
22
17
|
export async function syncScope(contractAddress, contractStore, functionToInvokeAfterSync, utilityExecutor, scope) {
|
|
23
18
|
// Protocol contracts don't have private state to sync
|
|
@@ -13,4 +13,4 @@ import { type PXECreationOptions } from '../../pxe_creation_options.js';
|
|
|
13
13
|
* @returns A Promise that resolves to the started PXE instance.
|
|
14
14
|
*/
|
|
15
15
|
export declare function createPXE(aztecNode: AztecNode, config: PXEConfig, options?: PXECreationOptions): Promise<PXE>;
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9jbGllbnQvYnVuZGxlL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRWpFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzFELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV0QyxPQUFPLEVBQUUsS0FBSyxrQkFBa0IsRUFBeUIsTUFBTSwrQkFBK0IsQ0FBQztBQUUvRjs7Ozs7Ozs7O0dBU0c7QUFDSCx3QkFBc0IsU0FBUyxDQUM3QixTQUFTLEVBQUUsU0FBUyxFQUNwQixNQUFNLEVBQUUsU0FBUyxFQUNqQixPQUFPLEdBQUUsa0JBQW9DLGdCQWdEOUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/utils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,+BAA+B,CAAC;AAE/F;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAoC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/utils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,+BAA+B,CAAC;AAE/F;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAoC,gBAgD9C"}
|
|
@@ -12,4 +12,4 @@ import { type PXECreationOptions } from '../../pxe_creation_options.js';
|
|
|
12
12
|
* @returns A Promise that resolves to the started PXE instance.
|
|
13
13
|
*/
|
|
14
14
|
export declare function createPXE(aztecNode: AztecNode, config: PXEConfig, options?: PXECreationOptions): Promise<PXE>;
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9jbGllbnQvbGF6eS91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRQSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFdEMsT0FBTyxFQUFFLEtBQUssa0JBQWtCLEVBQXlCLE1BQU0sK0JBQStCLENBQUM7QUFFL0Y7Ozs7Ozs7O0dBUUc7QUFDSCx3QkFBc0IsU0FBUyxDQUM3QixTQUFTLEVBQUUsU0FBUyxFQUNwQixNQUFNLEVBQUUsU0FBUyxFQUNqQixPQUFPLEdBQUUsa0JBQW9DLGdCQWlEOUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/utils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,+BAA+B,CAAC;AAE/F;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAoC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/utils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,+BAA+B,CAAC;AAE/F;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAoC,gBAiD9C"}
|
|
@@ -2,7 +2,7 @@ import type { BBPrivateKernelProverOptions } from '@aztec/bb-prover/client';
|
|
|
2
2
|
import type { Logger } from '@aztec/foundation/log';
|
|
3
3
|
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
4
4
|
import type { CircuitSimulator } from '@aztec/simulator/client';
|
|
5
|
-
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
5
|
+
import type { AztecNodeDebug, PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
6
6
|
import type { ExecutionHooks } from '../hooks/index.js';
|
|
7
7
|
import type { PreloadedContractsProvider } from '../pxe.js';
|
|
8
8
|
export type PXECreationOptions = {
|
|
@@ -20,7 +20,13 @@ export type PXECreationOptions = {
|
|
|
20
20
|
hooks?: ExecutionHooks;
|
|
21
21
|
/** Contracts to preload on startup. Replaces the default when set. */
|
|
22
22
|
preloadedContractsProvider?: PreloadedContractsProvider;
|
|
23
|
+
/**
|
|
24
|
+
* Optional debug API client for the same node. When provided, public function signatures are registered so the
|
|
25
|
+
* node can produce named public-execution stack traces. Only available on nodes started with debug endpoints
|
|
26
|
+
* enabled; omitted in prod-like setups.
|
|
27
|
+
*/
|
|
28
|
+
nodeDebug?: AztecNodeDebug;
|
|
23
29
|
};
|
|
24
30
|
/** Checks if the given value implements the PrivateKernelProver interface via duck-typing. */
|
|
25
31
|
export declare function isPrivateKernelProver(value: unknown): value is PrivateKernelProver;
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlX2NyZWF0aW9uX29wdGlvbnMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbnRyeXBvaW50cy9weGVfY3JlYXRpb25fb3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSw0QkFBNEIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzVFLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDekQsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxjQUFjLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUUzRixPQUFPLEtBQUssRUFBRSxjQUFjLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUN4RCxPQUFPLEtBQUssRUFBRSwwQkFBMEIsRUFBRSxNQUFNLFdBQVcsQ0FBQztBQUU1RCxNQUFNLE1BQU0sa0JBQWtCLEdBQUc7SUFDL0IsT0FBTyxDQUFDLEVBQUU7UUFBRSxLQUFLLENBQUMsRUFBRSxNQUFNLENBQUM7UUFBQyxHQUFHLENBQUMsRUFBRSxNQUFNLENBQUM7UUFBQyxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUE7S0FBRSxDQUFDO0lBQzVELHdFQUF3RTtJQUN4RSxnQkFBZ0IsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUMxQixlQUFlLENBQUMsRUFBRSxtQkFBbUIsR0FBRyw0QkFBNEIsQ0FBQztJQUNyRSxLQUFLLENBQUMsRUFBRSxpQkFBaUIsQ0FBQztJQUMxQixTQUFTLENBQUMsRUFBRSxnQkFBZ0IsQ0FBQztJQUM3QixrRUFBa0U7SUFDbEUsS0FBSyxDQUFDLEVBQUUsY0FBYyxDQUFDO0lBQ3ZCLHNFQUFzRTtJQUN0RSwwQkFBMEIsQ0FBQyxFQUFFLDBCQUEwQixDQUFDO0lBQ3hEOzs7O09BSUc7SUFDSCxTQUFTLENBQUMsRUFBRSxjQUFjLENBQUM7Q0FDNUIsQ0FBQztBQUVGLDhGQUE4RjtBQUM5Rix3QkFBZ0IscUJBQXFCLENBQUMsS0FBSyxFQUFFLE9BQU8sR0FBRyxLQUFLLElBQUksbUJBQW1CLENBSWxGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../src/entrypoints/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../src/entrypoints/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,mBAAmB,GAAG,4BAA4B,CAAC;IACrE,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,kEAAkE;IAClE,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,sEAAsE;IACtE,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IACxD;;;;OAIG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF,8FAA8F;AAC9F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAIlF"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from '../../notes_filter.js';
|
|
2
2
|
export * from '../../pxe.js';
|
|
3
|
-
export * from '../../hooks/index.js';
|
|
4
3
|
export * from '../../config/index.js';
|
|
5
4
|
export * from '../../error_enriching.js';
|
|
6
5
|
export * from '../../storage/index.js';
|
|
@@ -10,4 +9,4 @@ export { ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR } from '../../oracle_version
|
|
|
10
9
|
export { type PXECreationOptions } from '../pxe_creation_options.js';
|
|
11
10
|
export { JobCoordinator } from '../../job_coordinator/job_coordinator.js';
|
|
12
11
|
export { ContractSyncService } from '../../contract_sync/contract_sync_service.js';
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9zZXJ2ZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLFlBQVksQ0FBQztBQUMzQixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDMUQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLG9CQUFvQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDckYsT0FBTyxFQUFFLEtBQUssa0JBQWtCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUNyRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sMENBQTBDLENBQUM7QUFDMUUsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sOENBQThDLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC"}
|
|
@@ -6,4 +6,4 @@ import { type PXECreationOptions } from '../pxe_creation_options.js';
|
|
|
6
6
|
type PXEConfigWithoutDefaults = Omit<PXEConfig, 'l1ChainId' | 'l2BlockBatchSize' | 'rollupVersion' | keyof L1ContractAddresses>;
|
|
7
7
|
export declare function createPXE(aztecNode: AztecNode, config: PXEConfigWithoutDefaults, options?: PXECreationOptions): Promise<PXE>;
|
|
8
8
|
export {};
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9zZXJ2ZXIvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQVVqRixPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUN2RCxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sY0FBYyxDQUFDO0FBRW5DLE9BQU8sRUFBRSxLQUFLLGtCQUFrQixFQUF5QixNQUFNLDRCQUE0QixDQUFDO0FBRTVGLEtBQUssd0JBQXdCLEdBQUcsSUFBSSxDQUNsQyxTQUFTLEVBQ1QsV0FBVyxHQUFHLGtCQUFrQixHQUFHLGVBQWUsR0FBRyxNQUFNLG1CQUFtQixDQUMvRSxDQUFDO0FBRUYsd0JBQXNCLFNBQVMsQ0FDN0IsU0FBUyxFQUFFLFNBQVMsRUFDcEIsTUFBTSxFQUFFLHdCQUF3QixFQUNoQyxPQUFPLEdBQUUsa0JBQW9DLGdCQTZEOUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAUjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,4BAA4B,CAAC;AAE5F,KAAK,wBAAwB,GAAG,IAAI,CAClC,SAAS,EACT,WAAW,GAAG,kBAAkB,GAAG,eAAe,GAAG,MAAM,mBAAmB,CAC/E,CAAC;AAEF,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,kBAAoC,gBA6D9C"}
|
|
@@ -2,7 +2,8 @@ import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { createStore } from '@aztec/kv-store/lmdb-v2';
|
|
4
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
5
|
-
import {
|
|
5
|
+
import { WASMSimulator } from '@aztec/simulator/client';
|
|
6
|
+
import { MemoryCircuitRecorder, SimulatorRecorderWrapper } from '@aztec/simulator/server';
|
|
6
7
|
import { FileCircuitRecorder } from '@aztec/simulator/testing';
|
|
7
8
|
import { getStandardAuthRegistry } from '@aztec/standard-contracts/auth-registry';
|
|
8
9
|
import { getStandardHandshakeRegistry } from '@aztec/standard-contracts/handshake-registry';
|
|
@@ -62,6 +63,7 @@ export async function createPXE(aztecNode, config, options = {
|
|
|
62
63
|
});
|
|
63
64
|
const pxe = await PXE.create({
|
|
64
65
|
node: aztecNode,
|
|
66
|
+
nodeDebug: options.nodeDebug,
|
|
65
67
|
store: options.store,
|
|
66
68
|
proofCreator: prover,
|
|
67
69
|
simulator,
|
package/dest/error_enriching.js
CHANGED
|
@@ -23,7 +23,7 @@ import { isNoirCallStackUnresolved } from '@aztec/stdlib/errors';
|
|
|
23
23
|
await Promise.all([
|
|
24
24
|
...mentionedFunctions.entries()
|
|
25
25
|
].map(async ([contractAddress, fnSelectors])=>{
|
|
26
|
-
const parsedContractAddress = AztecAddress.
|
|
26
|
+
const parsedContractAddress = AztecAddress.fromStringUnsafe(contractAddress);
|
|
27
27
|
const contract = await contractStore.getContract(parsedContractAddress);
|
|
28
28
|
if (contract) {
|
|
29
29
|
err.enrichWithContractName(parsedContractAddress, contract.name);
|