@aztec/pxe 0.0.1-commit.b8a057fa → 0.0.1-commit.be03c316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bin/check_oracle_version.js +3 -8
- 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 +8 -25
- package/dest/bin/oracle_version_helpers.d.ts.map +1 -1
- package/dest/bin/oracle_version_helpers.js +11 -219
- package/dest/contract/helpers.d.ts +1 -1
- package/dest/contract/helpers.d.ts.map +1 -1
- package/dest/contract/helpers.js +3 -3
- 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/aztec_node_read_cache.d.ts +39 -0
- package/dest/contract_function_simulator/aztec_node_read_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/aztec_node_read_cache.js +60 -0
- package/dest/contract_function_simulator/index.d.ts +3 -3
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +1 -2
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.js +7 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tx.d.ts +7 -9
- package/dest/contract_function_simulator/noir-structs/resolved_tx.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/resolved_tx.js +3 -44
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.d.ts +5 -4
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.js +2 -2
- package/dest/contract_function_simulator/oracle/acir_callback.js +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_registry.d.ts +3 -3
- package/dest/contract_function_simulator/oracle/legacy_oracle_registry.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_registry.js +34 -1
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts +7 -4
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle_registry.js +40 -13
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +87 -35
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.js +286 -286
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +7 -10
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +14 -8
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +61 -34
- 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 +10 -4
- 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 +10 -4
- 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/server/index.d.ts +2 -1
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +1 -0
- 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 +8 -2
- package/dest/hooks/index.d.ts +2 -2
- package/dest/hooks/index.d.ts.map +1 -1
- package/dest/hooks/index.js +1 -0
- package/dest/hooks/resolve_tagging_secret_strategy.d.ts +3 -1
- package/dest/hooks/resolve_tagging_secret_strategy.d.ts.map +1 -1
- package/dest/hooks/resolve_tagging_secret_strategy.js +3 -3
- package/dest/logs/log_service.d.ts +3 -2
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +12 -3
- package/dest/messages/tx_resolver_service.d.ts +2 -2
- package/dest/messages/tx_resolver_service.d.ts.map +1 -1
- package/dest/messages/tx_resolver_service.js +7 -2
- package/dest/notes/note_service.d.ts +1 -1
- package/dest/notes/note_service.js +1 -1
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +3 -3
- package/dest/pxe.d.ts +1 -1
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +8 -5
- 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 +26 -2
- package/dest/storage/fact_store/index.d.ts +2 -2
- package/dest/storage/fact_store/index.d.ts.map +1 -1
- package/dest/storage/fact_store/index.js +1 -1
- package/dest/storage/fact_store/origin_state.d.ts +3 -1
- package/dest/storage/fact_store/origin_state.d.ts.map +1 -1
- package/dest/storage/fact_store/origin_state.js +7 -0
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/metadata.js +1 -1
- 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/sender_tagging_store.d.ts +19 -3
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.js +48 -11
- package/dest/tagging/constants.d.ts +3 -2
- package/dest/tagging/constants.d.ts.map +1 -1
- package/dest/tagging/constants.js +26 -5
- package/dest/tagging/index.d.ts +2 -2
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +1 -1
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts +9 -4
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.js +60 -25
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +1 -1
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +1 -1
- 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 +6 -2
- 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 +3 -10
- package/src/bin/index.ts +1 -5
- package/src/bin/oracle_version_helpers.ts +11 -268
- package/src/contract/helpers.ts +3 -3
- package/src/contract/skip_sync_contracts.ts +23 -0
- package/src/contract_function_simulator/aztec_node_read_cache.ts +89 -0
- package/src/contract_function_simulator/index.ts +23 -3
- package/src/contract_function_simulator/noir-structs/resolved_tagging_strategy.ts +8 -0
- package/src/contract_function_simulator/noir-structs/resolved_tx.ts +11 -45
- package/src/contract_function_simulator/noir-structs/tx_effect_data.ts +4 -3
- package/src/contract_function_simulator/oracle/acir_callback.ts +1 -1
- package/src/contract_function_simulator/oracle/legacy_oracle_registry.ts +30 -3
- package/src/contract_function_simulator/oracle/oracle_registry.ts +32 -11
- package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +285 -197
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +17 -12
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +92 -39
- package/src/entrypoints/client/bundle/index.ts +1 -0
- package/src/entrypoints/client/bundle/utils.ts +15 -3
- package/src/entrypoints/client/lazy/index.ts +1 -0
- package/src/entrypoints/client/lazy/utils.ts +15 -3
- package/src/entrypoints/client/store.ts +54 -0
- package/src/entrypoints/server/index.ts +1 -0
- package/src/entrypoints/server/store.ts +47 -0
- package/src/entrypoints/server/utils.ts +21 -7
- package/src/hooks/index.ts +1 -0
- package/src/hooks/resolve_tagging_secret_strategy.ts +3 -0
- package/src/logs/log_service.ts +11 -2
- package/src/messages/tx_resolver_service.ts +8 -8
- package/src/notes/note_service.ts +1 -1
- package/src/oracle_version.ts +3 -3
- package/src/pxe.ts +8 -5
- 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__/opened_stores.json +1 -1
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +30 -1
- package/src/storage/fact_store/index.ts +1 -0
- package/src/storage/fact_store/origin_state.ts +9 -0
- package/src/storage/metadata.ts +1 -1
- package/src/storage/store_identity.ts +72 -0
- package/src/storage/tagging_store/sender_tagging_store.ts +62 -15
- package/src/tagging/constants.ts +27 -5
- package/src/tagging/index.ts +1 -1
- package/src/tagging/recipient_sync/sync_tagged_private_logs.ts +103 -46
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +1 -1
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +6 -2
- package/src/tagging/testing/tag_query_test_utils.ts +11 -0
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { keccak256String } from '@aztec/foundation/crypto/keccak';
|
|
2
2
|
import { dirname, join } from 'path';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
|
+
import { ORACLE_REGISTRY } from '../contract_function_simulator/index.js';
|
|
4
5
|
import { ORACLE_INTERFACE_HASH, ORACLE_VERSION_MAJOR } from '../oracle_version.js';
|
|
5
6
|
import { getOracleRegistrySignature, readNumericGlobal } from './oracle_version_helpers.js';
|
|
6
7
|
/**
|
|
7
8
|
* Verifies that the Oracle interface matches the expected interface hash.
|
|
8
9
|
*
|
|
9
10
|
* The Oracle interface needs to be versioned to ensure compatibility between Aztec.nr and PXE. This function computes
|
|
10
|
-
* a hash of
|
|
11
|
+
* a hash of `ORACLE_REGISTRY` (where each oracle's parameter names, parameter types, and return type
|
|
11
12
|
* live) and compares it against a known hash. If they don't match, it means the interface has changed and the oracle
|
|
12
13
|
* version needs to be bumped:
|
|
13
14
|
* - If the change is backward-breaking (e.g. removing/renaming an oracle, or changing its params/return), bump
|
|
14
15
|
* ORACLE_VERSION_MAJOR.
|
|
15
16
|
* - If the change is an oracle addition (non-breaking), bump ORACLE_VERSION_MINOR.
|
|
16
17
|
*/ function assertOracleInterfaceMatches() {
|
|
17
|
-
// The script runs from dest/bin/ after compilation, so we go up to the package root then into src/ to find
|
|
18
|
-
// the source file.
|
|
19
|
-
const currentDir = dirname(fileURLToPath(import.meta.url));
|
|
20
|
-
const packageRoot = dirname(dirname(currentDir)); // Go up from bin/ to pxe/
|
|
21
|
-
const registrySourcePath = join(packageRoot, 'src/contract_function_simulator/oracle/oracle_registry.ts');
|
|
22
|
-
const oracleInterfaceSignature = getOracleRegistrySignature(registrySourcePath, 'ORACLE_REGISTRY');
|
|
23
18
|
// We use keccak256 here just because we already have it in the dependencies.
|
|
24
|
-
const oracleInterfaceHash = keccak256String(
|
|
19
|
+
const oracleInterfaceHash = keccak256String(getOracleRegistrySignature(ORACLE_REGISTRY));
|
|
25
20
|
if (oracleInterfaceHash !== ORACLE_INTERFACE_HASH) {
|
|
26
21
|
throw new Error(`The Oracle interface has changed. Update ORACLE_INTERFACE_HASH to ${oracleInterfaceHash} in pxe/src/oracle_version.ts and bump the oracle version (ORACLE_VERSION_MAJOR for breaking changes, ORACLE_VERSION_MINOR for oracle additions).`);
|
|
27
22
|
}
|
package/dest/bin/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export { getOracleRegistrySignature, readNumericGlobal } from './oracle_version_helpers.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iaW4vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLDBCQUEwQixFQUFFLGlCQUFpQixFQUFFLE1BQU0sNkJBQTZCLENBQUMifQ==
|
package/dest/bin/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC"}
|
package/dest/bin/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { getOracleRegistrySignature, readNumericGlobal } from './oracle_version_helpers.js';
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
+
import type { OracleRegistryEntry } from '../contract_function_simulator/index.js';
|
|
1
2
|
/**
|
|
2
|
-
* Extracts
|
|
3
|
+
* Extracts a deterministic signature string from an oracle registry (e.g. PXE's `ORACLE_REGISTRY`).
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @param sourcePath - Absolute path to the TypeScript source file to parse.
|
|
8
|
-
* @param targets - Names of classes or interfaces to extract methods from.
|
|
9
|
-
* @param excludedMembers - Method names to skip (e.g. non-oracle helpers like `constructor`).
|
|
10
|
-
*/
|
|
11
|
-
export declare function getOracleInterfaceSignature(sourcePath: string, targets: string[], excludedMembers: string[]): string;
|
|
12
|
-
/**
|
|
13
|
-
* Extracts a deterministic signature string from an oracle registry object literal (e.g. PXE's `ORACLE_REGISTRY`).
|
|
14
|
-
*
|
|
15
|
-
* Reads the registry declaration where each oracle's wire ABI lives: the ordered parameter names with their
|
|
16
|
-
* `TypeMapping` expressions and the return type. The resulting hash is sensitive to parameter, type, and return
|
|
17
|
-
* changes, not just oracle additions and removals.
|
|
18
|
-
*
|
|
19
|
-
* Type expressions are captured as their source text (e.g. `OPTION(AZTEC_ADDRESS)`, `BOUNDED_VEC(NOTE)`), so the
|
|
20
|
-
* signature tracks the composition of types. However, if the internal serialization logic of a `TypeMapping` constant
|
|
21
|
-
* (e.g. `FIELD`) changes without the constant being renamed, the hash will not change.
|
|
5
|
+
* Reads the registry where each oracle's wire ABI lives: the ordered parameter names with their `TypeMapping` labels
|
|
6
|
+
* and the return type. The resulting hash is sensitive to parameter, type, and return changes, not just oracle
|
|
7
|
+
* additions and removals.
|
|
22
8
|
*
|
|
23
9
|
* @example
|
|
24
10
|
* // Given a registry like:
|
|
@@ -28,12 +14,9 @@ export declare function getOracleInterfaceSignature(sourcePath: string, targets:
|
|
|
28
14
|
* // } satisfies Record<string, OracleRegistryEntry>;
|
|
29
15
|
* //
|
|
30
16
|
* // Returns (sorted, newline-joined):
|
|
31
|
-
* // "aztec_prv_bar(): void\naztec_utl_foo(a:
|
|
32
|
-
*
|
|
33
|
-
* @param sourcePath - Absolute path to the TypeScript source file declaring the registry.
|
|
34
|
-
* @param registryName - Name of the registry constant to read (e.g. `ORACLE_REGISTRY`).
|
|
17
|
+
* // "aztec_prv_bar(): void\naztec_utl_foo(a: u32): bool"
|
|
35
18
|
*/
|
|
36
|
-
export declare function getOracleRegistrySignature(
|
|
19
|
+
export declare function getOracleRegistrySignature(registry: Record<string, OracleRegistryEntry>): string;
|
|
37
20
|
/**
|
|
38
21
|
* Reads an integer-valued global constant from a Noir or TypeScript source file.
|
|
39
22
|
*
|
|
@@ -48,4 +31,4 @@ export declare function getOracleRegistrySignature(sourcePath: string, registryN
|
|
|
48
31
|
* @throws If the constant's declaration is not found in the file.
|
|
49
32
|
*/
|
|
50
33
|
export declare function readNumericGlobal(sourcePath: string, name: string): number;
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlX3ZlcnNpb25faGVscGVycy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Jpbi9vcmFjbGVfdmVyc2lvbl9oZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0seUNBQXlDLENBQUM7QUFFbkY7Ozs7Ozs7Ozs7Ozs7Ozs7R0FnQkc7QUFDSCx3QkFBZ0IsMEJBQTBCLENBQUMsUUFBUSxFQUFFLE1BQU0sQ0FBQyxNQUFNLEVBQUUsbUJBQW1CLENBQUMsR0FBRyxNQUFNLENBVWhHO0FBRUQ7Ozs7Ozs7Ozs7OztHQVlHO0FBQ0gsd0JBQWdCLGlCQUFpQixDQUFDLFVBQVUsRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFLE1BQU0sR0FBRyxNQUFNLENBTzFFIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle_version_helpers.d.ts","sourceRoot":"","sources":["../../src/bin/oracle_version_helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oracle_version_helpers.d.ts","sourceRoot":"","sources":["../../src/bin/oracle_version_helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAEnF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,MAAM,CAUhG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAO1E"}
|
|
@@ -1,55 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import ts from 'typescript';
|
|
1
|
+
import { readFileSync } from 'fs';
|
|
3
2
|
/**
|
|
4
|
-
* Extracts
|
|
3
|
+
* Extracts a deterministic signature string from an oracle registry (e.g. PXE's `ORACLE_REGISTRY`).
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @param sourcePath - Absolute path to the TypeScript source file to parse.
|
|
10
|
-
* @param targets - Names of classes or interfaces to extract methods from.
|
|
11
|
-
* @param excludedMembers - Method names to skip (e.g. non-oracle helpers like `constructor`).
|
|
12
|
-
*/ export function getOracleInterfaceSignature(sourcePath, targets, excludedMembers) {
|
|
13
|
-
const sourceCode = readFileSync(sourcePath, 'utf-8');
|
|
14
|
-
const sourceFile = ts.createSourceFile(sourcePath, sourceCode, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
15
|
-
const methodSignatures = [];
|
|
16
|
-
function visit(node) {
|
|
17
|
-
const isTarget = (ts.isClassDeclaration(node) || ts.isInterfaceDeclaration(node)) && targets.includes(node.name?.text ?? '');
|
|
18
|
-
if (isTarget) {
|
|
19
|
-
node.members.forEach((member)=>{
|
|
20
|
-
if ((ts.isMethodDeclaration(member) || ts.isMethodSignature(member)) && member.name && ts.isIdentifier(member.name)) {
|
|
21
|
-
const methodName = member.name.text;
|
|
22
|
-
if (excludedMembers.includes(methodName)) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const paramSignatures = [];
|
|
26
|
-
member.parameters.forEach((param)=>{
|
|
27
|
-
const paramName = extractParameterName(param, sourceFile);
|
|
28
|
-
const paramType = extractTypeString(param.type, sourceFile);
|
|
29
|
-
paramSignatures.push(`${paramName}: ${paramType}`);
|
|
30
|
-
});
|
|
31
|
-
const returnType = extractTypeString(member.type, sourceFile);
|
|
32
|
-
const signature = `${methodName}(${paramSignatures.join(', ')}): ${returnType}`;
|
|
33
|
-
methodSignatures.push(signature);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
ts.forEachChild(node, visit);
|
|
38
|
-
}
|
|
39
|
-
visit(sourceFile);
|
|
40
|
-
methodSignatures.sort();
|
|
41
|
-
return methodSignatures.join('');
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Extracts a deterministic signature string from an oracle registry object literal (e.g. PXE's `ORACLE_REGISTRY`).
|
|
45
|
-
*
|
|
46
|
-
* Reads the registry declaration where each oracle's wire ABI lives: the ordered parameter names with their
|
|
47
|
-
* `TypeMapping` expressions and the return type. The resulting hash is sensitive to parameter, type, and return
|
|
48
|
-
* changes, not just oracle additions and removals.
|
|
49
|
-
*
|
|
50
|
-
* Type expressions are captured as their source text (e.g. `OPTION(AZTEC_ADDRESS)`, `BOUNDED_VEC(NOTE)`), so the
|
|
51
|
-
* signature tracks the composition of types. However, if the internal serialization logic of a `TypeMapping` constant
|
|
52
|
-
* (e.g. `FIELD`) changes without the constant being renamed, the hash will not change.
|
|
5
|
+
* Reads the registry where each oracle's wire ABI lives: the ordered parameter names with their `TypeMapping` labels
|
|
6
|
+
* and the return type. The resulting hash is sensitive to parameter, type, and return changes, not just oracle
|
|
7
|
+
* additions and removals.
|
|
53
8
|
*
|
|
54
9
|
* @example
|
|
55
10
|
* // Given a registry like:
|
|
@@ -59,25 +14,12 @@ import ts from 'typescript';
|
|
|
59
14
|
* // } satisfies Record<string, OracleRegistryEntry>;
|
|
60
15
|
* //
|
|
61
16
|
* // Returns (sorted, newline-joined):
|
|
62
|
-
* // "aztec_prv_bar(): void\naztec_utl_foo(a:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const sourceFile = ts.createSourceFile(sourcePath, sourceCode, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
69
|
-
const registry = findObjectLiteral(sourceFile, registryName);
|
|
70
|
-
if (!registry) {
|
|
71
|
-
throw new Error(`Could not find oracle registry '${registryName}' in ${sourcePath}.`);
|
|
72
|
-
}
|
|
73
|
-
const oracleSignatures = registry.properties.map((property)=>{
|
|
74
|
-
if (!ts.isPropertyAssignment(property)) {
|
|
75
|
-
throw new Error(`Unexpected member in oracle registry '${registryName}': ${property.getText(sourceFile)}. Spread elements ` + `are not supported.`);
|
|
76
|
-
}
|
|
77
|
-
const oracleName = getPropertyName(property.name, sourceFile);
|
|
78
|
-
const { params, returnType } = extractRegistryEntry(property.initializer, sourceFile);
|
|
79
|
-
const paramSignatures = params.map((param)=>`${param.name}: ${param.type}`);
|
|
80
|
-
return `${oracleName}(${paramSignatures.join(', ')}): ${returnType}`;
|
|
17
|
+
* // "aztec_prv_bar(): void\naztec_utl_foo(a: u32): bool"
|
|
18
|
+
*/ export function getOracleRegistrySignature(registry) {
|
|
19
|
+
const oracleSignatures = Object.entries(registry).map(([name, entry])=>{
|
|
20
|
+
const paramSignatures = entry.params.map((p)=>`${p.name}: ${p.type.label}`);
|
|
21
|
+
const returnType = entry.returnType === undefined ? 'void' : entry.returnType.label;
|
|
22
|
+
return `${name}(${paramSignatures.join(', ')}): ${returnType}`;
|
|
81
23
|
});
|
|
82
24
|
oracleSignatures.sort();
|
|
83
25
|
return oracleSignatures.join('\n');
|
|
@@ -102,153 +44,3 @@ import ts from 'typescript';
|
|
|
102
44
|
}
|
|
103
45
|
return Number(match[1]);
|
|
104
46
|
}
|
|
105
|
-
function extractParameterName(param, sourceFile) {
|
|
106
|
-
const name = param.name;
|
|
107
|
-
if (ts.isIdentifier(name)) {
|
|
108
|
-
return name.text;
|
|
109
|
-
}
|
|
110
|
-
if (ts.isArrayBindingPattern(name)) {
|
|
111
|
-
if (name.elements.length > 0) {
|
|
112
|
-
const element = name.elements[0];
|
|
113
|
-
if (ts.isBindingElement(element)) {
|
|
114
|
-
const elementName = element.name;
|
|
115
|
-
if (ts.isIdentifier(elementName)) {
|
|
116
|
-
return elementName.text;
|
|
117
|
-
}
|
|
118
|
-
if (ts.isArrayBindingPattern(elementName) || ts.isObjectBindingPattern(elementName)) {
|
|
119
|
-
return elementName.getText(sourceFile);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return name.getText(sourceFile);
|
|
124
|
-
}
|
|
125
|
-
if (ts.isObjectBindingPattern(name)) {
|
|
126
|
-
return name.getText(sourceFile);
|
|
127
|
-
}
|
|
128
|
-
return name.getText(sourceFile);
|
|
129
|
-
}
|
|
130
|
-
/** Returns the source text of a type annotation, or `'void'` if absent. */ function extractTypeString(typeNode, sourceFile) {
|
|
131
|
-
if (!typeNode) {
|
|
132
|
-
return 'void';
|
|
133
|
-
}
|
|
134
|
-
return typeNode.getText(sourceFile).replace(/\s+/g, ' ').trim();
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Finds a top-level object-literal-valued constant by name, unwrapping `satisfies`/`as`/parenthesized wrappers.
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* // `const REGISTRY = { ... } satisfies Record<string, Entry>` => the `{ ... }` ObjectLiteralExpression
|
|
141
|
-
*/ function findObjectLiteral(sourceFile, name) {
|
|
142
|
-
let result;
|
|
143
|
-
function visit(node) {
|
|
144
|
-
if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.name.text === name && node.initializer) {
|
|
145
|
-
result = unwrapObjectLiteral(node.initializer);
|
|
146
|
-
}
|
|
147
|
-
ts.forEachChild(node, visit);
|
|
148
|
-
}
|
|
149
|
-
visit(sourceFile);
|
|
150
|
-
return result;
|
|
151
|
-
}
|
|
152
|
-
/** Peels `satisfies`, `as`, and parenthesized wrappers off an expression to reach the underlying object literal. */ function unwrapObjectLiteral(node) {
|
|
153
|
-
let current = node;
|
|
154
|
-
while(ts.isSatisfiesExpression(current) || ts.isAsExpression(current) || ts.isParenthesizedExpression(current)){
|
|
155
|
-
current = current.expression;
|
|
156
|
-
}
|
|
157
|
-
return ts.isObjectLiteralExpression(current) ? current : undefined;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Extracts the ordered `params` (names + type expressions) and `returnType` from a `makeEntry({ ... })` call.
|
|
161
|
-
*
|
|
162
|
-
* @example
|
|
163
|
-
* // makeEntry({ params: [{ name: 'a', type: OPTION(FIELD) }], returnType: BOOL })
|
|
164
|
-
* // => { params: [{ name: 'a', type: 'OPTION(FIELD)' }], returnType: 'BOOL' }
|
|
165
|
-
* //
|
|
166
|
-
* // makeEntry()
|
|
167
|
-
* // => { params: [], returnType: 'void' }
|
|
168
|
-
*/ function extractRegistryEntry(initializer, sourceFile) {
|
|
169
|
-
if (!ts.isCallExpression(initializer)) {
|
|
170
|
-
throw new Error(`Expected a makeEntry(...) call but got: ${initializer.getText(sourceFile)}`);
|
|
171
|
-
}
|
|
172
|
-
const [arg] = initializer.arguments;
|
|
173
|
-
if (arg === undefined) {
|
|
174
|
-
return {
|
|
175
|
-
params: [],
|
|
176
|
-
returnType: 'void'
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
if (!ts.isObjectLiteralExpression(arg)) {
|
|
180
|
-
throw new Error(`Expected a makeEntry object argument but got: ${arg.getText(sourceFile)}`);
|
|
181
|
-
}
|
|
182
|
-
let params = [];
|
|
183
|
-
let returnType = 'void';
|
|
184
|
-
arg.properties.forEach((property)=>{
|
|
185
|
-
if (!ts.isPropertyAssignment(property)) {
|
|
186
|
-
throw new Error(`Unexpected makeEntry property: ${property.getText(sourceFile)}`);
|
|
187
|
-
}
|
|
188
|
-
const key = getPropertyName(property.name, sourceFile);
|
|
189
|
-
if (key === 'params') {
|
|
190
|
-
params = extractRegistryParams(property.initializer, sourceFile);
|
|
191
|
-
} else if (key === 'returnType') {
|
|
192
|
-
returnType = normalizeExpressionText(property.initializer, sourceFile);
|
|
193
|
-
} else {
|
|
194
|
-
throw new Error(`Unexpected makeEntry property '${key}'.`);
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
return {
|
|
198
|
-
params,
|
|
199
|
-
returnType
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Extracts `{ name, type }` pairs from the `params` array literal inside a `makeEntry` call.
|
|
204
|
-
*/ function extractRegistryParams(initializer, sourceFile) {
|
|
205
|
-
if (!ts.isArrayLiteralExpression(initializer)) {
|
|
206
|
-
throw new Error(`Expected a params array but got: ${initializer.getText(sourceFile)}`);
|
|
207
|
-
}
|
|
208
|
-
return initializer.elements.map((element)=>{
|
|
209
|
-
if (!ts.isObjectLiteralExpression(element)) {
|
|
210
|
-
throw new Error(`Expected a param object but got: ${element.getText(sourceFile)}`);
|
|
211
|
-
}
|
|
212
|
-
let name;
|
|
213
|
-
let type;
|
|
214
|
-
element.properties.forEach((property)=>{
|
|
215
|
-
if (!ts.isPropertyAssignment(property)) {
|
|
216
|
-
throw new Error(`Unexpected param property: ${property.getText(sourceFile)}`);
|
|
217
|
-
}
|
|
218
|
-
const key = getPropertyName(property.name, sourceFile);
|
|
219
|
-
if (key === 'name') {
|
|
220
|
-
if (!ts.isStringLiteralLike(property.initializer)) {
|
|
221
|
-
throw new Error(`Expected a string literal param name but got: ${property.initializer.getText(sourceFile)}`);
|
|
222
|
-
}
|
|
223
|
-
name = property.initializer.text;
|
|
224
|
-
} else if (key === 'type') {
|
|
225
|
-
type = normalizeExpressionText(property.initializer, sourceFile);
|
|
226
|
-
} else {
|
|
227
|
-
throw new Error(`Unexpected param property '${key}'.`);
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
if (name === undefined || type === undefined) {
|
|
231
|
-
throw new Error(`Param missing 'name' or 'type': ${element.getText(sourceFile)}`);
|
|
232
|
-
}
|
|
233
|
-
return {
|
|
234
|
-
name,
|
|
235
|
-
type
|
|
236
|
-
};
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
/** Returns the text of an identifier or string-literal property name, throwing on computed or numeric names. */ function getPropertyName(name, sourceFile) {
|
|
240
|
-
if (ts.isIdentifier(name) || ts.isStringLiteralLike(name)) {
|
|
241
|
-
return name.text;
|
|
242
|
-
}
|
|
243
|
-
throw new Error(`Unsupported property name: ${name.getText(sourceFile)}`);
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Returns the source text of an expression with all whitespace stripped for format-insensitive comparison.
|
|
247
|
-
*
|
|
248
|
-
* @example
|
|
249
|
-
* // `OPTION(\n AZTEC_ADDRESS\n)` => `"OPTION(AZTEC_ADDRESS)"`
|
|
250
|
-
*/ function normalizeExpressionText(node, sourceFile) {
|
|
251
|
-
// Type expressions are TypeMapping references and calls (identifiers, parentheses, commas, numbers) with no
|
|
252
|
-
// meaningful whitespace, so we strip it entirely to keep the signature stable across reformatting.
|
|
253
|
-
return node.getText(sourceFile).replace(/\s+/g, '');
|
|
254
|
-
}
|
|
@@ -4,4 +4,4 @@ import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
|
4
4
|
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
5
5
|
import type { ContractClassService } from './contract_class_service.js';
|
|
6
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,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0L2hlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDeEUsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFcEQsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sNkNBQTZDLENBQUM7QUFDakYsT0FBTyxLQUFLLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUd4RSx3QkFBc0IsU0FBUyxDQUM3QixlQUFlLEVBQUUsWUFBWSxFQUM3QixhQUFhLEVBQUUsYUFBYSxFQUM1QixvQkFBb0IsRUFBRSxvQkFBb0IsRUFDMUMsaUJBQWlCLEVBQUUsV0FBVyxFQUM5Qix5QkFBeUIsRUFBRSxnQkFBZ0IsR0FBRyxJQUFJLEVBQ2xELGVBQWUsRUFBRSxDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxLQUFLLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFDeEYsS0FBSyxFQUFFLFlBQVksaUJBbUJwQiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/contract/helpers.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dest/contract/helpers.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isSkipSyncContract } from './skip_sync_contracts.js';
|
|
2
2
|
export async function syncScope(contractAddress, contractStore, contractClassService, anchorBlockHeader, functionToInvokeAfterSync, utilityExecutor, scope) {
|
|
3
|
-
//
|
|
4
|
-
if (
|
|
3
|
+
// Some canonical contracts hold no private state, so there is nothing to sync (see `skipSyncContracts`).
|
|
4
|
+
if (isSkipSyncContract(contractAddress)) {
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
const classId = await contractClassService.getCurrentClassId(contractAddress, anchorBlockHeader);
|
|
@@ -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,39 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import type { BlockHash, BlockParameter } from '@aztec/stdlib/block';
|
|
4
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
5
|
+
import type { TxHash } from '@aztec/stdlib/tx';
|
|
6
|
+
/**
|
|
7
|
+
* Per-execution cache for immutable Aztec node reads.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AztecNodeReadCache {
|
|
10
|
+
#private;
|
|
11
|
+
private readonly aztecNode;
|
|
12
|
+
private readonly cache;
|
|
13
|
+
constructor(aztecNode: AztecNode);
|
|
14
|
+
/** Fetches a block without reissuing the same node request. */
|
|
15
|
+
getBlock(block: BlockParameter): Promise<{
|
|
16
|
+
header: import("@aztec/stdlib/tx").BlockHeader;
|
|
17
|
+
archive: import("@aztec/stdlib/trees").AppendOnlyTreeSnapshot;
|
|
18
|
+
hash: BlockHash;
|
|
19
|
+
checkpointNumber: import("@aztec/foundation/branded-types").CheckpointNumber;
|
|
20
|
+
indexWithinCheckpoint: import("@aztec/foundation/branded-types").IndexWithinCheckpoint;
|
|
21
|
+
number: import("@aztec/foundation/branded-types").BlockNumber;
|
|
22
|
+
body?: import("@aztec/stdlib/block").Body | undefined;
|
|
23
|
+
l1?: import("@aztec/stdlib/interfaces/server").L1PublishInfo | undefined;
|
|
24
|
+
attestations?: import("@aztec/stdlib/block").CommitteeAttestation[] | undefined;
|
|
25
|
+
} | undefined>;
|
|
26
|
+
/** Fetches a transaction receipt with its effect attached. */
|
|
27
|
+
getTxReceiptWithEffect(txHash: TxHash): Promise<import("@aztec/stdlib/tx").TxReceipt<{
|
|
28
|
+
readonly includeTxEffect: true;
|
|
29
|
+
}>>;
|
|
30
|
+
/** Fetches an archive-tree witness for a block hash. */
|
|
31
|
+
getBlockHashMembershipWitness(referenceBlock: BlockParameter, blockHash: BlockHash): Promise<import("@aztec/foundation/trees").MembershipWitness<30> | undefined>;
|
|
32
|
+
/** Fetches a public-data-tree witness for a leaf slot. */
|
|
33
|
+
getPublicDataWitness(referenceBlock: BlockParameter, leafSlot: Fr): Promise<import("@aztec/stdlib/trees").PublicDataWitness | undefined>;
|
|
34
|
+
/** Fetches public storage for a single slot. */
|
|
35
|
+
getPublicStorageAt(referenceBlock: BlockParameter, contractAddress: AztecAddress, storageSlot: Fr): Promise<Fr>;
|
|
36
|
+
/** Fetches a contiguous public storage range, reusing cached reads for overlapping slots. */
|
|
37
|
+
getPublicStorageRange(referenceBlock: BlockParameter, contractAddress: AztecAddress, startStorageSlot: Fr, numberOfElements: number): Promise<Fr[]>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXp0ZWNfbm9kZV9yZWFkX2NhY2hlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY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F;IACtF,qBAAqB,CAC1B,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,YAAY,EAC7B,gBAAgB,EAAE,EAAE,EACpB,gBAAgB,EAAE,MAAM,iBAOzB;CA2BF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
/**
|
|
3
|
+
* Per-execution cache for immutable Aztec node reads.
|
|
4
|
+
*/ export class AztecNodeReadCache {
|
|
5
|
+
aztecNode;
|
|
6
|
+
cache;
|
|
7
|
+
constructor(aztecNode){
|
|
8
|
+
this.aztecNode = aztecNode;
|
|
9
|
+
this.cache = new Map();
|
|
10
|
+
}
|
|
11
|
+
/** Fetches a block without reissuing the same node request. */ getBlock(block) {
|
|
12
|
+
return this.#cachedRead(`block:${this.#keyPart(block)}`, ()=>this.aztecNode.getBlock(block));
|
|
13
|
+
}
|
|
14
|
+
/** Fetches a transaction receipt with its effect attached. */ getTxReceiptWithEffect(txHash) {
|
|
15
|
+
return this.#cachedRead(`tx-receipt-with-effect:${txHash.toString()}`, ()=>this.aztecNode.getTxReceipt(txHash, {
|
|
16
|
+
includeTxEffect: true
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
/** Fetches an archive-tree witness for a block hash. */ getBlockHashMembershipWitness(referenceBlock, blockHash) {
|
|
20
|
+
return this.#cachedRead(`block-hash-membership-witness:${this.#keyPart(referenceBlock)}:${blockHash.toString()}`, ()=>this.aztecNode.getBlockHashMembershipWitness(referenceBlock, blockHash));
|
|
21
|
+
}
|
|
22
|
+
/** Fetches a public-data-tree witness for a leaf slot. */ getPublicDataWitness(referenceBlock, leafSlot) {
|
|
23
|
+
return this.#cachedRead(`public-data-witness:${this.#keyPart(referenceBlock)}:${leafSlot.toString()}`, ()=>this.aztecNode.getPublicDataWitness(referenceBlock, leafSlot));
|
|
24
|
+
}
|
|
25
|
+
/** Fetches public storage for a single slot. */ getPublicStorageAt(referenceBlock, contractAddress, storageSlot) {
|
|
26
|
+
return this.#cachedRead(`public-storage:${this.#keyPart(referenceBlock)}:${contractAddress.toString()}:${storageSlot.toString()}`, ()=>this.aztecNode.getPublicStorageAt(referenceBlock, contractAddress, storageSlot));
|
|
27
|
+
}
|
|
28
|
+
/** Fetches a contiguous public storage range, reusing cached reads for overlapping slots. */ getPublicStorageRange(referenceBlock, contractAddress, startStorageSlot, numberOfElements) {
|
|
29
|
+
const slots = Array(numberOfElements).fill(0).map((_, i)=>new Fr(startStorageSlot.value + BigInt(i)));
|
|
30
|
+
return Promise.all(slots.map((storageSlot)=>this.getPublicStorageAt(referenceBlock, contractAddress, storageSlot)));
|
|
31
|
+
}
|
|
32
|
+
#cachedRead(key, fetch) {
|
|
33
|
+
const cached = this.cache.get(key);
|
|
34
|
+
if (cached) {
|
|
35
|
+
return cached;
|
|
36
|
+
}
|
|
37
|
+
const promise = fetch();
|
|
38
|
+
promise.catch(()=>this.cache.delete(key));
|
|
39
|
+
this.cache.set(key, promise);
|
|
40
|
+
return promise;
|
|
41
|
+
}
|
|
42
|
+
#keyPart(value) {
|
|
43
|
+
if ([
|
|
44
|
+
'string',
|
|
45
|
+
'number',
|
|
46
|
+
'bigint',
|
|
47
|
+
'boolean'
|
|
48
|
+
].includes(typeof value)) {
|
|
49
|
+
return String(value);
|
|
50
|
+
}
|
|
51
|
+
if (value && typeof value === 'object') {
|
|
52
|
+
const toString = value.toString;
|
|
53
|
+
if (toString && toString !== Object.prototype.toString) {
|
|
54
|
+
return toString.call(value);
|
|
55
|
+
}
|
|
56
|
+
return JSON.stringify(value, (_key, nested)=>typeof nested === 'bigint' ? nested.toString() : nested);
|
|
57
|
+
}
|
|
58
|
+
return String(value);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ORACLE_REGISTRY, makeEntry, type NamedValue, type OracleRegistryEntry, type ParamTypes, } from './oracle/oracle_registry.js';
|
|
2
|
-
export { ARRAY, AZTEC_ADDRESS, BIGINT, BLOCK_HASH, BLOCK_NUMBER, BOOL, BOUNDED_VEC,
|
|
2
|
+
export { ALIAS, ARRAY, AZTEC_ADDRESS, BIGINT, BLOCK_HASH, BLOCK_NUMBER, BOOL, BOUNDED_VEC, U8, CONTRACT_INSTANCE, DELIVERY_MODE, EPHEMERAL_ARRAY, ETH_ADDRESS, EVENT_VALIDATION_REQUEST, FIELD, FIXED_ARRAY, FUNCTION_SELECTOR, LEAF, LEAF_INDEX, LOG_RETRIEVAL_REQUEST, LOG_RETRIEVAL_RESPONSE, MEMBERSHIP_WITNESS, NOTE_SELECTOR, NOTE_VALIDATION_REQUEST, OPTION, PENDING_TAGGED_LOG, POINT, PROVIDED_SECRET, SCALAR, SLOT_NUMBER, STR, STRUCT, U32, U64, U128, tryFieldWidth, isArrayMapping, isBoundedVecMapping, isEphemeralArrayMapping, isFixedArrayMapping, isFixedBoundedVecMapping, isOptionMapping, isStructMapping, type ArrayMapping, type BoundedVecMapping, type CompositeMapping, type EphemeralArrayMapping, type FixedArrayMapping, type FixedBoundedVecMapping, type InputSlot, type MaybePromise, type OptionMapping, type OutputSlot, type SlotShape, type StructField, type StructMapping, type TypeMapping, } from './oracle/oracle_type_mappings.js';
|
|
3
3
|
export { ExecutionNoteCache } from './execution_note_cache.js';
|
|
4
4
|
export { ExecutionTaggingIndexCache } from './execution_tagging_index_cache.js';
|
|
5
5
|
export { HashedValuesCache } from './hashed_values_cache.js';
|
|
@@ -30,6 +30,6 @@ export { NoteValidationRequest } from './noir-structs/note_validation_request.js
|
|
|
30
30
|
export type { PendingTaggedLog } from './noir-structs/pending_tagged_log.js';
|
|
31
31
|
export type { TxEffectData } from './noir-structs/tx_effect_data.js';
|
|
32
32
|
export type { ProvidedSecret } from './noir-structs/provided_secret.js';
|
|
33
|
-
export { ResolvedTx } from './noir-structs/resolved_tx.js';
|
|
33
|
+
export type { ResolvedTx } from './noir-structs/resolved_tx.js';
|
|
34
34
|
export { TransientArrayService } from './transient_array_service.js';
|
|
35
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QUFDO0FBQ3JFLFlBQVksRUFBRSxjQUFjLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUN4RSxZQUFZLEVBQUUsVUFBVSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFDaEUsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sOEJBQThCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,UAAU,GAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,EACL,aAAa,EACb,MAAM,EACN,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,UAAU,GAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,EACL,KAAK,EACL,aAAa,EACb,MAAM,EACN,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,EAAE,EACF,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,WAAW,EACX,wBAAwB,EACxB,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,IAAI,EACJ,UAAU,EACV,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,KAAK,EACL,eAAe,EACf,MAAM,EACN,WAAW,EACX,GAAG,EACH,MAAM,EACN,GAAG,EACH,GAAG,EACH,IAAI,EACJ,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,wBAAw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AO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,YAAY,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACtF,YAAY,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,YAAY,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,YAAY,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,YAAY,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,YAAY,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,YAAY,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ORACLE_REGISTRY, makeEntry } from './oracle/oracle_registry.js';
|
|
2
|
-
export { ARRAY, AZTEC_ADDRESS, BIGINT, BLOCK_HASH, BLOCK_NUMBER, BOOL, BOUNDED_VEC,
|
|
2
|
+
export { ALIAS, ARRAY, AZTEC_ADDRESS, BIGINT, BLOCK_HASH, BLOCK_NUMBER, BOOL, BOUNDED_VEC, U8, CONTRACT_INSTANCE, DELIVERY_MODE, EPHEMERAL_ARRAY, ETH_ADDRESS, EVENT_VALIDATION_REQUEST, FIELD, FIXED_ARRAY, FUNCTION_SELECTOR, LEAF, LEAF_INDEX, LOG_RETRIEVAL_REQUEST, LOG_RETRIEVAL_RESPONSE, MEMBERSHIP_WITNESS, NOTE_SELECTOR, NOTE_VALIDATION_REQUEST, OPTION, PENDING_TAGGED_LOG, POINT, PROVIDED_SECRET, SCALAR, SLOT_NUMBER, STR, STRUCT, U32, U64, U128, tryFieldWidth, isArrayMapping, isBoundedVecMapping, isEphemeralArrayMapping, isFixedArrayMapping, isFixedBoundedVecMapping, isOptionMapping, isStructMapping } from './oracle/oracle_type_mappings.js';
|
|
3
3
|
export { ExecutionNoteCache } from './execution_note_cache.js';
|
|
4
4
|
export { ExecutionTaggingIndexCache } from './execution_tagging_index_cache.js';
|
|
5
5
|
export { HashedValuesCache } from './hashed_values_cache.js';
|
|
@@ -17,5 +17,4 @@ export { EphemeralArray } from './noir-structs/ephemeral_array.js';
|
|
|
17
17
|
export { Option } from './noir-structs/option.js';
|
|
18
18
|
export { EventValidationRequest } from './noir-structs/event_validation_request.js';
|
|
19
19
|
export { NoteValidationRequest } from './noir-structs/note_validation_request.js';
|
|
20
|
-
export { ResolvedTx } from './noir-structs/resolved_tx.js';
|
|
21
20
|
export { TransientArrayService } from './transient_array_service.js';
|
|
@@ -25,4 +25,4 @@ export type ResolvedTaggingStrategy = {
|
|
|
25
25
|
export declare function resolvedTaggingStrategyToFields(resolved: ResolvedTaggingStrategy): Fr[];
|
|
26
26
|
/** Deserializes a {@link ResolvedTaggingStrategy} from its `kind` discriminant and `secret` field. */
|
|
27
27
|
export declare function resolvedTaggingStrategyFromFields(kind: number, secret: Fr): ResolvedTaggingStrategy;
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZWRfdGFnZ2luZ19zdHJhdGVneS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9ub2lyLXN0cnVjdHMvcmVzb2x2ZWRfdGFnZ2luZ19zdHJhdGVneS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFPcEQ7OztHQUdHO0FBQ0gsTUFBTSxNQUFNLHVCQUF1QixHQUMvQjtJQUNFLDRHQUE0RztJQUM1RyxJQUFJLEVBQUUsMkJBQTJCLENBQUM7Q0FDbkMsR0FDRDtJQUNFOzs7O09BSUc7SUFDSCxJQUFJLEVBQUUsdUJBQXVCLENBQUM7Q0FDL0IsR0FDRDtJQUNFOztPQUVHO0lBQ0gsSUFBSSxFQUFFLHNCQUFzQixDQUFDO0lBQzdCLGlEQUFpRDtJQUNqRCxNQUFNLEVBQUUsRUFBRSxDQUFDO0NBQ1osQ0FBQztBQUVOLDBIQUEwSDtBQUMxSCx3QkFBZ0IsK0JBQStCLENBQUMsUUFBUSxFQUFFLHVCQUF1QixHQUFHLEVBQUUsRUFBRSxDQVN2RjtBQUVELHNHQUFzRztBQUN0Ryx3QkFBZ0IsaUNBQWlDLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsRUFBRSxHQUFHLHVCQUF1QixDQWFuRyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolved_tagging_strategy.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/resolved_tagging_strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAOpD;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IACE,4GAA4G;IAC5G,IAAI,EAAE,2BAA2B,CAAC;CACnC,GACD;IACE;;;;OAIG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B,GACD;IACE;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B,iDAAiD;IACjD,MAAM,EAAE,EAAE,CAAC;CACZ,CAAC;AAEN,0HAA0H;AAC1H,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,uBAAuB,GAAG,EAAE,EAAE,CASvF;AAED,sGAAsG;AACtG,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,uBAAuB,
|
|
1
|
+
{"version":3,"file":"resolved_tagging_strategy.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/resolved_tagging_strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAOpD;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IACE,4GAA4G;IAC5G,IAAI,EAAE,2BAA2B,CAAC;CACnC,GACD;IACE;;;;OAIG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B,GACD;IACE;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B,iDAAiD;IACjD,MAAM,EAAE,EAAE,CAAC;CACZ,CAAC;AAEN,0HAA0H;AAC1H,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,uBAAuB,GAAG,EAAE,EAAE,CASvF;AAED,sGAAsG;AACtG,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,uBAAuB,CAanG"}
|