Skip to content

Commit f1e6eeb

Browse files
authored
gate sync manager and sync overseer from asking blobs if given fork is post fulu fork epoch (#7039)
1 parent cef0979 commit f1e6eeb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

beacon_chain/nimbus_beacon_node.nim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ proc initFullNode(
500500
syncManager = newSyncManager[Peer, PeerId](
501501
node.network.peerPool,
502502
dag.cfg.DENEB_FORK_EPOCH,
503+
dag.cfg.FULU_FORK_EPOCH,
503504
dag.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS,
504505
dag.cfg.MAX_BLOBS_PER_BLOCK_ELECTRA,
505506
SyncQueueKind.Forward, getLocalHeadSlot,
@@ -511,6 +512,7 @@ proc initFullNode(
511512
backfiller = newSyncManager[Peer, PeerId](
512513
node.network.peerPool,
513514
dag.cfg.DENEB_FORK_EPOCH,
515+
dag.cfg.FULU_FORK_EPOCH,
514516
dag.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS,
515517
dag.cfg.MAX_BLOBS_PER_BLOCK_ELECTRA,
516518
SyncQueueKind.Backward, getLocalHeadSlot,
@@ -527,6 +529,7 @@ proc initFullNode(
527529
untrustedManager = newSyncManager[Peer, PeerId](
528530
node.network.peerPool,
529531
dag.cfg.DENEB_FORK_EPOCH,
532+
dag.cfg.FULU_FORK_EPOCH,
530533
dag.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS,
531534
dag.cfg.MAX_BLOBS_PER_BLOCK_ELECTRA,
532535
SyncQueueKind.Backward, getLocalHeadSlot,

beacon_chain/sync/sync_manager.nim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ type
5656
SyncManager*[A, B] = ref object
5757
pool: PeerPool[A, B]
5858
DENEB_FORK_EPOCH: Epoch
59+
FULU_FORK_EPOCH: Epoch
5960
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: uint64
6061
MAX_BLOBS_PER_BLOCK_ELECTRA: uint64
6162
responseTimeout: chronos.Duration
@@ -142,6 +143,7 @@ proc initQueue[A, B](man: SyncManager[A, B]) =
142143
proc newSyncManager*[A, B](
143144
pool: PeerPool[A, B],
144145
denebEpoch: Epoch,
146+
fuluEpoch: Epoch,
145147
minEpochsForBlobSidecarsRequests: uint64,
146148
maxBlobsPerBlockElectra: uint64,
147149
direction: SyncQueueKind,
@@ -171,6 +173,7 @@ proc newSyncManager*[A, B](
171173
var res = SyncManager[A, B](
172174
pool: pool,
173175
DENEB_FORK_EPOCH: denebEpoch,
176+
FULU_FORK_EPOCH: fuluEpoch,
174177
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: minEpochsForBlobSidecarsRequests,
175178
MAX_BLOBS_PER_BLOCK_ELECTRA: maxBlobsPerBlockElectra,
176179
getLocalHeadSlot: getLocalHeadSlotCb,
@@ -212,7 +215,7 @@ proc shouldGetBlobs[A, B](man: SyncManager[A, B], s: Slot): bool =
212215
let
213216
wallEpoch = man.getLocalWallSlot().epoch
214217
epoch = s.epoch()
215-
(epoch >= man.DENEB_FORK_EPOCH) and
218+
(epoch >= man.DENEB_FORK_EPOCH) and (epoch < man.FULU_FORK_EPOCH) and
216219
(wallEpoch < man.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS or
217220
epoch >= wallEpoch - man.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS)
218221

0 commit comments

Comments
 (0)