@lodestar/beacon-node 1.44.0-dev.b68fc56ae0 → 1.44.0-dev.be2850b7bb

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 (68) hide show
  1. package/lib/api/impl/config/constants.d.ts +1 -0
  2. package/lib/api/impl/config/constants.d.ts.map +1 -1
  3. package/lib/api/impl/config/constants.js +2 -1
  4. package/lib/api/impl/config/constants.js.map +1 -1
  5. package/lib/api/impl/debug/index.d.ts.map +1 -1
  6. package/lib/api/impl/debug/index.js +69 -12
  7. package/lib/api/impl/debug/index.js.map +1 -1
  8. package/lib/api/impl/validator/index.d.ts.map +1 -1
  9. package/lib/api/impl/validator/index.js +3 -1
  10. package/lib/api/impl/validator/index.js.map +1 -1
  11. package/lib/chain/archiveStore/archiveStore.d.ts +0 -1
  12. package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
  13. package/lib/chain/archiveStore/archiveStore.js +0 -4
  14. package/lib/chain/archiveStore/archiveStore.js.map +1 -1
  15. package/lib/chain/regen/interface.d.ts +0 -1
  16. package/lib/chain/regen/interface.d.ts.map +1 -1
  17. package/lib/chain/regen/queued.d.ts +0 -1
  18. package/lib/chain/regen/queued.d.ts.map +1 -1
  19. package/lib/chain/regen/queued.js +0 -4
  20. package/lib/chain/regen/queued.js.map +1 -1
  21. package/lib/chain/stateCache/fifoBlockStateCache.d.ts +0 -5
  22. package/lib/chain/stateCache/fifoBlockStateCache.d.ts.map +1 -1
  23. package/lib/chain/stateCache/fifoBlockStateCache.js +0 -5
  24. package/lib/chain/stateCache/fifoBlockStateCache.js.map +1 -1
  25. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts +1 -4
  26. package/lib/chain/stateCache/persistentCheckpointsCache.d.ts.map +1 -1
  27. package/lib/chain/stateCache/persistentCheckpointsCache.js +5 -2
  28. package/lib/chain/stateCache/persistentCheckpointsCache.js.map +1 -1
  29. package/lib/chain/stateCache/types.d.ts +0 -2
  30. package/lib/chain/stateCache/types.d.ts.map +1 -1
  31. package/lib/chain/stateCache/types.js.map +1 -1
  32. package/lib/network/reqresp/handlers/beaconBlocksByRange.d.ts.map +1 -1
  33. package/lib/network/reqresp/handlers/beaconBlocksByRange.js +9 -5
  34. package/lib/network/reqresp/handlers/beaconBlocksByRange.js.map +1 -1
  35. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.d.ts.map +1 -1
  36. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js +8 -3
  37. package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
  38. package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js +1 -1
  39. package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js.map +1 -1
  40. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.d.ts +2 -1
  41. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.d.ts.map +1 -1
  42. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js +16 -6
  43. package/lib/network/reqresp/handlers/executionPayloadEnvelopesByRange.js.map +1 -1
  44. package/lib/network/reqresp/handlers/index.js +2 -2
  45. package/lib/network/reqresp/handlers/index.js.map +1 -1
  46. package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts.map +1 -1
  47. package/lib/network/reqresp/utils/dataColumnResponseValidation.js +14 -3
  48. package/lib/network/reqresp/utils/dataColumnResponseValidation.js.map +1 -1
  49. package/lib/util/dataColumns.d.ts.map +1 -1
  50. package/lib/util/dataColumns.js +16 -11
  51. package/lib/util/dataColumns.js.map +1 -1
  52. package/package.json +14 -16
  53. package/src/api/impl/config/constants.ts +2 -0
  54. package/src/api/impl/debug/index.ts +73 -12
  55. package/src/api/impl/validator/index.ts +3 -5
  56. package/src/chain/archiveStore/archiveStore.ts +0 -5
  57. package/src/chain/regen/interface.ts +0 -1
  58. package/src/chain/regen/queued.ts +0 -5
  59. package/src/chain/stateCache/fifoBlockStateCache.ts +0 -6
  60. package/src/chain/stateCache/persistentCheckpointsCache.ts +6 -2
  61. package/src/chain/stateCache/types.ts +0 -2
  62. package/src/network/reqresp/handlers/beaconBlocksByRange.ts +12 -5
  63. package/src/network/reqresp/handlers/dataColumnSidecarsByRange.ts +11 -3
  64. package/src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts +1 -1
  65. package/src/network/reqresp/handlers/executionPayloadEnvelopesByRange.ts +22 -6
  66. package/src/network/reqresp/handlers/index.ts +2 -2
  67. package/src/network/reqresp/utils/dataColumnResponseValidation.ts +13 -3
  68. package/src/util/dataColumns.ts +17 -12
@@ -470,15 +470,17 @@ export async function recoverDataColumnSidecars(
470
470
  return DataColumnReconstructionCode.SuccessLate;
471
471
  }
472
472
 
473
- // Once the node obtains a column through reconstruction,
474
- // the node MUST expose the new column as if it had received it over the network.
475
- // If the node is subscribed to the subnet corresponding to the column,
476
- // it MUST send the reconstructed DataColumnSidecar to its topic mesh neighbors.
477
- // If instead the node is not subscribed to the corresponding subnet,
478
- // it SHOULD still expose the availability of the DataColumnSidecar as part of the gossip emission process.
479
- // After exposing the reconstructed DataColumnSidecar to the network,
480
- // the node MAY delete the DataColumnSidecar if it is not part of the node's custody requirement.
481
- const sidecarsToPublish = [];
473
+ // Per consensus-specs PR #4657, only publish reconstructed columns the node is
474
+ // subscribed to (custody + sampling). Eagerly cross-seeding non-subscribed
475
+ // columns floods the network with duplicates because the sender has no
476
+ // visibility into which peers already saw the message via the topic mesh.
477
+ // This matches the getBlobsV2 path in `getDataColumnSidecarsFromExecution` and
478
+ // aligns with Lighthouse/Prysm. Capture missing sampled indices before adding
479
+ // any reconstructed columns so they are not filtered out by the subsequent
480
+ // `addColumn` calls.
481
+ const missingSampledColumns = new Set(input.getMissingSampledColumnMeta().missing);
482
+ const sidecarsReconstructed: DataColumnSidecar[] = [];
483
+ const sidecarsToPublish: DataColumnSidecar[] = [];
482
484
  for (const columnSidecar of fullSidecars) {
483
485
  if (!input.hasColumn(columnSidecar.index)) {
484
486
  if (input instanceof PayloadEnvelopeInput) {
@@ -501,11 +503,14 @@ export async function recoverDataColumnSidecars(
501
503
  source: BlockInputSource.recovery,
502
504
  });
503
505
  }
504
- sidecarsToPublish.push(columnSidecar);
506
+ sidecarsReconstructed.push(columnSidecar);
507
+ if (missingSampledColumns.has(columnSidecar.index)) {
508
+ sidecarsToPublish.push(columnSidecar);
509
+ }
505
510
  }
506
511
  }
507
- metrics?.peerDas.reconstructedColumns.inc(sidecarsToPublish.length);
508
- metrics?.dataColumns.bySource.inc({source: BlockInputSource.recovery}, sidecarsToPublish.length);
512
+ metrics?.peerDas.reconstructedColumns.inc(sidecarsReconstructed.length);
513
+ metrics?.dataColumns.bySource.inc({source: BlockInputSource.recovery}, sidecarsReconstructed.length);
509
514
  emitter.emit(ChainEvent.publishDataColumns, sidecarsToPublish);
510
515
  // TODO: Can we record dataColumns.sentPeersPerSubnet metric somehow
511
516
  return DataColumnReconstructionCode.SuccessResolved;