@aztec/sequencer-client 0.16.4 → 0.16.5

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.
Files changed (37) hide show
  1. package/dest/block_builder/solo_block_builder.d.ts +3 -3
  2. package/dest/block_builder/solo_block_builder.d.ts.map +1 -1
  3. package/dest/block_builder/solo_block_builder.js +26 -26
  4. package/dest/block_builder/types.d.ts +11 -2
  5. package/dest/block_builder/types.d.ts.map +1 -1
  6. package/dest/sequencer/utils.js +2 -2
  7. package/package.json +11 -11
  8. package/src/block_builder/index.ts +0 -24
  9. package/src/block_builder/solo_block_builder.ts +0 -758
  10. package/src/block_builder/types.ts +0 -16
  11. package/src/client/index.ts +0 -1
  12. package/src/client/sequencer-client.ts +0 -87
  13. package/src/config.ts +0 -76
  14. package/src/global_variable_builder/config.ts +0 -20
  15. package/src/global_variable_builder/global_builder.ts +0 -87
  16. package/src/global_variable_builder/index.ts +0 -16
  17. package/src/global_variable_builder/viem-reader.ts +0 -61
  18. package/src/index.ts +0 -15
  19. package/src/mocks/verification_keys.ts +0 -36
  20. package/src/prover/empty.ts +0 -74
  21. package/src/prover/index.ts +0 -53
  22. package/src/publisher/config.ts +0 -41
  23. package/src/publisher/index.ts +0 -14
  24. package/src/publisher/l1-publisher.ts +0 -291
  25. package/src/publisher/viem-tx-sender.ts +0 -195
  26. package/src/receiver.ts +0 -13
  27. package/src/sequencer/config.ts +0 -1
  28. package/src/sequencer/index.ts +0 -3
  29. package/src/sequencer/processed_tx.ts +0 -107
  30. package/src/sequencer/public_processor.ts +0 -433
  31. package/src/sequencer/sequencer.ts +0 -434
  32. package/src/sequencer/utils.ts +0 -25
  33. package/src/simulator/index.ts +0 -51
  34. package/src/simulator/public_executor.ts +0 -153
  35. package/src/simulator/public_kernel.ts +0 -54
  36. package/src/simulator/rollup.ts +0 -76
  37. package/src/utils.ts +0 -16
@@ -1,54 +0,0 @@
1
- import { PublicKernelInputs, PublicKernelPublicInputs } from '@aztec/circuits.js';
2
- import { createDebugLogger } from '@aztec/foundation/log';
3
- import { elapsed } from '@aztec/foundation/timer';
4
- import { executePublicKernelPrivatePrevious, executePublicKernelPublicPrevious } from '@aztec/noir-protocol-circuits';
5
- import { CircuitSimulationStats } from '@aztec/types/stats';
6
-
7
- import { PublicKernelCircuitSimulator } from './index.js';
8
-
9
- /**
10
- * Implements the PublicKernelCircuitSimulator.
11
- */
12
- export class RealPublicKernelCircuitSimulator implements PublicKernelCircuitSimulator {
13
- private log = createDebugLogger('aztec:public-kernel-simulator');
14
-
15
- /**
16
- * Simulates the public kernel circuit (with a previous private kernel circuit run) from its inputs.
17
- * @param input - Inputs to the circuit.
18
- * @returns The public inputs as outputs of the simulation.
19
- */
20
- public async publicKernelCircuitPrivateInput(input: PublicKernelInputs): Promise<PublicKernelPublicInputs> {
21
- if (!input.previousKernel.publicInputs.isPrivate) {
22
- throw new Error(`Expected private kernel previous inputs`);
23
- }
24
- const [duration, result] = await elapsed(() => executePublicKernelPrivatePrevious(input));
25
- this.log(`Simulated public kernel circuit with private input`, {
26
- eventName: 'circuit-simulation',
27
- circuitName: 'public-kernel-private-input',
28
- duration,
29
- inputSize: input.toBuffer().length,
30
- outputSize: result.toBuffer().length,
31
- } satisfies CircuitSimulationStats);
32
- return result;
33
- }
34
-
35
- /**
36
- * Simulates the public kernel circuit (with no previous public kernel circuit run) from its inputs.
37
- * @param input - Inputs to the circuit.
38
- * @returns The public inputs as outputs of the simulation.
39
- */
40
- public async publicKernelCircuitNonFirstIteration(input: PublicKernelInputs): Promise<PublicKernelPublicInputs> {
41
- if (input.previousKernel.publicInputs.isPrivate) {
42
- throw new Error(`Expected public kernel previous inputs`);
43
- }
44
- const [duration, result] = await elapsed(() => executePublicKernelPublicPrevious(input));
45
- this.log(`Simulated public kernel circuit non-first iteration`, {
46
- eventName: 'circuit-simulation',
47
- circuitName: 'public-kernel-non-first-iteration',
48
- duration,
49
- inputSize: input.toBuffer().length,
50
- outputSize: result.toBuffer().length,
51
- } satisfies CircuitSimulationStats);
52
- return result;
53
- }
54
- }
@@ -1,76 +0,0 @@
1
- import {
2
- BaseOrMergeRollupPublicInputs,
3
- BaseRollupInputs,
4
- MergeRollupInputs,
5
- RootRollupInputs,
6
- RootRollupPublicInputs,
7
- } from '@aztec/circuits.js';
8
- import { createDebugLogger } from '@aztec/foundation/log';
9
- import { elapsed } from '@aztec/foundation/timer';
10
- import { executeBaseRollup, executeMergeRollup, executeRootRollup } from '@aztec/noir-protocol-circuits';
11
- import { CircuitSimulationStats } from '@aztec/types/stats';
12
-
13
- import { RollupSimulator } from './index.js';
14
-
15
- /**
16
- * Implements the rollup circuit simulator.
17
- */
18
- export class RealRollupCircuitSimulator implements RollupSimulator {
19
- private log = createDebugLogger('aztec:rollup-simulator');
20
-
21
- /**
22
- * Simulates the base rollup circuit from its inputs.
23
- * @param input - Inputs to the circuit.
24
- * @returns The public inputs as outputs of the simulation.
25
- */
26
- public async baseRollupCircuit(input: BaseRollupInputs): Promise<BaseOrMergeRollupPublicInputs> {
27
- const [duration, result] = await elapsed(() => executeBaseRollup(input));
28
-
29
- this.log(`Simulated base rollup circuit`, {
30
- eventName: 'circuit-simulation',
31
- circuitName: 'base-rollup',
32
- duration,
33
- inputSize: input.toBuffer().length,
34
- outputSize: result.toBuffer().length,
35
- } satisfies CircuitSimulationStats);
36
-
37
- return Promise.resolve(result);
38
- }
39
- /**
40
- * Simulates the merge rollup circuit from its inputs.
41
- * @param input - Inputs to the circuit.
42
- * @returns The public inputs as outputs of the simulation.
43
- */
44
- public async mergeRollupCircuit(input: MergeRollupInputs): Promise<BaseOrMergeRollupPublicInputs> {
45
- const [duration, result] = await elapsed(() => executeMergeRollup(input));
46
-
47
- this.log(`Simulated merge rollup circuit`, {
48
- eventName: 'circuit-simulation',
49
- circuitName: 'merge-rollup',
50
- duration,
51
- inputSize: input.toBuffer().length,
52
- outputSize: result.toBuffer().length,
53
- } satisfies CircuitSimulationStats);
54
-
55
- return result;
56
- }
57
-
58
- /**
59
- * Simulates the root rollup circuit from its inputs.
60
- * @param input - Inputs to the circuit.
61
- * @returns The public inputs as outputs of the simulation.
62
- */
63
- public async rootRollupCircuit(input: RootRollupInputs): Promise<RootRollupPublicInputs> {
64
- const [duration, result] = await elapsed(() => executeRootRollup(input));
65
-
66
- this.log(`Simulated root rollup circuit`, {
67
- eventName: 'circuit-simulation',
68
- circuitName: 'root-rollup',
69
- duration,
70
- inputSize: input.toBuffer().length,
71
- outputSize: result.toBuffer().length,
72
- } satisfies CircuitSimulationStats);
73
-
74
- return result;
75
- }
76
- }
package/src/utils.ts DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * Returns a promise that resolves after ms milliseconds, returning "returnValue".
3
- * @param ms - How many milliseconds to sleep.
4
- * @param returnValue - The return value of the promise.
5
- */
6
- export function sleep<T>(ms: number, returnValue: T): Promise<T> {
7
- return new Promise(resolve => setTimeout(() => resolve(returnValue), ms));
8
- }
9
-
10
- /**
11
- * Returns the lowest power of two that is greater of equal to the input.
12
- * @param num - The input.
13
- */
14
- export function ceilPowerOfTwo(num: number): number {
15
- return 2 ** Math.ceil(Math.log2(num));
16
- }