Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions beacon_chain/nimbus_beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ proc initFullNode(
syncManager = newSyncManager[Peer, PeerId](
node.network.peerPool,
dag.cfg.DENEB_FORK_EPOCH,
dag.cfg.FULU_FORK_EPOCH,
dag.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS,
dag.cfg.MAX_BLOBS_PER_BLOCK_ELECTRA,
SyncQueueKind.Forward, getLocalHeadSlot,
Expand All @@ -511,6 +512,7 @@ proc initFullNode(
backfiller = newSyncManager[Peer, PeerId](
node.network.peerPool,
dag.cfg.DENEB_FORK_EPOCH,
dag.cfg.FULU_FORK_EPOCH,
dag.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS,
dag.cfg.MAX_BLOBS_PER_BLOCK_ELECTRA,
SyncQueueKind.Backward, getLocalHeadSlot,
Expand All @@ -527,6 +529,7 @@ proc initFullNode(
untrustedManager = newSyncManager[Peer, PeerId](
node.network.peerPool,
dag.cfg.DENEB_FORK_EPOCH,
dag.cfg.FULU_FORK_EPOCH,
dag.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS,
dag.cfg.MAX_BLOBS_PER_BLOCK_ELECTRA,
SyncQueueKind.Backward, getLocalHeadSlot,
Expand Down
5 changes: 4 additions & 1 deletion beacon_chain/sync/sync_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type
SyncManager*[A, B] = ref object
pool: PeerPool[A, B]
DENEB_FORK_EPOCH: Epoch
FULU_FORK_EPOCH: Epoch
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: uint64
MAX_BLOBS_PER_BLOCK_ELECTRA: uint64
responseTimeout: chronos.Duration
Expand Down Expand Up @@ -142,6 +143,7 @@ proc initQueue[A, B](man: SyncManager[A, B]) =
proc newSyncManager*[A, B](
pool: PeerPool[A, B],
denebEpoch: Epoch,
fuluEpoch: Epoch,
minEpochsForBlobSidecarsRequests: uint64,
maxBlobsPerBlockElectra: uint64,
direction: SyncQueueKind,
Expand Down Expand Up @@ -171,6 +173,7 @@ proc newSyncManager*[A, B](
var res = SyncManager[A, B](
pool: pool,
DENEB_FORK_EPOCH: denebEpoch,
FULU_FORK_EPOCH: fuluEpoch,
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: minEpochsForBlobSidecarsRequests,
MAX_BLOBS_PER_BLOCK_ELECTRA: maxBlobsPerBlockElectra,
getLocalHeadSlot: getLocalHeadSlotCb,
Expand Down Expand Up @@ -212,7 +215,7 @@ proc shouldGetBlobs[A, B](man: SyncManager[A, B], s: Slot): bool =
let
wallEpoch = man.getLocalWallSlot().epoch
epoch = s.epoch()
(epoch >= man.DENEB_FORK_EPOCH) and
(epoch >= man.DENEB_FORK_EPOCH) and (epoch < man.FULU_FORK_EPOCH) and
(wallEpoch < man.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS or
epoch >= wallEpoch - man.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS)

Expand Down
Loading