@aztec/stdlib 2.0.3 → 2.1.0-rc.10
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/block/published_l2_block.d.ts +5 -1
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +5 -2
- package/dest/contract/interfaces/contract_class.d.ts +3 -3
- package/dest/epoch-helpers/index.d.ts +2 -0
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +3 -0
- package/dest/file-store/factory.d.ts.map +1 -1
- package/dest/file-store/factory.js +18 -0
- package/dest/file-store/interface.d.ts +8 -2
- package/dest/file-store/interface.d.ts.map +1 -1
- package/dest/file-store/s3.d.ts +26 -0
- package/dest/file-store/s3.d.ts.map +1 -0
- package/dest/file-store/s3.js +252 -0
- package/dest/interfaces/aztec-node-admin.d.ts +16 -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/configs.d.ts +5 -0
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +2 -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/l1-contracts/slash_factory.d.ts +1 -1
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.js +1 -1
- package/dest/p2p/block_attestation.d.ts +35 -0
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_attestation.js +17 -0
- 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 +11 -1
- package/dest/p2p/gossipable.d.ts +2 -4
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +5 -14
- 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/snapshots/download.d.ts.map +1 -1
- package/dest/snapshots/download.js +58 -2
- package/dest/snapshots/upload.d.ts.map +1 -1
- package/dest/snapshots/upload.js +1 -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 +11 -10
- 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/block/published_l2_block.ts +10 -4
- package/src/epoch-helpers/index.ts +8 -0
- package/src/file-store/factory.ts +15 -0
- package/src/file-store/interface.ts +8 -2
- package/src/file-store/s3.ts +254 -0
- package/src/interfaces/block-builder.ts +1 -0
- package/src/interfaces/configs.ts +3 -0
- package/src/interfaces/slasher.ts +2 -0
- package/src/interfaces/validator.ts +12 -2
- package/src/l1-contracts/slash_factory.ts +1 -1
- package/src/p2p/block_attestation.ts +20 -0
- package/src/p2p/consensus_payload.ts +17 -1
- package/src/p2p/gossipable.ts +6 -16
- package/src/p2p/signature_utils.ts +1 -0
- package/src/slashing/types.ts +23 -0
- package/src/snapshots/download.ts +66 -2
- package/src/snapshots/upload.ts +1 -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
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
+
import { GetObjectCommand, HeadObjectCommand, PutObjectCommand, S3Client } from '@aws-sdk/client-s3';
|
|
3
|
+
import { createReadStream, createWriteStream } from 'fs';
|
|
4
|
+
import { mkdir, mkdtemp, stat, unlink } from 'fs/promises';
|
|
5
|
+
import { tmpdir } from 'os';
|
|
6
|
+
import { basename, dirname, join } from 'path';
|
|
7
|
+
import { finished } from 'stream/promises';
|
|
8
|
+
import { createGzip } from 'zlib';
|
|
9
|
+
function normalizeBasePath(path) {
|
|
10
|
+
return path?.replace(/^\/+|\/+$/g, '') ?? '';
|
|
11
|
+
}
|
|
12
|
+
export class S3FileStore {
|
|
13
|
+
bucketName;
|
|
14
|
+
basePath;
|
|
15
|
+
log;
|
|
16
|
+
s3;
|
|
17
|
+
region;
|
|
18
|
+
endpoint;
|
|
19
|
+
publicBaseUrl;
|
|
20
|
+
constructor(bucketName, basePath, opts, log = createLogger('stdlib:s3-file-store')){
|
|
21
|
+
this.bucketName = bucketName;
|
|
22
|
+
this.basePath = basePath;
|
|
23
|
+
this.log = log;
|
|
24
|
+
this.endpoint = opts.endpoint;
|
|
25
|
+
this.region = this.endpoint ? 'auto' : process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? 'us-east-1';
|
|
26
|
+
this.publicBaseUrl = opts.publicBaseUrl;
|
|
27
|
+
const clientOptions = {};
|
|
28
|
+
if (this.endpoint) {
|
|
29
|
+
clientOptions.region = 'auto';
|
|
30
|
+
clientOptions.endpoint = this.endpoint;
|
|
31
|
+
clientOptions.forcePathStyle = true;
|
|
32
|
+
} else {
|
|
33
|
+
clientOptions.region = this.region;
|
|
34
|
+
}
|
|
35
|
+
this.s3 = new S3Client(clientOptions);
|
|
36
|
+
}
|
|
37
|
+
async save(path, data, opts = {}) {
|
|
38
|
+
const key = this.getFullPath(path);
|
|
39
|
+
const shouldCompress = !!opts.compress;
|
|
40
|
+
const body = shouldCompress ? (await import('zlib')).gzipSync(data) : data;
|
|
41
|
+
const contentLength = body.length;
|
|
42
|
+
const contentType = this.detectContentType(key, shouldCompress);
|
|
43
|
+
const put = new PutObjectCommand({
|
|
44
|
+
Bucket: this.bucketName,
|
|
45
|
+
Key: key,
|
|
46
|
+
Body: body,
|
|
47
|
+
ContentType: contentType,
|
|
48
|
+
CacheControl: opts.metadata?.['Cache-control'],
|
|
49
|
+
Metadata: this.extractUserMetadata(opts.metadata),
|
|
50
|
+
ContentLength: contentLength
|
|
51
|
+
});
|
|
52
|
+
await this.s3.send(put);
|
|
53
|
+
return this.buildReturnedUrl(key, !!opts.public);
|
|
54
|
+
}
|
|
55
|
+
async upload(destPath, srcPath, opts = {}) {
|
|
56
|
+
const key = this.getFullPath(destPath);
|
|
57
|
+
const shouldCompress = opts.compress !== false; // default true like GCS impl
|
|
58
|
+
await mkdir(dirname(srcPath), {
|
|
59
|
+
recursive: true
|
|
60
|
+
}).catch(()=>undefined);
|
|
61
|
+
let contentLength;
|
|
62
|
+
let bodyPath = srcPath;
|
|
63
|
+
// We don't set Content-Encoding and we avoid SigV4 streaming (aws-chunked).
|
|
64
|
+
// With AWS SigV4 streaming uploads (Content-Encoding: aws-chunked[,gzip]), servers require
|
|
65
|
+
// x-amz-decoded-content-length (the size of the decoded payload) and an exact Content-Length
|
|
66
|
+
// that includes chunk metadata. For on-the-fly compression, providing
|
|
67
|
+
// those values without buffering or a pre-pass is impractical. Instead, we pre-gzip to a temp file
|
|
68
|
+
// to know ContentLength up-front and upload the gzipped bytes as-is, omitting Content-Encoding.
|
|
69
|
+
// Reference: AWS SigV4 streaming (chunked upload) requirements —
|
|
70
|
+
// https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html
|
|
71
|
+
if (shouldCompress) {
|
|
72
|
+
// Pre-gzip to a temp file so we know the exact length for R2/S3 headers
|
|
73
|
+
const tmpDir = await mkdtemp(join(tmpdir(), 's3-upload-'));
|
|
74
|
+
const gzPath = join(tmpDir, `${basename(srcPath)}.gz`);
|
|
75
|
+
const source = createReadStream(srcPath);
|
|
76
|
+
const gz = createGzip();
|
|
77
|
+
const out = createWriteStream(gzPath);
|
|
78
|
+
try {
|
|
79
|
+
await finished(source.pipe(gz).pipe(out));
|
|
80
|
+
const st = await stat(gzPath);
|
|
81
|
+
contentLength = st.size;
|
|
82
|
+
bodyPath = gzPath;
|
|
83
|
+
} catch (err) {
|
|
84
|
+
// Ensure temp file is removed on failure
|
|
85
|
+
await unlink(gzPath).catch(()=>undefined);
|
|
86
|
+
throw err;
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
const st = await stat(srcPath);
|
|
90
|
+
contentLength = st.size;
|
|
91
|
+
bodyPath = srcPath;
|
|
92
|
+
}
|
|
93
|
+
const bodyStream = createReadStream(bodyPath);
|
|
94
|
+
const contentType = this.detectContentType(key, shouldCompress);
|
|
95
|
+
try {
|
|
96
|
+
const put = new PutObjectCommand({
|
|
97
|
+
Bucket: this.bucketName,
|
|
98
|
+
Key: key,
|
|
99
|
+
Body: bodyStream,
|
|
100
|
+
ContentType: contentType,
|
|
101
|
+
CacheControl: opts.metadata?.['Cache-control'],
|
|
102
|
+
Metadata: this.extractUserMetadata(opts.metadata),
|
|
103
|
+
// Explicitly set ContentLength so R2 can compute x-amz-decoded-content-length correctly
|
|
104
|
+
ContentLength: contentLength
|
|
105
|
+
});
|
|
106
|
+
await this.s3.send(put);
|
|
107
|
+
} finally{
|
|
108
|
+
if (shouldCompress && bodyPath !== srcPath) {
|
|
109
|
+
await unlink(bodyPath).catch(()=>undefined);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return this.buildReturnedUrl(key, !!opts.public);
|
|
113
|
+
}
|
|
114
|
+
async read(pathOrUrlStr) {
|
|
115
|
+
const { bucket, key } = this.getBucketAndKey(pathOrUrlStr);
|
|
116
|
+
const out = await this.s3.send(new GetObjectCommand({
|
|
117
|
+
Bucket: bucket,
|
|
118
|
+
Key: key
|
|
119
|
+
}));
|
|
120
|
+
const stream = out.Body;
|
|
121
|
+
const chunks = [];
|
|
122
|
+
for await (const chunk of stream){
|
|
123
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
124
|
+
}
|
|
125
|
+
return Buffer.concat(chunks);
|
|
126
|
+
}
|
|
127
|
+
async download(pathOrUrlStr, destPath) {
|
|
128
|
+
const { bucket, key } = this.getBucketAndKey(pathOrUrlStr);
|
|
129
|
+
const out = await this.s3.send(new GetObjectCommand({
|
|
130
|
+
Bucket: bucket,
|
|
131
|
+
Key: key
|
|
132
|
+
}));
|
|
133
|
+
await mkdir(dirname(destPath), {
|
|
134
|
+
recursive: true
|
|
135
|
+
});
|
|
136
|
+
const write = createWriteStream(destPath);
|
|
137
|
+
await finished(out.Body.pipe(write));
|
|
138
|
+
}
|
|
139
|
+
async exists(pathOrUrlStr) {
|
|
140
|
+
try {
|
|
141
|
+
const { bucket, key } = this.getBucketAndKey(pathOrUrlStr);
|
|
142
|
+
await this.s3.send(new HeadObjectCommand({
|
|
143
|
+
Bucket: bucket,
|
|
144
|
+
Key: key
|
|
145
|
+
}));
|
|
146
|
+
return true;
|
|
147
|
+
} catch (err) {
|
|
148
|
+
const code = err?.$metadata?.httpStatusCode ?? err?.name ?? err?.Code;
|
|
149
|
+
if (code === 404 || code === 'NotFound' || code === 'NoSuchKey') {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
this.log.warn(`Error checking existence for ${pathOrUrlStr}: ${err?.message ?? String(err)}`);
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
extractUserMetadata(meta) {
|
|
157
|
+
if (!meta) {
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
const { ['Cache-control']: _ignored, ...rest } = meta;
|
|
161
|
+
return Object.keys(rest).length ? rest : undefined;
|
|
162
|
+
}
|
|
163
|
+
detectContentType(key, isCompressed) {
|
|
164
|
+
// Basic content type inference
|
|
165
|
+
const lower = key.toLowerCase();
|
|
166
|
+
if (lower.endsWith('.json') || lower.endsWith('.json.gz')) {
|
|
167
|
+
return 'application/json';
|
|
168
|
+
}
|
|
169
|
+
if (lower.endsWith('.txt') || lower.endsWith('.log') || lower.endsWith('.csv') || lower.endsWith('.md')) {
|
|
170
|
+
return 'text/plain; charset=utf-8';
|
|
171
|
+
}
|
|
172
|
+
if (lower.endsWith('.db') || lower.endsWith('.sqlite') || lower.endsWith('.bin')) {
|
|
173
|
+
return 'application/octet-stream';
|
|
174
|
+
}
|
|
175
|
+
if (lower.endsWith('.wasm') || lower.endsWith('.wasm.gz')) {
|
|
176
|
+
return 'application/wasm';
|
|
177
|
+
}
|
|
178
|
+
// If compressed, prefer octet-stream unless known
|
|
179
|
+
if (isCompressed) {
|
|
180
|
+
return 'application/octet-stream';
|
|
181
|
+
}
|
|
182
|
+
return undefined;
|
|
183
|
+
}
|
|
184
|
+
buildReturnedUrl(key, makePublic) {
|
|
185
|
+
if (!makePublic) {
|
|
186
|
+
return `s3://${this.bucketName}/${key}`;
|
|
187
|
+
}
|
|
188
|
+
if (this.publicBaseUrl) {
|
|
189
|
+
const base = this.publicBaseUrl.replace(/\/$/, '');
|
|
190
|
+
// key already includes basePath via getFullPath, so do not prefix basePath again
|
|
191
|
+
const full = key.replace(/^\/+/, '');
|
|
192
|
+
return `${base}/${full}`;
|
|
193
|
+
}
|
|
194
|
+
// Try to synthesize a URL from endpoint if available (works for public R2 buckets)
|
|
195
|
+
if (this.endpoint) {
|
|
196
|
+
try {
|
|
197
|
+
const url = new URL(this.endpoint);
|
|
198
|
+
return `https://${this.bucketName}.${url.host}/${key}`;
|
|
199
|
+
} catch {
|
|
200
|
+
// fallthrough
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
// Fallback to AWS style URL if region looks valid
|
|
204
|
+
return `https://${this.bucketName}.s3.${this.region}.amazonaws.com/${key}`;
|
|
205
|
+
}
|
|
206
|
+
getBucketAndKey(pathOrUrlStr) {
|
|
207
|
+
if (URL.canParse(pathOrUrlStr)) {
|
|
208
|
+
const url = new URL(pathOrUrlStr);
|
|
209
|
+
if (url.protocol === 's3:') {
|
|
210
|
+
return {
|
|
211
|
+
bucket: url.host,
|
|
212
|
+
key: url.pathname.replace(/^\/+/, '')
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
// For https URLs, try to infer virtual-hosted or path-style
|
|
216
|
+
if (url.protocol === 'https:' || url.protocol === 'http:') {
|
|
217
|
+
// If the URL matches the configured publicBaseUrl host, map back to our bucket and key
|
|
218
|
+
if (this.publicBaseUrl && url.host === new URL(this.publicBaseUrl).host) {
|
|
219
|
+
return {
|
|
220
|
+
bucket: this.bucketName,
|
|
221
|
+
key: url.pathname.replace(/^\/+/, '')
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
const hostParts = url.host.split('.');
|
|
225
|
+
if (hostParts.length > 3 && (hostParts[1] === 's3' || hostParts[hostParts.length - 2] === 'r2')) {
|
|
226
|
+
// virtual hosted
|
|
227
|
+
return {
|
|
228
|
+
bucket: hostParts[0],
|
|
229
|
+
key: url.pathname.replace(/^\/+/, '')
|
|
230
|
+
};
|
|
231
|
+
} else if (this.endpoint && url.host === new URL(this.endpoint).host) {
|
|
232
|
+
// path-style at custom endpoint
|
|
233
|
+
const [bucket, ...rest] = url.pathname.replace(/^\/+/, '').split('/');
|
|
234
|
+
return {
|
|
235
|
+
bucket,
|
|
236
|
+
key: rest.join('/')
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// Treat as path
|
|
242
|
+
return {
|
|
243
|
+
bucket: this.bucketName,
|
|
244
|
+
key: this.getFullPath(pathOrUrlStr)
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
getFullPath(path) {
|
|
248
|
+
const base = normalizeBasePath(this.basePath);
|
|
249
|
+
const rel = path.replace(/^\/+/, '');
|
|
250
|
+
return base ? join(base, rel) : rel;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
@@ -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,8 @@ 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
|
+
injectFakeAttestation: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
} & {
|
|
99
100
|
nodeUrl: z.ZodOptional<z.ZodString>;
|
|
100
101
|
realProofs: z.ZodBoolean;
|
|
101
102
|
proverId: z.ZodOptional<import("../schemas/schemas.js").ZodFor<import("@aztec/foundation/schemas").EthAddress>>;
|
|
@@ -103,7 +104,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
103
104
|
proverTestDelayMs: z.ZodNumber;
|
|
104
105
|
proverTestDelayFactor: z.ZodNumber;
|
|
105
106
|
proverAgentCount: z.ZodNumber;
|
|
106
|
-
}
|
|
107
|
+
} & {
|
|
107
108
|
slashOverridePayload: z.ZodOptional<z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>>;
|
|
108
109
|
slashMinPenaltyPercentage: z.ZodNumber;
|
|
109
110
|
slashMaxPenaltyPercentage: z.ZodNumber;
|
|
@@ -121,24 +122,26 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
121
122
|
slashMaxPayloadSize: z.ZodNumber;
|
|
122
123
|
slashGracePeriodL2Slots: z.ZodNumber;
|
|
123
124
|
slashBroadcastedInvalidBlockPenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
125
|
+
slashExecuteRoundsLookBack: z.ZodNumber;
|
|
124
126
|
slashSelfAllowed: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
-
}
|
|
127
|
+
} & {
|
|
126
128
|
validatorAddresses: z.ZodOptional<z.ZodArray<z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>, "many">>;
|
|
127
129
|
disableValidator: z.ZodBoolean;
|
|
128
130
|
disabledValidators: z.ZodArray<z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>, "many">;
|
|
129
131
|
attestationPollingIntervalMs: z.ZodNumber;
|
|
130
132
|
validatorReexecute: z.ZodBoolean;
|
|
131
133
|
validatorReexecuteDeadlineMs: z.ZodNumber;
|
|
132
|
-
|
|
134
|
+
alwaysReexecuteBlockProposals: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
} & Pick<{
|
|
133
136
|
archiverPollingIntervalMS: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
134
137
|
archiverBatchSize: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
135
138
|
viemPollingIntervalMS: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
136
139
|
maxLogs: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
137
140
|
archiverStoreMapSizeKb: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
138
141
|
skipValidateBlockAttestations: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
-
}, "archiverPollingIntervalMS" | "archiverBatchSize" | "skipValidateBlockAttestations"
|
|
142
|
+
}, "archiverPollingIntervalMS" | "archiverBatchSize" | "skipValidateBlockAttestations"> & {
|
|
140
143
|
maxTxPoolSize: z.ZodNumber;
|
|
141
|
-
}
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
145
|
secondsBeforeInvalidatingBlockAsCommitteeMember: number;
|
|
143
146
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
|
|
144
147
|
slashMinPenaltyPercentage: number;
|
|
@@ -157,6 +160,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
157
160
|
slashMaxPayloadSize: number;
|
|
158
161
|
slashGracePeriodL2Slots: number;
|
|
159
162
|
slashBroadcastedInvalidBlockPenalty: bigint;
|
|
163
|
+
slashExecuteRoundsLookBack: number;
|
|
160
164
|
realProofs: boolean;
|
|
161
165
|
proverTestDelayType: "fixed" | "realistic";
|
|
162
166
|
proverTestDelayMs: number;
|
|
@@ -196,6 +200,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
196
200
|
fakeProcessingDelayPerTxMs?: number | undefined;
|
|
197
201
|
attestationPropagationTime?: number | undefined;
|
|
198
202
|
skipCollectingAttestations?: boolean | undefined;
|
|
203
|
+
injectFakeAttestation?: boolean | undefined;
|
|
199
204
|
proverId?: import("@aztec/foundation/schemas").EthAddress | undefined;
|
|
200
205
|
archiverPollingIntervalMS?: number | undefined;
|
|
201
206
|
archiverBatchSize?: number | undefined;
|
|
@@ -204,6 +209,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
204
209
|
slashSelfAllowed?: boolean | undefined;
|
|
205
210
|
nodeUrl?: string | undefined;
|
|
206
211
|
validatorAddresses?: import("@aztec/foundation/schemas").EthAddress[] | undefined;
|
|
212
|
+
alwaysReexecuteBlockProposals?: boolean | undefined;
|
|
207
213
|
}, {
|
|
208
214
|
secondsBeforeInvalidatingBlockAsCommitteeMember: number;
|
|
209
215
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
|
|
@@ -223,6 +229,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
223
229
|
slashMaxPayloadSize: number;
|
|
224
230
|
slashGracePeriodL2Slots: number;
|
|
225
231
|
slashBroadcastedInvalidBlockPenalty: string | number | bigint;
|
|
232
|
+
slashExecuteRoundsLookBack: number;
|
|
226
233
|
realProofs: boolean;
|
|
227
234
|
proverTestDelayType: "fixed" | "realistic";
|
|
228
235
|
proverTestDelayMs: number;
|
|
@@ -262,6 +269,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
262
269
|
fakeProcessingDelayPerTxMs?: number | undefined;
|
|
263
270
|
attestationPropagationTime?: number | undefined;
|
|
264
271
|
skipCollectingAttestations?: boolean | undefined;
|
|
272
|
+
injectFakeAttestation?: boolean | undefined;
|
|
265
273
|
proverId?: any;
|
|
266
274
|
archiverPollingIntervalMS?: string | number | bigint | undefined;
|
|
267
275
|
archiverBatchSize?: string | number | bigint | undefined;
|
|
@@ -270,6 +278,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
270
278
|
slashSelfAllowed?: boolean | undefined;
|
|
271
279
|
nodeUrl?: string | undefined;
|
|
272
280
|
validatorAddresses?: string[] | undefined;
|
|
281
|
+
alwaysReexecuteBlockProposals?: boolean | undefined;
|
|
273
282
|
}>;
|
|
274
283
|
export declare const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin>;
|
|
275
284
|
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,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aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;KAAE,CAAC;CACpE;AACD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,GAAG,CAAC;IACf,uBAAuB,EAAE,MAAM,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,kBAAkB,EAAE,KAAK,CAAC;IAC1B,OAAO,EAAE,EAAE,EAAE,CAAC;CACf;AAED,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,iBAAiB,EAAE,eAAe,GAAG,cAAc,CAAC,GAChG,IAAI,CAAC,WAAW,EAAE,WAAW,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"}
|
|
@@ -49,6 +49,8 @@ export interface SequencerConfig {
|
|
|
49
49
|
skipCollectingAttestations?: boolean;
|
|
50
50
|
/** Do not invalidate the previous block if invalid when we are the proposer (for testing only) */
|
|
51
51
|
skipInvalidateBlockAsProposer?: boolean;
|
|
52
|
+
/** Inject a fake attestation (for testing only) */
|
|
53
|
+
injectFakeAttestation?: boolean;
|
|
52
54
|
}
|
|
53
55
|
export declare const SequencerConfigSchema: z.ZodObject<{
|
|
54
56
|
transactionPollingIntervalMS: z.ZodOptional<z.ZodNumber>;
|
|
@@ -101,6 +103,7 @@ export declare const SequencerConfigSchema: z.ZodObject<{
|
|
|
101
103
|
skipCollectingAttestations: z.ZodOptional<z.ZodBoolean>;
|
|
102
104
|
secondsBeforeInvalidatingBlockAsCommitteeMember: z.ZodNumber;
|
|
103
105
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: z.ZodNumber;
|
|
106
|
+
injectFakeAttestation: z.ZodOptional<z.ZodBoolean>;
|
|
104
107
|
}, "strip", z.ZodTypeAny, {
|
|
105
108
|
secondsBeforeInvalidatingBlockAsCommitteeMember: number;
|
|
106
109
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
|
|
@@ -132,6 +135,7 @@ export declare const SequencerConfigSchema: z.ZodObject<{
|
|
|
132
135
|
fakeProcessingDelayPerTxMs?: number | undefined;
|
|
133
136
|
attestationPropagationTime?: number | undefined;
|
|
134
137
|
skipCollectingAttestations?: boolean | undefined;
|
|
138
|
+
injectFakeAttestation?: boolean | undefined;
|
|
135
139
|
}, {
|
|
136
140
|
secondsBeforeInvalidatingBlockAsCommitteeMember: number;
|
|
137
141
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
|
|
@@ -163,5 +167,6 @@ export declare const SequencerConfigSchema: z.ZodObject<{
|
|
|
163
167
|
fakeProcessingDelayPerTxMs?: number | undefined;
|
|
164
168
|
attestationPropagationTime?: number | undefined;
|
|
165
169
|
skipCollectingAttestations?: boolean | undefined;
|
|
170
|
+
injectFakeAttestation?: boolean | undefined;
|
|
166
171
|
}>;
|
|
167
172
|
//# sourceMappingURL=configs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../src/interfaces/configs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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AClC,yBAAyB,CAAC,EAAE,UAAU,CAAC;IACvC,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gFAAgF;IAChF,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,0EAA0E;IAC1E,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,wGAAwG;IACxG,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,oGAAoG;IACpG,+CAA+C,CAAC,EAAE,MAAM,CAAC;IACzD,wGAAwG;IACxG,kDAAkD,CAAC,EAAE,MAAM,CAAC;IAC5D,sDAAsD;IACtD,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,kGAAkG;IAClG,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,mDAAmD;IACnD,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBE,CAAC"}
|
|
@@ -21,5 +21,6 @@ export const SequencerConfigSchema = z.object({
|
|
|
21
21
|
attestationPropagationTime: z.number().optional(),
|
|
22
22
|
skipCollectingAttestations: z.boolean().optional(),
|
|
23
23
|
secondsBeforeInvalidatingBlockAsCommitteeMember: z.number(),
|
|
24
|
-
secondsBeforeInvalidatingBlockAsNonCommitteeMember: z.number()
|
|
24
|
+
secondsBeforeInvalidatingBlockAsNonCommitteeMember: z.number(),
|
|
25
|
+
injectFakeAttestation: z.boolean().optional()
|
|
25
26
|
});
|
|
@@ -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,EAAE,UAAU,EAAE,CAAC;IACpC,oBAAoB,EAAE,UAAU,EAAE,CAAC;IACnC,+BAA+B,EAAE,MAAM,CAAC;IACxC,wCAAwC,EAAE,MAAM,CAAC;IACjD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2BAA2B,EAAE,MAAM,CAAC;IACpC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,mCAAmC,EAAE,MAAM,CAAC;IAC5C,sCAAsC,EAAE,MAAM,CAAC;IAC/C,qCAAqC,EAAE,MAAM,CAAC;IAC9C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,4BAA4B,EAAE,MAAM,CAAC;IACrC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;
|
|
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,EAAE,UAAU,EAAE,CAAC;IACpC,oBAAoB,EAAE,UAAU,EAAE,CAAC;IACnC,+BAA+B,EAAE,MAAM,CAAC;IACxC,wCAAwC,EAAE,MAAM,CAAC;IACjD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2BAA2B,EAAE,MAAM,CAAC;IACpC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,mCAAmC,EAAE,MAAM,CAAC;IAC5C,sCAAsC,EAAE,MAAM,CAAC;IAC/C,qCAAqC,EAAE,MAAM,CAAC;IAC9C,mBAAmB,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,EAA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,EAAE,EAAE,EAAE,EACT,eAAe,EAAE,UAAU,GAAG,SAAS,EACvC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IACtC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,SAAS,CAAC,CAAC;IAEnG,sBAAsB,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,mBAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC5G,0BAA0B,CACxB,sBAAsB,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
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type L1TxRequest, type ViemClient } from '@aztec/ethereum';
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import { type Hex, type Log } from 'viem';
|
|
3
|
+
import { type Hex, type Log } from '@spalladino/viem';
|
|
4
4
|
import type { L1RollupConstants } from '../epoch-helpers/index.js';
|
|
5
5
|
import { type SlashPayload, type ValidatorSlash, type ValidatorSlashOffense } from '../slashing/index.js';
|
|
6
6
|
export declare class SlashFactoryContract {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash_factory.d.ts","sourceRoot":"","sources":["../../src/l1-contracts/slash_factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,EAA8B,KAAK,GAAG,EAAE,KAAK,GAAG,EAAmC,MAAM,
|
|
1
|
+
{"version":3,"file":"slash_factory.d.ts","sourceRoot":"","sources":["../../src/l1-contracts/slash_factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,EAA8B,KAAK,GAAG,EAAE,KAAK,GAAG,EAAmC,MAAM,kBAAkB,CAAC;AAEnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,oBAAoB;aAKb,MAAM,EAAE,UAAU;IAJpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;IAClE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4D;gBAGnE,MAAM,EAAE,UAAU,EAClC,OAAO,EAAE,GAAG,GAAG,UAAU;IAS3B,IAAW,OAAO,eAEjB;IAEM,yBAAyB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,WAAW;IAiBxE,wEAAwE;IACjE,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE;;;;;;;;;IAIxC,4BAA4B,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAiBpE;;;;;OAKG;IACU,yBAAyB,CACpC,cAAc,EAAE,UAAU,EAC1B,QAAQ,EAAE;QACR,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,+BAA+B,EAAE,MAAM,CAAC;KACzC,GAAG,IAAI,CAAC,iBAAiB,EAAE,cAAc,GAAG,sBAAsB,CAAC,GACnE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAqDtC,uBAAuB,CAClC,OAAO,EAAE,cAAc,EAAE,GACxB,OAAO,CAAC;QAAE,OAAO,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,GAAG,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IAUnE,OAAO,CAAC,WAAW;CAQpB;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAMhF;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,qBAAqB,CAKjF"}
|
|
@@ -3,7 +3,7 @@ import { maxBigint } from '@aztec/foundation/bigint';
|
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
5
|
import { SlashFactoryAbi } from '@aztec/l1-artifacts/SlashFactoryAbi';
|
|
6
|
-
import { encodeFunctionData, getContract } from 'viem';
|
|
6
|
+
import { encodeFunctionData, getContract } from '@spalladino/viem';
|
|
7
7
|
import { OffenseToBigInt, bigIntToOffense } from '../slashing/index.js';
|
|
8
8
|
export class SlashFactoryContract {
|
|
9
9
|
client;
|