@aztec/stdlib 3.0.0-nightly.20250910 → 3.0.0-nightly.20250911
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 +2 -0
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +2 -0
- package/dest/block/l2_block.d.ts +2 -8
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +5 -3
- package/dest/block/l2_block_info.d.ts +41 -0
- package/dest/block/l2_block_info.d.ts.map +1 -0
- package/dest/block/l2_block_info.js +40 -0
- package/dest/block/l2_block_source.d.ts +1 -428
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +0 -28
- package/dest/block/published_l2_block.d.ts +25 -1
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +20 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +2 -1
- package/dest/block/validate_block_result.d.ts +222 -0
- package/dest/block/validate_block_result.d.ts.map +1 -0
- package/dest/block/validate_block_result.js +83 -0
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +2 -1
- package/dest/p2p/block_attestation.d.ts +1 -0
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_attestation.js +3 -0
- package/dest/p2p/block_proposal.d.ts +2 -2
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +3 -1
- package/dest/p2p/consensus_payload.d.ts +1 -0
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +6 -4
- package/dest/tests/mocks.d.ts +1 -1
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +5 -8
- package/dest/tx/content_commitment.d.ts +1 -0
- package/dest/tx/content_commitment.d.ts.map +1 -1
- package/dest/tx/content_commitment.js +3 -0
- package/dest/tx/partial_state_reference.d.ts +1 -0
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +3 -0
- package/dest/tx/proposed_block_header.d.ts +1 -0
- package/dest/tx/proposed_block_header.d.ts.map +1 -1
- package/dest/tx/proposed_block_header.js +3 -0
- package/dest/tx/state_reference.d.ts +1 -0
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +3 -0
- package/dest/update-checker/update-checker.d.ts +1 -1
- 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/block/index.ts +2 -0
- package/src/block/l2_block.ts +6 -11
- package/src/block/l2_block_info.ts +63 -0
- package/src/block/l2_block_source.ts +1 -51
- package/src/block/published_l2_block.ts +38 -5
- package/src/block/test/l2_tips_store_test_suite.ts +7 -6
- package/src/block/validate_block_result.ts +122 -0
- package/src/interfaces/archiver.ts +2 -1
- package/src/p2p/block_attestation.ts +4 -0
- package/src/p2p/block_proposal.ts +5 -3
- package/src/p2p/consensus_payload.ts +7 -4
- package/src/tests/mocks.ts +5 -5
- package/src/tx/content_commitment.ts +4 -0
- package/src/tx/partial_state_reference.ts +8 -0
- package/src/tx/proposed_block_header.ts +13 -0
- package/src/tx/state_reference.ts +4 -0
- package/src/update-checker/update-checker.ts +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BufferReader } from '@aztec/foundation/serialize';
|
|
2
|
+
import type { FieldsOf } from '@aztec/foundation/types';
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
3
5
|
import { L2Block } from './l2_block.js';
|
|
@@ -21,13 +23,14 @@ export declare class L1PublishedData {
|
|
|
21
23
|
blockHash: string;
|
|
22
24
|
}>;
|
|
23
25
|
static random(): L1PublishedData;
|
|
26
|
+
static fromFields(fields: FieldsOf<L1PublishedData>): L1PublishedData;
|
|
24
27
|
}
|
|
25
28
|
export declare class PublishedL2Block {
|
|
26
29
|
block: L2Block;
|
|
27
30
|
l1: L1PublishedData;
|
|
28
31
|
attestations: CommitteeAttestation[];
|
|
29
32
|
constructor(block: L2Block, l1: L1PublishedData, attestations: CommitteeAttestation[]);
|
|
30
|
-
static get schema(): z.ZodObject<{
|
|
33
|
+
static get schema(): z.ZodEffects<z.ZodObject<{
|
|
31
34
|
block: z.ZodEffects<z.ZodObject<{
|
|
32
35
|
archive: z.ZodEffects<z.ZodObject<{
|
|
33
36
|
root: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
@@ -115,7 +118,28 @@ export declare class PublishedL2Block {
|
|
|
115
118
|
address: string;
|
|
116
119
|
signature: string;
|
|
117
120
|
}[];
|
|
121
|
+
}>, PublishedL2Block, {
|
|
122
|
+
block: {
|
|
123
|
+
archive: {
|
|
124
|
+
root: string;
|
|
125
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
126
|
+
};
|
|
127
|
+
header?: any;
|
|
128
|
+
body?: any;
|
|
129
|
+
};
|
|
130
|
+
l1: {
|
|
131
|
+
blockNumber: string | number | bigint;
|
|
132
|
+
timestamp: string | number | bigint;
|
|
133
|
+
blockHash: string;
|
|
134
|
+
};
|
|
135
|
+
attestations: {
|
|
136
|
+
address: string;
|
|
137
|
+
signature: string;
|
|
138
|
+
}[];
|
|
118
139
|
}>;
|
|
140
|
+
static fromBuffer(bufferOrReader: Buffer | BufferReader): PublishedL2Block;
|
|
141
|
+
static fromFields(fields: FieldsOf<PublishedL2Block>): PublishedL2Block;
|
|
142
|
+
toBuffer(): Buffer;
|
|
119
143
|
}
|
|
120
144
|
export declare function getAttestationsFromPublishedL2Block(block: Pick<PublishedL2Block, 'attestations' | 'block'>): BlockAttestation[];
|
|
121
145
|
//# 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":[],"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CAU1B;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,GAAG,OAAO,CAAC,GACtD,gBAAgB,EAAE,CAKpB"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
3
|
import { randomBigInt } from '@aztec/foundation/crypto';
|
|
4
4
|
import { schemas } from '@aztec/foundation/schemas';
|
|
5
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
6
|
import { z } from 'zod';
|
|
6
7
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
7
8
|
import { ConsensusPayload } from '../p2p/consensus_payload.js';
|
|
@@ -26,6 +27,9 @@ export class L1PublishedData {
|
|
|
26
27
|
static random() {
|
|
27
28
|
return new L1PublishedData(randomBigInt(1000n) + 1n, BigInt(Math.floor(Date.now() / 1000)), Buffer32.random().toString());
|
|
28
29
|
}
|
|
30
|
+
static fromFields(fields) {
|
|
31
|
+
return new L1PublishedData(fields.blockNumber, fields.timestamp, fields.blockHash);
|
|
32
|
+
}
|
|
29
33
|
}
|
|
30
34
|
export class PublishedL2Block {
|
|
31
35
|
block;
|
|
@@ -41,7 +45,22 @@ export class PublishedL2Block {
|
|
|
41
45
|
block: L2Block.schema,
|
|
42
46
|
l1: L1PublishedData.schema,
|
|
43
47
|
attestations: z.array(CommitteeAttestation.schema)
|
|
44
|
-
});
|
|
48
|
+
}).transform((obj)=>PublishedL2Block.fromFields(obj));
|
|
49
|
+
}
|
|
50
|
+
static fromBuffer(bufferOrReader) {
|
|
51
|
+
const reader = BufferReader.asReader(bufferOrReader);
|
|
52
|
+
const block = reader.readObject(L2Block);
|
|
53
|
+
const l1BlockNumber = reader.readBigInt();
|
|
54
|
+
const l1BlockHash = reader.readString();
|
|
55
|
+
const l1Timestamp = reader.readBigInt();
|
|
56
|
+
const attestations = reader.readVector(CommitteeAttestation);
|
|
57
|
+
return new PublishedL2Block(block, new L1PublishedData(l1BlockNumber, l1Timestamp, l1BlockHash), attestations);
|
|
58
|
+
}
|
|
59
|
+
static fromFields(fields) {
|
|
60
|
+
return new PublishedL2Block(fields.block, fields.l1, fields.attestations);
|
|
61
|
+
}
|
|
62
|
+
toBuffer() {
|
|
63
|
+
return serializeToBuffer(this.block, this.l1.blockNumber, this.l1.blockHash, this.l1.timestamp, this.attestations.length, this.attestations);
|
|
45
64
|
}
|
|
46
65
|
}
|
|
47
66
|
export function getAttestationsFromPublishedL2Block(block) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l2_tips_store_test_suite.d.ts","sourceRoot":"","sources":["../../../src/block/test/l2_tips_store_test_suite.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"l2_tips_store_test_suite.d.ts","sourceRoot":"","sources":["../../../src/block/test/l2_tips_store_test_suite.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,QA8ExE"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { times } from '@aztec/foundation/collection';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import { PublishedL2Block } from '@aztec/stdlib/block';
|
|
3
4
|
import { jestExpect as expect } from '@jest/expect';
|
|
4
5
|
export function testL2TipsStore(makeTipsStore) {
|
|
5
6
|
let tipsStore;
|
|
6
7
|
beforeEach(async ()=>{
|
|
7
8
|
tipsStore = await makeTipsStore();
|
|
8
9
|
});
|
|
9
|
-
const makeBlock = (number)=>({
|
|
10
|
+
const makeBlock = (number)=>PublishedL2Block.fromFields({
|
|
10
11
|
block: {
|
|
11
12
|
number,
|
|
12
13
|
header: {
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { type L2BlockInfo } from './l2_block_info.js';
|
|
5
|
+
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
6
|
+
/** Subtype for invalid block validation results */
|
|
7
|
+
export type ValidateBlockNegativeResult = {
|
|
8
|
+
valid: false;
|
|
9
|
+
/** Identifiers from the invalid block */
|
|
10
|
+
block: L2BlockInfo;
|
|
11
|
+
/** Committee members at the epoch this block was proposed */
|
|
12
|
+
committee: EthAddress[];
|
|
13
|
+
/** Epoch in which this block was proposed */
|
|
14
|
+
epoch: bigint;
|
|
15
|
+
/** Proposer selection seed for the epoch */
|
|
16
|
+
seed: bigint;
|
|
17
|
+
/** List of committee members who signed this block proposal */
|
|
18
|
+
attestors: EthAddress[];
|
|
19
|
+
/** Committee attestations for this block as they were posted to L1 */
|
|
20
|
+
attestations: CommitteeAttestation[];
|
|
21
|
+
/** Reason for the block being invalid: not enough attestations were posted */
|
|
22
|
+
reason: 'insufficient-attestations';
|
|
23
|
+
} | {
|
|
24
|
+
valid: false;
|
|
25
|
+
/** Identifiers from the invalid block */
|
|
26
|
+
block: L2BlockInfo;
|
|
27
|
+
/** Committee members at the epoch this block was proposed */
|
|
28
|
+
committee: EthAddress[];
|
|
29
|
+
/** Epoch in which this block was proposed */
|
|
30
|
+
epoch: bigint;
|
|
31
|
+
/** Proposer selection seed for the epoch */
|
|
32
|
+
seed: bigint;
|
|
33
|
+
/** List of committee members who signed this block proposal */
|
|
34
|
+
attestors: EthAddress[];
|
|
35
|
+
/** Committee attestations for this block as they were posted to L1 */
|
|
36
|
+
attestations: CommitteeAttestation[];
|
|
37
|
+
/** Reason for the block being invalid: an invalid attestation was posted */
|
|
38
|
+
reason: 'invalid-attestation';
|
|
39
|
+
/** Index in the attestations array of the invalid attestation posted */
|
|
40
|
+
invalidIndex: number;
|
|
41
|
+
};
|
|
42
|
+
/** Result type for validating a block attestations */
|
|
43
|
+
export type ValidateBlockResult = {
|
|
44
|
+
valid: true;
|
|
45
|
+
} | ValidateBlockNegativeResult;
|
|
46
|
+
export declare const ValidateBlockResultSchema: z.ZodUnion<[z.ZodObject<{
|
|
47
|
+
valid: z.ZodLiteral<true>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
valid: true;
|
|
50
|
+
}, {
|
|
51
|
+
valid: true;
|
|
52
|
+
}>, z.ZodObject<{
|
|
53
|
+
valid: z.ZodLiteral<false>;
|
|
54
|
+
block: z.ZodObject<{
|
|
55
|
+
blockHash: z.ZodOptional<z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>>;
|
|
56
|
+
archive: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
57
|
+
lastArchive: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
58
|
+
blockNumber: z.ZodNumber;
|
|
59
|
+
slotNumber: z.ZodNumber;
|
|
60
|
+
txCount: z.ZodNumber;
|
|
61
|
+
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
blockNumber: number;
|
|
64
|
+
slotNumber: number;
|
|
65
|
+
timestamp: bigint;
|
|
66
|
+
lastArchive: import("@aztec/foundation/schemas").Fr;
|
|
67
|
+
archive: import("@aztec/foundation/schemas").Fr;
|
|
68
|
+
txCount: number;
|
|
69
|
+
blockHash?: import("@aztec/foundation/schemas").Fr | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
blockNumber: number;
|
|
72
|
+
slotNumber: number;
|
|
73
|
+
timestamp: string | number | bigint;
|
|
74
|
+
lastArchive: string;
|
|
75
|
+
archive: string;
|
|
76
|
+
txCount: number;
|
|
77
|
+
blockHash?: string | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
committee: z.ZodArray<z.ZodType<EthAddress, any, string>, "many">;
|
|
80
|
+
epoch: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
81
|
+
seed: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
82
|
+
attestors: z.ZodArray<z.ZodType<EthAddress, any, string>, "many">;
|
|
83
|
+
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
84
|
+
address: z.ZodType<EthAddress, any, string>;
|
|
85
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./proposal/committee_attestation.js").Signature, string>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
address: EthAddress;
|
|
88
|
+
signature: import("./proposal/committee_attestation.js").Signature;
|
|
89
|
+
}, {
|
|
90
|
+
address: string;
|
|
91
|
+
signature: string;
|
|
92
|
+
}>, CommitteeAttestation, {
|
|
93
|
+
address: string;
|
|
94
|
+
signature: string;
|
|
95
|
+
}>, "many">;
|
|
96
|
+
reason: z.ZodLiteral<"insufficient-attestations">;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
valid: false;
|
|
99
|
+
block: {
|
|
100
|
+
blockNumber: number;
|
|
101
|
+
slotNumber: number;
|
|
102
|
+
timestamp: bigint;
|
|
103
|
+
lastArchive: import("@aztec/foundation/schemas").Fr;
|
|
104
|
+
archive: import("@aztec/foundation/schemas").Fr;
|
|
105
|
+
txCount: number;
|
|
106
|
+
blockHash?: import("@aztec/foundation/schemas").Fr | undefined;
|
|
107
|
+
};
|
|
108
|
+
attestations: CommitteeAttestation[];
|
|
109
|
+
committee: EthAddress[];
|
|
110
|
+
epoch: bigint;
|
|
111
|
+
seed: bigint;
|
|
112
|
+
attestors: EthAddress[];
|
|
113
|
+
reason: "insufficient-attestations";
|
|
114
|
+
}, {
|
|
115
|
+
valid: false;
|
|
116
|
+
block: {
|
|
117
|
+
blockNumber: number;
|
|
118
|
+
slotNumber: number;
|
|
119
|
+
timestamp: string | number | bigint;
|
|
120
|
+
lastArchive: string;
|
|
121
|
+
archive: string;
|
|
122
|
+
txCount: number;
|
|
123
|
+
blockHash?: string | undefined;
|
|
124
|
+
};
|
|
125
|
+
attestations: {
|
|
126
|
+
address: string;
|
|
127
|
+
signature: string;
|
|
128
|
+
}[];
|
|
129
|
+
committee: string[];
|
|
130
|
+
epoch: string | number | bigint;
|
|
131
|
+
seed: string | number | bigint;
|
|
132
|
+
attestors: string[];
|
|
133
|
+
reason: "insufficient-attestations";
|
|
134
|
+
}>, z.ZodObject<{
|
|
135
|
+
valid: z.ZodLiteral<false>;
|
|
136
|
+
block: z.ZodObject<{
|
|
137
|
+
blockHash: z.ZodOptional<z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>>;
|
|
138
|
+
archive: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
139
|
+
lastArchive: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
140
|
+
blockNumber: z.ZodNumber;
|
|
141
|
+
slotNumber: z.ZodNumber;
|
|
142
|
+
txCount: z.ZodNumber;
|
|
143
|
+
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
blockNumber: number;
|
|
146
|
+
slotNumber: number;
|
|
147
|
+
timestamp: bigint;
|
|
148
|
+
lastArchive: import("@aztec/foundation/schemas").Fr;
|
|
149
|
+
archive: import("@aztec/foundation/schemas").Fr;
|
|
150
|
+
txCount: number;
|
|
151
|
+
blockHash?: import("@aztec/foundation/schemas").Fr | undefined;
|
|
152
|
+
}, {
|
|
153
|
+
blockNumber: number;
|
|
154
|
+
slotNumber: number;
|
|
155
|
+
timestamp: string | number | bigint;
|
|
156
|
+
lastArchive: string;
|
|
157
|
+
archive: string;
|
|
158
|
+
txCount: number;
|
|
159
|
+
blockHash?: string | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
committee: z.ZodArray<z.ZodType<EthAddress, any, string>, "many">;
|
|
162
|
+
epoch: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
163
|
+
seed: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
164
|
+
attestors: z.ZodArray<z.ZodType<EthAddress, any, string>, "many">;
|
|
165
|
+
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
166
|
+
address: z.ZodType<EthAddress, any, string>;
|
|
167
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./proposal/committee_attestation.js").Signature, string>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
address: EthAddress;
|
|
170
|
+
signature: import("./proposal/committee_attestation.js").Signature;
|
|
171
|
+
}, {
|
|
172
|
+
address: string;
|
|
173
|
+
signature: string;
|
|
174
|
+
}>, CommitteeAttestation, {
|
|
175
|
+
address: string;
|
|
176
|
+
signature: string;
|
|
177
|
+
}>, "many">;
|
|
178
|
+
reason: z.ZodLiteral<"invalid-attestation">;
|
|
179
|
+
invalidIndex: z.ZodNumber;
|
|
180
|
+
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
valid: false;
|
|
182
|
+
block: {
|
|
183
|
+
blockNumber: number;
|
|
184
|
+
slotNumber: number;
|
|
185
|
+
timestamp: bigint;
|
|
186
|
+
lastArchive: import("@aztec/foundation/schemas").Fr;
|
|
187
|
+
archive: import("@aztec/foundation/schemas").Fr;
|
|
188
|
+
txCount: number;
|
|
189
|
+
blockHash?: import("@aztec/foundation/schemas").Fr | undefined;
|
|
190
|
+
};
|
|
191
|
+
attestations: CommitteeAttestation[];
|
|
192
|
+
committee: EthAddress[];
|
|
193
|
+
epoch: bigint;
|
|
194
|
+
seed: bigint;
|
|
195
|
+
attestors: EthAddress[];
|
|
196
|
+
reason: "invalid-attestation";
|
|
197
|
+
invalidIndex: number;
|
|
198
|
+
}, {
|
|
199
|
+
valid: false;
|
|
200
|
+
block: {
|
|
201
|
+
blockNumber: number;
|
|
202
|
+
slotNumber: number;
|
|
203
|
+
timestamp: string | number | bigint;
|
|
204
|
+
lastArchive: string;
|
|
205
|
+
archive: string;
|
|
206
|
+
txCount: number;
|
|
207
|
+
blockHash?: string | undefined;
|
|
208
|
+
};
|
|
209
|
+
attestations: {
|
|
210
|
+
address: string;
|
|
211
|
+
signature: string;
|
|
212
|
+
}[];
|
|
213
|
+
committee: string[];
|
|
214
|
+
epoch: string | number | bigint;
|
|
215
|
+
seed: string | number | bigint;
|
|
216
|
+
attestors: string[];
|
|
217
|
+
reason: "invalid-attestation";
|
|
218
|
+
invalidIndex: number;
|
|
219
|
+
}>]>;
|
|
220
|
+
export declare function serializeValidateBlockResult(result: ValidateBlockResult): Buffer;
|
|
221
|
+
export declare function deserializeValidateBlockResult(bufferOrReader: Buffer | BufferReader): ValidateBlockResult;
|
|
222
|
+
//# sourceMappingURL=validate_block_result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate_block_result.d.ts","sourceRoot":"","sources":["../../src/block/validate_block_result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAmB,KAAK,WAAW,EAA4C,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,mDAAmD;AACnD,MAAM,MAAM,2BAA2B,G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wBAAgB,8BAA8B,CAAC,cAAc,EAAE,MAAM,GAAG,YAAY,GAAG,mBAAmB,CAsBzG"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
3
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { BlockInfoSchema, deserializeBlockInfo, serializeBlockInfo } from './l2_block_info.js';
|
|
6
|
+
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
7
|
+
export const ValidateBlockResultSchema = z.union([
|
|
8
|
+
z.object({
|
|
9
|
+
valid: z.literal(true)
|
|
10
|
+
}),
|
|
11
|
+
z.object({
|
|
12
|
+
valid: z.literal(false),
|
|
13
|
+
block: BlockInfoSchema,
|
|
14
|
+
committee: z.array(schemas.EthAddress),
|
|
15
|
+
epoch: schemas.BigInt,
|
|
16
|
+
seed: schemas.BigInt,
|
|
17
|
+
attestors: z.array(schemas.EthAddress),
|
|
18
|
+
attestations: z.array(CommitteeAttestation.schema),
|
|
19
|
+
reason: z.literal('insufficient-attestations')
|
|
20
|
+
}),
|
|
21
|
+
z.object({
|
|
22
|
+
valid: z.literal(false),
|
|
23
|
+
block: BlockInfoSchema,
|
|
24
|
+
committee: z.array(schemas.EthAddress),
|
|
25
|
+
epoch: schemas.BigInt,
|
|
26
|
+
seed: schemas.BigInt,
|
|
27
|
+
attestors: z.array(schemas.EthAddress),
|
|
28
|
+
attestations: z.array(CommitteeAttestation.schema),
|
|
29
|
+
reason: z.literal('invalid-attestation'),
|
|
30
|
+
invalidIndex: z.number()
|
|
31
|
+
})
|
|
32
|
+
]);
|
|
33
|
+
export function serializeValidateBlockResult(result) {
|
|
34
|
+
if (result.valid) {
|
|
35
|
+
return serializeToBuffer(true);
|
|
36
|
+
}
|
|
37
|
+
const l2Block = serializeBlockInfo(result.block);
|
|
38
|
+
return serializeToBuffer(result.valid, result.reason, l2Block.length, l2Block, result.committee.length, result.committee, result.epoch, result.seed ?? 0n, result.attestors.length, result.attestors, result.attestations.length, result.attestations, result.reason === 'invalid-attestation' ? result.invalidIndex : 0);
|
|
39
|
+
}
|
|
40
|
+
export function deserializeValidateBlockResult(bufferOrReader) {
|
|
41
|
+
const reader = BufferReader.asReader(bufferOrReader);
|
|
42
|
+
const valid = reader.readBoolean();
|
|
43
|
+
if (valid) {
|
|
44
|
+
return {
|
|
45
|
+
valid
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const reason = reader.readString();
|
|
49
|
+
const block = deserializeBlockInfo(reader.readBuffer());
|
|
50
|
+
const committee = reader.readVector(EthAddress);
|
|
51
|
+
const epoch = reader.readBigInt();
|
|
52
|
+
const seed = reader.readBigInt();
|
|
53
|
+
const attestors = reader.readVector(EthAddress);
|
|
54
|
+
const attestations = reader.readVector(CommitteeAttestation);
|
|
55
|
+
const invalidIndex = reader.readNumber();
|
|
56
|
+
if (reason === 'insufficient-attestations') {
|
|
57
|
+
return {
|
|
58
|
+
valid,
|
|
59
|
+
reason,
|
|
60
|
+
block,
|
|
61
|
+
committee,
|
|
62
|
+
epoch,
|
|
63
|
+
seed,
|
|
64
|
+
attestors,
|
|
65
|
+
attestations: attestations
|
|
66
|
+
};
|
|
67
|
+
} else if (reason === 'invalid-attestation') {
|
|
68
|
+
return {
|
|
69
|
+
valid,
|
|
70
|
+
reason,
|
|
71
|
+
block,
|
|
72
|
+
committee,
|
|
73
|
+
epoch,
|
|
74
|
+
seed,
|
|
75
|
+
attestors,
|
|
76
|
+
invalidIndex,
|
|
77
|
+
attestations: attestations
|
|
78
|
+
};
|
|
79
|
+
} else {
|
|
80
|
+
const _ = reason;
|
|
81
|
+
throw new Error(`Unknown reason: ${reason}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/interfaces/archiver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAE,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/interfaces/archiver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,6BAA6B,CAAC;AAG/E,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAOnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB,EACvE,OAAO,GAAG,MAAM,CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAiDvD,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { L2Block } from '../block/l2_block.js';
|
|
3
|
-
import { L2TipsSchema
|
|
3
|
+
import { L2TipsSchema } from '../block/l2_block_source.js';
|
|
4
4
|
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
5
|
+
import { ValidateBlockResultSchema } from '../block/validate_block_result.js';
|
|
5
6
|
import { ContractClassPublicSchema, ContractInstanceWithAddressSchema } from '../contract/index.js';
|
|
6
7
|
import { L1RollupConstantsSchema } from '../epoch-helpers/index.js';
|
|
7
8
|
import { LogFilterSchema } from '../logs/log_filter.js';
|
|
@@ -46,6 +46,7 @@ export declare class BlockAttestation extends Gossipable {
|
|
|
46
46
|
toBuffer(): Buffer;
|
|
47
47
|
static fromBuffer(buf: Buffer | BufferReader): BlockAttestation;
|
|
48
48
|
static empty(): BlockAttestation;
|
|
49
|
+
static random(): BlockAttestation;
|
|
49
50
|
getSize(): number;
|
|
50
51
|
}
|
|
51
52
|
//# sourceMappingURL=block_attestation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_attestation.d.ts","sourceRoot":"","sources":["../../src/p2p/block_attestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAI9E,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,qBAAa,oBAAqB,SAAQ,QAAQ;gBACpC,IAAI,EAAE,MAAM;CAGzB;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAM5C,2CAA2C;aAC3B,WAAW,EAAE,MAAM;IAEnC,iEAAiE;aACjD,OAAO,EAAE,gBAAgB;IAEzC,0CAA0C;aAC1B,SAAS,EAAE,SAAS;IAZtC,OAAgB,QAAQ,YAA+B;IAEvD,OAAO,CAAC,MAAM,CAAyB;;IAGrC,2CAA2C;IAC3B,WAAW,EAAE,MAAM;IAEnC,iEAAiE;IACjD,OAAO,EAAE,gBAAgB;IAEzC,0CAA0C;IAC1B,SAAS,EAAE,SAAS;IAKtC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,gB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AS,EAAE,SAAS;IAZtC,OAAgB,QAAQ,YAA+B;IAEvD,OAAO,CAAC,MAAM,CAAyB;;IAGrC,2CAA2C;IAC3B,WAAW,EAAE,MAAM;IAEnC,iEAAiE;IACjD,OAAO,EAAE,gBAAgB;IAEzC,0CAA0C;IAC1B,SAAS,EAAE,SAAS;IAKtC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAQ5C;IAEQ,4BAA4B,IAAI,OAAO,CAAC,QAAQ,CAAC;IAI1D,IAAI,OAAO,IAAI,EAAE,CAEhB;IAED,IAAI,UAAU,IAAI,EAAE,CAEnB;IAED;;;OAGG;IACH,SAAS,IAAI,UAAU;IAWvB,UAAU,IAAI,MAAM;IAIpB,QAAQ,IAAI,MAAM;IAIlB,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,gBAAgB;IAK/D,MAAM,CAAC,KAAK,IAAI,gBAAgB;IAIhC,MAAM,CAAC,MAAM,IAAI,gBAAgB;IAIjC,OAAO,IAAI,MAAM;CAGlB"}
|
|
@@ -72,6 +72,9 @@ export class BlockAttestationHash extends Buffer32 {
|
|
|
72
72
|
static empty() {
|
|
73
73
|
return new BlockAttestation(0, ConsensusPayload.empty(), Signature.empty());
|
|
74
74
|
}
|
|
75
|
+
static random() {
|
|
76
|
+
return new BlockAttestation(Math.floor(Math.random() * 1000) + 1, ConsensusPayload.random(), Signature.random());
|
|
77
|
+
}
|
|
75
78
|
getSize() {
|
|
76
79
|
return 4 /* blockNumber */ + this.payload.getSize() + this.signature.getSize();
|
|
77
80
|
}
|
|
@@ -3,7 +3,7 @@ import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
3
3
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
4
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
5
5
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
6
|
-
import type {
|
|
6
|
+
import type { L2BlockInfo } from '../block/l2_block_info.js';
|
|
7
7
|
import { TxHash } from '../tx/index.js';
|
|
8
8
|
import { Tx } from '../tx/tx.js';
|
|
9
9
|
import type { UInt32 } from '../types/index.js';
|
|
@@ -49,7 +49,7 @@ export declare class BlockProposal extends Gossipable {
|
|
|
49
49
|
generateP2PMessageIdentifier(): Promise<Buffer32>;
|
|
50
50
|
get archive(): Fr;
|
|
51
51
|
get slotNumber(): Fr;
|
|
52
|
-
toBlockInfo():
|
|
52
|
+
toBlockInfo(): L2BlockInfo;
|
|
53
53
|
static createProposalFromSigner(blockNumber: UInt32, payload: ConsensusPayload, txHashes: TxHash[], txs: Tx[] | undefined, payloadSigner: (payload: Buffer32) => Promise<Signature>): Promise<BlockProposal>;
|
|
54
54
|
/**Get Sender
|
|
55
55
|
* Lazily evaluate the sender of the proposal; result is cached
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_proposal.d.ts","sourceRoot":"","sources":["../../src/p2p/block_proposal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"block_proposal.d.ts","sourceRoot":"","sources":["../../src/p2p/block_proposal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,M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;WAWb,wBAAwB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,MAAM,EAAE,EAElB,GAAG,EAAE,EAAE,EAAE,GAAG,SAAS,EACrB,aAAa,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,OAAO,CAAC,SAAS,CAAC;IAQ1D;;OAEG;IACH,SAAS;IAUT,UAAU;IAIV,QAAQ,IAAI,MAAM;IASlB,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,aAAa;IAgB5D,OAAO,IAAI,MAAM;CAUlB"}
|
|
@@ -43,7 +43,9 @@ export class BlockProposalHash extends Buffer32 {
|
|
|
43
43
|
return {
|
|
44
44
|
blockNumber: this.blockNumber,
|
|
45
45
|
slotNumber: this.slotNumber.toNumber(),
|
|
46
|
-
|
|
46
|
+
lastArchive: this.payload.header.lastArchiveRoot,
|
|
47
|
+
timestamp: this.payload.header.timestamp,
|
|
48
|
+
archive: this.archive,
|
|
47
49
|
txCount: this.txHashes.length
|
|
48
50
|
};
|
|
49
51
|
}
|
|
@@ -208,6 +208,7 @@ export declare class ConsensusPayload implements Signable {
|
|
|
208
208
|
static fromFields(fields: FieldsOf<ConsensusPayload>): ConsensusPayload;
|
|
209
209
|
static fromBlock(block: L2Block): ConsensusPayload;
|
|
210
210
|
static empty(): ConsensusPayload;
|
|
211
|
+
static random(): ConsensusPayload;
|
|
211
212
|
/**
|
|
212
213
|
* Get the size of the consensus payload in bytes.
|
|
213
214
|
* @returns The size of the consensus payload.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consensus_payload.d.ts","sourceRoot":"","sources":["../../src/p2p/consensus_payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBA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AAI,gBAAgB;IAIjC;;;OAGG;IACH,OAAO,IAAI,MAAM;IASjB,QAAQ;CAGT"}
|
|
@@ -53,17 +53,16 @@ export class ConsensusPayload {
|
|
|
53
53
|
return hexToBuffer(encodedData);
|
|
54
54
|
}
|
|
55
55
|
toBuffer() {
|
|
56
|
-
|
|
56
|
+
return serializeToBuffer([
|
|
57
57
|
this.header,
|
|
58
58
|
this.archive,
|
|
59
59
|
this.stateReference
|
|
60
60
|
]);
|
|
61
|
-
this.size = buffer.length;
|
|
62
|
-
return buffer;
|
|
63
61
|
}
|
|
64
62
|
static fromBuffer(buf) {
|
|
65
63
|
const reader = BufferReader.asReader(buf);
|
|
66
|
-
|
|
64
|
+
const payload = new ConsensusPayload(reader.readObject(ProposedBlockHeader), reader.readObject(Fr), reader.readObject(StateReference));
|
|
65
|
+
return payload;
|
|
67
66
|
}
|
|
68
67
|
static fromFields(fields) {
|
|
69
68
|
return new ConsensusPayload(fields.header, fields.archive, fields.stateReference);
|
|
@@ -74,6 +73,9 @@ export class ConsensusPayload {
|
|
|
74
73
|
static empty() {
|
|
75
74
|
return new ConsensusPayload(ProposedBlockHeader.empty(), Fr.ZERO, StateReference.empty());
|
|
76
75
|
}
|
|
76
|
+
static random() {
|
|
77
|
+
return new ConsensusPayload(ProposedBlockHeader.random(), Fr.random(), StateReference.random());
|
|
78
|
+
}
|
|
77
79
|
/**
|
|
78
80
|
* Get the size of the consensus payload in bytes.
|
|
79
81
|
* @returns The size of the consensus payload.
|
package/dest/tests/mocks.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ContractArtifact } from '../abi/abi.js';
|
|
|
4
4
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
5
5
|
import { L2Block } from '../block/l2_block.js';
|
|
6
6
|
import type { CommitteeAttestationsAndSigners } from '../block/proposal/attestations_and_signers.js';
|
|
7
|
-
import
|
|
7
|
+
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
8
8
|
import type { ContractInstanceWithAddress } from '../contract/index.js';
|
|
9
9
|
import { GasFees } from '../gas/gas_fees.js';
|
|
10
10
|
import { ExtendedNote, UniqueNote } from '../note/extended_note.js';
|
|
@@ -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;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,
|
|
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;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIlE,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,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iC,GAC5C,OAAM;IAAE,eAAe,CAAC,EAAE,EAAE,CAAA;CAAO,EACnC,UAAU,YAAY,KACrB,OAAO,CAAC,2BAA2B,CAUrC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;EAIlC,CAAC;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;AAqBD,eAAO,MAAM,0CAA0C,GACrD,wBAAwB,+BAA+B,EACvD,SAAQ,eAA0C,0CAOnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,2BAA2B,KAAG,aAOzE,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,UAAU,2BAA2B,KAAG,gBAM5E,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,OAAO,OAAO,EAAE,SAAS,eAAe,KAAG,gBAQxF,CAAC;AAEF,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,MAAM,EACrB,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;CAAO,GACzC,OAAO,CAAC,gBAAgB,CAAC,CAc3B"}
|
package/dest/tests/mocks.js
CHANGED
|
@@ -4,8 +4,9 @@ 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
|
+
import { CommitteeAttestation, L1PublishedData } from '../block/index.js';
|
|
8
8
|
import { L2Block } from '../block/l2_block.js';
|
|
9
|
+
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
9
10
|
import { computeContractAddressFromInstance } from '../contract/contract_address.js';
|
|
10
11
|
import { getContractClassFromArtifact } from '../contract/contract_class.js';
|
|
11
12
|
import { SerializableContractInstance } from '../contract/contract_instance.js';
|
|
@@ -179,17 +180,13 @@ export const makeBlockAttestationFromBlock = (block, signer)=>{
|
|
|
179
180
|
};
|
|
180
181
|
export async function randomPublishedL2Block(l2BlockNumber, opts = {}) {
|
|
181
182
|
const block = await L2Block.random(l2BlockNumber);
|
|
182
|
-
const l1 = {
|
|
183
|
+
const l1 = L1PublishedData.fromFields({
|
|
183
184
|
blockNumber: BigInt(block.number),
|
|
184
185
|
timestamp: block.header.globalVariables.timestamp,
|
|
185
186
|
blockHash: Buffer32.random().toString()
|
|
186
|
-
};
|
|
187
|
+
});
|
|
187
188
|
const signers = opts.signers ?? times(3, ()=>Secp256k1Signer.random());
|
|
188
189
|
const atts = await Promise.all(signers.map((signer)=>makeBlockAttestationFromBlock(block, signer)));
|
|
189
190
|
const attestations = atts.map((attestation, i)=>new CommitteeAttestation(signers[i].address, attestation.signature));
|
|
190
|
-
return
|
|
191
|
-
block,
|
|
192
|
-
l1,
|
|
193
|
-
attestations
|
|
194
|
-
};
|
|
191
|
+
return new PublishedL2Block(block, l1, attestations);
|
|
195
192
|
}
|
|
@@ -38,6 +38,7 @@ export declare class ContentCommitment {
|
|
|
38
38
|
static fromViem(contentCommitment: ViemContentCommitment): ContentCommitment;
|
|
39
39
|
toFields(): Fr[];
|
|
40
40
|
static fromFields(fields: Fr[] | FieldReader): ContentCommitment;
|
|
41
|
+
static random(): ContentCommitment;
|
|
41
42
|
static empty(): ContentCommitment;
|
|
42
43
|
isEmpty(): boolean;
|
|
43
44
|
toString(): string;
|
|
@@ -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,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