@aztec/stdlib 0.87.2-nightly.20250527 → 0.87.3-nightly.20250528
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/index.d.ts +1 -0
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +1 -0
- package/dest/block/proposal/committee_attestation.d.ts +34 -0
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -0
- package/dest/block/proposal/committee_attestation.js +59 -0
- package/dest/block/proposal/index.d.ts +2 -0
- package/dest/block/proposal/index.d.ts.map +1 -0
- package/dest/block/proposal/index.js +1 -0
- package/dest/block/published_l2_block.d.ts +99 -69
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +38 -12
- package/dest/block/test/l2_tips_store_test_suite.js +1 -1
- package/dest/interfaces/archiver.js +2 -2
- package/dest/interfaces/aztec-node.js +2 -2
- package/dest/interfaces/prover-agent.d.ts +31 -6
- package/dest/interfaces/prover-agent.d.ts.map +1 -1
- package/dest/interfaces/prover-agent.js +15 -6
- package/dest/kernel/private_kernel_prover_output.d.ts +3 -0
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +4 -3
- package/dest/tx/private_execution_result.d.ts +6 -0
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/profiling.d.ts +41 -0
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +4 -1
- package/dest/tx/proven_tx.d.ts +28 -0
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/block/index.ts +1 -0
- package/src/block/proposal/committee_attestation.ts +70 -0
- package/src/block/proposal/index.ts +1 -0
- package/src/block/published_l2_block.ts +38 -24
- package/src/block/test/l2_tips_store_test_suite.ts +1 -1
- package/src/interfaces/archiver.ts +2 -2
- package/src/interfaces/aztec-node.ts +2 -2
- package/src/interfaces/prover-agent.ts +9 -10
- package/src/kernel/private_kernel_prover_output.ts +1 -0
- package/src/tests/mocks.ts +6 -3
- package/src/tx/private_execution_result.ts +1 -1
- package/src/tx/profiling.ts +6 -1
package/dest/block/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/block/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/block/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC"}
|
package/dest/block/index.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ViemCommitteeAttestation } from '@aztec/ethereum';
|
|
2
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export { Signature };
|
|
6
|
+
export { EthAddress };
|
|
7
|
+
export declare class CommitteeAttestation {
|
|
8
|
+
readonly address: EthAddress;
|
|
9
|
+
readonly signature: Signature;
|
|
10
|
+
constructor(address: EthAddress, signature: Signature);
|
|
11
|
+
static get schema(): z.ZodEffects<z.ZodObject<{
|
|
12
|
+
address: z.ZodType<EthAddress, any, string>;
|
|
13
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, Signature, string>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
address: EthAddress;
|
|
16
|
+
signature: Signature;
|
|
17
|
+
}, {
|
|
18
|
+
address: string;
|
|
19
|
+
signature: string;
|
|
20
|
+
}>, CommitteeAttestation, {
|
|
21
|
+
address: string;
|
|
22
|
+
signature: string;
|
|
23
|
+
}>;
|
|
24
|
+
static fromAddress(address: EthAddress): CommitteeAttestation;
|
|
25
|
+
static fromAddressAndSignature(address: EthAddress, signature: Signature): CommitteeAttestation;
|
|
26
|
+
static fromViem(viem: ViemCommitteeAttestation): CommitteeAttestation;
|
|
27
|
+
static fromBuffer(buffer: Buffer): CommitteeAttestation;
|
|
28
|
+
static random(): CommitteeAttestation;
|
|
29
|
+
static empty(): CommitteeAttestation;
|
|
30
|
+
toBuffer(): Buffer;
|
|
31
|
+
equals(other: CommitteeAttestation): boolean;
|
|
32
|
+
toViem(): ViemCommitteeAttestation;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=committee_attestation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"committee_attestation.d.ts","sourceRoot":"","sources":["../../../src/block/proposal/committee_attestation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAG5D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,qBAAa,oBAAoB;aAEb,OAAO,EAAE,UAAU;aACnB,SAAS,EAAE,SAAS;gBADpB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,SAAS;IAGtC,MAAM,KAAK,MAAM;;;;;;;;;;;;OAOhB;IAGD,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,oBAAoB;IAK7D,MAAM,CAAC,uBAAuB,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,oBAAoB;IAI/F,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,GAAG,oBAAoB;IAIrE,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB;IAOvD,MAAM,CAAC,MAAM,IAAI,oBAAoB;IAKrC,MAAM,CAAC,KAAK,IAAI,oBAAoB;IAIpC,QAAQ,IAAI,MAAM;IAIlB,MAAM,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO;IAI5C,MAAM,IAAI,wBAAwB;CAMnC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
3
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export { Signature };
|
|
6
|
+
export { EthAddress };
|
|
7
|
+
export class CommitteeAttestation {
|
|
8
|
+
address;
|
|
9
|
+
signature;
|
|
10
|
+
constructor(address, signature){
|
|
11
|
+
this.address = address;
|
|
12
|
+
this.signature = signature;
|
|
13
|
+
}
|
|
14
|
+
static get schema() {
|
|
15
|
+
return z.object({
|
|
16
|
+
address: EthAddress.schema,
|
|
17
|
+
signature: Signature.schema
|
|
18
|
+
}).transform(({ address, signature })=>new CommitteeAttestation(address, signature));
|
|
19
|
+
}
|
|
20
|
+
// Create an empty attestation for an address that has not signed
|
|
21
|
+
static fromAddress(address) {
|
|
22
|
+
return new CommitteeAttestation(address, Signature.empty());
|
|
23
|
+
}
|
|
24
|
+
// Create an attestation from an address and a signature
|
|
25
|
+
static fromAddressAndSignature(address, signature) {
|
|
26
|
+
return new CommitteeAttestation(address, signature);
|
|
27
|
+
}
|
|
28
|
+
static fromViem(viem) {
|
|
29
|
+
return new CommitteeAttestation(EthAddress.fromString(viem.addr), Signature.fromViemSignature(viem.signature));
|
|
30
|
+
}
|
|
31
|
+
static fromBuffer(buffer) {
|
|
32
|
+
const reader = BufferReader.asReader(buffer);
|
|
33
|
+
const address = reader.readObject(EthAddress);
|
|
34
|
+
const signature = reader.readObject(Signature);
|
|
35
|
+
return new CommitteeAttestation(address, signature);
|
|
36
|
+
}
|
|
37
|
+
static random() {
|
|
38
|
+
// note: will be invalid
|
|
39
|
+
return new CommitteeAttestation(EthAddress.random(), Signature.random());
|
|
40
|
+
}
|
|
41
|
+
static empty() {
|
|
42
|
+
return new CommitteeAttestation(EthAddress.ZERO, Signature.empty());
|
|
43
|
+
}
|
|
44
|
+
toBuffer() {
|
|
45
|
+
return serializeToBuffer([
|
|
46
|
+
this.address,
|
|
47
|
+
this.signature
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
50
|
+
equals(other) {
|
|
51
|
+
return this.address.equals(other.address) && this.signature.equals(other.signature);
|
|
52
|
+
}
|
|
53
|
+
toViem() {
|
|
54
|
+
return {
|
|
55
|
+
addr: this.address.toString(),
|
|
56
|
+
signature: this.signature.toViemSignature()
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/block/proposal/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './committee_attestation.js';
|
|
@@ -1,54 +1,13 @@
|
|
|
1
|
-
import { Signature } from '@aztec/foundation/eth-signature';
|
|
2
|
-
import { L2Block } from '@aztec/stdlib/block';
|
|
3
1
|
import { z } from 'zod';
|
|
4
2
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
5
|
-
|
|
3
|
+
import { L2Block } from './l2_block.js';
|
|
4
|
+
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
5
|
+
export declare class L1PublishedData {
|
|
6
6
|
blockNumber: bigint;
|
|
7
7
|
timestamp: bigint;
|
|
8
8
|
blockHash: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
block: L2Block;
|
|
12
|
-
l1: L1PublishedData;
|
|
13
|
-
signatures: Signature[];
|
|
14
|
-
};
|
|
15
|
-
export declare const PublishedL2BlockSchema: z.ZodObject<{
|
|
16
|
-
block: z.ZodEffects<z.ZodObject<{
|
|
17
|
-
archive: z.ZodEffects<z.ZodObject<{
|
|
18
|
-
root: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
19
|
-
nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
root: import("@aztec/foundation/schemas").Fr;
|
|
22
|
-
nextAvailableLeafIndex: number;
|
|
23
|
-
}, {
|
|
24
|
-
root: string;
|
|
25
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
26
|
-
}>, import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot, {
|
|
27
|
-
root: string;
|
|
28
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
29
|
-
}>;
|
|
30
|
-
header: import("@aztec/foundation/schemas").ZodFor<import("../tx/block_header.js").BlockHeader>;
|
|
31
|
-
body: import("@aztec/foundation/schemas").ZodFor<import("@aztec/stdlib/block").Body>;
|
|
32
|
-
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
archive: import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot;
|
|
34
|
-
header: import("../tx/block_header.js").BlockHeader;
|
|
35
|
-
body: import("@aztec/stdlib/block").Body;
|
|
36
|
-
}, {
|
|
37
|
-
archive: {
|
|
38
|
-
root: string;
|
|
39
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
40
|
-
};
|
|
41
|
-
header?: any;
|
|
42
|
-
body?: any;
|
|
43
|
-
}>, L2Block, {
|
|
44
|
-
archive: {
|
|
45
|
-
root: string;
|
|
46
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
47
|
-
};
|
|
48
|
-
header?: any;
|
|
49
|
-
body?: any;
|
|
50
|
-
}>;
|
|
51
|
-
l1: z.ZodObject<{
|
|
9
|
+
constructor(blockNumber: bigint, timestamp: bigint, blockHash: string);
|
|
10
|
+
static get schema(): z.ZodObject<{
|
|
52
11
|
blockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
53
12
|
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
54
13
|
blockHash: z.ZodString;
|
|
@@ -61,30 +20,101 @@ export declare const PublishedL2BlockSchema: z.ZodObject<{
|
|
|
61
20
|
timestamp: string | number | bigint;
|
|
62
21
|
blockHash: string;
|
|
63
22
|
}>;
|
|
64
|
-
|
|
65
|
-
|
|
23
|
+
}
|
|
24
|
+
export declare class PublishedL2Block {
|
|
66
25
|
block: L2Block;
|
|
67
|
-
l1:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
26
|
+
l1: L1PublishedData;
|
|
27
|
+
attestations: CommitteeAttestation[];
|
|
28
|
+
constructor(block: L2Block, l1: L1PublishedData, attestations: CommitteeAttestation[]);
|
|
29
|
+
static get schema(): z.ZodObject<{
|
|
30
|
+
block: z.ZodEffects<z.ZodObject<{
|
|
31
|
+
archive: z.ZodEffects<z.ZodObject<{
|
|
32
|
+
root: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
33
|
+
nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
root: import("@aztec/foundation/schemas").Fr;
|
|
36
|
+
nextAvailableLeafIndex: number;
|
|
37
|
+
}, {
|
|
38
|
+
root: string;
|
|
39
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
40
|
+
}>, import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot, {
|
|
41
|
+
root: string;
|
|
42
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
43
|
+
}>;
|
|
44
|
+
header: import("@aztec/foundation/schemas").ZodFor<import("../tx/block_header.js").BlockHeader>;
|
|
45
|
+
body: import("@aztec/foundation/schemas").ZodFor<import("./body.js").Body>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
archive: import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot;
|
|
48
|
+
header: import("../tx/block_header.js").BlockHeader;
|
|
49
|
+
body: import("./body.js").Body;
|
|
50
|
+
}, {
|
|
51
|
+
archive: {
|
|
52
|
+
root: string;
|
|
53
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
54
|
+
};
|
|
55
|
+
header?: any;
|
|
56
|
+
body?: any;
|
|
57
|
+
}>, L2Block, {
|
|
58
|
+
archive: {
|
|
59
|
+
root: string;
|
|
60
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
61
|
+
};
|
|
62
|
+
header?: any;
|
|
63
|
+
body?: any;
|
|
64
|
+
}>;
|
|
65
|
+
l1: z.ZodObject<{
|
|
66
|
+
blockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
67
|
+
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
68
|
+
blockHash: z.ZodString;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
blockNumber: bigint;
|
|
71
|
+
timestamp: bigint;
|
|
72
|
+
blockHash: string;
|
|
73
|
+
}, {
|
|
74
|
+
blockNumber: string | number | bigint;
|
|
75
|
+
timestamp: string | number | bigint;
|
|
76
|
+
blockHash: string;
|
|
77
|
+
}>;
|
|
78
|
+
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
79
|
+
address: z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>;
|
|
80
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./proposal/committee_attestation.js").Signature, string>;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
address: import("@aztec/foundation/schemas").EthAddress;
|
|
83
|
+
signature: import("./proposal/committee_attestation.js").Signature;
|
|
84
|
+
}, {
|
|
85
|
+
address: string;
|
|
86
|
+
signature: string;
|
|
87
|
+
}>, CommitteeAttestation, {
|
|
88
|
+
address: string;
|
|
89
|
+
signature: string;
|
|
90
|
+
}>, "many">;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
block: L2Block;
|
|
93
|
+
l1: {
|
|
94
|
+
blockNumber: bigint;
|
|
95
|
+
timestamp: bigint;
|
|
96
|
+
blockHash: string;
|
|
78
97
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
98
|
+
attestations: CommitteeAttestation[];
|
|
99
|
+
}, {
|
|
100
|
+
block: {
|
|
101
|
+
archive: {
|
|
102
|
+
root: string;
|
|
103
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
104
|
+
};
|
|
105
|
+
header?: any;
|
|
106
|
+
body?: any;
|
|
107
|
+
};
|
|
108
|
+
l1: {
|
|
109
|
+
blockNumber: string | number | bigint;
|
|
110
|
+
timestamp: string | number | bigint;
|
|
111
|
+
blockHash: string;
|
|
112
|
+
};
|
|
113
|
+
attestations: {
|
|
114
|
+
address: string;
|
|
115
|
+
signature: string;
|
|
116
|
+
}[];
|
|
117
|
+
}>;
|
|
118
|
+
}
|
|
89
119
|
export declare function getAttestationsFromPublishedL2Block(block: PublishedL2Block): BlockAttestation[];
|
|
90
120
|
//# sourceMappingURL=published_l2_block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"published_l2_block.d.ts","sourceRoot":"","sources":["../../src/block/published_l2_block.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"published_l2_block.d.ts","sourceRoot":"","sources":["../../src/block/published_l2_block.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,qBAAa,eAAe;IAEjB,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;gBAFjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;IAG1B,MAAM,KAAK,MAAM;;;;;;;;;;;;OAMhB;CACF;AAED,qBAAa,gBAAgB;IAElB,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,eAAe;IACnB,YAAY,EAAE,oBAAoB,EAAE;gBAFpC,KAAK,EAAE,OAAO,EACd,EAAE,EAAE,eAAe,EACnB,YAAY,EAAE,oBAAoB,EAAE;IAG7C,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAMhB;CACF;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,gBAAgB,sBAQ1E"}
|
|
@@ -1,19 +1,45 @@
|
|
|
1
|
-
import
|
|
1
|
+
// Ignoring import issue to fix portable inferred type issue in zod schema
|
|
2
2
|
import { schemas } from '@aztec/foundation/schemas';
|
|
3
|
-
import { L2Block } from '@aztec/stdlib/block';
|
|
4
3
|
import { z } from 'zod';
|
|
5
4
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
6
5
|
import { ConsensusPayload } from '../p2p/consensus_payload.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
import { L2Block } from './l2_block.js';
|
|
7
|
+
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
8
|
+
export class L1PublishedData {
|
|
9
|
+
blockNumber;
|
|
10
|
+
timestamp;
|
|
11
|
+
blockHash;
|
|
12
|
+
constructor(blockNumber, timestamp, blockHash){
|
|
13
|
+
this.blockNumber = blockNumber;
|
|
14
|
+
this.timestamp = timestamp;
|
|
15
|
+
this.blockHash = blockHash;
|
|
16
|
+
}
|
|
17
|
+
static get schema() {
|
|
18
|
+
return z.object({
|
|
19
|
+
blockNumber: schemas.BigInt,
|
|
20
|
+
timestamp: schemas.BigInt,
|
|
21
|
+
blockHash: z.string()
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export class PublishedL2Block {
|
|
26
|
+
block;
|
|
27
|
+
l1;
|
|
28
|
+
attestations;
|
|
29
|
+
constructor(block, l1, attestations){
|
|
30
|
+
this.block = block;
|
|
31
|
+
this.l1 = l1;
|
|
32
|
+
this.attestations = attestations;
|
|
33
|
+
}
|
|
34
|
+
static get schema() {
|
|
35
|
+
return z.object({
|
|
36
|
+
block: L2Block.schema,
|
|
37
|
+
l1: L1PublishedData.schema,
|
|
38
|
+
attestations: z.array(CommitteeAttestation.schema)
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
16
42
|
export function getAttestationsFromPublishedL2Block(block) {
|
|
17
43
|
const payload = ConsensusPayload.fromBlock(block.block);
|
|
18
|
-
return block.
|
|
44
|
+
return block.attestations.filter((attestation)=>!attestation.signature.isEmpty()).map((attestation)=>new BlockAttestation(block.block.header.globalVariables.blockNumber, payload, attestation.signature));
|
|
19
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { L2Block } from '../block/l2_block.js';
|
|
3
3
|
import { L2TipsSchema } from '../block/l2_block_source.js';
|
|
4
|
-
import {
|
|
4
|
+
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
5
5
|
import { ContractClassPublicSchema, ContractInstanceWithAddressSchema } from '../contract/index.js';
|
|
6
6
|
import { L1RollupConstantsSchema } from '../epoch-helpers/index.js';
|
|
7
7
|
import { LogFilterSchema } from '../logs/log_filter.js';
|
|
@@ -24,7 +24,7 @@ export const ArchiverApiSchema = {
|
|
|
24
24
|
z.literal('latest')
|
|
25
25
|
])).returns(BlockHeader.schema.optional()),
|
|
26
26
|
getBlocks: z.function().args(schemas.Integer, schemas.Integer, optional(z.boolean())).returns(z.array(L2Block.schema)),
|
|
27
|
-
getPublishedBlocks: z.function().args(schemas.Integer, schemas.Integer, optional(z.boolean())).returns(z.array(
|
|
27
|
+
getPublishedBlocks: z.function().args(schemas.Integer, schemas.Integer, optional(z.boolean())).returns(z.array(PublishedL2Block.schema)),
|
|
28
28
|
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
29
29
|
getSettledTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema.optional()),
|
|
30
30
|
getL2SlotNumber: z.function().args().returns(schemas.BigInt),
|
|
@@ -7,7 +7,7 @@ import { inBlockSchemaFor } from '../block/in_block.js';
|
|
|
7
7
|
import { L2Block } from '../block/l2_block.js';
|
|
8
8
|
import { L2BlockNumberSchema } from '../block/l2_block_number.js';
|
|
9
9
|
import { L2TipsSchema } from '../block/l2_block_source.js';
|
|
10
|
-
import {
|
|
10
|
+
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
11
11
|
import { ContractClassPublicSchema, ContractInstanceWithAddressSchema, NodeInfoSchema, ProtocolContractAddressesSchema } from '../contract/index.js';
|
|
12
12
|
import { GasFees } from '../gas/gas_fees.js';
|
|
13
13
|
import { LogFilterSchema } from '../logs/log_filter.js';
|
|
@@ -48,7 +48,7 @@ export const AztecNodeApiSchema = {
|
|
|
48
48
|
isReady: z.function().returns(z.boolean()),
|
|
49
49
|
getNodeInfo: z.function().returns(NodeInfoSchema),
|
|
50
50
|
getBlocks: z.function().args(z.number(), z.number()).returns(z.array(L2Block.schema)),
|
|
51
|
-
getPublishedBlocks: z.function().args(z.number(), z.number()).returns(z.array(
|
|
51
|
+
getPublishedBlocks: z.function().args(z.number(), z.number()).returns(z.array(PublishedL2Block.schema)),
|
|
52
52
|
getCurrentBaseFees: z.function().returns(GasFees.schema),
|
|
53
53
|
getNodeVersion: z.function().returns(z.string()),
|
|
54
54
|
getVersion: z.function().returns(z.number()),
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import type { ApiSchemaFor } from '../schemas/index.js';
|
|
3
|
+
export declare const ProverAgentStatusSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
4
|
+
status: z.ZodLiteral<"stopped">;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
status: "stopped";
|
|
7
|
+
}, {
|
|
8
|
+
status: "stopped";
|
|
9
|
+
}>, z.ZodObject<{
|
|
10
|
+
status: z.ZodLiteral<"running">;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
status: "running";
|
|
13
|
+
}, {
|
|
14
|
+
status: "running";
|
|
15
|
+
}>, z.ZodObject<{
|
|
16
|
+
status: z.ZodLiteral<"proving">;
|
|
17
|
+
jobId: z.ZodString;
|
|
18
|
+
proofType: z.ZodNumber;
|
|
19
|
+
startedAtISO: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
status: "proving";
|
|
22
|
+
jobId: string;
|
|
23
|
+
proofType: number;
|
|
24
|
+
startedAtISO: string;
|
|
25
|
+
}, {
|
|
26
|
+
status: "proving";
|
|
27
|
+
jobId: string;
|
|
28
|
+
proofType: number;
|
|
29
|
+
startedAtISO: string;
|
|
30
|
+
}>]>;
|
|
31
|
+
export type ProverAgentStatus = z.infer<typeof ProverAgentStatusSchema>;
|
|
2
32
|
export interface ProverAgentApi {
|
|
3
|
-
|
|
4
|
-
isRunning(): Promise<boolean>;
|
|
5
|
-
getCurrentJobs(): Promise<{
|
|
6
|
-
id: string;
|
|
7
|
-
type: string;
|
|
8
|
-
}[]>;
|
|
33
|
+
getStatus(): Promise<unknown>;
|
|
9
34
|
}
|
|
10
35
|
export declare const ProverAgentApiSchema: ApiSchemaFor<ProverAgentApi>;
|
|
11
36
|
//# sourceMappingURL=prover-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prover-agent.d.ts","sourceRoot":"","sources":["../../src/interfaces/prover-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prover-agent.d.ts","sourceRoot":"","sources":["../../src/interfaces/prover-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,WAAW,cAAc;IAC7B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,cAAc,CAE7D,CAAC"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export const ProverAgentStatusSchema = z.discriminatedUnion('status', [
|
|
3
|
+
z.object({
|
|
4
|
+
status: z.literal('stopped')
|
|
5
|
+
}),
|
|
6
|
+
z.object({
|
|
7
|
+
status: z.literal('running')
|
|
8
|
+
}),
|
|
9
|
+
z.object({
|
|
10
|
+
status: z.literal('proving'),
|
|
11
|
+
jobId: z.string(),
|
|
12
|
+
proofType: z.number(),
|
|
13
|
+
startedAtISO: z.string()
|
|
14
|
+
})
|
|
15
|
+
]);
|
|
2
16
|
export const ProverAgentApiSchema = {
|
|
3
|
-
|
|
4
|
-
isRunning: z.function().args().returns(z.boolean()),
|
|
5
|
-
getCurrentJobs: z.function().args().returns(z.array(z.object({
|
|
6
|
-
id: z.string(),
|
|
7
|
-
type: z.string()
|
|
8
|
-
})))
|
|
17
|
+
getStatus: z.function().args().returns(ProverAgentStatusSchema)
|
|
9
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_kernel_prover_output.d.ts","sourceRoot":"","sources":["../../src/kernel/private_kernel_prover_output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAC;AAE3G,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,UAAU,CAAC;IAEpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"private_kernel_prover_output.d.ts","sourceRoot":"","sources":["../../src/kernel/private_kernel_prover_output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAC;AAE3G,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,UAAU,CAAC;IAEpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAC;KAC/C,CAAC;CACH;AAED,kEAAkE;AAClE,MAAM,WAAW,iCAAiC,CAChD,gBAAgB,SAAS,gCAAgC,GAAG,oCAAoC;IAEhG,8DAA8D;IAC9D,YAAY,EAAE,gBAAgB,CAAC;IAC/B;kEAC8D;IAC9D,cAAc,EAAE,cAAc,CAAC;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,cAAc,EAAE,oBAAoB,EAAE,CAAC;IACvC,0BAA0B;IAC1B,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,oBAAoB,EAAE,2BAU3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/tests/mocks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAe,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/tests/mocks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAe,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIvE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAS7C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EACL,WAAW,EAIX,cAAc,EACd,EAAE,EACH,MAAM,gBAAgB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AC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,EAAE,CAAC;IACb,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;CACZ;AA2BD,eAAO,MAAM,iBAAiB,GAAI,UAAU,2BAA2B,KAAG,aAMzE,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,UAAU,2BAA2B,KAAG,gBAM5E,CAAC;AAEF,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,MAAM,EACrB,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;CAAO,GACzC,OAAO,CAAC,gBAAgB,CAAC,CAwB3B"}
|
package/dest/tests/mocks.js
CHANGED
|
@@ -4,6 +4,7 @@ import { times } from '@aztec/foundation/collection';
|
|
|
4
4
|
import { Secp256k1Signer, randomBytes } from '@aztec/foundation/crypto';
|
|
5
5
|
import { Fr } from '@aztec/foundation/fields';
|
|
6
6
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
7
|
+
import { CommitteeAttestation } from '../block/index.js';
|
|
7
8
|
import { L2Block } from '../block/l2_block.js';
|
|
8
9
|
import { computeContractAddressFromInstance } from '../contract/contract_address.js';
|
|
9
10
|
import { getContractClassFromArtifact } from '../contract/contract_class.js';
|
|
@@ -165,17 +166,17 @@ export async function randomPublishedL2Block(l2BlockNumber, opts = {}) {
|
|
|
165
166
|
blockHash: Buffer32.random().toString()
|
|
166
167
|
};
|
|
167
168
|
const signers = opts.signers ?? times(3, ()=>Secp256k1Signer.random());
|
|
168
|
-
const
|
|
169
|
+
const atts = await Promise.all(signers.map((signer)=>makeBlockAttestation({
|
|
169
170
|
signer,
|
|
170
171
|
header: block.header,
|
|
171
172
|
archive: block.archive.root,
|
|
172
173
|
stateReference: block.header.state,
|
|
173
174
|
txHashes: block.body.txEffects.map((tx)=>tx.txHash)
|
|
174
175
|
})));
|
|
175
|
-
const
|
|
176
|
+
const attestations = atts.map((attestation, i)=>new CommitteeAttestation(signers[i].address, attestation.signature));
|
|
176
177
|
return {
|
|
177
178
|
block,
|
|
178
179
|
l1,
|
|
179
|
-
|
|
180
|
+
attestations
|
|
180
181
|
};
|
|
181
182
|
}
|
|
@@ -167,9 +167,15 @@ export declare function collectNested<T>(executionStack: PrivateCallExecutionRes
|
|
|
167
167
|
export declare class PrivateExecutionProfileResult {
|
|
168
168
|
timings: {
|
|
169
169
|
witgen: number;
|
|
170
|
+
oracles?: Record<string, {
|
|
171
|
+
times: number[];
|
|
172
|
+
}>;
|
|
170
173
|
};
|
|
171
174
|
constructor(timings: {
|
|
172
175
|
witgen: number;
|
|
176
|
+
oracles?: Record<string, {
|
|
177
|
+
times: number[];
|
|
178
|
+
}>;
|
|
173
179
|
});
|
|
174
180
|
}
|
|
175
181
|
//# sourceMappingURL=private_execution_result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_execution_result.d.ts","sourceRoot":"","sources":["../../src/tx/private_execution_result.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,MAAM,EAA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
|
|
6
6
|
functionName: string;
|
|
7
7
|
time: number;
|
|
8
|
+
oracles?: Record<string, {
|
|
9
|
+
times: number[];
|
|
10
|
+
}>;
|
|
8
11
|
};
|
|
9
12
|
export type ProvingTimings = {
|
|
10
13
|
sync?: number;
|
|
@@ -19,12 +22,25 @@ export declare const ProvingTimingsSchema: z.ZodObject<{
|
|
|
19
22
|
perFunction: z.ZodArray<z.ZodObject<{
|
|
20
23
|
functionName: z.ZodString;
|
|
21
24
|
time: z.ZodNumber;
|
|
25
|
+
oracles: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
|
+
times: z.ZodArray<z.ZodNumber, "many">;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
times: number[];
|
|
29
|
+
}, {
|
|
30
|
+
times: number[];
|
|
31
|
+
}>>>;
|
|
22
32
|
}, "strip", z.ZodTypeAny, {
|
|
23
33
|
functionName: string;
|
|
24
34
|
time: number;
|
|
35
|
+
oracles?: Record<string, {
|
|
36
|
+
times: number[];
|
|
37
|
+
}> | undefined;
|
|
25
38
|
}, {
|
|
26
39
|
functionName: string;
|
|
27
40
|
time: number;
|
|
41
|
+
oracles?: Record<string, {
|
|
42
|
+
times: number[];
|
|
43
|
+
}> | undefined;
|
|
28
44
|
}>, "many">;
|
|
29
45
|
unaccounted: z.ZodNumber;
|
|
30
46
|
total: z.ZodNumber;
|
|
@@ -32,6 +48,9 @@ export declare const ProvingTimingsSchema: z.ZodObject<{
|
|
|
32
48
|
perFunction: {
|
|
33
49
|
functionName: string;
|
|
34
50
|
time: number;
|
|
51
|
+
oracles?: Record<string, {
|
|
52
|
+
times: number[];
|
|
53
|
+
}> | undefined;
|
|
35
54
|
}[];
|
|
36
55
|
unaccounted: number;
|
|
37
56
|
total: number;
|
|
@@ -41,6 +60,9 @@ export declare const ProvingTimingsSchema: z.ZodObject<{
|
|
|
41
60
|
perFunction: {
|
|
42
61
|
functionName: string;
|
|
43
62
|
time: number;
|
|
63
|
+
oracles?: Record<string, {
|
|
64
|
+
times: number[];
|
|
65
|
+
}> | undefined;
|
|
44
66
|
}[];
|
|
45
67
|
unaccounted: number;
|
|
46
68
|
total: number;
|
|
@@ -62,12 +84,25 @@ export declare const SimulationTimingsSchema: z.ZodObject<{
|
|
|
62
84
|
perFunction: z.ZodArray<z.ZodObject<{
|
|
63
85
|
functionName: z.ZodString;
|
|
64
86
|
time: z.ZodNumber;
|
|
87
|
+
oracles: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
88
|
+
times: z.ZodArray<z.ZodNumber, "many">;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
times: number[];
|
|
91
|
+
}, {
|
|
92
|
+
times: number[];
|
|
93
|
+
}>>>;
|
|
65
94
|
}, "strip", z.ZodTypeAny, {
|
|
66
95
|
functionName: string;
|
|
67
96
|
time: number;
|
|
97
|
+
oracles?: Record<string, {
|
|
98
|
+
times: number[];
|
|
99
|
+
}> | undefined;
|
|
68
100
|
}, {
|
|
69
101
|
functionName: string;
|
|
70
102
|
time: number;
|
|
103
|
+
oracles?: Record<string, {
|
|
104
|
+
times: number[];
|
|
105
|
+
}> | undefined;
|
|
71
106
|
}>, "many">;
|
|
72
107
|
unaccounted: z.ZodNumber;
|
|
73
108
|
total: z.ZodNumber;
|
|
@@ -76,6 +111,9 @@ export declare const SimulationTimingsSchema: z.ZodObject<{
|
|
|
76
111
|
perFunction: {
|
|
77
112
|
functionName: string;
|
|
78
113
|
time: number;
|
|
114
|
+
oracles?: Record<string, {
|
|
115
|
+
times: number[];
|
|
116
|
+
}> | undefined;
|
|
79
117
|
}[];
|
|
80
118
|
unaccounted: number;
|
|
81
119
|
total: number;
|
|
@@ -86,6 +124,9 @@ export declare const SimulationTimingsSchema: z.ZodObject<{
|
|
|
86
124
|
perFunction: {
|
|
87
125
|
functionName: string;
|
|
88
126
|
time: number;
|
|
127
|
+
oracles?: Record<string, {
|
|
128
|
+
times: number[];
|
|
129
|
+
}> | undefined;
|
|
89
130
|
}[];
|
|
90
131
|
unaccounted: number;
|
|
91
132
|
total: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiling.d.ts","sourceRoot":"","sources":["../../src/tx/profiling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,oBAAoB,EAA8B,MAAM,2CAA2C,CAAC;AAGlH,KAAK,cAAc,GAAG;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"profiling.d.ts","sourceRoot":"","sources":["../../src/tx/profiling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,oBAAoB,EAA8B,MAAM,2CAA2C,CAAC;AAGlH,KAAK,cAAc,GAAG;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CAC/C,CAAC;AAQF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM/B,CAAC;AAEH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOlC,CAAC;AAEH,qBAAa,eAAe;IAEjB,cAAc,EAAE,oBAAoB,EAAE;IACtC,OAAO,EAAE,cAAc;gBADvB,cAAc,EAAE,oBAAoB,EAAE,EACtC,OAAO,EAAE,cAAc;IAGhC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,eAAe,CAAC,CAO3C;IAED,MAAM,CAAC,MAAM,IAAI,eAAe;CA4BjC;AAED,qBAAa,uBAAuB;IAEzB,MAAM,EAAE,UAAU;IAClB,OAAO,CAAC,EAAE,iBAAiB;gBAD3B,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,iBAAiB,YAAA;IAGpC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,uBAAuB,CAAC,CAOnD;IAED,MAAM,CAAC,MAAM,IAAI,uBAAuB;CAezC"}
|
package/dest/tx/profiling.js
CHANGED
|
@@ -5,7 +5,10 @@ import { PrivateExecutionStepSchema } from '../kernel/private_kernel_prover_outp
|
|
|
5
5
|
import { AbiDecodedSchema } from '../schemas/schemas.js';
|
|
6
6
|
const FunctionTimingSchema = z.object({
|
|
7
7
|
functionName: z.string(),
|
|
8
|
-
time: z.number()
|
|
8
|
+
time: z.number(),
|
|
9
|
+
oracles: optional(z.record(z.string(), z.object({
|
|
10
|
+
times: z.array(z.number())
|
|
11
|
+
})))
|
|
9
12
|
});
|
|
10
13
|
export const ProvingTimingsSchema = z.object({
|
|
11
14
|
sync: optional(z.number()),
|
package/dest/tx/proven_tx.d.ts
CHANGED
|
@@ -22,12 +22,25 @@ export declare class TxProvingResult {
|
|
|
22
22
|
perFunction: z.ZodArray<z.ZodObject<{
|
|
23
23
|
functionName: z.ZodString;
|
|
24
24
|
time: z.ZodNumber;
|
|
25
|
+
oracles: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
|
+
times: z.ZodArray<z.ZodNumber, "many">;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
times: number[];
|
|
29
|
+
}, {
|
|
30
|
+
times: number[];
|
|
31
|
+
}>>>;
|
|
25
32
|
}, "strip", z.ZodTypeAny, {
|
|
26
33
|
functionName: string;
|
|
27
34
|
time: number;
|
|
35
|
+
oracles?: Record<string, {
|
|
36
|
+
times: number[];
|
|
37
|
+
}> | undefined;
|
|
28
38
|
}, {
|
|
29
39
|
functionName: string;
|
|
30
40
|
time: number;
|
|
41
|
+
oracles?: Record<string, {
|
|
42
|
+
times: number[];
|
|
43
|
+
}> | undefined;
|
|
31
44
|
}>, "many">;
|
|
32
45
|
unaccounted: z.ZodNumber;
|
|
33
46
|
total: z.ZodNumber;
|
|
@@ -35,6 +48,9 @@ export declare class TxProvingResult {
|
|
|
35
48
|
perFunction: {
|
|
36
49
|
functionName: string;
|
|
37
50
|
time: number;
|
|
51
|
+
oracles?: Record<string, {
|
|
52
|
+
times: number[];
|
|
53
|
+
}> | undefined;
|
|
38
54
|
}[];
|
|
39
55
|
unaccounted: number;
|
|
40
56
|
total: number;
|
|
@@ -44,6 +60,9 @@ export declare class TxProvingResult {
|
|
|
44
60
|
perFunction: {
|
|
45
61
|
functionName: string;
|
|
46
62
|
time: number;
|
|
63
|
+
oracles?: Record<string, {
|
|
64
|
+
times: number[];
|
|
65
|
+
}> | undefined;
|
|
47
66
|
}[];
|
|
48
67
|
unaccounted: number;
|
|
49
68
|
total: number;
|
|
@@ -58,6 +77,9 @@ export declare class TxProvingResult {
|
|
|
58
77
|
perFunction: {
|
|
59
78
|
functionName: string;
|
|
60
79
|
time: number;
|
|
80
|
+
oracles?: Record<string, {
|
|
81
|
+
times: number[];
|
|
82
|
+
}> | undefined;
|
|
61
83
|
}[];
|
|
62
84
|
unaccounted: number;
|
|
63
85
|
total: number;
|
|
@@ -71,6 +93,9 @@ export declare class TxProvingResult {
|
|
|
71
93
|
perFunction: {
|
|
72
94
|
functionName: string;
|
|
73
95
|
time: number;
|
|
96
|
+
oracles?: Record<string, {
|
|
97
|
+
times: number[];
|
|
98
|
+
}> | undefined;
|
|
74
99
|
}[];
|
|
75
100
|
unaccounted: number;
|
|
76
101
|
total: number;
|
|
@@ -85,6 +110,9 @@ export declare class TxProvingResult {
|
|
|
85
110
|
perFunction: {
|
|
86
111
|
functionName: string;
|
|
87
112
|
time: number;
|
|
113
|
+
oracles?: Record<string, {
|
|
114
|
+
times: number[];
|
|
115
|
+
}> | undefined;
|
|
88
116
|
}[];
|
|
89
117
|
unaccounted: number;
|
|
90
118
|
total: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proven_tx.d.ts","sourceRoot":"","sources":["../../src/tx/proven_tx.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAkC,MAAM,+BAA+B,CAAC;AACvG,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,qBAAa,eAAe;IAEj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e,CAAC;WAIhC,MAAM;CAOpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.3-nightly.20250528",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/bb.js": "0.87.
|
|
71
|
-
"@aztec/blob-lib": "0.87.
|
|
72
|
-
"@aztec/constants": "0.87.
|
|
73
|
-
"@aztec/ethereum": "0.87.
|
|
74
|
-
"@aztec/foundation": "0.87.
|
|
75
|
-
"@aztec/noir-noirc_abi": "0.87.
|
|
70
|
+
"@aztec/bb.js": "0.87.3-nightly.20250528",
|
|
71
|
+
"@aztec/blob-lib": "0.87.3-nightly.20250528",
|
|
72
|
+
"@aztec/constants": "0.87.3-nightly.20250528",
|
|
73
|
+
"@aztec/ethereum": "0.87.3-nightly.20250528",
|
|
74
|
+
"@aztec/foundation": "0.87.3-nightly.20250528",
|
|
75
|
+
"@aztec/noir-noirc_abi": "0.87.3-nightly.20250528",
|
|
76
76
|
"@google-cloud/storage": "^7.15.0",
|
|
77
77
|
"axios": "^1.9.0",
|
|
78
78
|
"json-stringify-deterministic": "1.0.12",
|
package/src/block/index.ts
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ViemCommitteeAttestation } from '@aztec/ethereum';
|
|
2
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
4
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
|
+
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
|
|
8
|
+
export { Signature };
|
|
9
|
+
export { EthAddress };
|
|
10
|
+
|
|
11
|
+
export class CommitteeAttestation {
|
|
12
|
+
constructor(
|
|
13
|
+
public readonly address: EthAddress,
|
|
14
|
+
public readonly signature: Signature,
|
|
15
|
+
) {}
|
|
16
|
+
|
|
17
|
+
static get schema() {
|
|
18
|
+
return z
|
|
19
|
+
.object({
|
|
20
|
+
address: EthAddress.schema,
|
|
21
|
+
signature: Signature.schema,
|
|
22
|
+
})
|
|
23
|
+
.transform(({ address, signature }) => new CommitteeAttestation(address, signature));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Create an empty attestation for an address that has not signed
|
|
27
|
+
static fromAddress(address: EthAddress): CommitteeAttestation {
|
|
28
|
+
return new CommitteeAttestation(address, Signature.empty());
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Create an attestation from an address and a signature
|
|
32
|
+
static fromAddressAndSignature(address: EthAddress, signature: Signature): CommitteeAttestation {
|
|
33
|
+
return new CommitteeAttestation(address, signature);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static fromViem(viem: ViemCommitteeAttestation): CommitteeAttestation {
|
|
37
|
+
return new CommitteeAttestation(EthAddress.fromString(viem.addr), Signature.fromViemSignature(viem.signature));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static fromBuffer(buffer: Buffer): CommitteeAttestation {
|
|
41
|
+
const reader = BufferReader.asReader(buffer);
|
|
42
|
+
const address = reader.readObject(EthAddress);
|
|
43
|
+
const signature = reader.readObject(Signature);
|
|
44
|
+
return new CommitteeAttestation(address, signature);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static random(): CommitteeAttestation {
|
|
48
|
+
// note: will be invalid
|
|
49
|
+
return new CommitteeAttestation(EthAddress.random(), Signature.random());
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static empty(): CommitteeAttestation {
|
|
53
|
+
return new CommitteeAttestation(EthAddress.ZERO, Signature.empty());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
toBuffer(): Buffer {
|
|
57
|
+
return serializeToBuffer([this.address, this.signature]);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
equals(other: CommitteeAttestation): boolean {
|
|
61
|
+
return this.address.equals(other.address) && this.signature.equals(other.signature);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
toViem(): ViemCommitteeAttestation {
|
|
65
|
+
return {
|
|
66
|
+
addr: this.address.toString(),
|
|
67
|
+
signature: this.signature.toViemSignature(),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './committee_attestation.js';
|
|
@@ -1,37 +1,51 @@
|
|
|
1
|
-
import
|
|
1
|
+
// Ignoring import issue to fix portable inferred type issue in zod schema
|
|
2
2
|
import { schemas } from '@aztec/foundation/schemas';
|
|
3
|
-
import { L2Block } from '@aztec/stdlib/block';
|
|
4
3
|
|
|
5
4
|
import { z } from 'zod';
|
|
6
5
|
|
|
7
6
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
8
7
|
import { ConsensusPayload } from '../p2p/consensus_payload.js';
|
|
8
|
+
import { L2Block } from './l2_block.js';
|
|
9
|
+
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
9
10
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
export class L1PublishedData {
|
|
12
|
+
constructor(
|
|
13
|
+
public blockNumber: bigint,
|
|
14
|
+
public timestamp: bigint,
|
|
15
|
+
public blockHash: string,
|
|
16
|
+
) {}
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
static get schema() {
|
|
19
|
+
return z.object({
|
|
20
|
+
blockNumber: schemas.BigInt,
|
|
21
|
+
timestamp: schemas.BigInt,
|
|
22
|
+
blockHash: z.string(),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class PublishedL2Block {
|
|
28
|
+
constructor(
|
|
29
|
+
public block: L2Block,
|
|
30
|
+
public l1: L1PublishedData,
|
|
31
|
+
public attestations: CommitteeAttestation[],
|
|
32
|
+
) {}
|
|
21
33
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
});
|
|
34
|
+
static get schema() {
|
|
35
|
+
return z.object({
|
|
36
|
+
block: L2Block.schema,
|
|
37
|
+
l1: L1PublishedData.schema,
|
|
38
|
+
attestations: z.array(CommitteeAttestation.schema),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
31
42
|
|
|
32
43
|
export function getAttestationsFromPublishedL2Block(block: PublishedL2Block) {
|
|
33
44
|
const payload = ConsensusPayload.fromBlock(block.block);
|
|
34
|
-
return block.
|
|
35
|
-
.filter(
|
|
36
|
-
.map(
|
|
45
|
+
return block.attestations
|
|
46
|
+
.filter(attestation => !attestation.signature.isEmpty())
|
|
47
|
+
.map(
|
|
48
|
+
attestation =>
|
|
49
|
+
new BlockAttestation(block.block.header.globalVariables.blockNumber, payload, attestation.signature),
|
|
50
|
+
);
|
|
37
51
|
}
|
|
@@ -17,7 +17,7 @@ export function testL2TipsStore(makeTipsStore: () => Promise<L2TipsStore>) {
|
|
|
17
17
|
const makeBlock = (number: number): PublishedL2Block => ({
|
|
18
18
|
block: { number, header: { hash: () => Promise.resolve(new Fr(number)) } as BlockHeader } as L2Block,
|
|
19
19
|
l1: { blockNumber: BigInt(number), blockHash: `0x${number}`, timestamp: BigInt(number) },
|
|
20
|
-
|
|
20
|
+
attestations: [],
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
const makeBlockId = (number: number): L2BlockId => ({
|
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
|
|
5
5
|
import { L2Block } from '../block/l2_block.js';
|
|
6
6
|
import { type L2BlockSource, L2TipsSchema } from '../block/l2_block_source.js';
|
|
7
|
-
import {
|
|
7
|
+
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
8
8
|
import {
|
|
9
9
|
ContractClassPublicSchema,
|
|
10
10
|
type ContractDataSource,
|
|
@@ -45,7 +45,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
45
45
|
getPublishedBlocks: z
|
|
46
46
|
.function()
|
|
47
47
|
.args(schemas.Integer, schemas.Integer, optional(z.boolean()))
|
|
48
|
-
.returns(z.array(
|
|
48
|
+
.returns(z.array(PublishedL2Block.schema)),
|
|
49
49
|
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
50
50
|
getSettledTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema.optional()),
|
|
51
51
|
getL2SlotNumber: z.function().args().returns(schemas.BigInt),
|
|
@@ -17,7 +17,7 @@ import { type InBlock, inBlockSchemaFor } from '../block/in_block.js';
|
|
|
17
17
|
import { L2Block } from '../block/l2_block.js';
|
|
18
18
|
import { type L2BlockNumber, L2BlockNumberSchema } from '../block/l2_block_number.js';
|
|
19
19
|
import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
|
|
20
|
-
import {
|
|
20
|
+
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
21
21
|
import {
|
|
22
22
|
type ContractClassPublic,
|
|
23
23
|
ContractClassPublicSchema,
|
|
@@ -484,7 +484,7 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
484
484
|
|
|
485
485
|
getBlocks: z.function().args(z.number(), z.number()).returns(z.array(L2Block.schema)),
|
|
486
486
|
|
|
487
|
-
getPublishedBlocks: z.function().args(z.number(), z.number()).returns(z.array(
|
|
487
|
+
getPublishedBlocks: z.function().args(z.number(), z.number()).returns(z.array(PublishedL2Block.schema)),
|
|
488
488
|
|
|
489
489
|
getCurrentBaseFees: z.function().returns(GasFees.schema),
|
|
490
490
|
|
|
@@ -2,19 +2,18 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
import type { ApiSchemaFor } from '../schemas/index.js';
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
|
|
5
|
+
export const ProverAgentStatusSchema = z.discriminatedUnion('status', [
|
|
6
|
+
z.object({ status: z.literal('stopped') }),
|
|
7
|
+
z.object({ status: z.literal('running') }),
|
|
8
|
+
z.object({ status: z.literal('proving'), jobId: z.string(), proofType: z.number(), startedAtISO: z.string() }),
|
|
9
|
+
]);
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
export type ProverAgentStatus = z.infer<typeof ProverAgentStatusSchema>;
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
export interface ProverAgentApi {
|
|
14
|
+
getStatus(): Promise<unknown>;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
export const ProverAgentApiSchema: ApiSchemaFor<ProverAgentApi> = {
|
|
14
|
-
|
|
15
|
-
isRunning: z.function().args().returns(z.boolean()),
|
|
16
|
-
getCurrentJobs: z
|
|
17
|
-
.function()
|
|
18
|
-
.args()
|
|
19
|
-
.returns(z.array(z.object({ id: z.string(), type: z.string() }))),
|
|
18
|
+
getStatus: z.function().args().returns(ProverAgentStatusSchema),
|
|
20
19
|
};
|
package/src/tests/mocks.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
6
6
|
|
|
7
7
|
import type { ContractArtifact } from '../abi/abi.js';
|
|
8
8
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
9
|
+
import { CommitteeAttestation } from '../block/index.js';
|
|
9
10
|
import { L2Block } from '../block/l2_block.js';
|
|
10
11
|
import type { PublishedL2Block } from '../block/published_l2_block.js';
|
|
11
12
|
import { computeContractAddressFromInstance } from '../contract/contract_address.js';
|
|
@@ -299,7 +300,7 @@ export async function randomPublishedL2Block(
|
|
|
299
300
|
};
|
|
300
301
|
|
|
301
302
|
const signers = opts.signers ?? times(3, () => Secp256k1Signer.random());
|
|
302
|
-
const
|
|
303
|
+
const atts = await Promise.all(
|
|
303
304
|
signers.map(signer =>
|
|
304
305
|
makeBlockAttestation({
|
|
305
306
|
signer,
|
|
@@ -310,6 +311,8 @@ export async function randomPublishedL2Block(
|
|
|
310
311
|
}),
|
|
311
312
|
),
|
|
312
313
|
);
|
|
313
|
-
const
|
|
314
|
-
|
|
314
|
+
const attestations = atts.map(
|
|
315
|
+
(attestation, i) => new CommitteeAttestation(signers[i].address, attestation.signature),
|
|
316
|
+
);
|
|
317
|
+
return { block, l1, attestations };
|
|
315
318
|
}
|
package/src/tx/profiling.ts
CHANGED
|
@@ -10,9 +10,14 @@ import { AbiDecodedSchema } from '../schemas/schemas.js';
|
|
|
10
10
|
type FunctionTiming = {
|
|
11
11
|
functionName: string;
|
|
12
12
|
time: number;
|
|
13
|
+
oracles?: Record<string, { times: number[] }>;
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
const FunctionTimingSchema = z.object({
|
|
16
|
+
const FunctionTimingSchema = z.object({
|
|
17
|
+
functionName: z.string(),
|
|
18
|
+
time: z.number(),
|
|
19
|
+
oracles: optional(z.record(z.string(), z.object({ times: z.array(z.number()) }))),
|
|
20
|
+
});
|
|
16
21
|
|
|
17
22
|
export type ProvingTimings = {
|
|
18
23
|
sync?: number;
|