@aztec/sequencer-client 0.7.10 → 0.8.6
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/README.md +1 -1
- package/dest/client/sequencer-client.d.ts +3 -3
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +6 -6
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +14 -7
- package/dest/global_variable_builder/config.d.ts +5 -5
- package/dest/global_variable_builder/config.d.ts.map +1 -1
- package/dest/global_variable_builder/viem-reader.js +3 -3
- package/dest/publisher/config.d.ts +6 -2
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/index.d.ts +27 -0
- package/dest/publisher/index.d.ts.map +1 -1
- package/dest/publisher/index.js +1 -1
- package/dest/publisher/l1-publisher.d.ts +26 -11
- package/dest/publisher/l1-publisher.d.ts.map +1 -1
- package/dest/publisher/l1-publisher.js +18 -4
- package/dest/publisher/viem-tx-sender.d.ts +2 -1
- package/dest/publisher/viem-tx-sender.d.ts.map +1 -1
- package/dest/publisher/viem-tx-sender.js +27 -7
- package/dest/sequencer/public_processor.d.ts +4 -2
- package/dest/sequencer/public_processor.d.ts.map +1 -1
- package/dest/sequencer/public_processor.js +11 -5
- package/dest/sequencer/sequencer.d.ts +13 -9
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +53 -34
- package/dest/simulator/index.d.ts +0 -1
- package/dest/simulator/index.d.ts.map +1 -1
- package/dest/simulator/index.js +2 -2
- package/dest/simulator/public_executor.d.ts +28 -4
- package/dest/simulator/public_executor.d.ts.map +1 -1
- package/dest/simulator/public_executor.js +46 -7
- package/dest/simulator/public_kernel.d.ts +1 -0
- package/dest/simulator/public_kernel.d.ts.map +1 -1
- package/dest/simulator/public_kernel.js +26 -5
- package/dest/simulator/rollup.d.ts +2 -8
- package/dest/simulator/rollup.d.ts.map +1 -1
- package/dest/simulator/rollup.js +37 -18
- package/package.json +70 -11
- package/src/client/sequencer-client.ts +7 -6
- package/src/config.ts +14 -5
- package/src/global_variable_builder/config.ts +6 -5
- package/src/global_variable_builder/viem-reader.ts +2 -2
- package/src/publisher/config.ts +7 -2
- package/src/publisher/index.ts +28 -0
- package/src/publisher/l1-publisher.ts +46 -13
- package/src/publisher/viem-tx-sender.ts +33 -13
- package/src/sequencer/public_processor.ts +13 -4
- package/src/sequencer/sequencer.ts +59 -45
- package/src/simulator/index.ts +0 -2
- package/src/simulator/public_executor.ts +53 -7
- package/src/simulator/public_kernel.ts +24 -4
- package/src/simulator/rollup.ts +38 -21
- package/.eslintrc.cjs +0 -1
- package/.tsbuildinfo +0 -1
- package/dest/block_builder/solo_block_builder.test.d.ts +0 -3
- package/dest/block_builder/solo_block_builder.test.d.ts.map +0 -1
- package/dest/block_builder/solo_block_builder.test.js +0 -277
- package/dest/publisher/l1-publisher.test.d.ts +0 -2
- package/dest/publisher/l1-publisher.test.d.ts.map +0 -1
- package/dest/publisher/l1-publisher.test.js +0 -58
- package/dest/sequencer/public_processor.test.d.ts +0 -2
- package/dest/sequencer/public_processor.test.d.ts.map +0 -1
- package/dest/sequencer/public_processor.test.js +0 -164
- package/dest/sequencer/sequencer.test.d.ts +0 -2
- package/dest/sequencer/sequencer.test.d.ts.map +0 -1
- package/dest/sequencer/sequencer.test.js +0 -99
- package/jest.integration.config.json +0 -13
- package/src/block_builder/solo_block_builder.test.ts +0 -425
- package/src/publisher/l1-publisher.test.ts +0 -79
- package/src/sequencer/public_processor.test.ts +0 -265
- package/src/sequencer/sequencer.test.ts +0 -160
- package/tsconfig.json +0 -38
package/src/simulator/rollup.ts
CHANGED
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
mergeRollupSim,
|
|
11
11
|
rootRollupSim,
|
|
12
12
|
} from '@aztec/circuits.js';
|
|
13
|
+
import { createDebugLogger } from '@aztec/foundation/log';
|
|
14
|
+
import { elapsed } from '@aztec/foundation/timer';
|
|
13
15
|
|
|
14
16
|
import { RollupSimulator } from './index.js';
|
|
15
17
|
|
|
@@ -17,31 +19,28 @@ import { RollupSimulator } from './index.js';
|
|
|
17
19
|
* Implements the rollup circuit simulator using the wasm circuits implementation.
|
|
18
20
|
*/
|
|
19
21
|
export class WasmRollupCircuitSimulator implements RollupSimulator {
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
constructor(wasm: CircuitsWasm) {
|
|
23
|
-
this.wasm = wasm;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Creates a new instance using the default CircuitsWasm module.
|
|
28
|
-
* @returns A new instance.
|
|
29
|
-
*/
|
|
30
|
-
public static async new() {
|
|
31
|
-
return new this(await CircuitsWasm.get());
|
|
32
|
-
}
|
|
22
|
+
private log = createDebugLogger('aztec:rollup-simulator');
|
|
33
23
|
|
|
34
24
|
/**
|
|
35
25
|
* Simulates the base rollup circuit from its inputs.
|
|
36
26
|
* @param input - Inputs to the circuit.
|
|
37
27
|
* @returns The public inputs as outputs of the simulation.
|
|
38
28
|
*/
|
|
39
|
-
baseRollupCircuit(input: BaseRollupInputs): Promise<BaseOrMergeRollupPublicInputs> {
|
|
40
|
-
const
|
|
29
|
+
public async baseRollupCircuit(input: BaseRollupInputs): Promise<BaseOrMergeRollupPublicInputs> {
|
|
30
|
+
const wasm = await CircuitsWasm.get();
|
|
31
|
+
const [time, result] = await elapsed(() => baseRollupSim(wasm, input));
|
|
41
32
|
if (result instanceof CircuitError) {
|
|
42
33
|
throw new CircuitError(result.code, result.message);
|
|
43
34
|
}
|
|
44
35
|
|
|
36
|
+
this.log(`Simulated base rollup circuit`, {
|
|
37
|
+
eventName: 'circuit-simulation',
|
|
38
|
+
circuitName: 'base-rollup',
|
|
39
|
+
duration: time.ms(),
|
|
40
|
+
inputSize: input.toBuffer().length,
|
|
41
|
+
outputSize: result.toBuffer().length,
|
|
42
|
+
});
|
|
43
|
+
|
|
45
44
|
return Promise.resolve(result);
|
|
46
45
|
}
|
|
47
46
|
/**
|
|
@@ -49,13 +48,22 @@ export class WasmRollupCircuitSimulator implements RollupSimulator {
|
|
|
49
48
|
* @param input - Inputs to the circuit.
|
|
50
49
|
* @returns The public inputs as outputs of the simulation.
|
|
51
50
|
*/
|
|
52
|
-
mergeRollupCircuit(input: MergeRollupInputs): Promise<BaseOrMergeRollupPublicInputs> {
|
|
53
|
-
const
|
|
51
|
+
public async mergeRollupCircuit(input: MergeRollupInputs): Promise<BaseOrMergeRollupPublicInputs> {
|
|
52
|
+
const wasm = await CircuitsWasm.get();
|
|
53
|
+
const [time, result] = await elapsed(() => mergeRollupSim(wasm, input));
|
|
54
54
|
if (result instanceof CircuitError) {
|
|
55
55
|
throw new CircuitError(result.code, result.message);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
this.log(`Simulated merge rollup circuit`, {
|
|
59
|
+
eventName: 'circuit-simulation',
|
|
60
|
+
circuitName: 'merge-rollup',
|
|
61
|
+
duration: time.ms(),
|
|
62
|
+
inputSize: input.toBuffer().length,
|
|
63
|
+
outputSize: result.toBuffer().length,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return result;
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
/**
|
|
@@ -63,12 +71,21 @@ export class WasmRollupCircuitSimulator implements RollupSimulator {
|
|
|
63
71
|
* @param input - Inputs to the circuit.
|
|
64
72
|
* @returns The public inputs as outputs of the simulation.
|
|
65
73
|
*/
|
|
66
|
-
rootRollupCircuit(input: RootRollupInputs): Promise<RootRollupPublicInputs> {
|
|
67
|
-
const
|
|
74
|
+
public async rootRollupCircuit(input: RootRollupInputs): Promise<RootRollupPublicInputs> {
|
|
75
|
+
const wasm = await CircuitsWasm.get();
|
|
76
|
+
const [time, result] = await elapsed(() => rootRollupSim(wasm, input));
|
|
68
77
|
if (result instanceof CircuitError) {
|
|
69
78
|
throw new CircuitError(result.code, result.message);
|
|
70
79
|
}
|
|
71
80
|
|
|
72
|
-
|
|
81
|
+
this.log(`Simulated root rollup circuit`, {
|
|
82
|
+
eventName: 'circuit-simulation',
|
|
83
|
+
circuitName: 'root-rollup',
|
|
84
|
+
duration: time.ms(),
|
|
85
|
+
inputSize: input.toBuffer().length,
|
|
86
|
+
outputSize: result.toBuffer().length,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return result;
|
|
73
90
|
}
|
|
74
91
|
}
|
package/.eslintrc.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@aztec/foundation/eslint');
|