@aztec/txe 0.0.1-commit.fcb71a6 → 0.0.1-commit.ff7989d6c
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/index.d.ts +1 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +82 -50
- package/dest/oracle/interfaces.d.ts +4 -4
- package/dest/oracle/interfaces.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_public_context.d.ts +3 -3
- package/dest/oracle/txe_oracle_public_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_public_context.js +6 -6
- package/dest/oracle/txe_oracle_top_level_context.d.ts +6 -6
- package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +107 -40
- package/dest/rpc_translator.d.ts +21 -15
- package/dest/rpc_translator.d.ts.map +1 -1
- package/dest/rpc_translator.js +78 -53
- package/dest/state_machine/archiver.d.ts +20 -67
- package/dest/state_machine/archiver.d.ts.map +1 -1
- package/dest/state_machine/archiver.js +59 -178
- package/dest/state_machine/dummy_p2p_client.d.ts +19 -14
- package/dest/state_machine/dummy_p2p_client.d.ts.map +1 -1
- package/dest/state_machine/dummy_p2p_client.js +38 -23
- package/dest/state_machine/global_variable_builder.d.ts +2 -2
- package/dest/state_machine/global_variable_builder.d.ts.map +1 -1
- package/dest/state_machine/global_variable_builder.js +1 -1
- package/dest/state_machine/index.d.ts +5 -5
- package/dest/state_machine/index.d.ts.map +1 -1
- package/dest/state_machine/index.js +35 -12
- package/dest/state_machine/mock_epoch_cache.d.ts +9 -6
- package/dest/state_machine/mock_epoch_cache.d.ts.map +1 -1
- package/dest/state_machine/mock_epoch_cache.js +14 -7
- package/dest/state_machine/synchronizer.d.ts +3 -3
- package/dest/state_machine/synchronizer.d.ts.map +1 -1
- package/dest/txe_session.d.ts +6 -6
- package/dest/txe_session.d.ts.map +1 -1
- package/dest/txe_session.js +92 -24
- package/dest/util/encoding.d.ts +17 -17
- package/dest/util/txe_public_contract_data_source.d.ts +2 -3
- package/dest/util/txe_public_contract_data_source.d.ts.map +1 -1
- package/dest/util/txe_public_contract_data_source.js +5 -22
- package/dest/utils/block_creation.d.ts +4 -4
- package/dest/utils/block_creation.d.ts.map +1 -1
- package/dest/utils/block_creation.js +18 -5
- package/dest/utils/tx_effect_creation.d.ts +2 -3
- package/dest/utils/tx_effect_creation.d.ts.map +1 -1
- package/dest/utils/tx_effect_creation.js +3 -6
- package/package.json +16 -16
- package/src/index.ts +83 -49
- package/src/oracle/interfaces.ts +3 -3
- package/src/oracle/txe_oracle_public_context.ts +6 -8
- package/src/oracle/txe_oracle_top_level_context.ts +131 -91
- package/src/rpc_translator.ts +81 -55
- package/src/state_machine/archiver.ts +54 -220
- package/src/state_machine/dummy_p2p_client.ts +54 -31
- package/src/state_machine/global_variable_builder.ts +1 -1
- package/src/state_machine/index.ts +49 -11
- package/src/state_machine/mock_epoch_cache.ts +15 -11
- package/src/state_machine/synchronizer.ts +2 -2
- package/src/txe_session.ts +99 -80
- package/src/util/txe_public_contract_data_source.ts +10 -36
- package/src/utils/block_creation.ts +19 -16
- package/src/utils/tx_effect_creation.ts +3 -11
- package/dest/util/txe_contract_store.d.ts +0 -12
- package/dest/util/txe_contract_store.d.ts.map +0 -1
- package/dest/util/txe_contract_store.js +0 -22
- package/src/util/txe_contract_store.ts +0 -36
|
@@ -4,7 +4,10 @@ import type {
|
|
|
4
4
|
ENR,
|
|
5
5
|
P2P,
|
|
6
6
|
P2PBlockReceivedCallback,
|
|
7
|
+
P2PCheckpointReceivedCallback,
|
|
7
8
|
P2PConfig,
|
|
9
|
+
P2PDuplicateAttestationCallback,
|
|
10
|
+
P2PDuplicateProposalCallback,
|
|
8
11
|
P2PSyncState,
|
|
9
12
|
PeerId,
|
|
10
13
|
ReqRespSubProtocol,
|
|
@@ -13,15 +16,11 @@ import type {
|
|
|
13
16
|
StatusMessage,
|
|
14
17
|
} from '@aztec/p2p';
|
|
15
18
|
import type { EthAddress, L2BlockStreamEvent, L2Tips } from '@aztec/stdlib/block';
|
|
16
|
-
import type { PeerInfo } from '@aztec/stdlib/interfaces/server';
|
|
17
|
-
import type {
|
|
18
|
-
import type { Tx, TxHash } from '@aztec/stdlib/tx';
|
|
19
|
+
import type { ITxProvider, PeerInfo } from '@aztec/stdlib/interfaces/server';
|
|
20
|
+
import type { BlockProposal, CheckpointAttestation, CheckpointProposal, TopicType } from '@aztec/stdlib/p2p';
|
|
21
|
+
import type { BlockHeader, Tx, TxHash } from '@aztec/stdlib/tx';
|
|
19
22
|
|
|
20
23
|
export class DummyP2P implements P2P {
|
|
21
|
-
public broadcastAttestations(_attestations: BlockAttestation[]): Promise<void> {
|
|
22
|
-
return Promise.resolve();
|
|
23
|
-
}
|
|
24
|
-
|
|
25
24
|
public validate(_txs: Tx[]): Promise<void> {
|
|
26
25
|
return Promise.resolve();
|
|
27
26
|
}
|
|
@@ -42,14 +41,30 @@ export class DummyP2P implements P2P {
|
|
|
42
41
|
throw new Error('DummyP2P does not implement "getPeers"');
|
|
43
42
|
}
|
|
44
43
|
|
|
44
|
+
public getGossipMeshPeerCount(_topicType: TopicType): Promise<number> {
|
|
45
|
+
return Promise.resolve(0);
|
|
46
|
+
}
|
|
47
|
+
|
|
45
48
|
public broadcastProposal(_proposal: BlockProposal): Promise<void> {
|
|
46
49
|
throw new Error('DummyP2P does not implement "broadcastProposal"');
|
|
47
50
|
}
|
|
48
51
|
|
|
52
|
+
public broadcastCheckpointProposal(_proposal: CheckpointProposal): Promise<void> {
|
|
53
|
+
throw new Error('DummyP2P does not implement "broadcastCheckpointProposal"');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public broadcastCheckpointAttestations(_attestations: CheckpointAttestation[]): Promise<void> {
|
|
57
|
+
throw new Error('DummyP2P does not implement "broadcastCheckpointAttestations"');
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
public registerBlockProposalHandler(_handler: P2PBlockReceivedCallback): void {
|
|
50
61
|
throw new Error('DummyP2P does not implement "registerBlockProposalHandler"');
|
|
51
62
|
}
|
|
52
63
|
|
|
64
|
+
public registerCheckpointProposalHandler(_handler: P2PCheckpointReceivedCallback): void {
|
|
65
|
+
throw new Error('DummyP2P does not implement "registerCheckpointProposalHandler"');
|
|
66
|
+
}
|
|
67
|
+
|
|
53
68
|
public requestTxs(_txHashes: TxHash[]): Promise<(Tx | undefined)[]> {
|
|
54
69
|
throw new Error('DummyP2P does not implement "requestTxs"');
|
|
55
70
|
}
|
|
@@ -62,8 +77,8 @@ export class DummyP2P implements P2P {
|
|
|
62
77
|
throw new Error('DummyP2P does not implement "sendTx"');
|
|
63
78
|
}
|
|
64
79
|
|
|
65
|
-
public
|
|
66
|
-
throw new Error('DummyP2P does not implement "
|
|
80
|
+
public handleFailedExecution(_txHashes: TxHash[]): Promise<void> {
|
|
81
|
+
throw new Error('DummyP2P does not implement "handleFailedExecution"');
|
|
67
82
|
}
|
|
68
83
|
|
|
69
84
|
public getTxByHashFromPool(_txHash: TxHash): Promise<Tx | undefined> {
|
|
@@ -88,6 +103,10 @@ export class DummyP2P implements P2P {
|
|
|
88
103
|
throw new Error('DummyP2P does not implement "iteratePendingTxs"');
|
|
89
104
|
}
|
|
90
105
|
|
|
106
|
+
public iterateEligiblePendingTxs(): AsyncIterableIterator<Tx> {
|
|
107
|
+
throw new Error('DummyP2P does not implement "iterateEligiblePendingTxs"');
|
|
108
|
+
}
|
|
109
|
+
|
|
91
110
|
public getPendingTxCount(): Promise<number> {
|
|
92
111
|
throw new Error('DummyP2P does not implement "getPendingTxCount"');
|
|
93
112
|
}
|
|
@@ -116,20 +135,20 @@ export class DummyP2P implements P2P {
|
|
|
116
135
|
throw new Error('DummyP2P does not implement "isP2PClient"');
|
|
117
136
|
}
|
|
118
137
|
|
|
138
|
+
public getTxProvider(): ITxProvider {
|
|
139
|
+
throw new Error('DummyP2P does not implement "getTxProvider"');
|
|
140
|
+
}
|
|
141
|
+
|
|
119
142
|
public getTxsByHash(_txHashes: TxHash[]): Promise<Tx[]> {
|
|
120
143
|
throw new Error('DummyP2P does not implement "getTxsByHash"');
|
|
121
144
|
}
|
|
122
145
|
|
|
123
|
-
public
|
|
124
|
-
throw new Error('DummyP2P does not implement "
|
|
146
|
+
public getCheckpointAttestationsForSlot(_slot: SlotNumber, _proposalId?: string): Promise<CheckpointAttestation[]> {
|
|
147
|
+
throw new Error('DummyP2P does not implement "getCheckpointAttestationsForSlot"');
|
|
125
148
|
}
|
|
126
149
|
|
|
127
|
-
public
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
public addAttestations(_attestations: BlockAttestation[]): Promise<void> {
|
|
132
|
-
throw new Error('DummyP2P does not implement "addAttestations"');
|
|
150
|
+
public addOwnCheckpointAttestations(_attestations: CheckpointAttestation[]): Promise<void> {
|
|
151
|
+
throw new Error('DummyP2P does not implement "addOwnCheckpointAttestations"');
|
|
133
152
|
}
|
|
134
153
|
|
|
135
154
|
public getL2BlockHash(_number: number): Promise<string | undefined> {
|
|
@@ -152,14 +171,6 @@ export class DummyP2P implements P2P {
|
|
|
152
171
|
throw new Error('DummyP2P does not implement "sync"');
|
|
153
172
|
}
|
|
154
173
|
|
|
155
|
-
public requestTxsByHash(_txHashes: TxHash[]): Promise<Tx[]> {
|
|
156
|
-
throw new Error('DummyP2P does not implement "requestTxsByHash"');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
public getTxs(_filter: 'all' | 'pending' | 'mined'): Promise<Tx[]> {
|
|
160
|
-
throw new Error('DummyP2P does not implement "getTxs"');
|
|
161
|
-
}
|
|
162
|
-
|
|
163
174
|
public getTxsByHashFromPool(_txHashes: TxHash[]): Promise<(Tx | undefined)[]> {
|
|
164
175
|
throw new Error('DummyP2P does not implement "getTxsByHashFromPool"');
|
|
165
176
|
}
|
|
@@ -168,10 +179,6 @@ export class DummyP2P implements P2P {
|
|
|
168
179
|
throw new Error('DummyP2P does not implement "hasTxsInPool"');
|
|
169
180
|
}
|
|
170
181
|
|
|
171
|
-
public addTxsToPool(_txs: Tx[]): Promise<number> {
|
|
172
|
-
throw new Error('DummyP2P does not implement "addTxs"');
|
|
173
|
-
}
|
|
174
|
-
|
|
175
182
|
public getSyncedLatestBlockNum(): Promise<number> {
|
|
176
183
|
throw new Error('DummyP2P does not implement "getSyncedLatestBlockNum"');
|
|
177
184
|
}
|
|
@@ -184,8 +191,12 @@ export class DummyP2P implements P2P {
|
|
|
184
191
|
throw new Error('DummyP2P does not implement "getSyncedLatestSlot"');
|
|
185
192
|
}
|
|
186
193
|
|
|
187
|
-
|
|
188
|
-
throw new Error('DummyP2P does not implement "
|
|
194
|
+
protectTxs(_txHashes: TxHash[], _blockHeader: BlockHeader): Promise<TxHash[]> {
|
|
195
|
+
throw new Error('DummyP2P does not implement "protectTxs".');
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
prepareForSlot(_slotNumber: SlotNumber): Promise<void> {
|
|
199
|
+
return Promise.resolve();
|
|
189
200
|
}
|
|
190
201
|
|
|
191
202
|
addReqRespSubProtocol(
|
|
@@ -201,4 +212,16 @@ export class DummyP2P implements P2P {
|
|
|
201
212
|
|
|
202
213
|
//This is no-op
|
|
203
214
|
public registerThisValidatorAddresses(_address: EthAddress[]): void {}
|
|
215
|
+
|
|
216
|
+
public registerDuplicateProposalCallback(_callback: P2PDuplicateProposalCallback): void {
|
|
217
|
+
throw new Error('DummyP2P does not implement "registerDuplicateProposalCallback"');
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
public registerDuplicateAttestationCallback(_callback: P2PDuplicateAttestationCallback): void {
|
|
221
|
+
throw new Error('DummyP2P does not implement "registerDuplicateAttestationCallback"');
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
public hasBlockProposalsForSlot(_slot: SlotNumber): Promise<boolean> {
|
|
225
|
+
throw new Error('DummyP2P does not implement "hasBlockProposalsForSlot"');
|
|
226
|
+
}
|
|
204
227
|
}
|
|
@@ -6,7 +6,7 @@ import { makeGlobalVariables } from '@aztec/stdlib/testing';
|
|
|
6
6
|
import { type CheckpointGlobalVariables, type GlobalVariableBuilder, GlobalVariables } from '@aztec/stdlib/tx';
|
|
7
7
|
|
|
8
8
|
export class TXEGlobalVariablesBuilder implements GlobalVariableBuilder {
|
|
9
|
-
public
|
|
9
|
+
public getCurrentMinFees(): Promise<GasFees> {
|
|
10
10
|
return Promise.resolve(new GasFees(0, 0));
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
2
2
|
import { TestCircuitVerifier } from '@aztec/bb-prover/test';
|
|
3
|
+
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
4
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
5
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
|
-
import type
|
|
5
|
-
import { AnchorBlockStore } from '@aztec/pxe/server';
|
|
6
|
+
import { type AnchorBlockStore, type ContractStore, ContractSyncService, type NoteStore } from '@aztec/pxe/server';
|
|
6
7
|
import { L2Block } from '@aztec/stdlib/block';
|
|
7
|
-
import { L1PublishedData, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
8
|
+
import { Checkpoint, L1PublishedData, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
8
9
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
10
|
+
import { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
9
11
|
import { getPackageVersion } from '@aztec/stdlib/update-checker';
|
|
10
12
|
|
|
11
13
|
import { TXEArchiver } from './archiver.js';
|
|
@@ -23,13 +25,16 @@ export class TXEStateMachine {
|
|
|
23
25
|
public synchronizer: TXESynchronizer,
|
|
24
26
|
public archiver: TXEArchiver,
|
|
25
27
|
public anchorBlockStore: AnchorBlockStore,
|
|
28
|
+
public contractSyncService: ContractSyncService,
|
|
26
29
|
) {}
|
|
27
30
|
|
|
28
|
-
public static async create(
|
|
29
|
-
|
|
31
|
+
public static async create(
|
|
32
|
+
archiver: TXEArchiver,
|
|
33
|
+
anchorBlockStore: AnchorBlockStore,
|
|
34
|
+
contractStore: ContractStore,
|
|
35
|
+
noteStore: NoteStore,
|
|
36
|
+
) {
|
|
30
37
|
const synchronizer = await TXESynchronizer.create();
|
|
31
|
-
const anchorBlockStore = new AnchorBlockStore(db);
|
|
32
|
-
|
|
33
38
|
const aztecNodeConfig = {} as AztecNodeConfig;
|
|
34
39
|
|
|
35
40
|
const log = createLogger('txe_node');
|
|
@@ -45,6 +50,7 @@ export class TXEStateMachine {
|
|
|
45
50
|
undefined,
|
|
46
51
|
undefined,
|
|
47
52
|
undefined,
|
|
53
|
+
undefined,
|
|
48
54
|
VERSION,
|
|
49
55
|
CHAIN_ID,
|
|
50
56
|
new TXEGlobalVariablesBuilder(),
|
|
@@ -55,11 +61,40 @@ export class TXEStateMachine {
|
|
|
55
61
|
log,
|
|
56
62
|
);
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
const contractSyncService = new ContractSyncService(
|
|
65
|
+
node,
|
|
66
|
+
contractStore,
|
|
67
|
+
noteStore,
|
|
68
|
+
createLogger('txe:contract_sync'),
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return new this(node, synchronizer, archiver, anchorBlockStore, contractSyncService);
|
|
59
72
|
}
|
|
60
73
|
|
|
61
74
|
public async handleL2Block(block: L2Block) {
|
|
62
|
-
|
|
75
|
+
// Create a checkpoint from the block manually.
|
|
76
|
+
// TXE uses 1-block-per-checkpoint for testing simplicity, so we can use block number as checkpoint number.
|
|
77
|
+
// This uses the deprecated fromBlockNumber method intentionally for the TXE testing environment.
|
|
78
|
+
const checkpointNumber = CheckpointNumber.fromBlockNumber(block.number);
|
|
79
|
+
const checkpoint = new Checkpoint(
|
|
80
|
+
block.archive,
|
|
81
|
+
CheckpointHeader.from({
|
|
82
|
+
lastArchiveRoot: block.header.lastArchive.root,
|
|
83
|
+
inHash: Fr.ZERO,
|
|
84
|
+
blobsHash: Fr.ZERO,
|
|
85
|
+
blockHeadersHash: Fr.ZERO,
|
|
86
|
+
epochOutHash: Fr.ZERO,
|
|
87
|
+
slotNumber: block.header.globalVariables.slotNumber,
|
|
88
|
+
timestamp: block.header.globalVariables.timestamp,
|
|
89
|
+
coinbase: block.header.globalVariables.coinbase,
|
|
90
|
+
feeRecipient: block.header.globalVariables.feeRecipient,
|
|
91
|
+
gasFees: block.header.globalVariables.gasFees,
|
|
92
|
+
totalManaUsed: block.header.totalManaUsed,
|
|
93
|
+
}),
|
|
94
|
+
[block],
|
|
95
|
+
checkpointNumber,
|
|
96
|
+
);
|
|
97
|
+
|
|
63
98
|
const publishedCheckpoint = new PublishedCheckpoint(
|
|
64
99
|
checkpoint,
|
|
65
100
|
new L1PublishedData(
|
|
@@ -69,10 +104,13 @@ export class TXEStateMachine {
|
|
|
69
104
|
),
|
|
70
105
|
[],
|
|
71
106
|
);
|
|
107
|
+
// Wipe contract sync cache when anchor block changes (mirrors BlockSynchronizer behavior)
|
|
108
|
+
this.contractSyncService.wipe();
|
|
109
|
+
|
|
72
110
|
await Promise.all([
|
|
73
|
-
this.synchronizer.handleL2Block(block
|
|
111
|
+
this.synchronizer.handleL2Block(block),
|
|
74
112
|
this.archiver.addCheckpoints([publishedCheckpoint], undefined),
|
|
75
|
-
this.anchorBlockStore.setHeader(block.
|
|
113
|
+
this.anchorBlockStore.setHeader(block.header),
|
|
76
114
|
]);
|
|
77
115
|
}
|
|
78
116
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EpochAndSlot, EpochCacheInterface, EpochCommitteeInfo, SlotTag } from '@aztec/epoch-cache';
|
|
2
2
|
import { EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
+
import { EmptyL1RollupConstants, type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Mock implementation of the EpochCacheInterface used to satisfy dependencies of AztecNodeService.
|
|
@@ -12,14 +13,16 @@ export class MockEpochCache implements EpochCacheInterface {
|
|
|
12
13
|
committee: undefined,
|
|
13
14
|
seed: 0n,
|
|
14
15
|
epoch: EpochNumber.ZERO,
|
|
16
|
+
isEscapeHatchOpen: false,
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
getEpochAndSlotNow(): EpochAndSlot {
|
|
20
|
+
getEpochAndSlotNow(): EpochAndSlot & { nowMs: bigint } {
|
|
19
21
|
return {
|
|
20
22
|
epoch: EpochNumber.ZERO,
|
|
21
23
|
slot: SlotNumber(0),
|
|
22
24
|
ts: 0n,
|
|
25
|
+
nowMs: 0n,
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
|
|
@@ -40,18 +43,15 @@ export class MockEpochCache implements EpochCacheInterface {
|
|
|
40
43
|
return 0n;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
nextProposer: EthAddress | undefined;
|
|
46
|
-
currentSlot: SlotNumber;
|
|
47
|
-
nextSlot: SlotNumber;
|
|
48
|
-
}> {
|
|
49
|
-
return Promise.resolve({
|
|
50
|
-
currentProposer: undefined,
|
|
51
|
-
nextProposer: undefined,
|
|
46
|
+
getCurrentAndNextSlot(): { currentSlot: SlotNumber; nextSlot: SlotNumber } {
|
|
47
|
+
return {
|
|
52
48
|
currentSlot: SlotNumber(0),
|
|
53
49
|
nextSlot: SlotNumber(0),
|
|
54
|
-
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
getProposerAttesterAddressInSlot(_slot: SlotNumber): Promise<EthAddress | undefined> {
|
|
54
|
+
return Promise.resolve(undefined);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
isInCommittee(_slot: SlotTag, _validator: EthAddress): Promise<boolean> {
|
|
@@ -65,4 +65,8 @@ export class MockEpochCache implements EpochCacheInterface {
|
|
|
65
65
|
filterInCommittee(_slot: SlotTag, _validators: EthAddress[]): Promise<EthAddress[]> {
|
|
66
66
|
return Promise.resolve([]);
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
getL1Constants(): L1RollupConstants {
|
|
70
|
+
return EmptyL1RollupConstants;
|
|
71
|
+
}
|
|
68
72
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/constants';
|
|
2
2
|
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import type {
|
|
4
|
+
import type { L2Block } from '@aztec/stdlib/block';
|
|
5
5
|
import type {
|
|
6
6
|
MerkleTreeReadOperations,
|
|
7
7
|
MerkleTreeWriteOperations,
|
|
@@ -23,7 +23,7 @@ export class TXESynchronizer implements WorldStateSynchronizer {
|
|
|
23
23
|
return new this(nativeWorldStateService);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
public async handleL2Block(block:
|
|
26
|
+
public async handleL2Block(block: L2Block) {
|
|
27
27
|
await this.nativeWorldStateService.handleL2BlockAndMessages(
|
|
28
28
|
block,
|
|
29
29
|
Array(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP).fill(0).map(Fr.zero),
|