@aztec/txe 0.0.1-commit.d431d1c → 0.0.1-commit.d58ff9d0
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/AuthRegistry-QVGDDH5X.js +3 -0
- package/dest/AuthRegistry-QVGDDH5X.js.map +7 -0
- package/dest/ContractClassRegistry-VWR3F42P.js +3 -0
- package/dest/ContractClassRegistry-VWR3F42P.js.map +7 -0
- package/dest/ContractInstanceRegistry-FHIWE33X.js +3 -0
- package/dest/ContractInstanceRegistry-FHIWE33X.js.map +7 -0
- package/dest/FeeJuice-SAOWVGG7.js +3 -0
- package/dest/FeeJuice-SAOWVGG7.js.map +7 -0
- package/dest/HandshakeRegistry-GY5CPEPS.js +3 -0
- package/dest/HandshakeRegistry-GY5CPEPS.js.map +7 -0
- package/dest/MultiCallEntrypoint-QG5H33ZZ.js +3 -0
- package/dest/MultiCallEntrypoint-QG5H33ZZ.js.map +7 -0
- package/dest/SchnorrAccount-NME3E45O.js +3 -0
- package/dest/SchnorrAccount-NME3E45O.js.map +7 -0
- package/dest/SchnorrInitializerlessAccount-WTGXU6SW.js +3 -0
- package/dest/SchnorrInitializerlessAccount-WTGXU6SW.js.map +7 -0
- package/dest/bin/check_txe_oracle_version.d.ts +2 -0
- package/dest/bin/check_txe_oracle_version.d.ts.map +1 -0
- package/dest/bin/check_txe_oracle_version.js +53 -0
- package/dest/bin/index.js +3 -30
- package/dest/bin/index.js.map +7 -0
- package/dest/bin/oracle_test_server.d.ts +3 -0
- package/dest/bin/oracle_test_server.d.ts.map +1 -0
- package/dest/bin/oracle_test_server.js +41 -0
- package/dest/chunk-32UHX7YY.js +3 -0
- package/dest/chunk-32UHX7YY.js.map +7 -0
- package/dest/chunk-GSUKUCKV.js +260 -0
- package/dest/chunk-GSUKUCKV.js.map +7 -0
- package/dest/chunk-UP4KKUVA.js +304 -0
- package/dest/chunk-UP4KKUVA.js.map +7 -0
- package/dest/constants.d.ts +5 -1
- package/dest/constants.d.ts.map +1 -1
- package/dest/constants.js +9 -1
- package/dest/dispatcher_pool.d.ts +67 -0
- package/dest/dispatcher_pool.d.ts.map +1 -0
- package/dest/dispatcher_pool.js +286 -0
- package/dest/index.d.ts +51 -7
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +73 -157
- package/dest/metafile.json +38759 -0
- package/dest/msgpackr_fr_extension.d.ts +2 -0
- package/dest/msgpackr_fr_extension.d.ts.map +1 -0
- package/dest/msgpackr_fr_extension.js +21 -0
- package/dest/oracle/interfaces.d.ts +69 -30
- package/dest/oracle/interfaces.d.ts.map +1 -1
- package/dest/oracle/tagging_secret_strategy.d.ts +12 -0
- package/dest/oracle/tagging_secret_strategy.d.ts.map +1 -0
- package/dest/oracle/tagging_secret_strategy.js +12 -0
- package/dest/oracle/test-resolver/default_fixtures.d.ts +16 -0
- package/dest/oracle/test-resolver/default_fixtures.d.ts.map +1 -0
- package/dest/oracle/test-resolver/default_fixtures.js +200 -0
- package/dest/oracle/test-resolver/index.d.ts +9 -0
- package/dest/oracle/test-resolver/index.d.ts.map +1 -0
- package/dest/oracle/test-resolver/index.js +32 -0
- package/dest/oracle/test-resolver/resolver.d.ts +48 -0
- package/dest/oracle/test-resolver/resolver.d.ts.map +1 -0
- package/dest/oracle/test-resolver/resolver.js +181 -0
- package/dest/oracle/txe_oracle_public_context.d.ts +40 -16
- package/dest/oracle/txe_oracle_public_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_public_context.js +65 -17
- package/dest/oracle/txe_oracle_registry.d.ts +172 -0
- package/dest/oracle/txe_oracle_registry.d.ts.map +1 -0
- package/dest/oracle/txe_oracle_registry.js +767 -0
- package/dest/oracle/txe_oracle_top_level_context.d.ts +69 -29
- package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +608 -277
- package/dest/oracle/txe_oracle_version.d.ts +17 -0
- package/dest/oracle/txe_oracle_version.d.ts.map +1 -0
- package/dest/oracle/txe_oracle_version.js +14 -0
- package/dest/oracle/txe_private_execution_oracle.d.ts +17 -0
- package/dest/oracle/txe_private_execution_oracle.d.ts.map +1 -0
- package/dest/oracle/txe_private_execution_oracle.js +15 -0
- package/dest/rpc_server.d.ts +14 -0
- package/dest/rpc_server.d.ts.map +1 -0
- package/dest/rpc_server.js +78 -0
- package/dest/rpc_translator.d.ts +115 -222
- package/dest/rpc_translator.d.ts.map +1 -1
- package/dest/rpc_translator.js +901 -600
- package/dest/server.bundle.js +3 -0
- package/dest/server.bundle.js.map +7 -0
- package/dest/state_machine/archiver.d.ts +7 -6
- package/dest/state_machine/archiver.d.ts.map +1 -1
- package/dest/state_machine/archiver.js +31 -22
- package/dest/state_machine/dummy_p2p_client.d.ts +29 -16
- package/dest/state_machine/dummy_p2p_client.d.ts.map +1 -1
- package/dest/state_machine/dummy_p2p_client.js +53 -20
- package/dest/state_machine/global_variable_builder.d.ts +10 -6
- package/dest/state_machine/global_variable_builder.d.ts.map +1 -1
- package/dest/state_machine/global_variable_builder.js +8 -5
- package/dest/state_machine/index.d.ts +13 -7
- package/dest/state_machine/index.d.ts.map +1 -1
- package/dest/state_machine/index.js +75 -21
- package/dest/state_machine/mock_epoch_cache.d.ts +21 -4
- package/dest/state_machine/mock_epoch_cache.d.ts.map +1 -1
- package/dest/state_machine/mock_epoch_cache.js +35 -3
- package/dest/state_machine/synchronizer.d.ts +14 -6
- package/dest/state_machine/synchronizer.d.ts.map +1 -1
- package/dest/state_machine/synchronizer.js +22 -9
- package/dest/txe_session.d.ts +90 -16
- package/dest/txe_session.d.ts.map +1 -1
- package/dest/txe_session.js +381 -59
- package/dest/utils/block_creation.d.ts +6 -6
- package/dest/utils/block_creation.d.ts.map +1 -1
- package/dest/utils/block_creation.js +9 -7
- package/dest/utils/encoding.d.ts +192 -0
- package/dest/utils/encoding.d.ts.map +1 -0
- package/dest/{util → utils}/encoding.js +7 -2
- package/dest/{util → utils}/expected_failure_error.d.ts +1 -1
- package/dest/utils/expected_failure_error.d.ts.map +1 -0
- package/dest/utils/tx_effect_creation.d.ts +1 -1
- package/dest/utils/tx_effect_creation.d.ts.map +1 -1
- package/dest/utils/tx_effect_creation.js +0 -1
- package/dest/{util → utils}/txe_account_store.d.ts +1 -1
- package/dest/utils/txe_account_store.d.ts.map +1 -0
- package/dest/utils/txe_artifact_resolver.d.ts +37 -0
- package/dest/utils/txe_artifact_resolver.d.ts.map +1 -0
- package/dest/utils/txe_artifact_resolver.js +161 -0
- package/dest/utils/txe_public_contract_data_source.d.ts +20 -0
- package/dest/utils/txe_public_contract_data_source.d.ts.map +1 -0
- package/dest/utils/txe_public_contract_data_source.js +51 -0
- package/dest/worker.bundle.js +3 -0
- package/dest/worker.bundle.js.map +7 -0
- package/dest/worker.d.ts +2 -0
- package/dest/worker.d.ts.map +1 -0
- package/dest/worker.js +92 -0
- package/package.json +38 -21
- package/src/bin/check_txe_oracle_version.ts +67 -0
- package/src/bin/index.ts +11 -2
- package/src/bin/oracle_test_server.ts +51 -0
- package/src/constants.ts +11 -1
- package/src/dispatcher_pool.ts +317 -0
- package/src/index.ts +99 -190
- package/src/msgpackr_fr_extension.ts +23 -0
- package/src/oracle/interfaces.ts +75 -35
- package/src/oracle/tagging_secret_strategy.ts +25 -0
- package/src/oracle/test-resolver/default_fixtures.ts +271 -0
- package/src/oracle/test-resolver/index.ts +44 -0
- package/src/oracle/test-resolver/resolver.ts +245 -0
- package/src/oracle/txe_oracle_public_context.ts +80 -20
- package/src/oracle/txe_oracle_registry.ts +556 -0
- package/src/oracle/txe_oracle_top_level_context.ts +486 -180
- package/src/oracle/txe_oracle_version.ts +17 -0
- package/src/oracle/txe_private_execution_oracle.ts +30 -0
- package/src/rpc_server.ts +87 -0
- package/src/rpc_translator.ts +1116 -974
- package/src/state_machine/archiver.ts +45 -26
- package/src/state_machine/dummy_p2p_client.ts +83 -32
- package/src/state_machine/global_variable_builder.ts +12 -11
- package/src/state_machine/index.ts +105 -40
- package/src/state_machine/mock_epoch_cache.ts +45 -4
- package/src/state_machine/synchronizer.ts +31 -10
- package/src/txe_session.ts +630 -129
- package/src/utils/block_creation.ts +10 -7
- package/src/{util → utils}/encoding.ts +8 -2
- package/src/utils/tx_effect_creation.ts +0 -2
- package/src/utils/txe_artifact_resolver.ts +217 -0
- package/src/utils/txe_public_contract_data_source.ts +60 -0
- package/src/worker.ts +98 -0
- package/dest/util/encoding.d.ts +0 -720
- package/dest/util/encoding.d.ts.map +0 -1
- package/dest/util/expected_failure_error.d.ts.map +0 -1
- package/dest/util/txe_account_store.d.ts.map +0 -1
- 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/dest/util/txe_public_contract_data_source.d.ts +0 -21
- package/dest/util/txe_public_contract_data_source.d.ts.map +0 -1
- package/dest/util/txe_public_contract_data_source.js +0 -67
- package/src/util/txe_contract_store.ts +0 -36
- package/src/util/txe_public_contract_data_source.ts +0 -86
- /package/dest/{util → utils}/expected_failure_error.js +0 -0
- /package/dest/{util → utils}/txe_account_store.js +0 -0
- /package/src/{util → utils}/expected_failure_error.ts +0 -0
- /package/src/{util → utils}/txe_account_store.ts +0 -0
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { ArchiverDataSourceBase, ArchiverDataStoreUpdater,
|
|
1
|
+
import { ArchiverDataSourceBase, ArchiverDataStoreUpdater, createArchiverDataStores } from '@aztec/archiver';
|
|
2
2
|
import { GENESIS_ARCHIVE_ROOT } from '@aztec/constants';
|
|
3
3
|
import { CheckpointNumber, type EpochNumber, type SlotNumber } from '@aztec/foundation/branded-types';
|
|
4
4
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
5
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
6
|
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
7
|
-
import
|
|
7
|
+
import {
|
|
8
|
+
type CheckpointId,
|
|
9
|
+
GENESIS_BLOCK_HEADER_HASH,
|
|
10
|
+
type L2BlockId,
|
|
11
|
+
type L2TipId,
|
|
12
|
+
type L2Tips,
|
|
13
|
+
type ValidateCheckpointResult,
|
|
14
|
+
} from '@aztec/stdlib/block';
|
|
8
15
|
import type { PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
9
|
-
import type
|
|
16
|
+
import { EmptyL1RollupConstants, type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
17
|
+
import { BlockHeader } from '@aztec/stdlib/tx';
|
|
10
18
|
|
|
11
19
|
/**
|
|
12
20
|
* TXE Archiver implementation.
|
|
@@ -14,21 +22,22 @@ import type { L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
|
14
22
|
* without needing any of the extra overhead that the Archiver itself requires (i.e. an L1 client).
|
|
15
23
|
*/
|
|
16
24
|
export class TXEArchiver extends ArchiverDataSourceBase {
|
|
17
|
-
private readonly updater = new ArchiverDataStoreUpdater(this.
|
|
25
|
+
private readonly updater = new ArchiverDataStoreUpdater(this.stores);
|
|
18
26
|
|
|
19
27
|
constructor(db: AztecAsyncKVStore) {
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
super(
|
|
29
|
+
createArchiverDataStores(db, GENESIS_BLOCK_HEADER_HASH),
|
|
30
|
+
undefined,
|
|
31
|
+
BlockHeader.empty(),
|
|
32
|
+
GENESIS_BLOCK_HEADER_HASH,
|
|
33
|
+
new Fr(GENESIS_ARCHIVE_ROOT),
|
|
34
|
+
);
|
|
22
35
|
}
|
|
23
36
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
await this.updater.setNewCheckpointData(checkpoints, result);
|
|
27
|
-
return true;
|
|
37
|
+
public async addCheckpoints(checkpoints: PublishedCheckpoint[], result?: ValidateCheckpointResult): Promise<void> {
|
|
38
|
+
await this.updater.addCheckpoints(checkpoints, result);
|
|
28
39
|
}
|
|
29
40
|
|
|
30
|
-
// Abstract method implementations
|
|
31
|
-
|
|
32
41
|
public getRollupAddress(): Promise<EthAddress> {
|
|
33
42
|
throw new Error('TXE Archiver does not implement "getRollupAddress"');
|
|
34
43
|
}
|
|
@@ -38,7 +47,9 @@ export class TXEArchiver extends ArchiverDataSourceBase {
|
|
|
38
47
|
}
|
|
39
48
|
|
|
40
49
|
public getL1Constants(): Promise<L1RollupConstants> {
|
|
41
|
-
|
|
50
|
+
// The TXE has no L1, so it serves the empty constants (epochDuration=1) used throughout the TXE state machine
|
|
51
|
+
// (see mock_epoch_cache). The node calls this when assembling a mined tx receipt to derive the epoch number.
|
|
52
|
+
return Promise.resolve(EmptyL1RollupConstants);
|
|
42
53
|
}
|
|
43
54
|
|
|
44
55
|
public getGenesisValues(): Promise<{ genesisArchiveRoot: Fr }> {
|
|
@@ -52,18 +63,21 @@ export class TXEArchiver extends ArchiverDataSourceBase {
|
|
|
52
63
|
public async getL2Tips(): Promise<L2Tips> {
|
|
53
64
|
// In TXE there is no possibility of reorgs and no blocks are ever getting proven so we just set 'latest', 'proven'
|
|
54
65
|
// and 'finalized' to the latest block.
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
66
|
+
const latestBlockNumber = await this.stores.blocks.getLatestL2BlockNumber();
|
|
67
|
+
if (latestBlockNumber === 0) {
|
|
68
|
+
throw new Error('L2Tips requested from TXE Archiver but no block found');
|
|
69
|
+
}
|
|
70
|
+
const latestBlockData = await this.stores.blocks.getBlockData({ number: latestBlockNumber });
|
|
71
|
+
if (!latestBlockData) {
|
|
57
72
|
throw new Error('L2Tips requested from TXE Archiver but no block header found');
|
|
58
73
|
}
|
|
59
74
|
|
|
60
|
-
const number =
|
|
61
|
-
const hash =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const checkpoint = await this.store.getRangeOfCheckpoints(CheckpointNumber(number), 1);
|
|
75
|
+
const number = latestBlockData.header.globalVariables.blockNumber;
|
|
76
|
+
const hash = latestBlockData.blockHash.toString();
|
|
77
|
+
|
|
78
|
+
// TXE uses 1-block-per-checkpoint for testing simplicity, so we can use block number as checkpoint number.
|
|
79
|
+
// This uses the deprecated fromBlockNumber method intentionally for the TXE testing environment.
|
|
80
|
+
const checkpoint = await this.stores.blocks.getRangeOfCheckpoints(CheckpointNumber.fromBlockNumber(number), 1);
|
|
67
81
|
if (checkpoint.length === 0) {
|
|
68
82
|
throw new Error(`L2Tips requested from TXE Archiver but no checkpoint found for block number ${number}`);
|
|
69
83
|
}
|
|
@@ -81,12 +95,12 @@ export class TXEArchiver extends ArchiverDataSourceBase {
|
|
|
81
95
|
};
|
|
82
96
|
}
|
|
83
97
|
|
|
84
|
-
public
|
|
85
|
-
throw new Error('TXE Archiver does not implement "
|
|
98
|
+
public getSyncedL2SlotNumber(): Promise<SlotNumber | undefined> {
|
|
99
|
+
throw new Error('TXE Archiver does not implement "getSyncedL2SlotNumber"');
|
|
86
100
|
}
|
|
87
101
|
|
|
88
|
-
public
|
|
89
|
-
throw new Error('TXE Archiver does not implement "
|
|
102
|
+
public getSyncedL2EpochNumber(): Promise<EpochNumber | undefined> {
|
|
103
|
+
throw new Error('TXE Archiver does not implement "getSyncedL2EpochNumber"');
|
|
90
104
|
}
|
|
91
105
|
|
|
92
106
|
public isEpochComplete(_epochNumber: EpochNumber): Promise<boolean> {
|
|
@@ -96,4 +110,9 @@ export class TXEArchiver extends ArchiverDataSourceBase {
|
|
|
96
110
|
public syncImmediate(): Promise<void> {
|
|
97
111
|
throw new Error('TXE Archiver does not implement "syncImmediate"');
|
|
98
112
|
}
|
|
113
|
+
|
|
114
|
+
public getL2ToL1MembershipWitness(): Promise<undefined> {
|
|
115
|
+
// TXE doesn't drive the L2-to-L1 message flow through this archiver.
|
|
116
|
+
return Promise.resolve(undefined);
|
|
117
|
+
}
|
|
99
118
|
}
|
|
@@ -1,25 +1,34 @@
|
|
|
1
|
-
import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
1
|
+
import type { CheckpointProposalHash, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import type {
|
|
3
3
|
AuthRequest,
|
|
4
4
|
ENR,
|
|
5
5
|
P2P,
|
|
6
6
|
P2PBlockReceivedCallback,
|
|
7
|
+
P2PCheckpointAttestationCallback,
|
|
7
8
|
P2PCheckpointReceivedCallback,
|
|
8
9
|
P2PConfig,
|
|
10
|
+
P2PDuplicateAttestationCallback,
|
|
11
|
+
P2PDuplicateProposalCallback,
|
|
12
|
+
P2POversizedProposalCallback,
|
|
9
13
|
P2PSyncState,
|
|
10
14
|
PeerId,
|
|
11
15
|
ReqRespSubProtocol,
|
|
12
16
|
ReqRespSubProtocolHandler,
|
|
13
|
-
ReqRespSubProtocolValidators,
|
|
14
17
|
StatusMessage,
|
|
15
18
|
} from '@aztec/p2p';
|
|
16
19
|
import type { EthAddress, L2BlockStreamEvent, L2Tips } from '@aztec/stdlib/block';
|
|
17
|
-
import type { PeerInfo } from '@aztec/stdlib/interfaces/server';
|
|
18
|
-
import type {
|
|
19
|
-
|
|
20
|
+
import type { ITxProvider, PeerInfo } from '@aztec/stdlib/interfaces/server';
|
|
21
|
+
import type {
|
|
22
|
+
BlockProposal,
|
|
23
|
+
CheckpointAttestation,
|
|
24
|
+
CheckpointProposal,
|
|
25
|
+
CheckpointProposalCore,
|
|
26
|
+
TopicType,
|
|
27
|
+
} from '@aztec/stdlib/p2p';
|
|
28
|
+
import type { BlockHeader, Tx, TxHash } from '@aztec/stdlib/tx';
|
|
20
29
|
|
|
21
30
|
export class DummyP2P implements P2P {
|
|
22
|
-
public
|
|
31
|
+
public validateTxsReceivedInBlockProposal(_txs: Tx[]): Promise<void> {
|
|
23
32
|
return Promise.resolve();
|
|
24
33
|
}
|
|
25
34
|
|
|
@@ -39,6 +48,10 @@ export class DummyP2P implements P2P {
|
|
|
39
48
|
throw new Error('DummyP2P does not implement "getPeers"');
|
|
40
49
|
}
|
|
41
50
|
|
|
51
|
+
public getGossipMeshPeerCount(_topicType: TopicType): Promise<number> {
|
|
52
|
+
return Promise.resolve(0);
|
|
53
|
+
}
|
|
54
|
+
|
|
42
55
|
public broadcastProposal(_proposal: BlockProposal): Promise<void> {
|
|
43
56
|
throw new Error('DummyP2P does not implement "broadcastProposal"');
|
|
44
57
|
}
|
|
@@ -55,8 +68,12 @@ export class DummyP2P implements P2P {
|
|
|
55
68
|
throw new Error('DummyP2P does not implement "registerBlockProposalHandler"');
|
|
56
69
|
}
|
|
57
70
|
|
|
58
|
-
public
|
|
59
|
-
throw new Error('DummyP2P does not implement "
|
|
71
|
+
public registerValidatorCheckpointProposalHandler(_handler: P2PCheckpointReceivedCallback): void {
|
|
72
|
+
throw new Error('DummyP2P does not implement "registerValidatorCheckpointProposalHandler"');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public registerAllNodesCheckpointProposalHandler(_handler: P2PCheckpointReceivedCallback): void {
|
|
76
|
+
throw new Error('DummyP2P does not implement "registerAllNodesCheckpointProposalHandler"');
|
|
60
77
|
}
|
|
61
78
|
|
|
62
79
|
public requestTxs(_txHashes: TxHash[]): Promise<(Tx | undefined)[]> {
|
|
@@ -71,8 +88,8 @@ export class DummyP2P implements P2P {
|
|
|
71
88
|
throw new Error('DummyP2P does not implement "sendTx"');
|
|
72
89
|
}
|
|
73
90
|
|
|
74
|
-
public
|
|
75
|
-
throw new Error('DummyP2P does not implement "
|
|
91
|
+
public handleFailedExecution(_txHashes: TxHash[]): Promise<void> {
|
|
92
|
+
throw new Error('DummyP2P does not implement "handleFailedExecution"');
|
|
76
93
|
}
|
|
77
94
|
|
|
78
95
|
public getTxByHashFromPool(_txHash: TxHash): Promise<Tx | undefined> {
|
|
@@ -97,10 +114,18 @@ export class DummyP2P implements P2P {
|
|
|
97
114
|
throw new Error('DummyP2P does not implement "iteratePendingTxs"');
|
|
98
115
|
}
|
|
99
116
|
|
|
117
|
+
public iterateEligiblePendingTxs(): AsyncIterableIterator<Tx> {
|
|
118
|
+
throw new Error('DummyP2P does not implement "iterateEligiblePendingTxs"');
|
|
119
|
+
}
|
|
120
|
+
|
|
100
121
|
public getPendingTxCount(): Promise<number> {
|
|
101
122
|
throw new Error('DummyP2P does not implement "getPendingTxCount"');
|
|
102
123
|
}
|
|
103
124
|
|
|
125
|
+
public hasEligiblePendingTxs(_minCount: number): Promise<boolean> {
|
|
126
|
+
throw new Error('DummyP2P does not implement "hasEligiblePendingTxs"');
|
|
127
|
+
}
|
|
128
|
+
|
|
104
129
|
public start(): Promise<void> {
|
|
105
130
|
throw new Error('DummyP2P does not implement "start"');
|
|
106
131
|
}
|
|
@@ -125,16 +150,34 @@ export class DummyP2P implements P2P {
|
|
|
125
150
|
throw new Error('DummyP2P does not implement "isP2PClient"');
|
|
126
151
|
}
|
|
127
152
|
|
|
153
|
+
public getTxProvider(): ITxProvider {
|
|
154
|
+
throw new Error('DummyP2P does not implement "getTxProvider"');
|
|
155
|
+
}
|
|
156
|
+
|
|
128
157
|
public getTxsByHash(_txHashes: TxHash[]): Promise<Tx[]> {
|
|
129
158
|
throw new Error('DummyP2P does not implement "getTxsByHash"');
|
|
130
159
|
}
|
|
131
160
|
|
|
132
|
-
public getCheckpointAttestationsForSlot(
|
|
161
|
+
public getCheckpointAttestationsForSlot(
|
|
162
|
+
_slot: SlotNumber,
|
|
163
|
+
_proposalPayloadHash?: CheckpointProposalHash,
|
|
164
|
+
): Promise<CheckpointAttestation[]> {
|
|
133
165
|
throw new Error('DummyP2P does not implement "getCheckpointAttestationsForSlot"');
|
|
134
166
|
}
|
|
135
167
|
|
|
136
|
-
public
|
|
137
|
-
throw new Error('DummyP2P does not implement "
|
|
168
|
+
public addOwnCheckpointAttestations(_attestations: CheckpointAttestation[]): Promise<void> {
|
|
169
|
+
throw new Error('DummyP2P does not implement "addOwnCheckpointAttestations"');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
public getProposalsForSlot(_slot: SlotNumber): Promise<{
|
|
173
|
+
blockProposals: BlockProposal[];
|
|
174
|
+
checkpointProposals: CheckpointProposalCore[];
|
|
175
|
+
}> {
|
|
176
|
+
return Promise.resolve({ blockProposals: [], checkpointProposals: [] });
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
public hasCheckpointProposalForSlot(_slot: SlotNumber): Promise<boolean> {
|
|
180
|
+
return Promise.resolve(false);
|
|
138
181
|
}
|
|
139
182
|
|
|
140
183
|
public getL2BlockHash(_number: number): Promise<string | undefined> {
|
|
@@ -157,14 +200,6 @@ export class DummyP2P implements P2P {
|
|
|
157
200
|
throw new Error('DummyP2P does not implement "sync"');
|
|
158
201
|
}
|
|
159
202
|
|
|
160
|
-
public requestTxsByHash(_txHashes: TxHash[]): Promise<Tx[]> {
|
|
161
|
-
throw new Error('DummyP2P does not implement "requestTxsByHash"');
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
public getTxs(_filter: 'all' | 'pending' | 'mined'): Promise<Tx[]> {
|
|
165
|
-
throw new Error('DummyP2P does not implement "getTxs"');
|
|
166
|
-
}
|
|
167
|
-
|
|
168
203
|
public getTxsByHashFromPool(_txHashes: TxHash[]): Promise<(Tx | undefined)[]> {
|
|
169
204
|
throw new Error('DummyP2P does not implement "getTxsByHashFromPool"');
|
|
170
205
|
}
|
|
@@ -173,10 +208,6 @@ export class DummyP2P implements P2P {
|
|
|
173
208
|
throw new Error('DummyP2P does not implement "hasTxsInPool"');
|
|
174
209
|
}
|
|
175
210
|
|
|
176
|
-
public addTxsToPool(_txs: Tx[]): Promise<number> {
|
|
177
|
-
throw new Error('DummyP2P does not implement "addTxs"');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
211
|
public getSyncedLatestBlockNum(): Promise<number> {
|
|
181
212
|
throw new Error('DummyP2P does not implement "getSyncedLatestBlockNum"');
|
|
182
213
|
}
|
|
@@ -189,15 +220,15 @@ export class DummyP2P implements P2P {
|
|
|
189
220
|
throw new Error('DummyP2P does not implement "getSyncedLatestSlot"');
|
|
190
221
|
}
|
|
191
222
|
|
|
192
|
-
|
|
193
|
-
throw new Error('DummyP2P does not implement "
|
|
223
|
+
protectTxs(_txHashes: TxHash[], _blockHeader: BlockHeader): Promise<TxHash[]> {
|
|
224
|
+
throw new Error('DummyP2P does not implement "protectTxs".');
|
|
194
225
|
}
|
|
195
226
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
): Promise<void> {
|
|
227
|
+
prepareForSlot(_slotNumber: SlotNumber): Promise<void> {
|
|
228
|
+
return Promise.resolve();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
addReqRespSubProtocol(_subProtocol: ReqRespSubProtocol, _handler: ReqRespSubProtocolHandler): Promise<void> {
|
|
201
232
|
throw new Error('DummyP2P does not implement "addReqRespSubProtocol".');
|
|
202
233
|
}
|
|
203
234
|
handleAuthRequestFromPeer(_authRequest: AuthRequest, _peerId: PeerId): Promise<StatusMessage> {
|
|
@@ -206,4 +237,24 @@ export class DummyP2P implements P2P {
|
|
|
206
237
|
|
|
207
238
|
//This is no-op
|
|
208
239
|
public registerThisValidatorAddresses(_address: EthAddress[]): void {}
|
|
240
|
+
|
|
241
|
+
public registerDuplicateProposalCallback(_callback: P2PDuplicateProposalCallback): void {
|
|
242
|
+
throw new Error('DummyP2P does not implement "registerDuplicateProposalCallback"');
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
public registerOversizedProposalCallback(_callback: P2POversizedProposalCallback): void {
|
|
246
|
+
throw new Error('DummyP2P does not implement "registerOversizedProposalCallback"');
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
public registerDuplicateAttestationCallback(_callback: P2PDuplicateAttestationCallback): void {
|
|
250
|
+
throw new Error('DummyP2P does not implement "registerDuplicateAttestationCallback"');
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
public registerCheckpointAttestationCallback(_callback: P2PCheckpointAttestationCallback): void {
|
|
254
|
+
throw new Error('DummyP2P does not implement "registerCheckpointAttestationCallback"');
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
public hasBlockProposalsForSlot(_slot: SlotNumber): Promise<boolean> {
|
|
258
|
+
throw new Error('DummyP2P does not implement "hasBlockProposalsForSlot"');
|
|
259
|
+
}
|
|
209
260
|
}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SimulationOverridesPlan } from '@aztec/ethereum/contracts';
|
|
2
|
+
import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { times } from '@aztec/foundation/collection';
|
|
2
4
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
5
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
-
import { GasFees } from '@aztec/stdlib/gas';
|
|
6
|
+
import { FEE_ORACLE_LAG, GasFees } from '@aztec/stdlib/gas';
|
|
5
7
|
import { makeGlobalVariables } from '@aztec/stdlib/testing';
|
|
6
|
-
import {
|
|
8
|
+
import type { CheckpointGlobalVariables, FeeProvider, GlobalVariableBuilder } from '@aztec/stdlib/tx';
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
/** Simple FeeProvider for TXE that returns zero fees. */
|
|
11
|
+
export class TXEFeeProvider implements FeeProvider {
|
|
9
12
|
public getCurrentMinFees(): Promise<GasFees> {
|
|
10
13
|
return Promise.resolve(new GasFees(0, 0));
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
public
|
|
14
|
-
|
|
15
|
-
_coinbase: EthAddress,
|
|
16
|
-
_feeRecipient: AztecAddress,
|
|
17
|
-
_slotNumber?: SlotNumber,
|
|
18
|
-
): Promise<GlobalVariables> {
|
|
19
|
-
return Promise.resolve(makeGlobalVariables());
|
|
16
|
+
public getPredictedMinFees(): Promise<GasFees[]> {
|
|
17
|
+
return Promise.resolve(times(FEE_ORACLE_LAG, () => new GasFees(0, 0)));
|
|
20
18
|
}
|
|
19
|
+
}
|
|
21
20
|
|
|
21
|
+
export class TXEGlobalVariablesBuilder implements GlobalVariableBuilder {
|
|
22
22
|
public buildCheckpointGlobalVariables(
|
|
23
23
|
_coinbase: EthAddress,
|
|
24
24
|
_feeRecipient: AztecAddress,
|
|
25
25
|
_slotNumber: SlotNumber,
|
|
26
|
+
_simulationOverridesPlan?: SimulationOverridesPlan,
|
|
26
27
|
): Promise<CheckpointGlobalVariables> {
|
|
27
28
|
const vars = makeGlobalVariables();
|
|
28
29
|
return Promise.resolve({
|
|
@@ -1,21 +1,32 @@
|
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
import {
|
|
7
|
+
type AnchorBlockStore,
|
|
8
|
+
ContractClassService,
|
|
9
|
+
type ContractStore,
|
|
10
|
+
ContractSyncService,
|
|
11
|
+
type NoteStore,
|
|
12
|
+
} from '@aztec/pxe/server';
|
|
13
|
+
import { TxResolverService } from '@aztec/pxe/simulator';
|
|
14
|
+
import { L2Block, type L2TipsProvider } from '@aztec/stdlib/block';
|
|
7
15
|
import { Checkpoint, L1PublishedData, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
8
16
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
9
|
-
import {
|
|
17
|
+
import { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
10
18
|
|
|
11
19
|
import { TXEArchiver } from './archiver.js';
|
|
12
20
|
import { DummyP2P } from './dummy_p2p_client.js';
|
|
13
|
-
import { TXEGlobalVariablesBuilder } from './global_variable_builder.js';
|
|
21
|
+
import { TXEFeeProvider, TXEGlobalVariablesBuilder } from './global_variable_builder.js';
|
|
14
22
|
import { MockEpochCache } from './mock_epoch_cache.js';
|
|
15
23
|
import { TXESynchronizer } from './synchronizer.js';
|
|
16
24
|
|
|
17
25
|
const VERSION = 1;
|
|
18
26
|
const CHAIN_ID = 1;
|
|
27
|
+
// Hardcoded so the bundled TXE doesn't try to read stdlib's package.json at a relative path
|
|
28
|
+
// that becomes invalid once bundled
|
|
29
|
+
const PACKAGE_VERSION = 'txe';
|
|
19
30
|
|
|
20
31
|
export class TXEStateMachine {
|
|
21
32
|
constructor(
|
|
@@ -23,50 +34,101 @@ export class TXEStateMachine {
|
|
|
23
34
|
public synchronizer: TXESynchronizer,
|
|
24
35
|
public archiver: TXEArchiver,
|
|
25
36
|
public anchorBlockStore: AnchorBlockStore,
|
|
37
|
+
public contractSyncService: ContractSyncService,
|
|
38
|
+
public contractClassService: ContractClassService,
|
|
39
|
+
public txResolver: TxResolverService,
|
|
26
40
|
) {}
|
|
27
41
|
|
|
28
|
-
public static async create(
|
|
29
|
-
|
|
42
|
+
public static async create(
|
|
43
|
+
archiver: TXEArchiver,
|
|
44
|
+
anchorBlockStore: AnchorBlockStore,
|
|
45
|
+
contractStore: ContractStore,
|
|
46
|
+
noteStore: NoteStore,
|
|
47
|
+
) {
|
|
30
48
|
const synchronizer = await TXESynchronizer.create();
|
|
31
|
-
const anchorBlockStore = new AnchorBlockStore(db);
|
|
32
|
-
|
|
33
49
|
const aztecNodeConfig = {} as AztecNodeConfig;
|
|
34
50
|
|
|
35
51
|
const log = createLogger('txe_node');
|
|
36
|
-
const node = new AztecNodeService(
|
|
37
|
-
aztecNodeConfig,
|
|
38
|
-
new DummyP2P(),
|
|
39
|
-
archiver,
|
|
40
|
-
archiver,
|
|
41
|
-
archiver,
|
|
42
|
-
archiver,
|
|
43
|
-
synchronizer,
|
|
44
|
-
undefined,
|
|
45
|
-
undefined,
|
|
46
|
-
undefined,
|
|
47
|
-
undefined,
|
|
48
|
-
|
|
49
|
-
CHAIN_ID,
|
|
50
|
-
|
|
51
|
-
new
|
|
52
|
-
|
|
53
|
-
new
|
|
54
|
-
|
|
52
|
+
const node = new AztecNodeService({
|
|
53
|
+
config: aztecNodeConfig,
|
|
54
|
+
p2pClient: new DummyP2P(),
|
|
55
|
+
blockSource: archiver,
|
|
56
|
+
logsSource: archiver,
|
|
57
|
+
contractDataSource: archiver,
|
|
58
|
+
l1ToL2MessageSource: archiver,
|
|
59
|
+
worldStateSynchronizer: synchronizer,
|
|
60
|
+
sequencer: undefined,
|
|
61
|
+
proverNode: undefined,
|
|
62
|
+
slasherClient: undefined,
|
|
63
|
+
validatorsSentinel: undefined,
|
|
64
|
+
stopStartedWatchers: async () => {},
|
|
65
|
+
l1ChainId: CHAIN_ID,
|
|
66
|
+
version: VERSION,
|
|
67
|
+
globalVariableBuilder: new TXEGlobalVariablesBuilder(),
|
|
68
|
+
rollupContract: undefined,
|
|
69
|
+
feeProvider: new TXEFeeProvider(),
|
|
70
|
+
epochCache: new MockEpochCache(),
|
|
71
|
+
packageVersion: PACKAGE_VERSION,
|
|
72
|
+
peerProofVerifier: new TestCircuitVerifier(),
|
|
73
|
+
rpcProofVerifier: new TestCircuitVerifier(),
|
|
74
|
+
telemetry: undefined,
|
|
55
75
|
log,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const contractClassService = new ContractClassService(node, contractStore);
|
|
79
|
+
const contractSyncService = new ContractSyncService(
|
|
80
|
+
node,
|
|
81
|
+
contractStore,
|
|
82
|
+
contractClassService,
|
|
83
|
+
noteStore,
|
|
84
|
+
createLogger('txe:contract_sync'),
|
|
56
85
|
);
|
|
57
86
|
|
|
58
|
-
|
|
87
|
+
const txResolver = new TxResolverService(node);
|
|
88
|
+
|
|
89
|
+
return new this(
|
|
90
|
+
node,
|
|
91
|
+
synchronizer,
|
|
92
|
+
archiver,
|
|
93
|
+
anchorBlockStore,
|
|
94
|
+
contractSyncService,
|
|
95
|
+
contractClassService,
|
|
96
|
+
txResolver,
|
|
97
|
+
);
|
|
59
98
|
}
|
|
60
99
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
100
|
+
/** Returns an {@link L2TipsProvider} backed by this node's chain tips. */
|
|
101
|
+
public get l2TipsProvider(): L2TipsProvider {
|
|
102
|
+
const node = this.node;
|
|
103
|
+
return {
|
|
104
|
+
getL2Tips: () => node.getChainTips(),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public async handleL2Block(block: L2Block, l1ToL2Messages: Fr[] = []) {
|
|
109
|
+
// Create a checkpoint from the block manually.
|
|
110
|
+
// TXE uses 1-block-per-checkpoint for testing simplicity, so we can use block number as checkpoint number.
|
|
111
|
+
// This uses the deprecated fromBlockNumber method intentionally for the TXE testing environment.
|
|
112
|
+
const checkpointNumber = CheckpointNumber.fromBlockNumber(block.number);
|
|
113
|
+
const checkpoint = new Checkpoint(
|
|
114
|
+
block.archive,
|
|
115
|
+
CheckpointHeader.from({
|
|
116
|
+
lastArchiveRoot: block.header.lastArchive.root,
|
|
117
|
+
inHash: Fr.ZERO,
|
|
118
|
+
blobsHash: Fr.ZERO,
|
|
119
|
+
blockHeadersHash: Fr.ZERO,
|
|
120
|
+
epochOutHash: Fr.ZERO,
|
|
121
|
+
slotNumber: block.header.globalVariables.slotNumber,
|
|
122
|
+
timestamp: block.header.globalVariables.timestamp,
|
|
123
|
+
coinbase: block.header.globalVariables.coinbase,
|
|
124
|
+
feeRecipient: block.header.globalVariables.feeRecipient,
|
|
125
|
+
gasFees: block.header.globalVariables.gasFees,
|
|
126
|
+
totalManaUsed: block.header.totalManaUsed,
|
|
127
|
+
accumulatedFees: block.header.totalFees,
|
|
128
|
+
}),
|
|
129
|
+
[block],
|
|
130
|
+
checkpointNumber,
|
|
131
|
+
);
|
|
70
132
|
|
|
71
133
|
const publishedCheckpoint = new PublishedCheckpoint(
|
|
72
134
|
checkpoint,
|
|
@@ -77,10 +139,13 @@ export class TXEStateMachine {
|
|
|
77
139
|
),
|
|
78
140
|
[],
|
|
79
141
|
);
|
|
142
|
+
// Wipe contract sync cache when anchor block changes (mirrors BlockSynchronizer behavior)
|
|
143
|
+
this.contractSyncService.wipe();
|
|
144
|
+
|
|
80
145
|
await Promise.all([
|
|
81
|
-
this.synchronizer.handleL2Block(block
|
|
146
|
+
this.synchronizer.handleL2Block(block, l1ToL2Messages),
|
|
82
147
|
this.archiver.addCheckpoints([publishedCheckpoint], undefined),
|
|
83
|
-
this.anchorBlockStore.setHeader(block.header),
|
|
148
|
+
this.anchorBlockStore.setHeader(block.header),
|
|
84
149
|
]);
|
|
85
150
|
}
|
|
86
151
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
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.
|
|
7
8
|
* Since in TXE we don't validate transactions, mock suffices here.
|
|
8
9
|
*/
|
|
9
10
|
export class MockEpochCache implements EpochCacheInterface {
|
|
10
|
-
getCommittee(): Promise<EpochCommitteeInfo> {
|
|
11
|
+
getCommittee(_slot: SlotTag = 'now'): Promise<EpochCommitteeInfo> {
|
|
11
12
|
return Promise.resolve({
|
|
12
13
|
committee: undefined,
|
|
13
14
|
seed: 0n,
|
|
@@ -16,23 +17,44 @@ export class MockEpochCache implements EpochCacheInterface {
|
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
getSlotNow(): SlotNumber {
|
|
21
|
+
return SlotNumber(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
getTargetSlot(): SlotNumber {
|
|
25
|
+
return SlotNumber(0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
getEpochNow(): EpochNumber {
|
|
29
|
+
return EpochNumber.ZERO;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
getTargetEpoch(): EpochNumber {
|
|
33
|
+
return EpochNumber.ZERO;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getEpochAndSlotNow(): EpochAndSlot & { nowMs: bigint } {
|
|
20
37
|
return {
|
|
21
38
|
epoch: EpochNumber.ZERO,
|
|
22
39
|
slot: SlotNumber(0),
|
|
23
40
|
ts: 0n,
|
|
41
|
+
nowMs: 0n,
|
|
24
42
|
};
|
|
25
43
|
}
|
|
26
44
|
|
|
27
|
-
getEpochAndSlotInNextL1Slot(): EpochAndSlot & {
|
|
45
|
+
getEpochAndSlotInNextL1Slot(): EpochAndSlot & { nowSeconds: bigint } {
|
|
28
46
|
return {
|
|
29
47
|
epoch: EpochNumber.ZERO,
|
|
30
48
|
slot: SlotNumber(0),
|
|
31
49
|
ts: 0n,
|
|
32
|
-
|
|
50
|
+
nowSeconds: 0n,
|
|
33
51
|
};
|
|
34
52
|
}
|
|
35
53
|
|
|
54
|
+
getTargetEpochAndSlotInNextL1Slot(): EpochAndSlot & { nowSeconds: bigint } {
|
|
55
|
+
return this.getEpochAndSlotInNextL1Slot();
|
|
56
|
+
}
|
|
57
|
+
|
|
36
58
|
getProposerIndexEncoding(_epoch: EpochNumber, _slot: SlotNumber, _seed: bigint): `0x${string}` {
|
|
37
59
|
return '0x00';
|
|
38
60
|
}
|
|
@@ -48,6 +70,13 @@ export class MockEpochCache implements EpochCacheInterface {
|
|
|
48
70
|
};
|
|
49
71
|
}
|
|
50
72
|
|
|
73
|
+
getTargetAndNextSlot(): { targetSlot: SlotNumber; nextSlot: SlotNumber } {
|
|
74
|
+
return {
|
|
75
|
+
targetSlot: SlotNumber(0),
|
|
76
|
+
nextSlot: SlotNumber(0),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
51
80
|
getProposerAttesterAddressInSlot(_slot: SlotNumber): Promise<EthAddress | undefined> {
|
|
52
81
|
return Promise.resolve(undefined);
|
|
53
82
|
}
|
|
@@ -63,4 +92,16 @@ export class MockEpochCache implements EpochCacheInterface {
|
|
|
63
92
|
filterInCommittee(_slot: SlotTag, _validators: EthAddress[]): Promise<EthAddress[]> {
|
|
64
93
|
return Promise.resolve([]);
|
|
65
94
|
}
|
|
95
|
+
|
|
96
|
+
isEscapeHatchOpen(_epoch: EpochNumber): Promise<boolean> {
|
|
97
|
+
return Promise.resolve(false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
isEscapeHatchOpenAtSlot(_slot: SlotTag): Promise<boolean> {
|
|
101
|
+
return Promise.resolve(false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
getL1Constants(): L1RollupConstants {
|
|
105
|
+
return EmptyL1RollupConstants;
|
|
106
|
+
}
|
|
66
107
|
}
|