@aztec/prover-node 0.84.0-nightly.20250409 → 0.84.0-nightly.20250412
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.
|
@@ -2,7 +2,7 @@ import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
|
|
|
2
2
|
import type { L1TxUtils, RollupContract } from '@aztec/ethereum';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
5
|
-
import {
|
|
5
|
+
import type { Tuple } from '@aztec/foundation/serialize';
|
|
6
6
|
import type { PublisherConfig, TxSenderConfig } from '@aztec/sequencer-client';
|
|
7
7
|
import type { Proof } from '@aztec/stdlib/proofs';
|
|
8
8
|
import type { FeeRecipient, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prover-node-publisher.d.ts","sourceRoot":"","sources":["../src/prover-node-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"prover-node-publisher.d.ts","sourceRoot":"","sources":["../src/prover-node-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAIzD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;A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O,CAAC,uBAAuB;cA8Bf,kBAAkB;CAGnC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
|
|
2
2
|
import { makeTuple } from '@aztec/foundation/array';
|
|
3
|
-
import { areArraysEqual
|
|
3
|
+
import { areArraysEqual } from '@aztec/foundation/collection';
|
|
4
4
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
5
|
import { Fr } from '@aztec/foundation/fields';
|
|
6
6
|
import { createLogger } from '@aztec/foundation/log';
|
|
7
|
-
import { serializeToBuffer } from '@aztec/foundation/serialize';
|
|
8
7
|
import { InterruptibleSleep } from '@aztec/foundation/sleep';
|
|
9
8
|
import { Timer } from '@aztec/foundation/timer';
|
|
10
9
|
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
@@ -90,7 +89,7 @@ export class ProverNodePublisher {
|
|
|
90
89
|
return false;
|
|
91
90
|
}
|
|
92
91
|
async validateEpochProofSubmission(args) {
|
|
93
|
-
const { fromBlock, toBlock, publicInputs
|
|
92
|
+
const { fromBlock, toBlock, publicInputs } = args;
|
|
94
93
|
// Check that the block numbers match the expected epoch to be proven
|
|
95
94
|
const { pendingBlockNumber: pending, provenBlockNumber: proven } = await this.rollupContract.getTips();
|
|
96
95
|
// Don't publish if proven is beyond our toBlock, pointless to do so
|
|
@@ -120,10 +119,8 @@ export class ProverNodePublisher {
|
|
|
120
119
|
}
|
|
121
120
|
// Compare the public inputs computed by the contract with the ones injected
|
|
122
121
|
const rollupPublicInputs = await this.rollupContract.getEpochProofPublicInputs(this.getSubmitEpochProofArgs(args));
|
|
123
|
-
const aggregationObject = proof.isEmpty() ? times(AGGREGATION_OBJECT_LENGTH, Fr.zero) : proof.extractAggregationObject();
|
|
124
122
|
const argsPublicInputs = [
|
|
125
|
-
...publicInputs.toFields()
|
|
126
|
-
...aggregationObject
|
|
123
|
+
...publicInputs.toFields()
|
|
127
124
|
];
|
|
128
125
|
if (!areArraysEqual(rollupPublicInputs.map(Fr.fromHexString), argsPublicInputs, (a, b)=>a.equals(b))) {
|
|
129
126
|
const fmt = (inputs)=>inputs.map((x)=>x.toString()).join(', ');
|
|
@@ -140,7 +137,6 @@ export class ProverNodePublisher {
|
|
|
140
137
|
args: argsArray[2],
|
|
141
138
|
fees: argsArray[3],
|
|
142
139
|
blobPublicInputs: argsArray[4],
|
|
143
|
-
aggregationObject: argsArray[5],
|
|
144
140
|
proof: proofHex
|
|
145
141
|
}
|
|
146
142
|
];
|
|
@@ -184,8 +180,7 @@ export class ProverNodePublisher {
|
|
|
184
180
|
proverId: EthAddress.fromField(args.publicInputs.proverId).toString()
|
|
185
181
|
},
|
|
186
182
|
makeTuple(AZTEC_MAX_EPOCH_DURATION * 2, (i)=>i % 2 === 0 ? args.publicInputs.fees[i / 2].recipient.toField().toString() : args.publicInputs.fees[(i - 1) / 2].value.toString()),
|
|
187
|
-
`0x${args.publicInputs.blobPublicInputs.filter((_, i)=>i < args.toBlock - args.fromBlock + 1).map((b)=>b.toString()).join(``)}
|
|
188
|
-
`0x${serializeToBuffer(args.proof.extractAggregationObject()).toString('hex')}`
|
|
183
|
+
`0x${args.publicInputs.blobPublicInputs.filter((_, i)=>i < args.toBlock - args.fromBlock + 1).map((b)=>b.toString()).join(``)}`
|
|
189
184
|
];
|
|
190
185
|
}
|
|
191
186
|
async sleepOrInterrupted() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/prover-node",
|
|
3
|
-
"version": "0.84.0-nightly.
|
|
3
|
+
"version": "0.84.0-nightly.20250412",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -53,25 +53,25 @@
|
|
|
53
53
|
]
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@aztec/archiver": "0.84.0-nightly.
|
|
57
|
-
"@aztec/bb-prover": "0.84.0-nightly.
|
|
58
|
-
"@aztec/blob-sink": "0.84.0-nightly.
|
|
59
|
-
"@aztec/constants": "0.84.0-nightly.
|
|
60
|
-
"@aztec/epoch-cache": "0.84.0-nightly.
|
|
61
|
-
"@aztec/ethereum": "0.84.0-nightly.
|
|
62
|
-
"@aztec/foundation": "0.84.0-nightly.
|
|
63
|
-
"@aztec/kv-store": "0.84.0-nightly.
|
|
64
|
-
"@aztec/l1-artifacts": "0.84.0-nightly.
|
|
65
|
-
"@aztec/node-lib": "0.84.0-nightly.
|
|
66
|
-
"@aztec/noir-protocol-circuits-types": "0.84.0-nightly.
|
|
67
|
-
"@aztec/p2p": "0.84.0-nightly.
|
|
68
|
-
"@aztec/protocol-contracts": "0.84.0-nightly.
|
|
69
|
-
"@aztec/prover-client": "0.84.0-nightly.
|
|
70
|
-
"@aztec/sequencer-client": "0.84.0-nightly.
|
|
71
|
-
"@aztec/simulator": "0.84.0-nightly.
|
|
72
|
-
"@aztec/stdlib": "0.84.0-nightly.
|
|
73
|
-
"@aztec/telemetry-client": "0.84.0-nightly.
|
|
74
|
-
"@aztec/world-state": "0.84.0-nightly.
|
|
56
|
+
"@aztec/archiver": "0.84.0-nightly.20250412",
|
|
57
|
+
"@aztec/bb-prover": "0.84.0-nightly.20250412",
|
|
58
|
+
"@aztec/blob-sink": "0.84.0-nightly.20250412",
|
|
59
|
+
"@aztec/constants": "0.84.0-nightly.20250412",
|
|
60
|
+
"@aztec/epoch-cache": "0.84.0-nightly.20250412",
|
|
61
|
+
"@aztec/ethereum": "0.84.0-nightly.20250412",
|
|
62
|
+
"@aztec/foundation": "0.84.0-nightly.20250412",
|
|
63
|
+
"@aztec/kv-store": "0.84.0-nightly.20250412",
|
|
64
|
+
"@aztec/l1-artifacts": "0.84.0-nightly.20250412",
|
|
65
|
+
"@aztec/node-lib": "0.84.0-nightly.20250412",
|
|
66
|
+
"@aztec/noir-protocol-circuits-types": "0.84.0-nightly.20250412",
|
|
67
|
+
"@aztec/p2p": "0.84.0-nightly.20250412",
|
|
68
|
+
"@aztec/protocol-contracts": "0.84.0-nightly.20250412",
|
|
69
|
+
"@aztec/prover-client": "0.84.0-nightly.20250412",
|
|
70
|
+
"@aztec/sequencer-client": "0.84.0-nightly.20250412",
|
|
71
|
+
"@aztec/simulator": "0.84.0-nightly.20250412",
|
|
72
|
+
"@aztec/stdlib": "0.84.0-nightly.20250412",
|
|
73
|
+
"@aztec/telemetry-client": "0.84.0-nightly.20250412",
|
|
74
|
+
"@aztec/world-state": "0.84.0-nightly.20250412",
|
|
75
75
|
"source-map-support": "^0.5.21",
|
|
76
76
|
"tslib": "^2.4.0",
|
|
77
77
|
"viem": "2.23.7"
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@jest/globals": "^29.5.0",
|
|
81
81
|
"@types/jest": "^29.5.0",
|
|
82
|
-
"@types/memdown": "^3.0.0",
|
|
83
82
|
"@types/node": "^18.7.23",
|
|
84
83
|
"@types/source-map-support": "^0.5.10",
|
|
85
84
|
"jest": "^29.5.0",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
|
|
2
2
|
import type { L1TxUtils, RollupContract } from '@aztec/ethereum';
|
|
3
3
|
import { makeTuple } from '@aztec/foundation/array';
|
|
4
|
-
import { areArraysEqual
|
|
4
|
+
import { areArraysEqual } from '@aztec/foundation/collection';
|
|
5
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
6
|
import { Fr } from '@aztec/foundation/fields';
|
|
7
7
|
import { createLogger } from '@aztec/foundation/log';
|
|
8
|
-
import {
|
|
8
|
+
import type { Tuple } from '@aztec/foundation/serialize';
|
|
9
9
|
import { InterruptibleSleep } from '@aztec/foundation/sleep';
|
|
10
10
|
import { Timer } from '@aztec/foundation/timer';
|
|
11
11
|
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
@@ -145,7 +145,7 @@ export class ProverNodePublisher {
|
|
|
145
145
|
publicInputs: RootRollupPublicInputs;
|
|
146
146
|
proof: Proof;
|
|
147
147
|
}) {
|
|
148
|
-
const { fromBlock, toBlock, publicInputs
|
|
148
|
+
const { fromBlock, toBlock, publicInputs } = args;
|
|
149
149
|
|
|
150
150
|
// Check that the block numbers match the expected epoch to be proven
|
|
151
151
|
const { pendingBlockNumber: pending, provenBlockNumber: proven } = await this.rollupContract.getTips();
|
|
@@ -185,10 +185,7 @@ export class ProverNodePublisher {
|
|
|
185
185
|
|
|
186
186
|
// Compare the public inputs computed by the contract with the ones injected
|
|
187
187
|
const rollupPublicInputs = await this.rollupContract.getEpochProofPublicInputs(this.getSubmitEpochProofArgs(args));
|
|
188
|
-
const
|
|
189
|
-
? times(AGGREGATION_OBJECT_LENGTH, Fr.zero)
|
|
190
|
-
: proof.extractAggregationObject();
|
|
191
|
-
const argsPublicInputs = [...publicInputs.toFields(), ...aggregationObject];
|
|
188
|
+
const argsPublicInputs = [...publicInputs.toFields()];
|
|
192
189
|
|
|
193
190
|
if (!areArraysEqual(rollupPublicInputs.map(Fr.fromHexString), argsPublicInputs, (a, b) => a.equals(b))) {
|
|
194
191
|
const fmt = (inputs: Fr[] | readonly string[]) => inputs.map(x => x.toString()).join(', ');
|
|
@@ -214,7 +211,6 @@ export class ProverNodePublisher {
|
|
|
214
211
|
args: argsArray[2],
|
|
215
212
|
fees: argsArray[3],
|
|
216
213
|
blobPublicInputs: argsArray[4],
|
|
217
|
-
aggregationObject: argsArray[5],
|
|
218
214
|
proof: proofHex,
|
|
219
215
|
},
|
|
220
216
|
] as const;
|
|
@@ -277,7 +273,6 @@ export class ProverNodePublisher {
|
|
|
277
273
|
.filter((_, i) => i < args.toBlock - args.fromBlock + 1)
|
|
278
274
|
.map(b => b.toString())
|
|
279
275
|
.join(``)}`,
|
|
280
|
-
`0x${serializeToBuffer(args.proof.extractAggregationObject()).toString('hex')}`,
|
|
281
276
|
] as const;
|
|
282
277
|
}
|
|
283
278
|
|