@aztec/pxe 5.1.0-nightly.20260721 → 5.1.0
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/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/package.json +17 -17
- package/src/contract/helpers.ts +3 -3
- package/src/contract/skip_sync_contracts.ts +23 -0
|
@@ -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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/pxe",
|
|
3
|
-
"version": "5.1.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"typedocOptions": {
|
|
6
6
|
"entryPoints": [
|
|
@@ -71,20 +71,20 @@
|
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@aztec/bb-prover": "5.1.0
|
|
75
|
-
"@aztec/bb.js": "5.1.0
|
|
76
|
-
"@aztec/builder": "5.1.0
|
|
77
|
-
"@aztec/constants": "5.1.0
|
|
78
|
-
"@aztec/ethereum": "5.1.0
|
|
79
|
-
"@aztec/foundation": "5.1.0
|
|
80
|
-
"@aztec/key-store": "5.1.0
|
|
81
|
-
"@aztec/kv-store": "5.1.0
|
|
82
|
-
"@aztec/noir-protocol-circuits-types": "5.1.0
|
|
83
|
-
"@aztec/noir-types": "5.1.0
|
|
84
|
-
"@aztec/protocol-contracts": "5.1.0
|
|
85
|
-
"@aztec/simulator": "5.1.0
|
|
86
|
-
"@aztec/standard-contracts": "5.1.0
|
|
87
|
-
"@aztec/stdlib": "5.1.0
|
|
74
|
+
"@aztec/bb-prover": "5.1.0",
|
|
75
|
+
"@aztec/bb.js": "5.1.0",
|
|
76
|
+
"@aztec/builder": "5.1.0",
|
|
77
|
+
"@aztec/constants": "5.1.0",
|
|
78
|
+
"@aztec/ethereum": "5.1.0",
|
|
79
|
+
"@aztec/foundation": "5.1.0",
|
|
80
|
+
"@aztec/key-store": "5.1.0",
|
|
81
|
+
"@aztec/kv-store": "5.1.0",
|
|
82
|
+
"@aztec/noir-protocol-circuits-types": "5.1.0",
|
|
83
|
+
"@aztec/noir-types": "5.1.0",
|
|
84
|
+
"@aztec/protocol-contracts": "5.1.0",
|
|
85
|
+
"@aztec/simulator": "5.1.0",
|
|
86
|
+
"@aztec/standard-contracts": "5.1.0",
|
|
87
|
+
"@aztec/stdlib": "5.1.0",
|
|
88
88
|
"koa": "^2.16.1",
|
|
89
89
|
"koa-router": "^13.1.1",
|
|
90
90
|
"lodash.omit": "^4.5.0",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"viem": "npm:@aztec/viem@2.38.2"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@aztec/noir-test-contracts.js": "5.1.0
|
|
97
|
-
"@aztec/world-state": "5.1.0
|
|
96
|
+
"@aztec/noir-test-contracts.js": "5.1.0",
|
|
97
|
+
"@aztec/world-state": "5.1.0",
|
|
98
98
|
"@jest/globals": "^30.0.0",
|
|
99
99
|
"@types/jest": "^30.0.0",
|
|
100
100
|
"@types/lodash.omit": "^4.5.7",
|
package/src/contract/helpers.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isProtocolContract } from '@aztec/protocol-contracts';
|
|
2
1
|
import type { FunctionCall, FunctionSelector } from '@aztec/stdlib/abi';
|
|
3
2
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
3
|
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
5
4
|
|
|
6
5
|
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
7
6
|
import type { ContractClassService } from './contract_class_service.js';
|
|
7
|
+
import { isSkipSyncContract } from './skip_sync_contracts.js';
|
|
8
8
|
|
|
9
9
|
export async function syncScope(
|
|
10
10
|
contractAddress: AztecAddress,
|
|
@@ -15,8 +15,8 @@ export async function syncScope(
|
|
|
15
15
|
utilityExecutor: (privateSyncCall: FunctionCall, scopes: AztecAddress[]) => Promise<any>,
|
|
16
16
|
scope: AztecAddress,
|
|
17
17
|
) {
|
|
18
|
-
//
|
|
19
|
-
if (
|
|
18
|
+
// Some canonical contracts hold no private state, so there is nothing to sync (see `skipSyncContracts`).
|
|
19
|
+
if (isSkipSyncContract(contractAddress)) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Canonical contracts that hold no private state and are therefore never synced.
|
|
9
|
+
*
|
|
10
|
+
* The protocol contracts (registries, fee juice) plus the standard AuthRegistry, MultiCallEntrypoint and PublicChecks
|
|
11
|
+
* declare no notes and no events, so their macro-generated `sync_state` has nothing to discover.
|
|
12
|
+
*/
|
|
13
|
+
export const skipSyncContracts: AztecAddress[] = [
|
|
14
|
+
...Object.values(ProtocolContractAddress),
|
|
15
|
+
STANDARD_AUTH_REGISTRY_ADDRESS,
|
|
16
|
+
STANDARD_MULTI_CALL_ENTRYPOINT_ADDRESS,
|
|
17
|
+
STANDARD_PUBLIC_CHECKS_ADDRESS,
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
/** Returns whether the given contract should be skipped during private state synchronization. */
|
|
21
|
+
export function isSkipSyncContract(address: AztecAddress): boolean {
|
|
22
|
+
return skipSyncContracts.some(a => a.equals(address));
|
|
23
|
+
}
|