@lodestar/beacon-node 1.50.0-dev.3bd495295e → 1.50.0-dev.408017a9db

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/lib/api/impl/beacon/blocks/index.d.ts.map +1 -1
  2. package/lib/api/impl/beacon/blocks/index.js +6 -1
  3. package/lib/api/impl/beacon/blocks/index.js.map +1 -1
  4. package/lib/chain/chain.d.ts +5 -4
  5. package/lib/chain/chain.d.ts.map +1 -1
  6. package/lib/chain/chain.js +11 -13
  7. package/lib/chain/chain.js.map +1 -1
  8. package/lib/chain/errors/envelopeReconstructionError.d.ts +5 -0
  9. package/lib/chain/errors/envelopeReconstructionError.d.ts.map +1 -1
  10. package/lib/chain/errors/envelopeReconstructionError.js +2 -0
  11. package/lib/chain/errors/envelopeReconstructionError.js.map +1 -1
  12. package/lib/chain/errors/gossipValidation.d.ts +1 -0
  13. package/lib/chain/errors/gossipValidation.d.ts.map +1 -1
  14. package/lib/chain/errors/gossipValidation.js +1 -0
  15. package/lib/chain/errors/gossipValidation.js.map +1 -1
  16. package/lib/chain/interface.d.ts +2 -2
  17. package/lib/chain/interface.d.ts.map +1 -1
  18. package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts +3 -2
  19. package/lib/chain/seenCache/seenPayloadEnvelopeInput.d.ts.map +1 -1
  20. package/lib/chain/seenCache/seenPayloadEnvelopeInput.js +13 -13
  21. package/lib/chain/seenCache/seenPayloadEnvelopeInput.js.map +1 -1
  22. package/lib/network/processor/gossipValidatorFn.d.ts +4 -2
  23. package/lib/network/processor/gossipValidatorFn.d.ts.map +1 -1
  24. package/lib/network/processor/gossipValidatorFn.js +6 -2
  25. package/lib/network/processor/gossipValidatorFn.js.map +1 -1
  26. package/lib/network/processor/index.d.ts +8 -0
  27. package/lib/network/processor/index.d.ts.map +1 -1
  28. package/lib/network/processor/index.js +49 -2
  29. package/lib/network/processor/index.js.map +1 -1
  30. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js +1 -1
  31. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRoot.js.map +1 -1
  32. package/lib/sync/range/batch.d.ts +6 -0
  33. package/lib/sync/range/batch.d.ts.map +1 -1
  34. package/lib/sync/range/batch.js +10 -0
  35. package/lib/sync/range/batch.js.map +1 -1
  36. package/lib/util/execution.d.ts +9 -11
  37. package/lib/util/execution.d.ts.map +1 -1
  38. package/lib/util/execution.js +5 -1
  39. package/lib/util/execution.js.map +1 -1
  40. package/package.json +15 -15
  41. package/src/api/impl/beacon/blocks/index.ts +7 -4
  42. package/src/chain/chain.ts +14 -16
  43. package/src/chain/errors/envelopeReconstructionError.ts +3 -0
  44. package/src/chain/errors/gossipValidation.ts +1 -0
  45. package/src/chain/interface.ts +2 -2
  46. package/src/chain/seenCache/seenPayloadEnvelopeInput.ts +20 -13
  47. package/src/network/processor/gossipValidatorFn.ts +12 -2
  48. package/src/network/processor/index.ts +55 -2
  49. package/src/network/reqresp/handlers/executionPayloadEnvelopesByRoot.ts +1 -1
  50. package/src/sync/range/batch.ts +11 -0
  51. package/src/util/execution.ts +16 -8
@@ -1 +1 @@
1
- {"version":3,"file":"execution.js","sourceRoot":"","sources":["../../src/util/execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAGrC,OAAO,EAAC,yBAAyB,EAAC,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAA2D,wBAAwB,EAAE,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACxH,OAAO,EAAS,OAAO,EAAE,KAAK,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAAE,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAc,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAC,oBAAoB,EAAE,0BAA0B,EAAC,MAAM,+CAA+C,CAAC;AAC/G,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AC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/ChainSafe/lodestar/issues"
13
13
  },
14
- "version": "1.50.0-dev.3bd495295e",
14
+ "version": "1.50.0-dev.408017a9db",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -127,17 +127,17 @@
127
127
  "@libp2p/prometheus-metrics": "^5.0.28",
128
128
  "@libp2p/tcp": "^11.0.27",
129
129
  "@libp2p/utils": "^7.4.0",
130
- "@lodestar/api": "^1.50.0-dev.3bd495295e",
131
- "@lodestar/config": "^1.50.0-dev.3bd495295e",
132
- "@lodestar/db": "^1.50.0-dev.3bd495295e",
133
- "@lodestar/fork-choice": "^1.50.0-dev.3bd495295e",
134
- "@lodestar/logger": "^1.50.0-dev.3bd495295e",
135
- "@lodestar/params": "^1.50.0-dev.3bd495295e",
136
- "@lodestar/reqresp": "^1.50.0-dev.3bd495295e",
137
- "@lodestar/state-transition": "^1.50.0-dev.3bd495295e",
138
- "@lodestar/types": "^1.50.0-dev.3bd495295e",
139
- "@lodestar/utils": "^1.50.0-dev.3bd495295e",
140
- "@lodestar/validator": "^1.50.0-dev.3bd495295e",
130
+ "@lodestar/api": "^1.50.0-dev.408017a9db",
131
+ "@lodestar/config": "^1.50.0-dev.408017a9db",
132
+ "@lodestar/db": "^1.50.0-dev.408017a9db",
133
+ "@lodestar/fork-choice": "^1.50.0-dev.408017a9db",
134
+ "@lodestar/logger": "^1.50.0-dev.408017a9db",
135
+ "@lodestar/params": "^1.50.0-dev.408017a9db",
136
+ "@lodestar/reqresp": "^1.50.0-dev.408017a9db",
137
+ "@lodestar/state-transition": "^1.50.0-dev.408017a9db",
138
+ "@lodestar/types": "^1.50.0-dev.408017a9db",
139
+ "@lodestar/utils": "^1.50.0-dev.408017a9db",
140
+ "@lodestar/validator": "^1.50.0-dev.408017a9db",
141
141
  "@multiformats/multiaddr": "^13.0.1",
142
142
  "datastore-core": "^12.0.1",
143
143
  "datastore-level": "^13.0.1",
@@ -158,8 +158,8 @@
158
158
  "devDependencies": {
159
159
  "@libp2p/interface-internal": "^3.1.12",
160
160
  "@libp2p/logger": "^6.2.13",
161
- "@lodestar/spec-test-util": "^1.50.0-dev.3bd495295e",
162
- "@lodestar/test-utils": "^1.50.0-dev.3bd495295e",
161
+ "@lodestar/spec-test-util": "^1.50.0-dev.408017a9db",
162
+ "@lodestar/test-utils": "^1.50.0-dev.408017a9db",
163
163
  "@types/js-yaml": "^4.0.5",
164
164
  "@types/qs": "^6.9.7",
165
165
  "@types/tmp": "^0.2.3",
@@ -174,5 +174,5 @@
174
174
  "beacon",
175
175
  "blockchain"
176
176
  ],
177
- "gitHead": "9c5f282c99b7c3bd1d658becc5c79c6f600e2680"
177
+ "gitHead": "55c441c4c9eb8e7d31c0ec6b541c05ed7b5afb74"
178
178
  }
@@ -1118,10 +1118,13 @@ export function getBeaconBlockApi({
1118
1118
  : await chain.getExecutionPayloadEnvelope(slot, blockRootHex);
1119
1119
  } catch (e) {
1120
1120
  if (e instanceof EnvelopeReconstructionError) {
1121
- throw new ApiError(
1122
- e.type.code === EnvelopeReconstructionErrorCode.ENGINE_UNAVAILABLE ? 503 : 500,
1123
- `Failed to reconstruct execution payload envelope: ${e.message}`
1124
- );
1121
+ // The envelope is archived but our EL cannot serve it right now (EL down, or it does not
1122
+ // have the body / block access list): 503 so clients retry or ask another node, rather than
1123
+ // 500 for what is not a beacon node fault. A body root mismatch is a local inconsistency.
1124
+ const unavailable =
1125
+ e.type.code === EnvelopeReconstructionErrorCode.ENGINE_UNAVAILABLE ||
1126
+ e.type.code === EnvelopeReconstructionErrorCode.BODY_UNAVAILABLE;
1127
+ throw new ApiError(unavailable ? 503 : 500, `Failed to reconstruct execution payload envelope: ${e.message}`);
1125
1128
  }
1126
1129
  throw e;
1127
1130
  }
@@ -71,7 +71,7 @@ import {BufferPool} from "../util/bufferPool.js";
71
71
  import {Clock, ClockEvent, IClock} from "../util/clock.js";
72
72
  import {CustodyConfig, getValidatorsCustodyRequirement} from "../util/dataColumns.js";
73
73
  import {callInNextEventLoop} from "../util/eventLoop.js";
74
- import {ReconstructMismatchPolicy, isRebuildMiss, reconstructExecutionPayloadEnvelopes} from "../util/execution.js";
74
+ import {ReconstructMissPolicy, isRebuildMiss, reconstructExecutionPayloadEnvelopes} from "../util/execution.js";
75
75
  import {ensureDir, writeIfNotExist} from "../util/file.js";
76
76
  import {isOptimisticBlock} from "../util/forkChoice.js";
77
77
  import {JobItemQueue} from "../util/queue/itemQueue.js";
@@ -934,12 +934,13 @@ export class BeaconChain implements IBeaconChain {
934
934
 
935
935
  /**
936
936
  * Batch variant: archived header envelopes are rebuilt 32 per EL round-trip. Aligned with `requests`.
937
- * A body root mismatch is a local inconsistency: `"throw"` surfaces it, `"omit"` logs it and
938
- * returns null for that entry, for peer-facing paths where the spec allows omission.
937
+ * An archived envelope that cannot be rebuilt (EL-unavailable body or body root mismatch) is not the
938
+ * same as an unknown one: `"throw"` surfaces it, `"omit"` returns null for that entry, for
939
+ * peer-facing paths where the spec allows omission.
939
940
  */
940
941
  async getSerializedExecutionPayloadEnvelopes(
941
942
  requests: {blockSlot: Slot; blockRootHex: RootHex}[],
942
- onMismatch: ReconstructMismatchPolicy = "throw"
943
+ onMiss: ReconstructMissPolicy = "throw"
943
944
  ): Promise<(Uint8Array | null)[]> {
944
945
  const out: (Uint8Array | null)[] = new Array(requests.length).fill(null);
945
946
  const headerEnvelopes: gloas.SignedExecutionPayloadHeaderEnvelope[] = [];
@@ -978,14 +979,14 @@ export class BeaconChain implements IBeaconChain {
978
979
  for (let j = 0; j < rebuilt.length; j++) {
979
980
  const result = rebuilt[j];
980
981
  if (isRebuildMiss(result)) {
981
- if (result.reason === "mismatch") {
982
- if (onMismatch === "throw") throw result.error;
983
- this.logger.debug(
984
- "Archived envelope failed body root check against EL bodies",
985
- {slot: result.slot},
986
- result.error
987
- );
988
- }
982
+ if (onMiss === "throw") throw result.error;
983
+ this.logger.debug(
984
+ result.reason === "mismatch"
985
+ ? "Archived envelope failed body root check against EL bodies"
986
+ : "EL cannot serve bodies for archived envelope, omitting",
987
+ {slot: result.slot},
988
+ result.error
989
+ );
989
990
  continue;
990
991
  }
991
992
  out[headerEnvelopeIdxs[j]] = ssz.gloas.SignedExecutionPayloadEnvelope.serialize(result);
@@ -1016,10 +1017,7 @@ export class BeaconChain implements IBeaconChain {
1016
1017
  const [result] = await reconstructExecutionPayloadEnvelopes(this.executionEngine, this.metrics, [
1017
1018
  archived.headerEnvelope,
1018
1019
  ]);
1019
- if (isRebuildMiss(result)) {
1020
- if (result.reason === "mismatch") throw result.error;
1021
- return null;
1022
- }
1020
+ if (isRebuildMiss(result)) throw result.error;
1023
1021
  return result;
1024
1022
  }
1025
1023
 
@@ -4,6 +4,8 @@ import {LodestarError} from "@lodestar/utils";
4
4
  export enum EnvelopeReconstructionErrorCode {
5
5
  /** The EL failed to answer engine_getPayloadBodiesByHashV2 (transport / EL down). Transient. */
6
6
  ENGINE_UNAVAILABLE = "ENVELOPE_RECONSTRUCTION_ERROR_ENGINE_UNAVAILABLE",
7
+ /** The EL does not have the block or its block access list (pruned, or not yet re-indexed after a restart). May recover. */
8
+ BODY_UNAVAILABLE = "ENVELOPE_RECONSTRUCTION_ERROR_BODY_UNAVAILABLE",
7
9
  /** A body returned by the EL does not hash to the root stored in the header envelope. Local DB/EL inconsistency. */
8
10
  BODY_ROOT_MISMATCH = "ENVELOPE_RECONSTRUCTION_ERROR_BODY_ROOT_MISMATCH",
9
11
  /** A by-range stream stopped short at a slot that cannot be served; the response so far is still valid */
@@ -12,6 +14,7 @@ export enum EnvelopeReconstructionErrorCode {
12
14
 
13
15
  export type EnvelopeReconstructionErrorType =
14
16
  | {code: EnvelopeReconstructionErrorCode.ENGINE_UNAVAILABLE}
17
+ | {code: EnvelopeReconstructionErrorCode.BODY_UNAVAILABLE; slot: Slot}
15
18
  | {
16
19
  code: EnvelopeReconstructionErrorCode.BODY_ROOT_MISMATCH;
17
20
  slot: Slot;
@@ -9,6 +9,7 @@ export enum GossipErrorCode {
9
9
  INVALID_SERIALIZED_BYTES_ERROR_CODE = "GOSSIP_ERROR_INVALID_SERIALIZED_BYTES",
10
10
  PAST_SLOT = "GOSSIP_ERROR_PAST_SLOT",
11
11
  FUTURE_SLOT = "GOSSIP_ERROR_FUTURE_SLOT",
12
+ FATAL_PEER = "GOSSIP_ERROR_FATAL_PEER",
12
13
  INVALID_SLOT = "GOSSIP_ERROR_INVALID_SLOT",
13
14
  }
14
15
 
@@ -30,7 +30,7 @@ import {Metrics} from "../metrics/metrics.js";
30
30
  import {BufferPool} from "../util/bufferPool.js";
31
31
  import {IClock} from "../util/clock.js";
32
32
  import {CustodyConfig} from "../util/dataColumns.js";
33
- import {ReconstructMismatchPolicy} from "../util/execution.js";
33
+ import {ReconstructMissPolicy} from "../util/execution.js";
34
34
  import {SerializedCache} from "../util/serializedCache.js";
35
35
  import {IArchiveStore} from "./archiveStore/interface.js";
36
36
  import {CheckpointBalancesCache} from "./balancesCache.js";
@@ -239,7 +239,7 @@ export interface IBeaconChain {
239
239
  getSerializedExecutionPayloadEnvelope(blockSlot: Slot, blockRootHex: string): Promise<Uint8Array | null>;
240
240
  getSerializedExecutionPayloadEnvelopes(
241
241
  requests: {blockSlot: Slot; blockRootHex: RootHex}[],
242
- onMismatch?: ReconstructMismatchPolicy
242
+ onMiss?: ReconstructMissPolicy
243
243
  ): Promise<(Uint8Array | null)[]>;
244
244
  getExecutionPayloadEnvelope(
245
245
  blockSlot: Slot,
@@ -47,8 +47,9 @@ export type SeenPayloadEnvelopeInputModules = {
47
47
  * Created whenever we have a block because it needs block bid.
48
48
  * Steady state (linear chain, healthy progression): the cache holds ~2 entries — the head
49
49
  * (parent for next-slot production) and its parent (proposer-boost-reorg fallback). It can
50
- * transiently hold more during forks, range-sync bursts, or when `prepareNextSlot` skips
51
- * ticks; subsequent ticks settle it back.
50
+ * hold more during forks and range sync, or while an entry's payload is not FULL on the head's
51
+ * branch or its columns are still being gathered. Such entries are evicted on a later block
52
+ * import, on finalization or by the size cap.
52
53
  */
53
54
  export class SeenPayloadEnvelopeInput {
54
55
  private readonly config: ChainForkConfig;
@@ -276,17 +277,23 @@ export class SeenPayloadEnvelopeInput {
276
277
  }
277
278
 
278
279
  pruneBelowParent(parentBlock: ProtoBlock): void {
279
- for (const block of this.forkChoice.getAllAncestorBlocks(parentBlock.blockRoot, parentBlock.payloadStatus)) {
280
- // Only evict once the payload is FULL (revealed/imported) — on an EMPTY/PENDING branch we may
281
- // still need to download the FULL envelope (see #9475), and evicting would make payload-by-root
282
- // sync throw "Missing PayloadEnvelopeInput for known block".
283
- if (block.slot < parentBlock.slot && block.payloadStatus === PayloadStatus.FULL) {
284
- const input = this.payloadInputs.get(block.blockRoot);
285
- // ...and don't evict while columns are still being gathered: writeDataColumnsToDb awaits the
286
- // same hasComputedAllData() before persisting. Such entries are pruned by a later call.
287
- if (input?.hasComputedAllData()) {
288
- this.evictPayloadInput(input, "belowParent");
289
- }
280
+ for (const input of this.payloadInputs.values()) {
281
+ if (
282
+ input.slot < parentBlock.slot &&
283
+ // Don't evict while columns are still being gathered: writeDataColumnsToDb awaits the same
284
+ // hasComputedAllData() before persisting. Such entries are pruned by a later call.
285
+ input.hasComputedAllData() &&
286
+ // Only evict once the payload is FULL (revealed/imported) on the parent's branch. On an EMPTY/PENDING
287
+ // branch we may still need to download the FULL envelope (see #9475), and without the entry gossip
288
+ // for the block is ignored until by-root sync reloads it.
289
+ this.forkChoice.isDescendant(
290
+ input.blockRootHex,
291
+ PayloadStatus.FULL,
292
+ parentBlock.blockRoot,
293
+ parentBlock.payloadStatus
294
+ )
295
+ ) {
296
+ this.evictPayloadInput(input, "belowParent");
290
297
  }
291
298
  }
292
299
  }
@@ -20,6 +20,7 @@ import {
20
20
  VoluntaryExitErrorCode,
21
21
  } from "../../chain/errors/index.js";
22
22
  import {Metrics} from "../../metrics/index.js";
23
+ import {PeerIdStr} from "../../util/peerId.js";
23
24
  import {INetworkCore} from "../core/index.js";
24
25
  import {
25
26
  BatchGossipHandlerFn,
@@ -40,6 +41,8 @@ export type ValidatorFnModules = {
40
41
  core: INetworkCore;
41
42
  };
42
43
 
44
+ export type OnFatalPeerFn = (peer: PeerIdStr) => void;
45
+
43
46
  type RejectPeerActionRule = {default: PeerAction; byCode?: Record<string, PeerAction>};
44
47
 
45
48
  /**
@@ -123,7 +126,8 @@ export function rejectPeerAction(type: GossipType, code: string): PeerAction {
123
126
  */
124
127
  export function getGossipValidatorBatchFn(
125
128
  gossipHandlers: GossipHandlers,
126
- modules: ValidatorFnModules
129
+ modules: ValidatorFnModules,
130
+ onFatalPeer: OnFatalPeerFn
127
131
  ): GossipValidatorBatchFn {
128
132
  const {logger, metrics, core} = modules;
129
133
 
@@ -173,6 +177,7 @@ export function getGossipValidatorBatchFn(
173
177
  metrics?.networkProcessor.gossipAttestationRejectByReason.inc({reason: e.type.code});
174
178
  const peerAction = rejectPeerAction(type, e.type.code);
175
179
  core.reportPeer(propagationSource, peerAction, e.type.code);
180
+ if (peerAction === PeerAction.Fatal) onFatalPeer(propagationSource);
176
181
  logger.debug(
177
182
  `Gossip validation ${type} rejected`,
178
183
  {peer: propagationSource, clientAgent, clientVersion, peerAction},
@@ -208,7 +213,11 @@ export function getGossipValidatorBatchFn(
208
213
  *
209
214
  * @see getGossipHandlers for reasoning on why GossipHandlerFn are used for gossip validation.
210
215
  */
211
- export function getGossipValidatorFn(gossipHandlers: GossipHandlers, modules: ValidatorFnModules): GossipValidatorFn {
216
+ export function getGossipValidatorFn(
217
+ gossipHandlers: GossipHandlers,
218
+ modules: ValidatorFnModules,
219
+ onFatalPeer: OnFatalPeerFn
220
+ ): GossipValidatorFn {
212
221
  const {logger, metrics, core} = modules;
213
222
 
214
223
  return async function gossipValidatorFn({
@@ -260,6 +269,7 @@ export function getGossipValidatorFn(gossipHandlers: GossipHandlers, modules: Va
260
269
  metrics?.networkProcessor.gossipValidationReject.inc({topic: type});
261
270
  const peerAction = rejectPeerAction(type, e.type.code);
262
271
  core.reportPeer(propagationSource, peerAction, e.type.code);
272
+ if (peerAction === PeerAction.Fatal) onFatalPeer(propagationSource);
263
273
  logger.debug(
264
274
  `Gossip validation ${type} rejected`,
265
275
  {peer: propagationSource, clientAgent, clientVersion, peerAction},
@@ -108,6 +108,12 @@ type SearchedRootEntry = {
108
108
  */
109
109
  const DEFAULT_EARLIEST_PERMISSIBLE_SLOT_DISTANCE = 32;
110
110
 
111
+ /**
112
+ * The network worker bans a Fatal peer only on its next PeerManager heartbeat (30s). Until then the main thread
113
+ * would keep validating that peer's messages, so drop them here. 3 slots (36s) outlasts one heartbeat.
114
+ */
115
+ export const FATAL_PEER_EXPIRY_SLOTS = 3;
116
+
111
117
  type WorkOpts = {
112
118
  bypassQueue?: boolean;
113
119
  };
@@ -263,6 +269,8 @@ export class NetworkProcessor {
263
269
  () => new MapDef<RootHex, SearchedRootEntry>(() => ({}))
264
270
  );
265
271
  private bufferedRootsBySlot = new MapDef<Slot, Set<RootHex>>(() => new Set());
272
+ /** peer -> clock slot when it was Fatal'ed */
273
+ private readonly fatalPeers = new Map<PeerIdStr, Slot>();
266
274
 
267
275
  constructor(
268
276
  modules: NetworkProcessorModules,
@@ -277,10 +285,15 @@ export class NetworkProcessor {
277
285
  this.events = events;
278
286
  this.gossipQueues = createGossipQueues();
279
287
  this.gossipTopicConcurrency = mapValues(this.gossipQueues, () => 0);
280
- this.gossipValidatorFn = getGossipValidatorFn(modules.gossipHandlers ?? getGossipHandlers(modules, opts), modules);
288
+ this.gossipValidatorFn = getGossipValidatorFn(
289
+ modules.gossipHandlers ?? getGossipHandlers(modules, opts),
290
+ modules,
291
+ this.onFatalPeer
292
+ );
281
293
  this.gossipValidatorBatchFn = getGossipValidatorBatchFn(
282
294
  modules.gossipHandlers ?? getGossipHandlers(modules, opts),
283
- modules
295
+ modules,
296
+ this.onFatalPeer
284
297
  );
285
298
 
286
299
  events.on(NetworkEvent.pendingGossipsubMessage, this.onPendingGossipsubMessage);
@@ -414,8 +427,18 @@ export class NetworkProcessor {
414
427
  }
415
428
  }
416
429
 
430
+ private onFatalPeer = (peer: PeerIdStr): void => {
431
+ this.fatalPeers.set(peer, this.chain.clock.currentSlot);
432
+ };
433
+
417
434
  private onPendingGossipsubMessage = (message: PendingGossipsubMessage): void => {
418
435
  const topicType = message.topic.type;
436
+ if (this.fatalPeers.has(message.propagationSource)) {
437
+ this.metrics?.networkProcessor.gossipValidationError.inc({topic: topicType, error: GossipErrorCode.FATAL_PEER});
438
+ // No need to report the dropped job to gossip. It will be eventually pruned from the mcache
439
+ return;
440
+ }
441
+
419
442
  const extractBlockSlotRootFn = this.extractBlockSlotRootFns[topicType];
420
443
  if (extractBlockSlotRootFn === undefined) {
421
444
  // some messages don't have slot and root
@@ -898,6 +921,10 @@ export class NetworkProcessor {
898
921
  for (const slot of this.bufferedRootsBySlot.keys()) {
899
922
  if (slot <= minSlot) this.bufferedRootsBySlot.delete(slot);
900
923
  }
924
+
925
+ for (const [peer, slot] of this.fatalPeers) {
926
+ if (clockSlot - slot > FATAL_PEER_EXPIRY_SLOTS) this.fatalPeers.delete(peer);
927
+ }
901
928
  };
902
929
 
903
930
  private executeWork(): void {
@@ -953,6 +980,32 @@ export class NetworkProcessor {
953
980
  private async processPendingGossipsubMessage(
954
981
  messageOrArray: PendingGossipsubMessage | PendingGossipsubMessage[]
955
982
  ): Promise<void> {
983
+ // drop messages from peers Fatal'ed after these were queued or started awaiting a block/envelope
984
+ // No need to report the dropped jobs to gossip. They will be eventually pruned from the mcache
985
+ if (this.fatalPeers.size > 0) {
986
+ if (Array.isArray(messageOrArray)) {
987
+ const allowed: PendingGossipsubMessage[] = [];
988
+ for (const msg of messageOrArray) {
989
+ if (this.fatalPeers.has(msg.propagationSource)) {
990
+ this.metrics?.networkProcessor.gossipValidationError.inc({
991
+ topic: msg.topic.type,
992
+ error: GossipErrorCode.FATAL_PEER,
993
+ });
994
+ } else {
995
+ allowed.push(msg);
996
+ }
997
+ }
998
+ if (allowed.length === 0) return;
999
+ messageOrArray = allowed;
1000
+ } else if (this.fatalPeers.has(messageOrArray.propagationSource)) {
1001
+ this.metrics?.networkProcessor.gossipValidationError.inc({
1002
+ topic: messageOrArray.topic.type,
1003
+ error: GossipErrorCode.FATAL_PEER,
1004
+ });
1005
+ return;
1006
+ }
1007
+ }
1008
+
956
1009
  const nowSec = Date.now() / 1000;
957
1010
  if (Array.isArray(messageOrArray)) {
958
1011
  for (const msg of messageOrArray) {
@@ -53,7 +53,7 @@ export async function* onExecutionPayloadEnvelopesByRoot(
53
53
  const batch = requests.slice(i, i + MAX_BODIES_PER_REQUEST);
54
54
  let envelopesBytes: (Uint8Array | null)[];
55
55
  try {
56
- // By-root allows omission, so a mismatched envelope is left out rather than failing the response.
56
+ // By-root allows omission, so an envelope that cannot be rebuilt is left out rather than failing the response.
57
57
  envelopesBytes = await chain.getSerializedExecutionPayloadEnvelopes(batch, "omit");
58
58
  } catch (e) {
59
59
  if (e instanceof EnvelopeReconstructionError) {
@@ -773,6 +773,7 @@ export class Batch {
773
773
  // remove any downloaded blocks and re-attempt
774
774
  // TODO(fulu): need to remove the bad blocks from the SeenBlockInputCache
775
775
  this.state = {status: BatchStatus.AwaitingDownload, blocks: [], payloadEnvelopes: null};
776
+ this.resetRequests();
776
777
  }
777
778
 
778
779
  private onProcessingError(attempt: FailedAttempt): void {
@@ -784,6 +785,16 @@ export class Batch {
784
785
  // remove any downloaded blocks and re-attempt
785
786
  // TODO(fulu): need to remove the bad blocks from the SeenBlockInputCache
786
787
  this.state = {status: BatchStatus.AwaitingDownload, blocks: [], payloadEnvelopes: null};
788
+ this.resetRequests();
789
+ }
790
+
791
+ /**
792
+ * After a partial download `requests` only cover the data still missing from the downloaded blocks,
793
+ * e.g. a single column. Once those blocks are dropped, request the whole batch again, otherwise
794
+ * every peer fails the retry for lack of blocks to validate the data against.
795
+ */
796
+ private resetRequests(): void {
797
+ this.requests = this.getRequests([]);
787
798
  }
788
799
 
789
800
  /** Helper to construct typed BatchError. Stack traces are correct as the error is thrown above */
@@ -266,14 +266,15 @@ type SlotEnvelopeBytes = {slot: Slot; envelopeBytes: Uint8Array};
266
266
 
267
267
  type RangeEntry = ArchivedEnvelope & {slot: Slot};
268
268
 
269
- /** What a body root mismatch means on a given serving path */
270
- export type ReconstructMismatchPolicy = "throw" | "omit";
269
+ /** What an envelope that cannot be rebuilt (EL-unavailable body or body root mismatch) means on a given serving path */
270
+ export type ReconstructMissPolicy = "throw" | "omit";
271
271
 
272
- export type RebuildMiss =
273
- /** EL does not have the block, or has pruned its block access list */
274
- | {slot: Slot; reason: "unavailable"}
275
- /** An EL body does not hash to its stored root (local inconsistency) */
276
- | {slot: Slot; reason: "mismatch"; error: EnvelopeReconstructionError};
272
+ /**
273
+ * An archived envelope that could not be rebuilt. `"unavailable"`: the EL does not have the block or its
274
+ * block access list (BODY_UNAVAILABLE). `"mismatch"`: an EL body does not hash to its stored root, a local
275
+ * inconsistency (BODY_ROOT_MISMATCH). `error` carries the matching code for paths that surface it.
276
+ */
277
+ export type RebuildMiss = {slot: Slot; reason: "unavailable" | "mismatch"; error: EnvelopeReconstructionError};
277
278
 
278
279
  /**
279
280
  * Stream finalized envelopes over [startSlot, endSlot) as serialized bytes, rebuilding header
@@ -405,7 +406,14 @@ async function reconstructEnvelopesBatch(
405
406
  // A zero-length block access list cannot be valid, RLP encodes an empty list as 0xc0
406
407
  if (body == null || body.withdrawals == null || body.blockAccessList == null || body.blockAccessList.length === 0) {
407
408
  metrics?.payloadEnvelopeReconstruction.envelopes.inc({result: "unavailable"});
408
- return {slot, reason: "unavailable"};
409
+ return {
410
+ slot,
411
+ reason: "unavailable",
412
+ error: new EnvelopeReconstructionError(
413
+ {code: EnvelopeReconstructionErrorCode.BODY_UNAVAILABLE, slot},
414
+ `execution client cannot serve the payload body or block access list for archived envelope slot=${slot}`
415
+ ),
416
+ };
409
417
  }
410
418
  try {
411
419
  const envelope = signedHeaderEnvelopeToFull(headerEnvelope, {