@aztec/stdlib 3.0.0-nightly.20251210 → 3.0.0-nightly.20251212
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/avm/avm.d.ts +22 -1
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +32 -16
- package/dest/block/l2_block_new.d.ts +3 -1
- package/dest/block/l2_block_new.d.ts.map +1 -1
- package/dest/block/l2_block_new.js +3 -0
- package/dest/block/proposal/attestations_and_signers.d.ts +2 -2
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/committee_attestation.d.ts +2 -2
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_class.d.ts +9 -2
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_class.js +17 -0
- package/dest/contract/interfaces/contract_instance.d.ts +13 -3
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.js +25 -0
- package/dest/interfaces/archiver.d.ts +7 -2
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +2 -3
- package/dest/interfaces/aztec-node-admin.d.ts +2 -1
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.d.ts +1 -9
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +0 -2
- package/dest/interfaces/l2_logs_source.d.ts +1 -9
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.d.ts +3 -2
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.js +1 -1
- package/dest/note/note.d.ts +1 -1
- package/dest/note/note.d.ts.map +1 -1
- package/dest/note/note.js +3 -0
- package/dest/note/note_dao.d.ts +5 -1
- package/dest/note/note_dao.d.ts.map +1 -1
- package/dest/note/note_dao.js +5 -0
- package/dest/rollup/checkpoint_header.d.ts +2 -2
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +1 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +7 -2
- package/dest/tx/content_commitment.d.ts +2 -2
- package/dest/tx/content_commitment.d.ts.map +1 -1
- package/dest/update-checker/update-checker.d.ts +2 -2
- package/dest/update-checker/update-checker.d.ts.map +1 -1
- package/dest/update-checker/update-checker.js +1 -1
- package/package.json +8 -8
- package/src/avm/avm.ts +26 -6
- package/src/block/l2_block_new.ts +5 -0
- package/src/block/proposal/attestations_and_signers.ts +1 -1
- package/src/block/proposal/committee_attestation.ts +1 -1
- package/src/contract/interfaces/contract_class.ts +19 -1
- package/src/contract/interfaces/contract_instance.ts +32 -2
- package/src/interfaces/archiver.ts +5 -3
- package/src/interfaces/aztec-node.ts +0 -14
- package/src/interfaces/l2_logs_source.ts +0 -9
- package/src/l1-contracts/slash_factory.ts +3 -1
- package/src/note/note.ts +3 -0
- package/src/note/note_dao.ts +20 -0
- package/src/rollup/checkpoint_header.ts +1 -1
- package/src/tests/factories.ts +7 -2
- package/src/tx/content_commitment.ts +1 -1
- package/src/update-checker/update-checker.ts +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ViemContentCommitment } from '@aztec/ethereum';
|
|
1
|
+
import type { ViemContentCommitment } from '@aztec/ethereum/contracts';
|
|
2
2
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
4
4
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
@@ -46,4 +46,4 @@ export declare class ContentCommitment {
|
|
|
46
46
|
static fromString(str: string): ContentCommitment;
|
|
47
47
|
equals(other: this): boolean;
|
|
48
48
|
}
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9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QUFTOzs7O01BTVI7SUFFRCxNQUFNLElBQUkscUJBQXFCLENBTTlCO0lBRUQsTUFBTSxDQUFDLFFBQVEsQ0FBQyxpQkFBaUIsRUFBRSxxQkFBcUIscUJBTXZEO0lBRUQsUUFBUSxJQUFJLEVBQUUsRUFBRSxDQUVmO0lBRUQsTUFBTSxDQUFDLFVBQVUsQ0FBQyxNQUFNLEVBQUUsRUFBRSxFQUFFLEdBQUcsV0FBVyxHQUFHLGlCQUFpQixDQUcvRDtJQUVELE1BQU0sQ0FBQyxNQUFNLENBQUMsU0FBUyxHQUFFLE9BQU8sQ0FBQyxRQUFRLENBQUMsaUJBQWlCLENBQUMsQ0FBTSxHQUFHLGlCQUFpQixDQU9yRjtJQUVELE1BQU0sQ0FBQyxLQUFLLElBQUksaUJBQWlCLENBRWhDO0lBRUQsT0FBTyxJQUFJLE9BQU8sQ0FFakI7SUFFTSxRQUFRLElBQUksTUFBTSxDQUV4QjtJQUVELE1BQU0sQ0FBQyxVQUFVLENBQUMsR0FBRyxFQUFFLE1BQU0sR0FBRyxpQkFBaUIsQ0FHaEQ7SUFFTSxNQUFNLENBQUMsS0FBSyxFQUFFLElBQUksR0FBRyxPQUFPLENBSWxDO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content_commitment.d.ts","sourceRoot":"","sources":["../../src/tx/content_commitment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"content_commitment.d.ts","sourceRoot":"","sources":["../../src/tx/content_commitment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAwC,MAAM,6BAA6B,CAAC;AAE9G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,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Address } from '@aztec/foundation/eth-address';
|
|
3
3
|
import { EventEmitter } from 'events';
|
|
4
4
|
export type EventMap = {
|
|
@@ -46,4 +46,4 @@ export declare class UpdateChecker extends EventEmitter<EventMap> {
|
|
|
46
46
|
*/
|
|
47
47
|
export declare function getPackageVersion(): string | undefined;
|
|
48
48
|
export {};
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBkYXRlLWNoZWNrZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91cGRhdGUtY2hlY2tlci91cGRhdGUtY2hlY2tlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUN4RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFLM0QsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQztBQVl0QyxNQUFNLE1BQU0sUUFBUSxHQUFHO0lBQ3JCLGdCQUFnQixFQUFFLENBQUM7UUFBRSxjQUFjLEVBQUUsTUFBTSxDQUFDO1FBQUMsYUFBYSxFQUFFLE1BQU0sQ0FBQTtLQUFFLENBQUMsQ0FBQztJQUN0RSxjQUFjLEVBQUUsQ0FBQztRQUFFLGNBQWMsRUFBRSxNQUFNLENBQUM7UUFBQyxhQUFhLEVBQUUsTUFBTSxDQUFBO0tBQUUsQ0FBQyxDQUFDO0lBQ3BFLGdCQUFnQixFQUFFLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDM0IsMkJBQTJCLEVBQUUsQ0FBQyxNQUFNLENBQUMsQ0FBQztDQUN2QyxDQUFDO0FBRUYsS0FBSyxNQUFNLEdBQUc7SUFDWixPQUFPLEVBQUUsR0FBRyxDQUFDO0lBQ2I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BSSxPQUFPLENBQUMsSUFBSSxDQUFDLENBRTlCO0lBRUQsT0FBTyxDQUFDLFNBQVMsQ0FFZjtZQUVZLGtCQUFrQjtZQWVsQixXQUFXO0NBc0MxQjtBQUVEOztHQUVHO0FBQ0gsd0JBQWdCLGlCQUFpQixJQUFJLE1BQU0sR0FBRyxTQUFTLENBV3REIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-checker.d.ts","sourceRoot":"","sources":["../../src/update-checker/update-checker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-checker.d.ts","sourceRoot":"","sources":["../../src/update-checker/update-checker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAYtC,MAAM,MAAM,QAAQ,GAAG;IACrB,gBAAgB,EAAE,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtE,cAAc,EAAE,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpE,gBAAgB,EAAE,CAAC,MAAM,CAAC,CAAC;IAC3B,2BAA2B,EAAE,CAAC,MAAM,CAAC,CAAC;CACvC,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,UAAU,CAAC;IACpC,YAAY,EAAE,UAAU,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB,CAAC;AAEF,qBAAa,aAAc,SAAQ,YAAY,CAAC,QAAQ,CAAC;IAMrD,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,sBAAsB;IAC9B,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,GAAG;IAXb,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,iBAAiB,CAAc;IACvC,OAAO,CAAC,gCAAgC,CAAc;IAEtD,YACU,UAAU,EAAE,GAAG,EACf,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,EAC9B,sBAAsB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAC7C,eAAe,SAAc,EAC7B,GAAG,yCAA0C,EAItD;IAED,OAAoB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAY9D;IAEM,KAAK,IAAI,IAAI,CAWnB;IAEM,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAM3B;IAEM,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAE9B;IAED,OAAO,CAAC,SAAS,CAEf;YAEY,kBAAkB;YAelB,WAAW;CAsC1B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,SAAS,CAWtD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RegistryContract } from '@aztec/ethereum';
|
|
1
|
+
import { RegistryContract } from '@aztec/ethereum/contracts';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
4
4
|
import { fileURLToPath } from '@aztec/foundation/url';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251212",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@aws-sdk/client-s3": "^3.892.0",
|
|
75
|
-
"@aztec/bb.js": "3.0.0-nightly.
|
|
76
|
-
"@aztec/blob-lib": "3.0.0-nightly.
|
|
77
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
78
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
79
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
80
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
81
|
-
"@aztec/noir-noirc_abi": "3.0.0-nightly.
|
|
75
|
+
"@aztec/bb.js": "3.0.0-nightly.20251212",
|
|
76
|
+
"@aztec/blob-lib": "3.0.0-nightly.20251212",
|
|
77
|
+
"@aztec/constants": "3.0.0-nightly.20251212",
|
|
78
|
+
"@aztec/ethereum": "3.0.0-nightly.20251212",
|
|
79
|
+
"@aztec/foundation": "3.0.0-nightly.20251212",
|
|
80
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251212",
|
|
81
|
+
"@aztec/noir-noirc_abi": "3.0.0-nightly.20251212",
|
|
82
82
|
"@google-cloud/storage": "^7.15.0",
|
|
83
83
|
"axios": "^1.12.0",
|
|
84
84
|
"json-stringify-deterministic": "1.0.12",
|
package/src/avm/avm.ts
CHANGED
|
@@ -1162,17 +1162,37 @@ export class CallStackMetadata {
|
|
|
1162
1162
|
);
|
|
1163
1163
|
}
|
|
1164
1164
|
|
|
1165
|
+
/**
|
|
1166
|
+
* Finds the "rightmost deepest" revert in the call tree.
|
|
1167
|
+
*
|
|
1168
|
+
* At each level, we select the LAST (rightmost) reverted call, then recurse into its
|
|
1169
|
+
* nested calls to find the deepest reverted leaf along that path. The chain stops
|
|
1170
|
+
* when we encounter a non-reverted call (since you can choose not to rethrow).
|
|
1171
|
+
*
|
|
1172
|
+
* Examples (X = reverted, O = passed):
|
|
1173
|
+
*
|
|
1174
|
+
* 1. [X, X, X] at depth 1 -> returns the last X (rightmost)
|
|
1175
|
+
*
|
|
1176
|
+
* 2. [X(depth2), X, X] where first X has a nested revert -> returns the last X at depth 1,
|
|
1177
|
+
* NOT the deeper revert in the first X (rightmost takes priority over depth)
|
|
1178
|
+
*
|
|
1179
|
+
* 3. X -> X -> X -> O -> O -> X (nested chain)
|
|
1180
|
+
* Returns the 3rd X, because the O's break the reverted chain (they didn't rethrow)
|
|
1181
|
+
*
|
|
1182
|
+
* @param calls - Array of call metadata at the current level
|
|
1183
|
+
* @param parentStack - Accumulated stack of parent calls (for building the result)
|
|
1184
|
+
* @returns The deepest reverted call along the rightmost reverted path, or undefined if none
|
|
1185
|
+
*/
|
|
1165
1186
|
private findDeepestRevert(
|
|
1166
1187
|
calls: CallStackMetadata[],
|
|
1167
1188
|
parentStack: CallStackMetadata[] = [],
|
|
1168
1189
|
): { stack: CallStackMetadata[]; leaf: CallStackMetadata } | undefined {
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
return nested || { stack: [...parentStack, call], leaf: call };
|
|
1173
|
-
}
|
|
1190
|
+
const lastReverted = calls.findLast(call => call.reverted);
|
|
1191
|
+
if (!lastReverted) {
|
|
1192
|
+
return undefined;
|
|
1174
1193
|
}
|
|
1175
|
-
|
|
1194
|
+
const currentStack = [...parentStack, lastReverted];
|
|
1195
|
+
return this.findDeepestRevert(lastReverted.nested, currentStack) || { stack: currentStack, leaf: lastReverted };
|
|
1176
1196
|
}
|
|
1177
1197
|
}
|
|
1178
1198
|
|
|
@@ -5,6 +5,7 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
|
5
5
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
8
|
+
import type { PrivateLog } from '../logs/private_log.js';
|
|
8
9
|
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
9
10
|
import { BlockHeader } from '../tx/block_header.js';
|
|
10
11
|
import { Body } from './body.js';
|
|
@@ -178,6 +179,10 @@ export class L2BlockNew {
|
|
|
178
179
|
};
|
|
179
180
|
}
|
|
180
181
|
|
|
182
|
+
getPrivateLogs(): PrivateLog[] {
|
|
183
|
+
return this.body.txEffects.map(txEffect => txEffect.privateLogs).flat();
|
|
184
|
+
}
|
|
185
|
+
|
|
181
186
|
toBlockInfo(): L2BlockInfo {
|
|
182
187
|
return {
|
|
183
188
|
blockHash: this.blockHash,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ViemCommitteeAttestation, ViemCommitteeAttestations } from '@aztec/ethereum';
|
|
1
|
+
import type { ViemCommitteeAttestation, ViemCommitteeAttestations } from '@aztec/ethereum/contracts';
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
4
4
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
3
3
|
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -153,3 +153,21 @@ export const ContractClassPublicSchema = z
|
|
|
153
153
|
|
|
154
154
|
/** The contract class with the block it was initially deployed at */
|
|
155
155
|
export type ContractClassPublicWithBlockNumber = { l2BlockNumber: number } & ContractClassPublic;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Creates a ContractClassPublic from a plain object without Zod validation.
|
|
159
|
+
* Suitable for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
160
|
+
* Note: privateFunctions and utilityFunctions are set to empty arrays since
|
|
161
|
+
* C++ does not provide them.
|
|
162
|
+
*/
|
|
163
|
+
export function contractClassPublicFromPlainObject(obj: any): ContractClassPublic {
|
|
164
|
+
return {
|
|
165
|
+
id: Fr.fromPlainObject(obj.id),
|
|
166
|
+
version: 1,
|
|
167
|
+
artifactHash: Fr.fromPlainObject(obj.artifactHash),
|
|
168
|
+
privateFunctionsRoot: Fr.fromPlainObject(obj.privateFunctionsRoot),
|
|
169
|
+
privateFunctions: [],
|
|
170
|
+
utilityFunctions: [],
|
|
171
|
+
packedBytecode: obj.packedBytecode instanceof Buffer ? obj.packedBytecode : Buffer.from(obj.packedBytecode),
|
|
172
|
+
};
|
|
173
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { AztecAddress } from '../../aztec-address/index.js';
|
|
6
6
|
import { PublicKeys } from '../../keys/public_keys.js';
|
|
7
7
|
import { type ZodFor, schemas } from '../../schemas/index.js';
|
|
8
8
|
|
|
@@ -45,3 +45,33 @@ export const ContractInstanceSchema = z.object({
|
|
|
45
45
|
export const ContractInstanceWithAddressSchema = ContractInstanceSchema.and(
|
|
46
46
|
z.object({ address: schemas.AztecAddress }),
|
|
47
47
|
) satisfies ZodFor<ContractInstanceWithAddress>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Creates a ContractInstance from a plain object without Zod validation.
|
|
51
|
+
* Suitable for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
52
|
+
*/
|
|
53
|
+
export function contractInstanceFromPlainObject(obj: any): ContractInstance {
|
|
54
|
+
return {
|
|
55
|
+
version: 1,
|
|
56
|
+
salt: Fr.fromPlainObject(obj.salt),
|
|
57
|
+
deployer: AztecAddress.fromPlainObject(obj.deployer),
|
|
58
|
+
currentContractClassId: Fr.fromPlainObject(obj.currentContractClassId),
|
|
59
|
+
originalContractClassId: Fr.fromPlainObject(obj.originalContractClassId),
|
|
60
|
+
initializationHash: Fr.fromPlainObject(obj.initializationHash),
|
|
61
|
+
publicKeys: PublicKeys.fromPlainObject(obj.publicKeys),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates a ContractInstanceWithAddress from a plain object without Zod validation.
|
|
67
|
+
* Suitable for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
68
|
+
*/
|
|
69
|
+
export function contractInstanceWithAddressFromPlainObject(
|
|
70
|
+
address: AztecAddress,
|
|
71
|
+
obj: any,
|
|
72
|
+
): ContractInstanceWithAddress {
|
|
73
|
+
return {
|
|
74
|
+
...contractInstanceFromPlainObject(obj),
|
|
75
|
+
address,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { L1ContractAddresses } from '@aztec/ethereum';
|
|
1
|
+
import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
|
|
2
2
|
import { BlockNumberSchema, CheckpointNumberSchema, EpochNumberSchema } from '@aztec/foundation/branded-types';
|
|
3
3
|
import type { ApiSchemaFor } from '@aztec/foundation/schemas';
|
|
4
4
|
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
} from '../contract/index.js';
|
|
18
18
|
import { L1RollupConstantsSchema } from '../epoch-helpers/index.js';
|
|
19
19
|
import { LogFilterSchema } from '../logs/log_filter.js';
|
|
20
|
-
import { PrivateLog } from '../logs/private_log.js';
|
|
21
20
|
import { TxScopedL2Log } from '../logs/tx_scoped_l2_log.js';
|
|
22
21
|
import type { L1ToL2MessageSource } from '../messaging/l1_to_l2_message_source.js';
|
|
23
22
|
import { optional, schemas } from '../schemas/schemas.js';
|
|
@@ -55,6 +54,9 @@ export type ArchiverSpecificConfig = {
|
|
|
55
54
|
|
|
56
55
|
/** Maximum allowed drift in seconds between the Ethereum client and current time. */
|
|
57
56
|
maxAllowedEthClientDriftSeconds?: number;
|
|
57
|
+
|
|
58
|
+
/** Whether to allow starting the archiver without debug/trace method support on Ethereum hosts */
|
|
59
|
+
ethereumAllowNoDebugHosts?: boolean;
|
|
58
60
|
};
|
|
59
61
|
|
|
60
62
|
export const ArchiverSpecificConfigSchema = z.object({
|
|
@@ -65,6 +67,7 @@ export const ArchiverSpecificConfigSchema = z.object({
|
|
|
65
67
|
archiverStoreMapSizeKb: schemas.Integer.optional(),
|
|
66
68
|
skipValidateBlockAttestations: z.boolean().optional(),
|
|
67
69
|
maxAllowedEthClientDriftSeconds: schemas.Integer.optional(),
|
|
70
|
+
ethereumAllowNoDebugHosts: z.boolean().optional(),
|
|
68
71
|
});
|
|
69
72
|
|
|
70
73
|
export type ArchiverApi = Omit<
|
|
@@ -108,7 +111,6 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
108
111
|
getBlockHeadersForEpoch: z.function().args(EpochNumberSchema).returns(z.array(BlockHeader.schema)),
|
|
109
112
|
isEpochComplete: z.function().args(EpochNumberSchema).returns(z.boolean()),
|
|
110
113
|
getL2Tips: z.function().args().returns(L2TipsSchema),
|
|
111
|
-
getPrivateLogs: z.function().args(BlockNumberSchema, z.number()).returns(z.array(PrivateLog.schema)),
|
|
112
114
|
getLogsByTags: z
|
|
113
115
|
.function()
|
|
114
116
|
.args(z.array(schemas.Fr))
|
|
@@ -37,7 +37,6 @@ import {
|
|
|
37
37
|
} from '../contract/index.js';
|
|
38
38
|
import { GasFees } from '../gas/gas_fees.js';
|
|
39
39
|
import { type LogFilter, LogFilterSchema } from '../logs/log_filter.js';
|
|
40
|
-
import { PrivateLog } from '../logs/private_log.js';
|
|
41
40
|
import { TxScopedL2Log } from '../logs/tx_scoped_l2_log.js';
|
|
42
41
|
import { type ApiSchemaFor, optional, schemas } from '../schemas/schemas.js';
|
|
43
42
|
import { MerkleTreeId } from '../trees/merkle_tree_id.js';
|
|
@@ -324,14 +323,6 @@ export interface AztecNode
|
|
|
324
323
|
*/
|
|
325
324
|
registerContractFunctionSignatures(functionSignatures: string[]): Promise<void>;
|
|
326
325
|
|
|
327
|
-
/**
|
|
328
|
-
* Retrieves all private logs from up to `limit` blocks, starting from the block number `from`.
|
|
329
|
-
* @param from - The block number from which to begin retrieving logs.
|
|
330
|
-
* @param limit - The maximum number of blocks to retrieve logs from.
|
|
331
|
-
* @returns An array of private logs from the specified range of blocks.
|
|
332
|
-
*/
|
|
333
|
-
getPrivateLogs(from: BlockNumber, limit: number): Promise<PrivateLog[]>;
|
|
334
|
-
|
|
335
326
|
/**
|
|
336
327
|
* Gets public logs based on the provided filter.
|
|
337
328
|
* @param filter - The filter to apply to the logs.
|
|
@@ -606,11 +597,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
606
597
|
.args(z.array(z.string().max(MAX_SIGNATURE_LEN)).max(MAX_SIGNATURES_PER_REGISTER_CALL))
|
|
607
598
|
.returns(z.void()),
|
|
608
599
|
|
|
609
|
-
getPrivateLogs: z
|
|
610
|
-
.function()
|
|
611
|
-
.args(BlockNumberPositiveSchema, z.number().lte(MAX_RPC_LEN))
|
|
612
|
-
.returns(z.array(PrivateLog.schema)),
|
|
613
|
-
|
|
614
600
|
getPublicLogs: z.function().args(LogFilterSchema).returns(GetPublicLogsResponseSchema),
|
|
615
601
|
|
|
616
602
|
getContractClassLogs: z.function().args(LogFilterSchema).returns(GetContractClassLogsResponseSchema),
|
|
@@ -2,7 +2,6 @@ import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
|
2
2
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
|
|
4
4
|
import type { LogFilter } from '../logs/log_filter.js';
|
|
5
|
-
import type { PrivateLog } from '../logs/private_log.js';
|
|
6
5
|
import type { TxScopedL2Log } from '../logs/tx_scoped_l2_log.js';
|
|
7
6
|
import type { GetContractClassLogsResponse, GetPublicLogsResponse } from './get_logs_response.js';
|
|
8
7
|
|
|
@@ -10,14 +9,6 @@ import type { GetContractClassLogsResponse, GetPublicLogsResponse } from './get_
|
|
|
10
9
|
* Interface of classes allowing for the retrieval of logs.
|
|
11
10
|
*/
|
|
12
11
|
export interface L2LogsSource {
|
|
13
|
-
/**
|
|
14
|
-
* Retrieves all private logs from up to `limit` blocks, starting from the block number `from`.
|
|
15
|
-
* @param from - The block number from which to begin retrieving logs.
|
|
16
|
-
* @param limit - The maximum number of blocks to retrieve logs from.
|
|
17
|
-
* @returns An array of private logs from the specified range of blocks.
|
|
18
|
-
*/
|
|
19
|
-
getPrivateLogs(from: BlockNumber, limit: number): Promise<PrivateLog[]>;
|
|
20
|
-
|
|
21
12
|
/**
|
|
22
13
|
* Gets all logs that match any of the received tags (i.e. logs with their first field equal to a tag).
|
|
23
14
|
* @param tags - The tags to filter the logs by.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { L1TxRequest } from '@aztec/ethereum/l1-tx-utils';
|
|
2
|
+
import type { ViemClient } from '@aztec/ethereum/types';
|
|
3
|
+
import { tryExtractEvent } from '@aztec/ethereum/utils';
|
|
2
4
|
import { maxBigint } from '@aztec/foundation/bigint';
|
|
3
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
6
|
import { createLogger } from '@aztec/foundation/log';
|
package/src/note/note.ts
CHANGED
package/src/note/note_dao.ts
CHANGED
|
@@ -118,6 +118,26 @@ export class NoteDao {
|
|
|
118
118
|
return NoteDao.fromBuffer(Buffer.from(hex, 'hex'));
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Returns true if this note is equal to the `other` one.
|
|
123
|
+
*/
|
|
124
|
+
equals(other: NoteDao): boolean {
|
|
125
|
+
return (
|
|
126
|
+
this.note.equals(other.note) &&
|
|
127
|
+
this.contractAddress.equals(other.contractAddress) &&
|
|
128
|
+
this.owner.equals(other.owner) &&
|
|
129
|
+
this.storageSlot.equals(other.storageSlot) &&
|
|
130
|
+
this.randomness.equals(other.randomness) &&
|
|
131
|
+
this.noteNonce.equals(other.noteNonce) &&
|
|
132
|
+
this.noteHash.equals(other.noteHash) &&
|
|
133
|
+
this.siloedNullifier.equals(other.siloedNullifier) &&
|
|
134
|
+
this.txHash.equals(other.txHash) &&
|
|
135
|
+
this.l2BlockNumber === other.l2BlockNumber &&
|
|
136
|
+
this.l2BlockHash === other.l2BlockHash &&
|
|
137
|
+
this.index === other.index
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
121
141
|
/**
|
|
122
142
|
* Returns the size in bytes of the Note Dao.
|
|
123
143
|
* @returns - Its size in bytes.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ViemHeader } from '@aztec/ethereum';
|
|
1
|
+
import type { ViemHeader } from '@aztec/ethereum/contracts';
|
|
2
2
|
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
3
|
import { sha256ToField } from '@aztec/foundation/crypto/sha256';
|
|
4
4
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
package/src/tests/factories.ts
CHANGED
|
@@ -439,7 +439,10 @@ function makeAvmAccumulatedDataArrayLengths(seed = 1) {
|
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
export function makeGas(seed = 1) {
|
|
442
|
-
|
|
442
|
+
// Constrain gas values to u32 range
|
|
443
|
+
const daGas = seed % 2 ** 32;
|
|
444
|
+
const l2Gas = (seed + 1) % 2 ** 32;
|
|
445
|
+
return new Gas(daGas, l2Gas);
|
|
443
446
|
}
|
|
444
447
|
|
|
445
448
|
/**
|
|
@@ -722,7 +725,9 @@ function makeFeeRecipient(seed = 1) {
|
|
|
722
725
|
* @returns An append only tree snapshot.
|
|
723
726
|
*/
|
|
724
727
|
export function makeAppendOnlyTreeSnapshot(seed = 1): AppendOnlyTreeSnapshot {
|
|
725
|
-
|
|
728
|
+
// Constrain nextAvailableLeafIndex to u32 range
|
|
729
|
+
const nextAvailableLeafIndex = seed % 2 ** 32;
|
|
730
|
+
return new AppendOnlyTreeSnapshot(fr(seed), nextAvailableLeafIndex);
|
|
726
731
|
}
|
|
727
732
|
|
|
728
733
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ViemContentCommitment } from '@aztec/ethereum';
|
|
1
|
+
import type { ViemContentCommitment } from '@aztec/ethereum/contracts';
|
|
2
2
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { schemas } from '@aztec/foundation/schemas';
|
|
4
4
|
import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { RegistryContract
|
|
1
|
+
import { RegistryContract } from '@aztec/ethereum/contracts';
|
|
2
|
+
import type { ViemClient } from '@aztec/ethereum/types';
|
|
2
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
5
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|