@aztec/stdlib 2.0.3 → 2.1.0-rc.1
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/in_block.d.ts +5 -5
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.d.ts +48 -0
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -0
- package/dest/block/proposal/attestations_and_signers.js +99 -0
- package/dest/block/proposal/committee_attestation.d.ts +1 -0
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
- package/dest/block/proposal/committee_attestation.js +3 -0
- package/dest/block/proposal/index.d.ts +1 -0
- package/dest/block/proposal/index.d.ts.map +1 -1
- package/dest/block/proposal/index.js +1 -0
- package/dest/contract/interfaces/contract_class.d.ts +3 -3
- package/dest/interfaces/aztec-node-admin.d.ts +13 -7
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/block-builder.d.ts +1 -0
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/proving-job.d.ts +6 -6
- package/dest/interfaces/slasher.d.ts +4 -0
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +1 -0
- package/dest/interfaces/validator.d.ts +9 -2
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -1
- package/dest/p2p/consensus_payload.d.ts +27 -0
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +10 -0
- package/dest/p2p/signature_utils.d.ts +2 -1
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +1 -0
- package/dest/slashing/types.d.ts +1 -0
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +22 -0
- package/dest/tests/mocks.d.ts +2 -0
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +4 -0
- package/dest/tx/indexed_tx_effect.d.ts +3 -3
- 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.js +1 -1
- package/dest/tx/tx.d.ts +0 -7
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +0 -8
- package/package.json +9 -9
- package/src/block/proposal/attestations_and_signers.ts +121 -0
- package/src/block/proposal/committee_attestation.ts +4 -0
- package/src/block/proposal/index.ts +1 -0
- package/src/interfaces/block-builder.ts +1 -0
- package/src/interfaces/slasher.ts +2 -0
- package/src/interfaces/validator.ts +12 -2
- package/src/p2p/consensus_payload.ts +16 -0
- package/src/p2p/signature_utils.ts +1 -0
- package/src/slashing/types.ts +23 -0
- package/src/tests/mocks.ts +12 -0
- package/src/tx/proposed_block_header.ts +13 -0
- package/src/tx/state_reference.ts +1 -1
- package/src/tx/tx.ts +0 -10
package/dest/block/in_block.d.ts
CHANGED
|
@@ -12,21 +12,21 @@ export declare function inBlockSchemaFor<T extends ZodTypeAny>(schema: T): z.Zod
|
|
|
12
12
|
data: T;
|
|
13
13
|
l2BlockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
14
14
|
l2BlockHash: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, Buffer<ArrayBuffer>, string>, L2BlockHash, string>;
|
|
15
|
-
}, "strip", ZodTypeAny,
|
|
15
|
+
}, "strip", ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
16
16
|
data: T;
|
|
17
17
|
l2BlockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
18
18
|
l2BlockHash: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, Buffer<ArrayBuffer>, string>, L2BlockHash, string>;
|
|
19
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
19
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
20
20
|
data: T;
|
|
21
21
|
l2BlockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
22
22
|
l2BlockHash: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, Buffer<ArrayBuffer>, string>, L2BlockHash, string>;
|
|
23
|
-
}>, any>[k]; }
|
|
23
|
+
}>, any>[k]; } : never, z.baseObjectInputType<{
|
|
24
24
|
data: T;
|
|
25
25
|
l2BlockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
26
26
|
l2BlockHash: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, Buffer<ArrayBuffer>, string>, L2BlockHash, string>;
|
|
27
|
-
}>]: z.baseObjectInputType<{
|
|
27
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
|
|
28
28
|
data: T;
|
|
29
29
|
l2BlockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
30
30
|
l2BlockHash: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, Buffer<ArrayBuffer>, string>, L2BlockHash, string>;
|
|
31
|
-
}>[k_1]; }>;
|
|
31
|
+
}>[k_1]; } : never>;
|
|
32
32
|
//# sourceMappingURL=in_block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in_block.d.ts","sourceRoot":"","sources":["../../src/block/in_block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE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AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,UAAU,EAAE,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;oBAM/D"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ViemCommitteeAttestations } from '@aztec/ethereum';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { Signable, SignatureDomainSeparator } from '../../p2p/signature_utils.js';
|
|
4
|
+
import { CommitteeAttestation } from './committee_attestation.js';
|
|
5
|
+
export declare class CommitteeAttestationsAndSigners implements Signable {
|
|
6
|
+
attestations: CommitteeAttestation[];
|
|
7
|
+
constructor(attestations: CommitteeAttestation[]);
|
|
8
|
+
static get schema(): z.ZodEffects<z.ZodObject<{
|
|
9
|
+
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
10
|
+
address: z.ZodType<import("./committee_attestation.js").EthAddress, any, string>;
|
|
11
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./committee_attestation.js").Signature, string>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
address: import("./committee_attestation.js").EthAddress;
|
|
14
|
+
signature: import("./committee_attestation.js").Signature;
|
|
15
|
+
}, {
|
|
16
|
+
address: string;
|
|
17
|
+
signature: string;
|
|
18
|
+
}>, CommitteeAttestation, {
|
|
19
|
+
address: string;
|
|
20
|
+
signature: string;
|
|
21
|
+
}>, "many">;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
attestations: CommitteeAttestation[];
|
|
24
|
+
}, {
|
|
25
|
+
attestations: {
|
|
26
|
+
address: string;
|
|
27
|
+
signature: string;
|
|
28
|
+
}[];
|
|
29
|
+
}>, CommitteeAttestationsAndSigners, {
|
|
30
|
+
attestations: {
|
|
31
|
+
address: string;
|
|
32
|
+
signature: string;
|
|
33
|
+
}[];
|
|
34
|
+
}>;
|
|
35
|
+
getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer;
|
|
36
|
+
static empty(): CommitteeAttestationsAndSigners;
|
|
37
|
+
toString(): string;
|
|
38
|
+
getSigners(): import("./committee_attestation.js").EthAddress[];
|
|
39
|
+
getSignedAttestations(): CommitteeAttestation[];
|
|
40
|
+
/**
|
|
41
|
+
* Packs an array of committee attestations into the format expected by the Solidity contract
|
|
42
|
+
*
|
|
43
|
+
* @param attestations - Array of committee attestations with addresses and signatures
|
|
44
|
+
* @returns Packed attestations with bitmap and tightly packed signature/address data
|
|
45
|
+
*/
|
|
46
|
+
getPackedAttestations(): ViemCommitteeAttestations;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=attestations_and_signers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attestations_and_signers.d.ts","sourceRoot":"","sources":["../../../src/block/proposal/attestations_and_signers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAIjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,qBAAa,+BAAgC,YAAW,QAAQ;IAC3C,YAAY,EAAE,oBAAoB,EAAE;gBAApC,YAAY,EAAE,oBAAoB,EAAE;IAEvD,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;OAMhB;IAED,gBAAgB,CAAC,eAAe,EAAE,wBAAwB,GAAG,MAAM;IAanE,MAAM,CAAC,KAAK,IAAI,+BAA+B;IAI/C,QAAQ;IAIR,UAAU;IAIV,qBAAqB;IAIrB;;;;;OAKG;IACH,qBAAqB,IAAI,yBAAyB;CAiEnD"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { hexToBuffer } from '@aztec/foundation/string';
|
|
2
|
+
import { encodeAbiParameters, parseAbiParameters } from 'viem';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { CommitteeAttestation } from './committee_attestation.js';
|
|
5
|
+
export class CommitteeAttestationsAndSigners {
|
|
6
|
+
attestations;
|
|
7
|
+
constructor(attestations){
|
|
8
|
+
this.attestations = attestations;
|
|
9
|
+
}
|
|
10
|
+
static get schema() {
|
|
11
|
+
return z.object({
|
|
12
|
+
attestations: CommitteeAttestation.schema.array()
|
|
13
|
+
}).transform((obj)=>new CommitteeAttestationsAndSigners(obj.attestations));
|
|
14
|
+
}
|
|
15
|
+
getPayloadToSign(domainSeparator) {
|
|
16
|
+
const abi = parseAbiParameters('uint8,(bytes,bytes),address[]');
|
|
17
|
+
const packed = this.getPackedAttestations();
|
|
18
|
+
const encodedData = encodeAbiParameters(abi, [
|
|
19
|
+
domainSeparator,
|
|
20
|
+
[
|
|
21
|
+
packed.signatureIndices,
|
|
22
|
+
packed.signaturesOrAddresses
|
|
23
|
+
],
|
|
24
|
+
this.getSigners().map((s)=>s.toString())
|
|
25
|
+
]);
|
|
26
|
+
return hexToBuffer(encodedData);
|
|
27
|
+
}
|
|
28
|
+
static empty() {
|
|
29
|
+
return new CommitteeAttestationsAndSigners([]);
|
|
30
|
+
}
|
|
31
|
+
toString() {
|
|
32
|
+
return `CommitteeAttestationsAndSigners(${this.attestations.map((a)=>a.toString()).join(',')})`;
|
|
33
|
+
}
|
|
34
|
+
getSigners() {
|
|
35
|
+
return this.attestations.filter((a)=>!a.signature.isEmpty()).map((a)=>a.address);
|
|
36
|
+
}
|
|
37
|
+
getSignedAttestations() {
|
|
38
|
+
return this.attestations.filter((a)=>!a.signature.isEmpty());
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Packs an array of committee attestations into the format expected by the Solidity contract
|
|
42
|
+
*
|
|
43
|
+
* @param attestations - Array of committee attestations with addresses and signatures
|
|
44
|
+
* @returns Packed attestations with bitmap and tightly packed signature/address data
|
|
45
|
+
*/ getPackedAttestations() {
|
|
46
|
+
const length = this.attestations.length;
|
|
47
|
+
const attestations = this.attestations.map((a)=>a.toViem());
|
|
48
|
+
// Calculate bitmap size (1 bit per attestation, rounded up to nearest byte)
|
|
49
|
+
const bitmapSize = Math.ceil(length / 8);
|
|
50
|
+
const signatureIndices = new Uint8Array(bitmapSize);
|
|
51
|
+
// Calculate total data size needed
|
|
52
|
+
let totalDataSize = 0;
|
|
53
|
+
for(let i = 0; i < length; i++){
|
|
54
|
+
const signature = attestations[i].signature;
|
|
55
|
+
// Check if signature is empty (v = 0)
|
|
56
|
+
const isEmpty = signature.v === 0;
|
|
57
|
+
if (!isEmpty) {
|
|
58
|
+
totalDataSize += 65; // v (1) + r (32) + s (32)
|
|
59
|
+
} else {
|
|
60
|
+
totalDataSize += 20; // address only
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const signaturesOrAddresses = new Uint8Array(totalDataSize);
|
|
64
|
+
let dataIndex = 0;
|
|
65
|
+
// Pack the data
|
|
66
|
+
for(let i = 0; i < length; i++){
|
|
67
|
+
const attestation = attestations[i];
|
|
68
|
+
const signature = attestation.signature;
|
|
69
|
+
// Check if signature is empty
|
|
70
|
+
const isEmpty = signature.v === 0;
|
|
71
|
+
if (!isEmpty) {
|
|
72
|
+
// Set bit in bitmap (bit 7-0 in each byte, left to right)
|
|
73
|
+
const byteIndex = Math.floor(i / 8);
|
|
74
|
+
const bitIndex = 7 - i % 8;
|
|
75
|
+
signatureIndices[byteIndex] |= 1 << bitIndex;
|
|
76
|
+
// Pack signature: v + r + s
|
|
77
|
+
signaturesOrAddresses[dataIndex] = signature.v;
|
|
78
|
+
dataIndex++;
|
|
79
|
+
// Pack r (32 bytes)
|
|
80
|
+
const rBytes = Buffer.from(signature.r.slice(2), 'hex');
|
|
81
|
+
signaturesOrAddresses.set(rBytes, dataIndex);
|
|
82
|
+
dataIndex += 32;
|
|
83
|
+
// Pack s (32 bytes)
|
|
84
|
+
const sBytes = Buffer.from(signature.s.slice(2), 'hex');
|
|
85
|
+
signaturesOrAddresses.set(sBytes, dataIndex);
|
|
86
|
+
dataIndex += 32;
|
|
87
|
+
} else {
|
|
88
|
+
// Pack address only (20 bytes)
|
|
89
|
+
const addrBytes = Buffer.from(attestation.addr.slice(2), 'hex');
|
|
90
|
+
signaturesOrAddresses.set(addrBytes, dataIndex);
|
|
91
|
+
dataIndex += 20;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
signatureIndices: `0x${Buffer.from(signatureIndices).toString('hex')}`,
|
|
96
|
+
signaturesOrAddresses: `0x${Buffer.from(signaturesOrAddresses).toString('hex')}`
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -31,6 +31,7 @@ export declare class CommitteeAttestation {
|
|
|
31
31
|
static fromPacked(packed: ViemCommitteeAttestations, committeeSize: number): CommitteeAttestation[];
|
|
32
32
|
toBuffer(): Buffer;
|
|
33
33
|
equals(other: CommitteeAttestation): boolean;
|
|
34
|
+
toString(): string;
|
|
34
35
|
toViem(): ViemCommitteeAttestation;
|
|
35
36
|
}
|
|
36
37
|
//# sourceMappingURL=committee_attestation.d.ts.map
|
|
@@ -1 +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,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAEjC,qBAAa,oBAAoB;aAEb,OAAO,EAAE,UAAU;aACnB,SAAS,EAAE,SAAS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E,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,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,oBAAoB;IAIhE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,GAAG,oBAAoB;IAIrE,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,oBAAoB;IAOtE,MAAM,CAAC,MAAM,IAAI,oBAAoB;IAKrC,MAAM,CAAC,KAAK,IAAI,oBAAoB;IAIpC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,GAAG,oBAAoB,EAAE;IA+CnG,QAAQ,IAAI,MAAM;IAIlB,MAAM,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO;IAI5C,QAAQ,IAAI,MAAM;IAIlB,MAAM,IAAI,wBAAwB;CAMnC"}
|
|
@@ -92,6 +92,9 @@ export class CommitteeAttestation {
|
|
|
92
92
|
equals(other) {
|
|
93
93
|
return this.address.equals(other.address) && this.signature.equals(other.signature);
|
|
94
94
|
}
|
|
95
|
+
toString() {
|
|
96
|
+
return `CommitteeAttestation(${this.address.toString()}, ${this.signature.toString()})`;
|
|
97
|
+
}
|
|
95
98
|
toViem() {
|
|
96
99
|
return {
|
|
97
100
|
addr: this.address.toString(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/block/proposal/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/block/proposal/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC"}
|
|
@@ -120,7 +120,7 @@ interface ContractClassCommitments {
|
|
|
120
120
|
}
|
|
121
121
|
/** A contract class with its precomputed id. */
|
|
122
122
|
export type ContractClassWithId = ContractClass & Pick<ContractClassCommitments, 'id'>;
|
|
123
|
-
export declare const ContractClassWithIdSchema: z.ZodObject<
|
|
123
|
+
export declare const ContractClassWithIdSchema: z.ZodObject<{
|
|
124
124
|
version: z.ZodLiteral<1>;
|
|
125
125
|
artifactHash: z.ZodType<Fr, any, string>;
|
|
126
126
|
privateFunctions: z.ZodArray<z.ZodObject<{
|
|
@@ -146,9 +146,9 @@ export declare const ContractClassWithIdSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
146
146
|
type: "Buffer";
|
|
147
147
|
data: number[];
|
|
148
148
|
}>]>;
|
|
149
|
-
}
|
|
149
|
+
} & {
|
|
150
150
|
id: z.ZodType<Fr, any, string>;
|
|
151
|
-
}
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
152
|
version: 1;
|
|
153
153
|
id: Fr;
|
|
154
154
|
artifactHash: Fr;
|
|
@@ -44,7 +44,7 @@ export interface AztecNodeAdmin {
|
|
|
44
44
|
export type AztecNodeAdminConfig = ValidatorClientFullConfig & SequencerConfig & ProverConfig & SlasherConfig & Pick<ArchiverSpecificConfig, 'archiverPollingIntervalMS' | 'skipValidateBlockAttestations' | 'archiverBatchSize'> & {
|
|
45
45
|
maxTxPoolSize: number;
|
|
46
46
|
};
|
|
47
|
-
export declare const AztecNodeAdminConfigSchema: z.ZodObject<
|
|
47
|
+
export declare const AztecNodeAdminConfigSchema: z.ZodObject<{
|
|
48
48
|
transactionPollingIntervalMS: z.ZodOptional<z.ZodNumber>;
|
|
49
49
|
maxTxsPerBlock: z.ZodOptional<z.ZodNumber>;
|
|
50
50
|
minTxsPerBlock: z.ZodOptional<z.ZodNumber>;
|
|
@@ -95,7 +95,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
95
95
|
skipCollectingAttestations: z.ZodOptional<z.ZodBoolean>;
|
|
96
96
|
secondsBeforeInvalidatingBlockAsCommitteeMember: z.ZodNumber;
|
|
97
97
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: z.ZodNumber;
|
|
98
|
-
}
|
|
98
|
+
} & {
|
|
99
99
|
nodeUrl: z.ZodOptional<z.ZodString>;
|
|
100
100
|
realProofs: z.ZodBoolean;
|
|
101
101
|
proverId: z.ZodOptional<import("../schemas/schemas.js").ZodFor<import("@aztec/foundation/schemas").EthAddress>>;
|
|
@@ -103,7 +103,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
103
103
|
proverTestDelayMs: z.ZodNumber;
|
|
104
104
|
proverTestDelayFactor: z.ZodNumber;
|
|
105
105
|
proverAgentCount: z.ZodNumber;
|
|
106
|
-
}
|
|
106
|
+
} & {
|
|
107
107
|
slashOverridePayload: z.ZodOptional<z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>>;
|
|
108
108
|
slashMinPenaltyPercentage: z.ZodNumber;
|
|
109
109
|
slashMaxPenaltyPercentage: z.ZodNumber;
|
|
@@ -121,24 +121,26 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
121
121
|
slashMaxPayloadSize: z.ZodNumber;
|
|
122
122
|
slashGracePeriodL2Slots: z.ZodNumber;
|
|
123
123
|
slashBroadcastedInvalidBlockPenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
124
|
+
slashExecuteRoundsLookBack: z.ZodNumber;
|
|
124
125
|
slashSelfAllowed: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
-
}
|
|
126
|
+
} & {
|
|
126
127
|
validatorAddresses: z.ZodOptional<z.ZodArray<z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>, "many">>;
|
|
127
128
|
disableValidator: z.ZodBoolean;
|
|
128
129
|
disabledValidators: z.ZodArray<z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>, "many">;
|
|
129
130
|
attestationPollingIntervalMs: z.ZodNumber;
|
|
130
131
|
validatorReexecute: z.ZodBoolean;
|
|
131
132
|
validatorReexecuteDeadlineMs: z.ZodNumber;
|
|
132
|
-
|
|
133
|
+
alwaysReexecuteBlockProposals: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
+
} & Pick<{
|
|
133
135
|
archiverPollingIntervalMS: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
134
136
|
archiverBatchSize: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
135
137
|
viemPollingIntervalMS: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
136
138
|
maxLogs: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
137
139
|
archiverStoreMapSizeKb: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
138
140
|
skipValidateBlockAttestations: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
-
}, "archiverPollingIntervalMS" | "archiverBatchSize" | "skipValidateBlockAttestations"
|
|
141
|
+
}, "archiverPollingIntervalMS" | "archiverBatchSize" | "skipValidateBlockAttestations"> & {
|
|
140
142
|
maxTxPoolSize: z.ZodNumber;
|
|
141
|
-
}
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
144
|
secondsBeforeInvalidatingBlockAsCommitteeMember: number;
|
|
143
145
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
|
|
144
146
|
slashMinPenaltyPercentage: number;
|
|
@@ -157,6 +159,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
157
159
|
slashMaxPayloadSize: number;
|
|
158
160
|
slashGracePeriodL2Slots: number;
|
|
159
161
|
slashBroadcastedInvalidBlockPenalty: bigint;
|
|
162
|
+
slashExecuteRoundsLookBack: number;
|
|
160
163
|
realProofs: boolean;
|
|
161
164
|
proverTestDelayType: "fixed" | "realistic";
|
|
162
165
|
proverTestDelayMs: number;
|
|
@@ -204,6 +207,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
204
207
|
slashSelfAllowed?: boolean | undefined;
|
|
205
208
|
nodeUrl?: string | undefined;
|
|
206
209
|
validatorAddresses?: import("@aztec/foundation/schemas").EthAddress[] | undefined;
|
|
210
|
+
alwaysReexecuteBlockProposals?: boolean | undefined;
|
|
207
211
|
}, {
|
|
208
212
|
secondsBeforeInvalidatingBlockAsCommitteeMember: number;
|
|
209
213
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
|
|
@@ -223,6 +227,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
223
227
|
slashMaxPayloadSize: number;
|
|
224
228
|
slashGracePeriodL2Slots: number;
|
|
225
229
|
slashBroadcastedInvalidBlockPenalty: string | number | bigint;
|
|
230
|
+
slashExecuteRoundsLookBack: number;
|
|
226
231
|
realProofs: boolean;
|
|
227
232
|
proverTestDelayType: "fixed" | "realistic";
|
|
228
233
|
proverTestDelayMs: number;
|
|
@@ -270,6 +275,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
270
275
|
slashSelfAllowed?: boolean | undefined;
|
|
271
276
|
nodeUrl?: string | undefined;
|
|
272
277
|
validatorAddresses?: string[] | undefined;
|
|
278
|
+
alwaysReexecuteBlockProposals?: boolean | undefined;
|
|
273
279
|
}>;
|
|
274
280
|
export declare const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin>;
|
|
275
281
|
export declare function createAztecNodeAdminClient(url: string, versions?: Partial<ComponentsVersions>, fetch?: typeof defaultFetch): AztecNodeAdmin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec-node-admin.d.ts","sourceRoot":"","sources":["../../src/interfaces/aztec-node-admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAE1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,KAAK,OAAO,EAAiB,KAAK,iBAAiB,EAA2B,MAAM,sBAAsB,CAAC;AACpH,OAAO,EAAE,KAAK,kBAAkB,EAAgC,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,KAAK,sBAAsB,EAAgC,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,cAAc,CAAC;AACvE,OAAO,EAA+B,KAAK,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAE7F;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE3C;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhE;;;OAGG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD;;;;OAIG;IACH,UAAU,CAAC,iBAAiB,EAAE,MAAM,EAA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W,GAAG,eAAe,CAAC,GAChD,IAAI,CAAC,eAAe,EAAE,wBAAwB,GAAG,4BAA4B,CAAC,CAAC;AAEjF,MAAM,WAAW,qBAAqB;IACpC,SAAS,IAAI,0BAA0B,CAAC;IAExC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAAG,IAAI,CAAC;IAEhE,UAAU,CACR,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,EAAE,CAAC,EACrC,cAAc,EAAE,EAAE,EAAE,EACpB,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,qBAAqB,EAC9B,IAAI,CAAC,EAAE,yBAAyB,GAC/B,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7B,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAClE"}
|
|
@@ -5808,11 +5808,11 @@ export declare const ProvingJobFulfilledResult: z.ZodObject<{
|
|
|
5808
5808
|
status: z.ZodLiteral<"fulfilled">;
|
|
5809
5809
|
value: z.ZodBranded<z.ZodString, "ProvingJobUri">;
|
|
5810
5810
|
}, "strip", z.ZodTypeAny, {
|
|
5811
|
-
status: "fulfilled";
|
|
5812
5811
|
value: string & z.BRAND<"ProvingJobUri">;
|
|
5813
|
-
}, {
|
|
5814
5812
|
status: "fulfilled";
|
|
5813
|
+
}, {
|
|
5815
5814
|
value: string;
|
|
5815
|
+
status: "fulfilled";
|
|
5816
5816
|
}>;
|
|
5817
5817
|
export type ProvingJobFulfilledResult = z.infer<typeof ProvingJobFulfilledResult>;
|
|
5818
5818
|
export declare const ProvingJobRejectedResult: z.ZodObject<{
|
|
@@ -5830,11 +5830,11 @@ export declare const ProvingJobSettledResult: z.ZodDiscriminatedUnion<"status",
|
|
|
5830
5830
|
status: z.ZodLiteral<"fulfilled">;
|
|
5831
5831
|
value: z.ZodBranded<z.ZodString, "ProvingJobUri">;
|
|
5832
5832
|
}, "strip", z.ZodTypeAny, {
|
|
5833
|
-
status: "fulfilled";
|
|
5834
5833
|
value: string & z.BRAND<"ProvingJobUri">;
|
|
5835
|
-
}, {
|
|
5836
5834
|
status: "fulfilled";
|
|
5835
|
+
}, {
|
|
5837
5836
|
value: string;
|
|
5837
|
+
status: "fulfilled";
|
|
5838
5838
|
}>, z.ZodObject<{
|
|
5839
5839
|
status: z.ZodLiteral<"rejected">;
|
|
5840
5840
|
reason: z.ZodString;
|
|
@@ -5868,11 +5868,11 @@ export declare const ProvingJobStatus: z.ZodDiscriminatedUnion<"status", [z.ZodO
|
|
|
5868
5868
|
status: z.ZodLiteral<"fulfilled">;
|
|
5869
5869
|
value: z.ZodBranded<z.ZodString, "ProvingJobUri">;
|
|
5870
5870
|
}, "strip", z.ZodTypeAny, {
|
|
5871
|
-
status: "fulfilled";
|
|
5872
5871
|
value: string & z.BRAND<"ProvingJobUri">;
|
|
5873
|
-
}, {
|
|
5874
5872
|
status: "fulfilled";
|
|
5873
|
+
}, {
|
|
5875
5874
|
value: string;
|
|
5875
|
+
status: "fulfilled";
|
|
5876
5876
|
}>, z.ZodObject<{
|
|
5877
5877
|
status: z.ZodLiteral<"rejected">;
|
|
5878
5878
|
reason: z.ZodString;
|
|
@@ -20,6 +20,7 @@ export interface SlasherConfig {
|
|
|
20
20
|
slashOffenseExpirationRounds: number;
|
|
21
21
|
slashMaxPayloadSize: number;
|
|
22
22
|
slashGracePeriodL2Slots: number;
|
|
23
|
+
slashExecuteRoundsLookBack: number;
|
|
23
24
|
}
|
|
24
25
|
export declare const SlasherConfigSchema: z.ZodObject<{
|
|
25
26
|
slashOverridePayload: z.ZodOptional<z.ZodType<EthAddress, any, string>>;
|
|
@@ -39,6 +40,7 @@ export declare const SlasherConfigSchema: z.ZodObject<{
|
|
|
39
40
|
slashMaxPayloadSize: z.ZodNumber;
|
|
40
41
|
slashGracePeriodL2Slots: z.ZodNumber;
|
|
41
42
|
slashBroadcastedInvalidBlockPenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
43
|
+
slashExecuteRoundsLookBack: z.ZodNumber;
|
|
42
44
|
slashSelfAllowed: z.ZodOptional<z.ZodBoolean>;
|
|
43
45
|
}, "strip", z.ZodTypeAny, {
|
|
44
46
|
slashMinPenaltyPercentage: number;
|
|
@@ -57,6 +59,7 @@ export declare const SlasherConfigSchema: z.ZodObject<{
|
|
|
57
59
|
slashMaxPayloadSize: number;
|
|
58
60
|
slashGracePeriodL2Slots: number;
|
|
59
61
|
slashBroadcastedInvalidBlockPenalty: bigint;
|
|
62
|
+
slashExecuteRoundsLookBack: number;
|
|
60
63
|
slashOverridePayload?: EthAddress | undefined;
|
|
61
64
|
slashSelfAllowed?: boolean | undefined;
|
|
62
65
|
}, {
|
|
@@ -76,6 +79,7 @@ export declare const SlasherConfigSchema: z.ZodObject<{
|
|
|
76
79
|
slashMaxPayloadSize: number;
|
|
77
80
|
slashGracePeriodL2Slots: number;
|
|
78
81
|
slashBroadcastedInvalidBlockPenalty: string | number | bigint;
|
|
82
|
+
slashExecuteRoundsLookBack: number;
|
|
79
83
|
slashOverridePayload?: string | undefined;
|
|
80
84
|
slashSelfAllowed?: boolean | undefined;
|
|
81
85
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slasher.d.ts","sourceRoot":"","sources":["../../src/interfaces/slasher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,yBAAyB,EAAE,MAAM,CAAC;IAClC,yBAAyB,EAAE,MAAM,CAAC;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qBAAqB,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AmB,EAAE,MAAM,CAAC;IAC5B,4BAA4B,EAAE,MAAM,CAAC;IACrC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,0BAA0B,EAAE,MAAM,CAAC;CACpC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBE,CAAC"}
|
|
@@ -18,5 +18,6 @@ export const SlasherConfigSchema = z.object({
|
|
|
18
18
|
slashMaxPayloadSize: z.number(),
|
|
19
19
|
slashGracePeriodL2Slots: z.number(),
|
|
20
20
|
slashBroadcastedInvalidBlockPenalty: schemas.BigInt,
|
|
21
|
+
slashExecuteRoundsLookBack: z.number(),
|
|
21
22
|
slashSelfAllowed: z.boolean().optional()
|
|
22
23
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { SecretValue } from '@aztec/foundation/config';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
3
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
5
|
import type { SequencerConfig, SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
5
6
|
import type { BlockAttestation, BlockProposal, BlockProposalOptions } from '@aztec/stdlib/p2p';
|
|
6
7
|
import type { ProposedBlockHeader, StateReference, Tx } from '@aztec/stdlib/tx';
|
|
7
8
|
import type { PeerId } from '@libp2p/interface';
|
|
8
9
|
import { z } from 'zod';
|
|
10
|
+
import type { CommitteeAttestationsAndSigners } from '../block/index.js';
|
|
9
11
|
/**
|
|
10
12
|
* Validator client configuration
|
|
11
13
|
*/
|
|
@@ -20,10 +22,12 @@ export interface ValidatorClientConfig {
|
|
|
20
22
|
disabledValidators: EthAddress[];
|
|
21
23
|
/** Interval between polling for new attestations from peers */
|
|
22
24
|
attestationPollingIntervalMs: number;
|
|
23
|
-
/**
|
|
25
|
+
/** Whether to re-execute transactions in a block proposal before attesting */
|
|
24
26
|
validatorReexecute: boolean;
|
|
25
27
|
/** Will re-execute until this many milliseconds are left in the slot */
|
|
26
28
|
validatorReexecuteDeadlineMs: number;
|
|
29
|
+
/** Whether to always reexecute block proposals, even for non-validator nodes or when out of the currnet committee */
|
|
30
|
+
alwaysReexecuteBlockProposals?: boolean;
|
|
27
31
|
}
|
|
28
32
|
export type ValidatorClientFullConfig = ValidatorClientConfig & Pick<SequencerConfig, 'txPublicSetupAllowList'> & Pick<SlasherConfig, 'slashBroadcastedInvalidBlockPenalty'>;
|
|
29
33
|
export declare const ValidatorClientConfigSchema: z.ZodObject<{
|
|
@@ -33,6 +37,7 @@ export declare const ValidatorClientConfigSchema: z.ZodObject<{
|
|
|
33
37
|
attestationPollingIntervalMs: z.ZodNumber;
|
|
34
38
|
validatorReexecute: z.ZodBoolean;
|
|
35
39
|
validatorReexecuteDeadlineMs: z.ZodNumber;
|
|
40
|
+
alwaysReexecuteBlockProposals: z.ZodOptional<z.ZodBoolean>;
|
|
36
41
|
}, "strip", z.ZodTypeAny, {
|
|
37
42
|
disableValidator: boolean;
|
|
38
43
|
disabledValidators: EthAddress[];
|
|
@@ -40,6 +45,7 @@ export declare const ValidatorClientConfigSchema: z.ZodObject<{
|
|
|
40
45
|
validatorReexecute: boolean;
|
|
41
46
|
validatorReexecuteDeadlineMs: number;
|
|
42
47
|
validatorAddresses?: EthAddress[] | undefined;
|
|
48
|
+
alwaysReexecuteBlockProposals?: boolean | undefined;
|
|
43
49
|
}, {
|
|
44
50
|
disableValidator: boolean;
|
|
45
51
|
disabledValidators: string[];
|
|
@@ -47,14 +53,15 @@ export declare const ValidatorClientConfigSchema: z.ZodObject<{
|
|
|
47
53
|
validatorReexecute: boolean;
|
|
48
54
|
validatorReexecuteDeadlineMs: number;
|
|
49
55
|
validatorAddresses?: string[] | undefined;
|
|
56
|
+
alwaysReexecuteBlockProposals?: boolean | undefined;
|
|
50
57
|
}>;
|
|
51
58
|
export interface Validator {
|
|
52
59
|
start(): Promise<void>;
|
|
53
|
-
registerBlockProposalHandler(): void;
|
|
54
60
|
updateConfig(config: Partial<ValidatorClientFullConfig>): void;
|
|
55
61
|
createBlockProposal(blockNumber: number, header: ProposedBlockHeader, archive: Fr, stateReference: StateReference, txs: Tx[], proposerAddress: EthAddress | undefined, options: BlockProposalOptions): Promise<BlockProposal | undefined>;
|
|
56
62
|
attestToProposal(proposal: BlockProposal, sender: PeerId): Promise<BlockAttestation[] | undefined>;
|
|
57
63
|
broadcastBlockProposal(proposal: BlockProposal): Promise<void>;
|
|
58
64
|
collectAttestations(proposal: BlockProposal, required: number, deadline: Date): Promise<BlockAttestation[]>;
|
|
65
|
+
signAttestationsAndSigners(attestationsAndSigners: CommitteeAttestationsAndSigners, proposer: EthAddress): Promise<Signature>;
|
|
59
66
|
}
|
|
60
67
|
//# sourceMappingURL=validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/interfaces/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,6EAA6E;IAC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AAsB,EAAE,+BAA+B,EACvD,QAAQ,EAAE,UAAU,GACnB,OAAO,CAAC,SAAS,CAAC,CAAC;CACvB"}
|
|
@@ -6,5 +6,6 @@ export const ValidatorClientConfigSchema = z.object({
|
|
|
6
6
|
disabledValidators: z.array(schemas.EthAddress),
|
|
7
7
|
attestationPollingIntervalMs: z.number().min(0),
|
|
8
8
|
validatorReexecute: z.boolean(),
|
|
9
|
-
validatorReexecuteDeadlineMs: z.number().min(0)
|
|
9
|
+
validatorReexecuteDeadlineMs: z.number().min(0),
|
|
10
|
+
alwaysReexecuteBlockProposals: z.boolean().optional()
|
|
10
11
|
});
|
|
@@ -204,6 +204,7 @@ export declare class ConsensusPayload implements Signable {
|
|
|
204
204
|
static getFields(fields: FieldsOf<ConsensusPayload>): readonly [ProposedBlockHeader, Fr, StateReference];
|
|
205
205
|
getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer;
|
|
206
206
|
toBuffer(): Buffer;
|
|
207
|
+
equals(other: ConsensusPayload): boolean;
|
|
207
208
|
static fromBuffer(buf: Buffer | BufferReader): ConsensusPayload;
|
|
208
209
|
static fromFields(fields: FieldsOf<ConsensusPayload>): ConsensusPayload;
|
|
209
210
|
static fromBlock(block: L2Block): ConsensusPayload;
|
|
@@ -214,6 +215,32 @@ export declare class ConsensusPayload implements Signable {
|
|
|
214
215
|
* @returns The size of the consensus payload.
|
|
215
216
|
*/
|
|
216
217
|
getSize(): number;
|
|
218
|
+
toInspect(): {
|
|
219
|
+
header: {
|
|
220
|
+
lastArchive: `0x${string}`;
|
|
221
|
+
contentCommitment: {
|
|
222
|
+
blobsHash: `0x${string}`;
|
|
223
|
+
inHash: `0x${string}`;
|
|
224
|
+
outHash: `0x${string}`;
|
|
225
|
+
};
|
|
226
|
+
slotNumber: bigint;
|
|
227
|
+
timestamp: bigint;
|
|
228
|
+
coinbase: `0x${string}`;
|
|
229
|
+
feeRecipient: `0x${string}`;
|
|
230
|
+
gasFees: {
|
|
231
|
+
feePerDaGas: bigint;
|
|
232
|
+
feePerL2Gas: bigint;
|
|
233
|
+
};
|
|
234
|
+
totalManaUsed: bigint;
|
|
235
|
+
};
|
|
236
|
+
archive: `0x${string}`;
|
|
237
|
+
stateReference: {
|
|
238
|
+
l1ToL2MessageTree: `0x${string}`;
|
|
239
|
+
noteHashTree: `0x${string}`;
|
|
240
|
+
nullifierTree: `0x${string}`;
|
|
241
|
+
publicDataTree: `0x${string}`;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
217
244
|
toString(): string;
|
|
218
245
|
}
|
|
219
246
|
//# sourceMappingURL=consensus_payload.d.ts.map
|
|
@@ -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,yBAAyB,CAAC;AAGxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAE/E,qBAAa,gBAAiB,YAAW,QAAQ;IAI7C,6DAA6D;aAC7C,MAAM,EAAE,mBAAmB;IAC3C,gDAAgD;aAChC,OAAO,EAAE,EAAE;IAC3B,mDAAmD;aACnC,cAAc,EAAE,cAAc;IARhD,OAAO,CAAC,IAAI,CAAqB;;IAG/B,6DAA6D;IAC7C,MAAM,EAAE,mBAAmB;IAC3C,gDAAgD;IAChC,OAAO,EAAE,EAAE;IAC3B,mDAAmD;IACnC,cAAc,EAAE,cAAc;IAGhD,MAAM,KAAK,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAQhB;IAED,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,gBAAgB,CAAC;IAInD,gBAAgB,CAAC,eAAe,EAAE,wBAAwB,GAAG,MAAM;IAsBnE,QAAQ,IAAI,MAAM;IAIX,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO;IAQ/C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,gBAAgB;IAU/D,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IAIvE,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB;IAIlD,MAAM,CAAC,KAAK,IAAI,gBAAgB;IAIhC,MAAM,CAAC,MAAM,IAAI,gBAAgB;IAIjC;;;OAGG;IACH,OAAO,IAAI,MAAM;IASjB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;IAQT,QAAQ;CAGT"}
|
|
@@ -59,6 +59,9 @@ export class ConsensusPayload {
|
|
|
59
59
|
this.stateReference
|
|
60
60
|
]);
|
|
61
61
|
}
|
|
62
|
+
equals(other) {
|
|
63
|
+
return this.header.equals(other.header) && this.archive.equals(other.archive) && this.stateReference.equals(other.stateReference);
|
|
64
|
+
}
|
|
62
65
|
static fromBuffer(buf) {
|
|
63
66
|
const reader = BufferReader.asReader(buf);
|
|
64
67
|
const payload = new ConsensusPayload(reader.readObject(ProposedBlockHeader), reader.readObject(Fr), reader.readObject(StateReference));
|
|
@@ -87,6 +90,13 @@ export class ConsensusPayload {
|
|
|
87
90
|
this.size = this.toBuffer().length;
|
|
88
91
|
return this.size;
|
|
89
92
|
}
|
|
93
|
+
toInspect() {
|
|
94
|
+
return {
|
|
95
|
+
header: this.header.toInspect(),
|
|
96
|
+
archive: this.archive.toString(),
|
|
97
|
+
stateReference: this.stateReference.toInspect()
|
|
98
|
+
};
|
|
99
|
+
}
|
|
90
100
|
toString() {
|
|
91
101
|
return `header: ${this.header.toString()}, archive: ${this.archive.toString()}, stateReference: ${this.stateReference.l1ToL2MessageTree.root.toString()}`;
|
|
92
102
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
2
|
export declare enum SignatureDomainSeparator {
|
|
3
3
|
blockProposal = 0,
|
|
4
|
-
blockAttestation = 1
|
|
4
|
+
blockAttestation = 1,
|
|
5
|
+
attestationsAndSigners = 2
|
|
5
6
|
}
|
|
6
7
|
export interface Signable {
|
|
7
8
|
getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer;
|