@aztec/aztec-node 5.0.0-private.20260319 → 5.0.0-rc.2
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/aztec-node/block_response_helpers.d.ts +25 -0
- package/dest/aztec-node/block_response_helpers.d.ts.map +1 -0
- package/dest/aztec-node/block_response_helpers.js +112 -0
- package/dest/aztec-node/config.d.ts +16 -4
- package/dest/aztec-node/config.d.ts.map +1 -1
- package/dest/aztec-node/config.js +15 -5
- package/dest/aztec-node/node_public_calls_simulator.d.ts +90 -0
- package/dest/aztec-node/node_public_calls_simulator.d.ts.map +1 -0
- package/dest/aztec-node/node_public_calls_simulator.js +346 -0
- package/dest/aztec-node/public_data_overrides.d.ts +13 -0
- package/dest/aztec-node/public_data_overrides.d.ts.map +1 -0
- package/dest/aztec-node/public_data_overrides.js +21 -0
- package/dest/aztec-node/register_node_rpc_handlers.d.ts +10 -0
- package/dest/aztec-node/register_node_rpc_handlers.d.ts.map +1 -0
- package/dest/aztec-node/register_node_rpc_handlers.js +31 -0
- package/dest/aztec-node/server.d.ts +128 -134
- package/dest/aztec-node/server.d.ts.map +1 -1
- package/dest/aztec-node/server.js +393 -820
- package/dest/bin/index.js +15 -10
- package/dest/factory.d.ts +33 -0
- package/dest/factory.d.ts.map +1 -0
- package/dest/factory.js +496 -0
- package/dest/index.d.ts +3 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +2 -0
- package/dest/modules/block_parameter.d.ts +25 -0
- package/dest/modules/block_parameter.d.ts.map +1 -0
- package/dest/modules/block_parameter.js +100 -0
- package/dest/modules/node_block_provider.d.ts +19 -0
- package/dest/modules/node_block_provider.d.ts.map +1 -0
- package/dest/modules/node_block_provider.js +112 -0
- package/dest/modules/node_tx_receipt.d.ts +24 -0
- package/dest/modules/node_tx_receipt.d.ts.map +1 -0
- package/dest/modules/node_tx_receipt.js +70 -0
- package/dest/modules/node_world_state_queries.d.ts +61 -0
- package/dest/modules/node_world_state_queries.d.ts.map +1 -0
- package/dest/modules/node_world_state_queries.js +257 -0
- package/dest/sentinel/config.d.ts +3 -2
- package/dest/sentinel/config.d.ts.map +1 -1
- package/dest/sentinel/config.js +15 -5
- package/dest/sentinel/factory.d.ts +5 -3
- package/dest/sentinel/factory.d.ts.map +1 -1
- package/dest/sentinel/factory.js +12 -5
- package/dest/sentinel/sentinel.d.ts +145 -21
- package/dest/sentinel/sentinel.d.ts.map +1 -1
- package/dest/sentinel/sentinel.js +227 -105
- package/dest/sentinel/store.d.ts +8 -8
- package/dest/sentinel/store.d.ts.map +1 -1
- package/dest/sentinel/store.js +25 -17
- package/dest/test/index.d.ts +3 -3
- package/dest/test/index.d.ts.map +1 -1
- package/package.json +28 -26
- package/src/aztec-node/block_response_helpers.ts +161 -0
- package/src/aztec-node/config.ts +30 -7
- package/src/aztec-node/node_public_calls_simulator.ts +383 -0
- package/src/aztec-node/public_data_overrides.ts +35 -0
- package/src/aztec-node/register_node_rpc_handlers.ts +29 -0
- package/src/aztec-node/server.ts +514 -1070
- package/src/bin/index.ts +19 -12
- package/src/factory.ts +656 -0
- package/src/index.ts +2 -0
- package/src/modules/block_parameter.ts +93 -0
- package/src/modules/node_block_provider.ts +149 -0
- package/src/modules/node_tx_receipt.ts +115 -0
- package/src/modules/node_world_state_queries.ts +360 -0
- package/src/sentinel/README.md +103 -0
- package/src/sentinel/config.ts +18 -6
- package/src/sentinel/factory.ts +21 -6
- package/src/sentinel/sentinel.ts +277 -130
- package/src/sentinel/store.ts +26 -18
- package/src/test/index.ts +2 -2
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { chunkBy } from '@aztec/foundation/collection';
|
|
3
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
+
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
6
|
+
import { inspectBlockParameter } from '@aztec/stdlib/block';
|
|
7
|
+
import { computePublicDataTreeLeafSlot } from '@aztec/stdlib/hash';
|
|
8
|
+
import { InboxLeaf } from '@aztec/stdlib/messaging';
|
|
9
|
+
import { MerkleTreeId, NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
10
|
+
import { normalizeBlockParameter } from './block_parameter.js';
|
|
11
|
+
/**
|
|
12
|
+
* Serves the node's Merkle-tree and membership-witness queries against committed world-state at a
|
|
13
|
+
* requested block. Extracted from `AztecNodeService` so the block-resolution and reorg-aware sync logic
|
|
14
|
+
* can be unit-tested without standing up the whole node, and to keep `server.ts` smaller.
|
|
15
|
+
*/ export class NodeWorldStateQueries {
|
|
16
|
+
worldStateSynchronizer;
|
|
17
|
+
blockSource;
|
|
18
|
+
l1ToL2MessageSource;
|
|
19
|
+
log;
|
|
20
|
+
constructor(deps){
|
|
21
|
+
this.worldStateSynchronizer = deps.worldStateSynchronizer;
|
|
22
|
+
this.blockSource = deps.blockSource;
|
|
23
|
+
this.l1ToL2MessageSource = deps.l1ToL2MessageSource;
|
|
24
|
+
this.log = deps.log ?? createLogger('node:world-state-queries');
|
|
25
|
+
}
|
|
26
|
+
async findLeavesIndexes(referenceBlock, treeId, leafValues) {
|
|
27
|
+
const committedDb = await this.getWorldState(referenceBlock);
|
|
28
|
+
const maybeIndices = await committedDb.findLeafIndices(treeId, leafValues.map((x)=>x.toBuffer()));
|
|
29
|
+
// Filter out undefined values to query block numbers only for found leaves
|
|
30
|
+
const definedIndices = maybeIndices.filter((x)=>x !== undefined);
|
|
31
|
+
// Now we find the block numbers for the defined indices
|
|
32
|
+
const blockNumbers = await committedDb.getBlockNumbersForLeafIndices(treeId, definedIndices);
|
|
33
|
+
// Build a map from leaf index to block number
|
|
34
|
+
const indexToBlockNumber = new Map();
|
|
35
|
+
for(let i = 0; i < definedIndices.length; i++){
|
|
36
|
+
const blockNumber = blockNumbers[i];
|
|
37
|
+
if (blockNumber === undefined) {
|
|
38
|
+
throw new Error(`Block number is undefined for leaf index ${definedIndices[i]} in tree ${MerkleTreeId[treeId]}`);
|
|
39
|
+
}
|
|
40
|
+
indexToBlockNumber.set(definedIndices[i], blockNumber);
|
|
41
|
+
}
|
|
42
|
+
// Get unique block numbers in order to optimize num calls to getLeafValue function.
|
|
43
|
+
const uniqueBlockNumbers = [
|
|
44
|
+
...new Set(indexToBlockNumber.values())
|
|
45
|
+
];
|
|
46
|
+
// Now we obtain the block hashes from the archive tree (block number = leaf index in archive tree).
|
|
47
|
+
const blockHashes = await Promise.all(uniqueBlockNumbers.map((blockNumber)=>{
|
|
48
|
+
return committedDb.getLeafValue(MerkleTreeId.ARCHIVE, BigInt(blockNumber));
|
|
49
|
+
}));
|
|
50
|
+
// Build a map from block number to block hash
|
|
51
|
+
const blockNumberToHash = new Map();
|
|
52
|
+
for(let i = 0; i < uniqueBlockNumbers.length; i++){
|
|
53
|
+
const blockHash = blockHashes[i];
|
|
54
|
+
if (blockHash === undefined) {
|
|
55
|
+
throw new Error(`Block hash is undefined for block number ${uniqueBlockNumbers[i]}`);
|
|
56
|
+
}
|
|
57
|
+
blockNumberToHash.set(uniqueBlockNumbers[i], blockHash);
|
|
58
|
+
}
|
|
59
|
+
// Create DataInBlock objects by combining indices, blockNumbers and blockHashes and return them.
|
|
60
|
+
return maybeIndices.map((index)=>{
|
|
61
|
+
if (index === undefined) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
const blockNumber = indexToBlockNumber.get(index);
|
|
65
|
+
if (blockNumber === undefined) {
|
|
66
|
+
throw new Error(`Block number not found for leaf index ${index} in tree ${MerkleTreeId[treeId]}`);
|
|
67
|
+
}
|
|
68
|
+
const l2BlockHash = blockNumberToHash.get(blockNumber);
|
|
69
|
+
if (l2BlockHash === undefined) {
|
|
70
|
+
throw new Error(`Block hash not found for block number ${blockNumber}`);
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
l2BlockNumber: blockNumber,
|
|
74
|
+
l2BlockHash,
|
|
75
|
+
data: index
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async getBlockHashMembershipWitness(referenceBlock, blockHash) {
|
|
80
|
+
// The Noir circuit checks the archive membership proof against `anchor_block_header.last_archive.root`,
|
|
81
|
+
// which is the archive tree root BEFORE the anchor block was added (i.e. the state after block N-1).
|
|
82
|
+
// So we need the world state at block N-1, not block N, to produce a sibling path matching that root.
|
|
83
|
+
const referenceBlockNumber = await this.resolveBlockNumber(referenceBlock);
|
|
84
|
+
if (referenceBlockNumber === BlockNumber.ZERO) {
|
|
85
|
+
// Block 0 (the initial block) has an empty archive, so no membership witness can exist.
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
const committedDb = await this.getWorldState(BlockNumber(referenceBlockNumber - 1));
|
|
89
|
+
const [pathAndIndex] = await committedDb.findSiblingPaths(MerkleTreeId.ARCHIVE, [
|
|
90
|
+
blockHash
|
|
91
|
+
]);
|
|
92
|
+
return pathAndIndex === undefined ? undefined : MembershipWitness.fromSiblingPath(pathAndIndex.index, pathAndIndex.path);
|
|
93
|
+
}
|
|
94
|
+
async getNoteHashMembershipWitness(referenceBlock, noteHash) {
|
|
95
|
+
const committedDb = await this.getWorldState(referenceBlock);
|
|
96
|
+
const [pathAndIndex] = await committedDb.findSiblingPaths(MerkleTreeId.NOTE_HASH_TREE, [
|
|
97
|
+
noteHash
|
|
98
|
+
]);
|
|
99
|
+
return pathAndIndex === undefined ? undefined : MembershipWitness.fromSiblingPath(pathAndIndex.index, pathAndIndex.path);
|
|
100
|
+
}
|
|
101
|
+
async getL1ToL2MessageMembershipWitness(referenceBlock, l1ToL2Message) {
|
|
102
|
+
const db = await this.getWorldState(referenceBlock);
|
|
103
|
+
const [witness] = await db.findSiblingPaths(MerkleTreeId.L1_TO_L2_MESSAGE_TREE, [
|
|
104
|
+
l1ToL2Message
|
|
105
|
+
]);
|
|
106
|
+
if (!witness) {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
// REFACTOR: Return a MembershipWitness object
|
|
110
|
+
return [
|
|
111
|
+
witness.index,
|
|
112
|
+
witness.path
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
async getL1ToL2MessageCheckpoint(l1ToL2Message) {
|
|
116
|
+
const messageIndex = await this.l1ToL2MessageSource.getL1ToL2MessageIndex(l1ToL2Message);
|
|
117
|
+
return messageIndex !== undefined ? InboxLeaf.checkpointNumberFromIndex(messageIndex) : undefined;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Returns all the L2 to L1 messages in an epoch (empty array if the epoch is not found). The public
|
|
121
|
+
* `AztecNodeService.getL2ToL1Messages` that delegates here is deprecated in favor of
|
|
122
|
+
* {@link getL2ToL1MembershipWitness}.
|
|
123
|
+
* @param epoch - The epoch at which to get the data.
|
|
124
|
+
*/ async getL2ToL1Messages(epoch) {
|
|
125
|
+
const blocks = await this.blockSource.getBlocks({
|
|
126
|
+
epoch,
|
|
127
|
+
onlyCheckpointed: true
|
|
128
|
+
});
|
|
129
|
+
const blocksInCheckpoints = chunkBy(blocks, (block)=>block.header.globalVariables.slotNumber);
|
|
130
|
+
return blocksInCheckpoints.map((slotBlocks)=>slotBlocks.map((block)=>block.body.txEffects.map((txEffect)=>txEffect.l2ToL1Msgs)));
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Returns the L2-to-L1 membership witness for a message in `txHash`. Passthrough to the
|
|
134
|
+
* archiver's locally-cached resolver — see {@link Archiver.getL2ToL1MembershipWitness}.
|
|
135
|
+
*/ getL2ToL1MembershipWitness(txHash, message, messageIndexInTx) {
|
|
136
|
+
return this.blockSource.getL2ToL1MembershipWitness(txHash, message, messageIndexInTx);
|
|
137
|
+
}
|
|
138
|
+
async getNullifierMembershipWitness(referenceBlock, nullifier) {
|
|
139
|
+
const db = await this.getWorldState(referenceBlock);
|
|
140
|
+
const [witness] = await db.findSiblingPaths(MerkleTreeId.NULLIFIER_TREE, [
|
|
141
|
+
nullifier.toBuffer()
|
|
142
|
+
]);
|
|
143
|
+
if (!witness) {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
const { index, path } = witness;
|
|
147
|
+
const leafPreimage = await db.getLeafPreimage(MerkleTreeId.NULLIFIER_TREE, index);
|
|
148
|
+
if (!leafPreimage) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
return new NullifierMembershipWitness(index, leafPreimage, path);
|
|
152
|
+
}
|
|
153
|
+
async getLowNullifierMembershipWitness(referenceBlock, nullifier) {
|
|
154
|
+
const committedDb = await this.getWorldState(referenceBlock);
|
|
155
|
+
const findResult = await committedDb.getPreviousValueIndex(MerkleTreeId.NULLIFIER_TREE, nullifier.toBigInt());
|
|
156
|
+
if (!findResult) {
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
const { index, alreadyPresent } = findResult;
|
|
160
|
+
if (alreadyPresent) {
|
|
161
|
+
throw new Error(`Cannot prove nullifier non-inclusion: nullifier ${nullifier.toBigInt()} already exists in the tree`);
|
|
162
|
+
}
|
|
163
|
+
const preimageData = await committedDb.getLeafPreimage(MerkleTreeId.NULLIFIER_TREE, index);
|
|
164
|
+
const siblingPath = await committedDb.getSiblingPath(MerkleTreeId.NULLIFIER_TREE, BigInt(index));
|
|
165
|
+
return new NullifierMembershipWitness(BigInt(index), preimageData, siblingPath);
|
|
166
|
+
}
|
|
167
|
+
async getPublicDataWitness(referenceBlock, leafSlot) {
|
|
168
|
+
const committedDb = await this.getWorldState(referenceBlock);
|
|
169
|
+
const lowLeafResult = await committedDb.getPreviousValueIndex(MerkleTreeId.PUBLIC_DATA_TREE, leafSlot.toBigInt());
|
|
170
|
+
if (!lowLeafResult) {
|
|
171
|
+
return undefined;
|
|
172
|
+
} else {
|
|
173
|
+
const preimage = await committedDb.getLeafPreimage(MerkleTreeId.PUBLIC_DATA_TREE, lowLeafResult.index);
|
|
174
|
+
const path = await committedDb.getSiblingPath(MerkleTreeId.PUBLIC_DATA_TREE, lowLeafResult.index);
|
|
175
|
+
return new PublicDataWitness(lowLeafResult.index, preimage, path);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
async getPublicStorageAt(referenceBlock, contract, slot) {
|
|
179
|
+
const committedDb = await this.getWorldState(referenceBlock);
|
|
180
|
+
const leafSlot = await computePublicDataTreeLeafSlot(contract, slot);
|
|
181
|
+
const lowLeafResult = await committedDb.getPreviousValueIndex(MerkleTreeId.PUBLIC_DATA_TREE, leafSlot.toBigInt());
|
|
182
|
+
if (!lowLeafResult || !lowLeafResult.alreadyPresent) {
|
|
183
|
+
return Fr.ZERO;
|
|
184
|
+
}
|
|
185
|
+
const preimage = await committedDb.getLeafPreimage(MerkleTreeId.PUBLIC_DATA_TREE, lowLeafResult.index);
|
|
186
|
+
return preimage.leaf.value;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Returns an instance of MerkleTreeOperations having first ensured the world state is fully synched
|
|
190
|
+
* @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
|
|
191
|
+
* @returns An instance of a committed MerkleTreeOperations
|
|
192
|
+
*/ async getWorldState(block) {
|
|
193
|
+
const query = normalizeBlockParameter(block);
|
|
194
|
+
// When the request anchors on a specific block hash, resolve it against the archiver up front and
|
|
195
|
+
// drive the world-state sync to that exact block number and hash. Resolving against the archiver
|
|
196
|
+
// first fails fast with a clear reorg error if the hash is unknown, and passing the hash to the
|
|
197
|
+
// synchronizer makes the sync reorg-aware: it barriers until the archive-tree commit for that block
|
|
198
|
+
// has landed and verifies it matches the requested fork, instead of syncing to bare latest height
|
|
199
|
+
// and then racing the snapshot read below against an in-flight archive-tree write.
|
|
200
|
+
const requestedHash = 'hash' in query ? query.hash : undefined;
|
|
201
|
+
const anchorBlockNumber = requestedHash !== undefined ? await this.resolveBlockNumber(query) : undefined;
|
|
202
|
+
let blockSyncedTo = BlockNumber.ZERO;
|
|
203
|
+
try {
|
|
204
|
+
// Attempt to sync the world state if necessary
|
|
205
|
+
blockSyncedTo = await this.#syncWorldState(anchorBlockNumber, requestedHash);
|
|
206
|
+
} catch (err) {
|
|
207
|
+
this.log.error(`Error getting world state: ${err}`);
|
|
208
|
+
}
|
|
209
|
+
if ('tag' in query && query.tag === 'proposed') {
|
|
210
|
+
this.log.debug(`Using committed db for latest block, world state synced upto ${blockSyncedTo}`);
|
|
211
|
+
return this.worldStateSynchronizer.getCommitted();
|
|
212
|
+
}
|
|
213
|
+
const blockNumber = anchorBlockNumber ?? await this.resolveBlockNumber(query);
|
|
214
|
+
// Check it's within world state sync range
|
|
215
|
+
if (blockNumber > blockSyncedTo) {
|
|
216
|
+
throw new Error(`Queried block ${inspectBlockParameter(block)} not yet synced by the node (node is synced upto ${blockSyncedTo}).`);
|
|
217
|
+
}
|
|
218
|
+
this.log.debug(`Using snapshot for block ${blockNumber}, world state synced upto ${blockSyncedTo}`);
|
|
219
|
+
const snapshot = this.worldStateSynchronizer.getSnapshot(blockNumber);
|
|
220
|
+
// Double-check world-state synced to the same block hash as was requested.
|
|
221
|
+
// Block 0 is skipped: the snapshot returned by `getSnapshot(0)` is the *pre*-genesis archive
|
|
222
|
+
// (size 0), so leaf 0 is not yet inserted from that snapshot's view even though block 0's hash
|
|
223
|
+
// does live at archive index 0 in the committed tree. The genesis hash is already validated by
|
|
224
|
+
// the archiver when it resolves the hash query to block number 0.
|
|
225
|
+
if (requestedHash !== undefined && blockNumber !== BlockNumber.ZERO) {
|
|
226
|
+
const blockHash = await snapshot.getLeafValue(MerkleTreeId.ARCHIVE, BigInt(blockNumber));
|
|
227
|
+
if (!blockHash || !requestedHash.equals(blockHash)) {
|
|
228
|
+
throw new Error(`Block hash ${requestedHash.toString()} not found in world state at block number ${blockNumber} (world state has ${blockHash?.toString() ?? 'no hash'} at that index, genesis header hash is ${this.blockSource.getGenesisBlockHash().toString()}). If the node API has been queried with anchor block hash possibly a reorg has occurred.`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return snapshot;
|
|
232
|
+
}
|
|
233
|
+
/** Resolves any {@link BlockParameter} variant to a concrete block number. */ async resolveBlockNumber(block) {
|
|
234
|
+
const query = normalizeBlockParameter(block);
|
|
235
|
+
const blockNumber = await this.blockSource.getBlockNumber(query);
|
|
236
|
+
if (blockNumber === undefined) {
|
|
237
|
+
if ('hash' in query) {
|
|
238
|
+
throw new Error(`Block hash ${query.hash.toString()} not found when querying world state. If the node API has been queried with anchor block hash possibly a reorg has occurred.`);
|
|
239
|
+
}
|
|
240
|
+
if ('archive' in query) {
|
|
241
|
+
throw new Error(`Block with archive ${query.archive.toString()} not found.`);
|
|
242
|
+
}
|
|
243
|
+
throw new Error(`Block not found for ${inspectBlockParameter(block)}.`);
|
|
244
|
+
}
|
|
245
|
+
return blockNumber;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Ensure the world state is synced.
|
|
249
|
+
* @param targetBlockNumber - Block to sync up to. Defaults to the latest block known to the archiver.
|
|
250
|
+
* @param blockHash - If provided, the synchronizer verifies the block at `targetBlockNumber` matches this
|
|
251
|
+
* hash, resyncing (and so detecting reorgs) if it does not yet match or has been reorged away.
|
|
252
|
+
* @returns A promise that fulfils once the world state is synced
|
|
253
|
+
*/ async #syncWorldState(targetBlockNumber, blockHash) {
|
|
254
|
+
const target = targetBlockNumber ?? await this.blockSource.getBlockNumber();
|
|
255
|
+
return await this.worldStateSynchronizer.syncImmediate(target, blockHash);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type ConfigMappingsType } from '@aztec/foundation/config';
|
|
2
2
|
export type SentinelConfig = {
|
|
3
3
|
sentinelHistoryLengthInEpochs: number;
|
|
4
|
-
|
|
4
|
+
sentinelHistoricEpochPerformanceLengthInEpochs: number;
|
|
5
5
|
sentinelEnabled: boolean;
|
|
6
|
+
sentinelEpochEndBufferSlots: number;
|
|
6
7
|
};
|
|
7
8
|
export declare const sentinelConfigMappings: ConfigMappingsType<SentinelConfig>;
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VudGluZWwvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxLQUFLLGtCQUFrQixFQUEyQyxNQUFNLDBCQUEwQixDQUFDO0FBRTVHLE1BQU0sTUFBTSxjQUFjLEdBQUc7SUFDM0IsNkJBQTZCLEVBQUUsTUFBTSxDQUFDO0lBQ3RDLDhDQUE4QyxFQUFFLE1BQU0sQ0FBQztJQUN2RCxlQUFlLEVBQUUsT0FBTyxDQUFDO0lBQ3pCLDJCQUEyQixFQUFFLE1BQU0sQ0FBQztDQUNyQyxDQUFDO0FBRUYsZUFBTyxNQUFNLHNCQUFzQixFQUFFLGtCQUFrQixDQUFDLGNBQWMsQ0F1Q3JFLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/sentinel/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAA2C,MAAM,0BAA0B,CAAC;AAE5G,MAAM,MAAM,cAAc,GAAG;IAC3B,6BAA6B,EAAE,MAAM,CAAC;IACtC
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/sentinel/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAA2C,MAAM,0BAA0B,CAAC;AAE5G,MAAM,MAAM,cAAc,GAAG;IAC3B,6BAA6B,EAAE,MAAM,CAAC;IACtC,8CAA8C,EAAE,MAAM,CAAC;IACvD,eAAe,EAAE,OAAO,CAAC;IACzB,2BAA2B,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,kBAAkB,CAAC,cAAc,CAuCrE,CAAC"}
|
package/dest/sentinel/config.js
CHANGED
|
@@ -6,8 +6,9 @@ export const sentinelConfigMappings = {
|
|
|
6
6
|
...numberConfigHelper(24)
|
|
7
7
|
},
|
|
8
8
|
/**
|
|
9
|
-
* The number of L2 epochs kept of
|
|
10
|
-
*
|
|
9
|
+
* The number of L2 epochs kept of per-epoch performance history for each validator. End-of-epoch
|
|
10
|
+
* activity is recorded here and used to decide consecutive-epoch inactivity slashing.
|
|
11
|
+
* This value must be large enough so that we have epoch performance for every validator
|
|
11
12
|
* for at least slashInactivityConsecutiveEpochThreshold. Assuming this value is 3,
|
|
12
13
|
* and the committee size is 48, and we have 10k validators, then we pick 48 out of 10k each draw.
|
|
13
14
|
* For any fixed element, per-draw prob = 48/10000 = 0.0048.
|
|
@@ -16,14 +17,23 @@ export const sentinelConfigMappings = {
|
|
|
16
17
|
* - 90% chance: n = 1108
|
|
17
18
|
* - 95% chance: n = 1310
|
|
18
19
|
* - 99% chance: n = 1749
|
|
19
|
-
*/
|
|
20
|
-
description: 'The number of L2 epochs kept of
|
|
21
|
-
env: '
|
|
20
|
+
*/ sentinelHistoricEpochPerformanceLengthInEpochs: {
|
|
21
|
+
description: 'The number of L2 epochs kept of per-epoch performance history for each validator.',
|
|
22
|
+
env: 'SENTINEL_HISTORIC_EPOCH_PERFORMANCE_LENGTH_IN_EPOCHS',
|
|
22
23
|
...numberConfigHelper(2000)
|
|
23
24
|
},
|
|
24
25
|
sentinelEnabled: {
|
|
25
26
|
description: 'Whether the sentinel is enabled or not.',
|
|
26
27
|
env: 'SENTINEL_ENABLED',
|
|
27
28
|
...booleanConfigHelper(false)
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* Number of L2 slots to wait after the end of an epoch before computing the epoch's performance.
|
|
32
|
+
* The buffer allows P2P attestations and the local archiver to settle. Higher values reduce the
|
|
33
|
+
* risk of misjudging late-arriving activity at the cost of delayed slashing.
|
|
34
|
+
*/ sentinelEpochEndBufferSlots: {
|
|
35
|
+
description: 'Number of L2 slots after the end of an epoch before the sentinel evaluates it.',
|
|
36
|
+
env: 'SENTINEL_EPOCH_END_BUFFER_SLOTS',
|
|
37
|
+
...numberConfigHelper(2)
|
|
28
38
|
}
|
|
29
39
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
2
|
import type { P2PClient } from '@aztec/p2p';
|
|
3
3
|
import type { L2BlockSource } from '@aztec/stdlib/block';
|
|
4
|
-
import type {
|
|
4
|
+
import type { CheckpointReexecutionTracker } from '@aztec/stdlib/checkpoint';
|
|
5
|
+
import type { ChainConfig } from '@aztec/stdlib/config';
|
|
6
|
+
import type { SlasherConfig, ValidatorClientConfig } from '@aztec/stdlib/interfaces/server';
|
|
5
7
|
import type { DataStoreConfig } from '@aztec/stdlib/kv-store';
|
|
6
8
|
import type { SentinelConfig } from './config.js';
|
|
7
9
|
import { Sentinel } from './sentinel.js';
|
|
8
|
-
export declare function createSentinel(epochCache: EpochCache, archiver: L2BlockSource, p2p: P2PClient, config: SentinelConfig & DataStoreConfig & SlasherConfig, logger?: import("@aztec/foundation/log").Logger): Promise<Sentinel | undefined>;
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
export declare function createSentinel(epochCache: EpochCache, archiver: L2BlockSource, p2p: P2PClient, reexecutionTracker: CheckpointReexecutionTracker, config: SentinelConfig & DataStoreConfig & SlasherConfig & Pick<ChainConfig, 'l1ChainId' | 'rollupAddress'> & Pick<ValidatorClientConfig, 'disableValidator'>, logger?: import("@aztec/foundation/log").Logger): Promise<Sentinel | undefined>;
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjdG9yeS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlbnRpbmVsL2ZhY3RvcnkudHMiXSwibmFtZXM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sourceRoot":"","sources":["../../src/sentinel/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/sentinel/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,wBAAsB,cAAc,CAClC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,aAAa,EACvB,GAAG,EAAE,SAAS,EACd,kBAAkB,EAAE,4BAA4B,EAChD,MAAM,EAAE,cAAc,GACpB,eAAe,GACf,aAAa,GACb,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,eAAe,CAAC,GAChD,IAAI,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,EACjD,MAAM,yCAAgC,GACrC,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAoB/B"}
|
package/dest/sentinel/factory.js
CHANGED
|
@@ -2,16 +2,23 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
2
2
|
import { createStore } from '@aztec/kv-store/lmdb-v2';
|
|
3
3
|
import { Sentinel } from './sentinel.js';
|
|
4
4
|
import { SentinelStore } from './store.js';
|
|
5
|
-
export async function createSentinel(epochCache, archiver, p2p, config, logger = createLogger('node:sentinel')) {
|
|
6
|
-
|
|
5
|
+
export async function createSentinel(epochCache, archiver, p2p, reexecutionTracker, config, logger = createLogger('node:sentinel')) {
|
|
6
|
+
const runsValidator = !config.disableValidator;
|
|
7
|
+
if (!runsValidator && !config.sentinelEnabled) {
|
|
8
|
+
logger.verbose('Sentinel is disabled');
|
|
7
9
|
return undefined;
|
|
8
10
|
}
|
|
11
|
+
if (runsValidator) {
|
|
12
|
+
logger.info('Enabling sentinel since this node runs a validator');
|
|
13
|
+
} else {
|
|
14
|
+
logger.info('Enabling sentinel from SENTINEL_ENABLED configuration');
|
|
15
|
+
}
|
|
9
16
|
const kvStore = await createStore('sentinel', SentinelStore.SCHEMA_VERSION, config, logger.getBindings());
|
|
10
17
|
const storeHistoryLength = config.sentinelHistoryLengthInEpochs * epochCache.getL1Constants().epochDuration;
|
|
11
|
-
const
|
|
18
|
+
const storeHistoricEpochPerformanceLength = config.sentinelHistoricEpochPerformanceLengthInEpochs;
|
|
12
19
|
const sentinelStore = new SentinelStore(kvStore, {
|
|
13
20
|
historyLength: storeHistoryLength,
|
|
14
|
-
|
|
21
|
+
historicEpochPerformanceLength: storeHistoricEpochPerformanceLength
|
|
15
22
|
});
|
|
16
|
-
return new Sentinel(epochCache, archiver, p2p, sentinelStore, config, logger);
|
|
23
|
+
return new Sentinel(epochCache, archiver, p2p, sentinelStore, reexecutionTracker, config, logger);
|
|
17
24
|
}
|
|
@@ -1,42 +1,141 @@
|
|
|
1
1
|
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
|
-
import { CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { CheckpointNumber, CheckpointProposalHash, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
5
|
-
import { type L2TipsStore } from '@aztec/kv-store/stores';
|
|
6
5
|
import type { P2PClient } from '@aztec/p2p';
|
|
7
6
|
import { type Watcher, type WatcherEmitter } from '@aztec/slasher';
|
|
8
7
|
import type { SlasherConfig } from '@aztec/slasher/config';
|
|
9
|
-
import { type L2BlockSource
|
|
8
|
+
import { type L2BlockSource } from '@aztec/stdlib/block';
|
|
9
|
+
import type { CheckpointReexecutionTracker } from '@aztec/stdlib/checkpoint';
|
|
10
|
+
import type { ChainConfig } from '@aztec/stdlib/config';
|
|
10
11
|
import type { SingleValidatorStats, ValidatorStats, ValidatorStatusHistory, ValidatorStatusInSlot, ValidatorStatusType, ValidatorsEpochPerformance, ValidatorsStats } from '@aztec/stdlib/validators';
|
|
12
|
+
import type { SentinelConfig } from './config.js';
|
|
11
13
|
import { SentinelStore } from './store.js';
|
|
14
|
+
export type SentinelRuntimeConfig = Pick<SlasherConfig, 'slashInactivityTargetPercentage' | 'slashInactivityPenalty' | 'slashInactivityConsecutiveEpochThreshold'> & Pick<SentinelConfig, 'sentinelEpochEndBufferSlots'> & Pick<ChainConfig, 'l1ChainId' | 'rollupAddress'>;
|
|
12
15
|
declare const Sentinel_base: new () => WatcherEmitter;
|
|
13
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The Sentinel observes validator behaviour every L2 slot, classifies it into a per-slot status,
|
|
18
|
+
* aggregates those statuses into per-epoch performance once each epoch is fully observed, and
|
|
19
|
+
* emits inactivity slash payloads when a validator has been inactive for the configured number
|
|
20
|
+
* of consecutive epochs.
|
|
21
|
+
*
|
|
22
|
+
* ## Two cadences
|
|
23
|
+
*
|
|
24
|
+
* The sentinel runs `work()` every quarter L2 slot and drives two independent pipelines:
|
|
25
|
+
*
|
|
26
|
+
* 1. **Per-slot activity recording.** `processSlot(currentSlot - 2)` runs once per slot, with a
|
|
27
|
+
* two-slot lag to let P2P attestations settle and the archiver catch up. It classifies each
|
|
28
|
+
* committee member's behaviour for that slot via `getSlotActivity` and persists the result to
|
|
29
|
+
* `SentinelStore.historyMap` (sliding window of `sentinelHistoryLengthInEpochs * epochDuration`
|
|
30
|
+
* slots, default 24 epochs).
|
|
31
|
+
*
|
|
32
|
+
* 2. **Per-epoch evaluation.** `processEpochEnds(currentSlot)` runs every tick too. Once
|
|
33
|
+
* `sentinelEpochEndBufferSlots` (default 2) has elapsed past an epoch's last slot AND the
|
|
34
|
+
* per-slot recorder has covered that last slot, the sentinel calls `handleEpochEnd(epoch)`.
|
|
35
|
+
* That aggregates the slot-level statuses for the epoch into per-validator `{missed, total}`,
|
|
36
|
+
* persists it to `SentinelStore.epochMap` (default 2000-epoch window), and runs the slashing
|
|
37
|
+
* decision.
|
|
38
|
+
*
|
|
39
|
+
* Triggering per-epoch evaluation off local L2 state — rather than waiting for L1 proof
|
|
40
|
+
* publication — decouples slashing from prover availability.
|
|
41
|
+
*
|
|
42
|
+
* ## Six-case taxonomy in `getSlotActivity`
|
|
43
|
+
*
|
|
44
|
+
* For each slot, the sentinel assigns the proposer one of six statuses, ranked highest-confidence
|
|
45
|
+
* first:
|
|
46
|
+
*
|
|
47
|
+
* - `checkpoint-mined` — a checkpoint covering this slot has landed on L1
|
|
48
|
+
* (fetched on demand via `archiver.getCheckpoint({ slot })`).
|
|
49
|
+
* - `checkpoint-valid` — the local node re-executed a checkpoint proposal for this slot
|
|
50
|
+
* successfully (consulted via `CheckpointReexecutionTracker`).
|
|
51
|
+
* - `checkpoint-invalid` — the local node re-executed a checkpoint proposal for this slot
|
|
52
|
+
* and rejected it (e.g. header/archive/out-hash mismatch, limit
|
|
53
|
+
* breach). Proposer-fault.
|
|
54
|
+
* - `checkpoint-unvalidated` — the local node observed a checkpoint proposal but could not
|
|
55
|
+
* validate it (missing blocks/txs, timeouts). Treated as
|
|
56
|
+
* proposer-fault for slashing.
|
|
57
|
+
* - `checkpoint-missed` — block proposals seen on P2P but no checkpoint proposal at all.
|
|
58
|
+
* - `blocks-missed` — no block proposals seen for this slot.
|
|
59
|
+
*
|
|
60
|
+
* Missing-attestor faults are recorded only in `checkpoint-mined` and `checkpoint-valid`, where
|
|
61
|
+
* the local node has positive evidence the checkpoint was canonical or valid. In the other four
|
|
62
|
+
* cases the proposer is at fault and no attestor penalty applies.
|
|
63
|
+
*
|
|
64
|
+
* ## Re-execution tracker
|
|
65
|
+
*
|
|
66
|
+
* `CheckpointReexecutionTracker` is populated by the validator client's checkpoint proposal
|
|
67
|
+
* handler. Every early return in `validateCheckpointProposal` records an outcome
|
|
68
|
+
* (`valid` / `invalid` / `unvalidated`) keyed by slot.
|
|
69
|
+
*
|
|
70
|
+
* ## Inactivity slashing
|
|
71
|
+
*
|
|
72
|
+
* `handleEpochPerformance` filters the epoch's per-validator stats by
|
|
73
|
+
* `slashInactivityTargetPercentage` and then calls `checkPastInactivity` to require
|
|
74
|
+
* `slashInactivityConsecutiveEpochThreshold` consecutive past epochs over the same threshold
|
|
75
|
+
* (read from `SentinelStore.epochMap`). Only validators meeting both conditions are emitted as
|
|
76
|
+
* `WANT_TO_SLASH_EVENT` with `OffenseType.INACTIVITY`. The slot-level counters that feed this —
|
|
77
|
+
* `missedProposals` and `missedAttestations` — include the four proposer-fault statuses plus
|
|
78
|
+
* `attestation-missed`.
|
|
79
|
+
*
|
|
80
|
+
* ## Escape hatch
|
|
81
|
+
*
|
|
82
|
+
* If `epochCache.getCommittee(slot)` reports `isEscapeHatchOpen`, per-slot recording is skipped
|
|
83
|
+
* (no history entries for that slot) and per-epoch evaluation writes an empty performance map
|
|
84
|
+
* (no slashing).
|
|
85
|
+
*/
|
|
86
|
+
export declare class Sentinel extends Sentinel_base implements Watcher {
|
|
14
87
|
protected epochCache: EpochCache;
|
|
15
88
|
protected archiver: L2BlockSource;
|
|
16
89
|
protected p2p: P2PClient;
|
|
17
90
|
protected store: SentinelStore;
|
|
18
|
-
protected
|
|
91
|
+
protected reexecutionTracker: CheckpointReexecutionTracker;
|
|
92
|
+
protected config: SentinelRuntimeConfig;
|
|
19
93
|
protected logger: import("@aztec/foundation/log").Logger;
|
|
20
94
|
protected runningPromise: RunningPromise;
|
|
21
|
-
protected blockStream: L2BlockStream;
|
|
22
|
-
protected l2TipsStore: L2TipsStore;
|
|
23
95
|
protected initialSlot: SlotNumber | undefined;
|
|
24
96
|
protected lastProcessedSlot: SlotNumber | undefined;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}>;
|
|
30
|
-
constructor(epochCache: EpochCache, archiver: L2BlockSource, p2p: P2PClient, store: SentinelStore, config: Pick<SlasherConfig, 'slashInactivityTargetPercentage' | 'slashInactivityPenalty' | 'slashInactivityConsecutiveEpochThreshold'>, logger?: import("@aztec/foundation/log").Logger);
|
|
97
|
+
/** Largest epoch number for which the end-of-epoch aggregator has run. */
|
|
98
|
+
protected lastEvaluatedEpoch: EpochNumber | undefined;
|
|
99
|
+
constructor(epochCache: EpochCache, archiver: L2BlockSource, p2p: P2PClient, store: SentinelStore, reexecutionTracker: CheckpointReexecutionTracker, config: SentinelRuntimeConfig, logger?: import("@aztec/foundation/log").Logger);
|
|
100
|
+
private getSignatureContext;
|
|
31
101
|
updateConfig(config: Partial<SlasherConfig>): void;
|
|
32
102
|
start(): Promise<void>;
|
|
33
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Loads the initial slot. We will not process anything at or before the initial slot. Floors at the
|
|
105
|
+
* archiver's synced L2 slot so the sentinel keeps making forward progress when L1 is advancing but L2 has no
|
|
106
|
+
* activity (the synced slot is driven by L1 sync, not by L2 blocks). Falls back to the wallclock if the
|
|
107
|
+
* archiver isn't ready yet (cold start).
|
|
108
|
+
*/
|
|
34
109
|
protected init(): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the L2 slot the sentinel should treat as "current": the archiver's last fully
|
|
112
|
+
* synced L2 slot, falling back to the wallclock slot when the archiver isn't ready yet
|
|
113
|
+
* (cold start). Anchoring to the synced slot keeps timing arithmetic (initial floor,
|
|
114
|
+
* per-slot lag, end-of-epoch buffer, stats-range fallback) from speculating ahead of where
|
|
115
|
+
* L1 actually is.
|
|
116
|
+
*/
|
|
117
|
+
protected getCurrentSlot(): Promise<SlotNumber>;
|
|
35
118
|
stop(): Promise<void>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Fetches the L1-confirmed checkpoint covering a slot (if any) and derives the slot-level data the
|
|
121
|
+
* activity classifier needs: the checkpoint number, archive root, consensus payload hash (used to fetch
|
|
122
|
+
* matching p2p attestations regardless of feeAssetPriceModifier variants), and the recovered attestor set.
|
|
123
|
+
* Reads on demand so the result is always against the canonical chain — a reorged-out checkpoint simply
|
|
124
|
+
* stops being returned, with no stale mapping to clean up.
|
|
125
|
+
*/
|
|
126
|
+
protected getCheckpointForSlot(slot: SlotNumber): Promise<{
|
|
127
|
+
checkpointNumber: CheckpointNumber;
|
|
128
|
+
archive: string;
|
|
129
|
+
proposalPayloadHash: CheckpointProposalHash;
|
|
130
|
+
attestors: EthAddress[];
|
|
131
|
+
} | undefined>;
|
|
132
|
+
/**
|
|
133
|
+
* Called once per epoch, after the configured end-of-epoch buffer has elapsed beyond the
|
|
134
|
+
* epoch's last slot. Computes per-epoch performance from the slot-level history collected
|
|
135
|
+
* by `processSlot` and emits any inactivity slash payloads.
|
|
136
|
+
*/
|
|
137
|
+
protected handleEpochEnd(epoch: EpochNumber): Promise<void>;
|
|
138
|
+
protected computeEpochPerformance(epoch: EpochNumber): Promise<ValidatorsEpochPerformance>;
|
|
40
139
|
/**
|
|
41
140
|
* Checks if a validator has been inactive for the specified number of consecutive epochs for which we have data on it.
|
|
42
141
|
* @param validator The validator address to check
|
|
@@ -44,13 +143,22 @@ export declare class Sentinel extends Sentinel_base implements L2BlockStreamEven
|
|
|
44
143
|
* @param requiredConsecutiveEpochs Number of consecutive epochs required for slashing
|
|
45
144
|
*/
|
|
46
145
|
protected checkPastInactivity(validator: EthAddress, currentEpoch: EpochNumber, requiredConsecutiveEpochs: number): Promise<boolean>;
|
|
47
|
-
protected
|
|
146
|
+
protected handleEpochPerformance(epoch: EpochNumber, performance: ValidatorsEpochPerformance): Promise<void>;
|
|
48
147
|
/**
|
|
49
148
|
* Process data for two L2 slots ago.
|
|
50
149
|
* Note that we do not process historical data, since we rely on p2p data for processing,
|
|
51
150
|
* and we don't have that data if we were offline during the period.
|
|
151
|
+
*
|
|
152
|
+
* `currentSlot` is anchored to the archiver's last synced L2 slot rather than the wallclock,
|
|
153
|
+
* so the per-slot lag (`isReadyToProcess`) and the end-of-epoch buffer (`processEpochEnds`)
|
|
154
|
+
* advance with archiver.
|
|
52
155
|
*/
|
|
53
156
|
work(): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* After the configured buffer has elapsed past an epoch's last slot, runs the end-of-epoch
|
|
159
|
+
* aggregator for that epoch. Catches up if multiple epochs become eligible at once.
|
|
160
|
+
*/
|
|
161
|
+
protected processEpochEnds(currentSlot: SlotNumber): Promise<void>;
|
|
54
162
|
/**
|
|
55
163
|
* Check if we are ready to process data for two L2 slots ago, so we allow plenty of time for p2p to process all in-flight attestations.
|
|
56
164
|
* We also don't move past the archiver last synced L2 slot, as we don't want to process data that is not yet available.
|
|
@@ -62,7 +170,23 @@ export declare class Sentinel extends Sentinel_base implements L2BlockStreamEven
|
|
|
62
170
|
* and updates overall stats.
|
|
63
171
|
*/
|
|
64
172
|
protected processSlot(slot: SlotNumber): Promise<void>;
|
|
65
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* Computes activity for a given slot using the six-case taxonomy.
|
|
175
|
+
*
|
|
176
|
+
* Proposer status:
|
|
177
|
+
* - case 6 `checkpoint-mined` — a checkpoint covering this slot has landed on L1.
|
|
178
|
+
* - case 5 `checkpoint-valid` — the local node re-executed a checkpoint proposal for this
|
|
179
|
+
* slot successfully.
|
|
180
|
+
* - case 4 `checkpoint-invalid` — the local node re-executed a checkpoint proposal for this
|
|
181
|
+
* slot and rejected it.
|
|
182
|
+
* - case 3 `checkpoint-unvalidated` — the local node observed a checkpoint proposal for this
|
|
183
|
+
* slot but could not validate it (missing data, timeouts).
|
|
184
|
+
* - case 2 `checkpoint-missed` — block proposals seen on P2P but no checkpoint proposal.
|
|
185
|
+
* - case 1 `blocks-missed` — no block proposals seen for this slot.
|
|
186
|
+
*
|
|
187
|
+
* Missing-attestor penalties apply only in cases 5 and 6, where the local node has positive
|
|
188
|
+
* evidence the checkpoint was valid or has been canonicalised on L1.
|
|
189
|
+
*/
|
|
66
190
|
protected getSlotActivity(slot: SlotNumber, epoch: EpochNumber, proposer: EthAddress, committee: EthAddress[]): Promise<{
|
|
67
191
|
[k: string]: ValidatorStatusInSlot | undefined;
|
|
68
192
|
}>;
|
|
@@ -90,4 +214,4 @@ export declare class Sentinel extends Sentinel_base implements L2BlockStreamEven
|
|
|
90
214
|
} | undefined;
|
|
91
215
|
}
|
|
92
216
|
export {};
|
|
93
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
217
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VudGluZWwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZW50aW5lbC9zZW50aW5lbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsc0JBQXNCLEVBQUUsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRXBILE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK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EVBQ2xDLFFBQVEsQ0FBQyxFQUFFLFVBQVUsRUFDckIsTUFBTSxDQUFDLEVBQUUsVUFBVSxHQUNsQixjQUFjLENBbUJoQjtJQUVELFNBQVMsQ0FBQyxhQUFhLENBQ3JCLE9BQU8sRUFBRSxzQkFBc0IsRUFDL0IsbUJBQW1CLEVBQUUsbUJBQW1CLEdBQUcsU0FBUyxFQUNwRCxNQUFNLEVBQUUscUJBQXFCLEVBQUU7Ozs7O01BWWhDO0lBRUQsU0FBUyxDQUFDLGVBQWUsQ0FBQyxJQUFJLEVBQUUsVUFBVSxHQUFHLFNBQVM7Ozs7a0JBTXJEO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentinel.d.ts","sourceRoot":"","sources":["../../src/sentinel/sentinel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"sentinel.d.ts","sourceRoot":"","sources":["../../src/sentinel/sentinel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAEpH,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,cAAc,EAEpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,KAAK,aAAa,EAA6C,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;A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