@aztec/sequencer-client 0.32.0 → 0.33.0
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/client/sequencer-client.d.ts +8 -8
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +1 -1
- package/dest/config.d.ts +3 -3
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +1 -1
- package/dest/global_variable_builder/config.d.ts +1 -1
- package/dest/global_variable_builder/config.d.ts.map +1 -1
- package/dest/global_variable_builder/global_builder.d.ts +1 -1
- package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
- package/dest/global_variable_builder/global_builder.js +1 -1
- package/dest/global_variable_builder/index.d.ts +2 -2
- package/dest/global_variable_builder/index.d.ts.map +1 -1
- package/dest/global_variable_builder/index.js +1 -1
- package/dest/global_variable_builder/viem-reader.d.ts +2 -2
- package/dest/global_variable_builder/viem-reader.d.ts.map +1 -1
- package/dest/publisher/config.d.ts +1 -1
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/index.d.ts +1 -1
- package/dest/publisher/index.d.ts.map +1 -1
- package/dest/publisher/l1-publisher.d.ts +3 -3
- package/dest/publisher/l1-publisher.d.ts.map +1 -1
- package/dest/publisher/viem-tx-sender.d.ts +3 -3
- package/dest/publisher/viem-tx-sender.d.ts.map +1 -1
- package/dest/publisher/viem-tx-sender.js +1 -1
- package/dest/receiver.d.ts +1 -1
- package/dest/receiver.d.ts.map +1 -1
- package/dest/sequencer/abstract_phase_manager.d.ts +21 -9
- package/dest/sequencer/abstract_phase_manager.d.ts.map +1 -1
- package/dest/sequencer/abstract_phase_manager.js +38 -39
- package/dest/sequencer/app_logic_phase_manager.d.ts +7 -6
- package/dest/sequencer/app_logic_phase_manager.d.ts.map +1 -1
- package/dest/sequencer/app_logic_phase_manager.js +3 -3
- package/dest/sequencer/hints_builder.d.ts +9 -5
- package/dest/sequencer/hints_builder.d.ts.map +1 -1
- package/dest/sequencer/hints_builder.js +24 -4
- package/dest/sequencer/phase_manager_factory.d.ts +7 -7
- package/dest/sequencer/phase_manager_factory.d.ts.map +1 -1
- package/dest/sequencer/phase_manager_factory.js +5 -4
- package/dest/sequencer/public_processor.d.ts +10 -7
- package/dest/sequencer/public_processor.d.ts.map +1 -1
- package/dest/sequencer/public_processor.js +65 -27
- package/dest/sequencer/sequencer.d.ts +11 -21
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +33 -38
- package/dest/sequencer/setup_phase_manager.d.ts +7 -6
- package/dest/sequencer/setup_phase_manager.d.ts.map +1 -1
- package/dest/sequencer/setup_phase_manager.js +2 -2
- package/dest/sequencer/tail_phase_manager.d.ts +11 -6
- package/dest/sequencer/tail_phase_manager.d.ts.map +1 -1
- package/dest/sequencer/tail_phase_manager.js +28 -3
- package/dest/sequencer/teardown_phase_manager.d.ts +7 -6
- package/dest/sequencer/teardown_phase_manager.d.ts.map +1 -1
- package/dest/sequencer/teardown_phase_manager.js +2 -2
- package/dest/sequencer/tx_validator.d.ts +3 -3
- package/dest/sequencer/tx_validator.d.ts.map +1 -1
- package/dest/sequencer/tx_validator.js +9 -8
- package/dest/sequencer/tx_validator_factory.d.ts +3 -3
- package/dest/sequencer/tx_validator_factory.d.ts.map +1 -1
- package/dest/sequencer/utils.d.ts +1 -1
- package/dest/sequencer/utils.d.ts.map +1 -1
- package/dest/sequencer/utils.js +8 -7
- package/dest/simulator/index.d.ts +2 -2
- package/dest/simulator/index.d.ts.map +1 -1
- package/dest/simulator/public_executor.d.ts +5 -5
- package/dest/simulator/public_executor.d.ts.map +1 -1
- package/dest/simulator/public_executor.js +2 -2
- package/dest/simulator/public_kernel.d.ts +4 -4
- package/dest/simulator/public_kernel.d.ts.map +1 -1
- package/dest/simulator/public_kernel.js +1 -1
- package/package.json +32 -15
- package/src/client/sequencer-client.ts +8 -8
- package/src/config.ts +5 -5
- package/src/global_variable_builder/config.ts +1 -1
- package/src/global_variable_builder/global_builder.ts +1 -1
- package/src/global_variable_builder/index.ts +2 -2
- package/src/global_variable_builder/viem-reader.ts +6 -6
- package/src/publisher/config.ts +1 -1
- package/src/publisher/index.ts +1 -1
- package/src/publisher/l1-publisher.ts +4 -4
- package/src/publisher/viem-tx-sender.ts +12 -12
- package/src/receiver.ts +1 -1
- package/src/sequencer/abstract_phase_manager.ts +88 -77
- package/src/sequencer/app_logic_phase_manager.ts +13 -8
- package/src/sequencer/hints_builder.ts +49 -16
- package/src/sequencer/phase_manager_factory.ts +11 -10
- package/src/sequencer/public_processor.ts +105 -59
- package/src/sequencer/sequencer.ts +52 -61
- package/src/sequencer/setup_phase_manager.ts +12 -7
- package/src/sequencer/tail_phase_manager.ts +77 -8
- package/src/sequencer/teardown_phase_manager.ts +12 -7
- package/src/sequencer/tx_validator.ts +18 -10
- package/src/sequencer/tx_validator_factory.ts +3 -3
- package/src/sequencer/utils.ts +8 -7
- package/src/simulator/index.ts +5 -4
- package/src/simulator/public_executor.ts +20 -11
- package/src/simulator/public_kernel.ts +8 -7
- package/dest/utils.d.ts +0 -12
- package/dest/utils.d.ts.map +0 -1
- package/dest/utils.js +0 -16
- package/src/utils.ts +0 -16
|
@@ -1,22 +1,31 @@
|
|
|
1
|
-
import { MerkleTreeId, NullifierMembershipWitness, Tx } from '@aztec/circuit-types';
|
|
1
|
+
import { MerkleTreeId, NullifierMembershipWitness, type Tx } from '@aztec/circuit-types';
|
|
2
2
|
import {
|
|
3
|
-
AztecAddress,
|
|
3
|
+
type AztecAddress,
|
|
4
4
|
ContractClassRegisteredEvent,
|
|
5
5
|
ContractInstanceDeployedEvent,
|
|
6
|
-
EthAddress,
|
|
6
|
+
type EthAddress,
|
|
7
7
|
Fr,
|
|
8
|
-
FunctionSelector,
|
|
9
|
-
L1_TO_L2_MSG_TREE_HEIGHT,
|
|
10
|
-
NULLIFIER_TREE_HEIGHT,
|
|
11
|
-
NullifierLeafPreimage,
|
|
12
|
-
PublicDataTreeLeafPreimage,
|
|
8
|
+
type FunctionSelector,
|
|
9
|
+
type L1_TO_L2_MSG_TREE_HEIGHT,
|
|
10
|
+
type NULLIFIER_TREE_HEIGHT,
|
|
11
|
+
type NullifierLeafPreimage,
|
|
12
|
+
type PublicDataTreeLeafPreimage,
|
|
13
13
|
} from '@aztec/circuits.js';
|
|
14
14
|
import { computeL1ToL2MessageNullifier, computePublicDataTreeLeafSlot } from '@aztec/circuits.js/hash';
|
|
15
15
|
import { createDebugLogger } from '@aztec/foundation/log';
|
|
16
16
|
import { getCanonicalClassRegistererAddress } from '@aztec/protocol-contracts/class-registerer';
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
import {
|
|
18
|
+
type CommitmentsDB,
|
|
19
|
+
MessageLoadOracleInputs,
|
|
20
|
+
type PublicContractsDB,
|
|
21
|
+
type PublicStateDB,
|
|
22
|
+
} from '@aztec/simulator';
|
|
23
|
+
import {
|
|
24
|
+
type ContractClassPublic,
|
|
25
|
+
type ContractDataSource,
|
|
26
|
+
type ContractInstanceWithAddress,
|
|
27
|
+
} from '@aztec/types/contracts';
|
|
28
|
+
import { type MerkleTreeOperations } from '@aztec/world-state';
|
|
20
29
|
|
|
21
30
|
/**
|
|
22
31
|
* Implements the PublicContractsDB using a ContractDataSource.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { CircuitSimulationStats } from '@aztec/circuit-types/stats';
|
|
1
|
+
import { type CircuitSimulationStats } from '@aztec/circuit-types/stats';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type KernelCircuitPublicInputs,
|
|
4
|
+
type PublicKernelCircuitPrivateInputs,
|
|
5
|
+
type PublicKernelCircuitPublicInputs,
|
|
6
|
+
type PublicKernelTailCircuitPrivateInputs,
|
|
6
7
|
} from '@aztec/circuits.js';
|
|
7
8
|
import { createDebugLogger } from '@aztec/foundation/log';
|
|
8
9
|
import { elapsed } from '@aztec/foundation/timer';
|
|
@@ -20,9 +21,9 @@ import {
|
|
|
20
21
|
convertPublicTeardownRollupInputsToWitnessMap,
|
|
21
22
|
convertPublicTeardownRollupOutputFromWitnessMap,
|
|
22
23
|
} from '@aztec/noir-protocol-circuits-types';
|
|
23
|
-
import { SimulationProvider, WASMSimulator } from '@aztec/simulator';
|
|
24
|
+
import { type SimulationProvider, WASMSimulator } from '@aztec/simulator';
|
|
24
25
|
|
|
25
|
-
import { PublicKernelCircuitSimulator } from './index.js';
|
|
26
|
+
import { type PublicKernelCircuitSimulator } from './index.js';
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* Implements the PublicKernelCircuitSimulator.
|
|
@@ -120,7 +121,7 @@ export class RealPublicKernelCircuitSimulator implements PublicKernelCircuitSimu
|
|
|
120
121
|
*/
|
|
121
122
|
public async publicKernelCircuitTail(
|
|
122
123
|
input: PublicKernelTailCircuitPrivateInputs,
|
|
123
|
-
): Promise<
|
|
124
|
+
): Promise<KernelCircuitPublicInputs> {
|
|
124
125
|
const inputWitness = convertPublicTailInputsToWitnessMap(input);
|
|
125
126
|
const [duration, witness] = await elapsed(() =>
|
|
126
127
|
this.wasmSimulator.simulateCircuit(inputWitness, PublicKernelTailArtifact),
|
package/dest/utils.d.ts
DELETED
|
@@ -1,12 +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 declare function sleep<T>(ms: number, returnValue: T): Promise<T>;
|
|
7
|
-
/**
|
|
8
|
-
* Returns the lowest power of two that is greater of equal to the input.
|
|
9
|
-
* @param num - The input.
|
|
10
|
-
*/
|
|
11
|
-
export declare function ceilPowerOfTwo(num: number): number;
|
|
12
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dest/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAE/D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
package/dest/utils.js
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(ms, returnValue) {
|
|
7
|
-
return new Promise(resolve => setTimeout(() => resolve(returnValue), ms));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Returns the lowest power of two that is greater of equal to the input.
|
|
11
|
-
* @param num - The input.
|
|
12
|
-
*/
|
|
13
|
-
export function ceilPowerOfTwo(num) {
|
|
14
|
-
return 2 ** Math.ceil(Math.log2(num));
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxLQUFLLENBQUksRUFBVSxFQUFFLFdBQWM7SUFDakQsT0FBTyxJQUFJLE9BQU8sQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLFVBQVUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxPQUFPLENBQUMsV0FBVyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUM1RSxDQUFDO0FBRUQ7OztHQUdHO0FBQ0gsTUFBTSxVQUFVLGNBQWMsQ0FBQyxHQUFXO0lBQ3hDLE9BQU8sQ0FBQyxJQUFJLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3hDLENBQUMifQ==
|
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
|
-
}
|