Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
fdaf311
More work
cheatfate Aug 12, 2025
e16516b
More changes.
cheatfate Aug 20, 2025
b38c07f
Add sync access to engine events.
cheatfate Aug 21, 2025
4318646
Add groupSidecars(DataColumnsByRootIdentifier).
cheatfate Aug 25, 2025
d4eda0f
Addressing some TODOs in overseer.
cheatfate Aug 25, 2025
ea72594
Add missing shortLog()
cheatfate Aug 25, 2025
c0cd2dc
Replace one more TODO.
cheatfate Aug 25, 2025
de6e388
Addressing column intersection TODO.
cheatfate Aug 25, 2025
fd5bda5
Add event handlers.
cheatfate Aug 25, 2025
9a53264
Update events implementation.
cheatfate Aug 26, 2025
c33c999
Add some debugging logs.
cheatfate Aug 26, 2025
96d74ec
Fix crash.
cheatfate Aug 26, 2025
7e1c01b
Fix some issues and add some more debug logging.
cheatfate Aug 27, 2025
31ca513
Move all the blocks received on `range` step to the BlockBuffer.
cheatfate Aug 27, 2025
e95070f
Upgrade BlockBuffer.
cheatfate Sep 1, 2025
e30357c
Fix assertion crash.
cheatfate Sep 1, 2025
682bdc4
Fix how sidecars checking procedures.
cheatfate Sep 2, 2025
5328b98
Do fixes of byroot sync.
cheatfate Sep 2, 2025
92ac399
Fix compilation issues.
cheatfate Sep 2, 2025
bdab479
Add loop pause when there is no work to do.
cheatfate Sep 3, 2025
11a1aaf
Fix incremental math.
cheatfate Sep 3, 2025
dcc860e
Make blobs and columns lists in logs smaller.
cheatfate Sep 3, 2025
3f1dcc4
Actively reload how columns/blobs are logged.
cheatfate Sep 3, 2025
998366c
Investigation of peer's endless loop issue.
cheatfate Sep 3, 2025
e8d11b1
Add performance meters.
cheatfate Sep 4, 2025
98fe829
Fix performance counter issues.
cheatfate Sep 4, 2025
1c9ebf8
Add finalization event pruning.
cheatfate Sep 5, 2025
fbf6d39
Post rebase fixes.
cheatfate Sep 5, 2025
e7f1a9b
Add more conditions to peerPause.
cheatfate Sep 5, 2025
f1b954d
Fix missing dag access.
cheatfate Sep 5, 2025
d97c2f1
Add earliest_available_slot handling.
cheatfate Sep 8, 2025
27890ed
Add some debugging logs.
cheatfate Sep 8, 2025
2db6abb
Fix compilation issue.
cheatfate Sep 8, 2025
a729587
Add more debugging statements.
cheatfate Sep 8, 2025
276e36f
Move debugging statements.
cheatfate Sep 8, 2025
c79fc49
Add some more information to debug logging.
cheatfate Sep 8, 2025
2b65ae4
Change SyncQueue[T].push method to return number of slots advanced.
cheatfate Sep 9, 2025
2f6af56
Add debug information about current checkpoints stored in dag.
cheatfate Sep 10, 2025
07e5769
Restore inclusion proof verifications.
cheatfate Sep 10, 2025
74bd8f2
Add async control to block buffer.
cheatfate Sep 15, 2025
0d29dac
Do not enter block range downloading in case when block buffer is alm…
cheatfate Sep 15, 2025
ccd0f46
Add more debugging on RangeBuffer.
cheatfate Sep 15, 2025
8927232
Use RangeBuffer shortLog.
cheatfate Sep 15, 2025
6611e84
Fix block buffer advance when empty responses being processed.
cheatfate Sep 15, 2025
128eaa5
Fix sync_queue cyrillic C characters.
cheatfate Sep 16, 2025
d08bbfc
Remove block_buffer asynchronous handlers.
cheatfate Sep 16, 2025
c827b9b
Removal of Checkpoints from SyncDag, maintain single Queues structure.
cheatfate Sep 18, 2025
d72345d
Removal of checkpoints part 2.
cheatfate Sep 18, 2025
8bef3bc
Fix pruning for blockBuffer and blobQuarantine.
cheatfate Sep 18, 2025
13f2b54
Add more debugging statements.
cheatfate Sep 18, 2025
113d4dd
Add logs for investigation lighthouse issue with range response.
cheatfate Sep 18, 2025
3ab0e86
Fix getSidecarSlot().
cheatfate Sep 18, 2025
c30f7e1
More changes in getSidecarSlot().
cheatfate Sep 20, 2025
9089a7e
Address runtime crash.
cheatfate Sep 20, 2025
8e251f4
Make SyncQueue return negative integer when rewind is happen.
cheatfate Sep 21, 2025
60ffd90
Address all the warnings.
cheatfate Sep 21, 2025
e5ac2f2
Validate early empty sidecar responses.
cheatfate Sep 21, 2025
eb4091f
Add more debugging output.
cheatfate Sep 22, 2025
431cb8b
More debugging output.
cheatfate Sep 22, 2025
305efc1
Add SyncQueue synchronization after rewinds.
cheatfate Sep 22, 2025
3bd8b8e
Make block_buffer accept blocks before initSlot.
cheatfate Sep 22, 2025
a8ec2e0
VerifierError.MissingSidecars should not affect failures count.
cheatfate Sep 23, 2025
7824d72
Disable byRoot syncing while rangeSync is active.
cheatfate Sep 23, 2025
d40e2f8
Post-rebase fixes.
cheatfate Sep 23, 2025
f041bb1
Fix peer management in Overseer.
cheatfate Sep 23, 2025
2e911e2
Update pause detector.
cheatfate Sep 23, 2025
9cfe842
Fix block_buffer.peekRange() returns incorrect number of blocks.
cheatfate Sep 24, 2025
e2db2ab
Fix compilation.
cheatfate Sep 24, 2025
3586dba
More fixes to block_buffer.peekRange().
cheatfate Sep 24, 2025
1d94046
Add parent_root into slimLog(blocks).
cheatfate Sep 25, 2025
dbfa793
Add SyncQueue synchronization for blocks loop.
cheatfate Sep 26, 2025
731af91
Fix sidecars step should not be active when sidecars are not needed.
cheatfate Sep 26, 2025
d8e62c9
Sidecars check should be done before request has been made.
cheatfate Sep 26, 2025
cac6f5f
Remove initSlot from BlockRangeBuffer.
cheatfate Sep 29, 2025
081b244
Fix blocks queue should not rewind sidecars queue, if its not running…
cheatfate Sep 29, 2025
e148f08
Add SyncPushResponse result for SyncQueue.push().
cheatfate Sep 29, 2025
2857dd6
Add one more step in debugging MissingParent error returned by BlockP…
cheatfate Sep 30, 2025
d3f2ffe
Add more debugging statements to SyncQueue.
cheatfate Sep 30, 2025
893625f
Make requests non-relevant more strict.
cheatfate Oct 1, 2025
2953d8f
Add more debug statements to verifiers.
cheatfate Oct 1, 2025
f0e9a9c
Fix compilation issue.
cheatfate Oct 1, 2025
0719278
Add blob index checking to response utils.
cheatfate Oct 1, 2025
e380b1f
Disable blob/column quarantine pruning in sidecars step.
cheatfate Oct 1, 2025
264c67d
Add blob_quarantine logging.
cheatfate Oct 2, 2025
1e84b17
Disable rewind syncing for blocks step.
cheatfate Oct 3, 2025
a2e8955
Add blob/column quarantine pruning for failing/empty requests.
cheatfate Oct 4, 2025
b28bd95
Add more debug logging to blob/column quarantine.
cheatfate Oct 4, 2025
9b83e8c
Store blobs/columns in quarantine right before pushing request to avo…
cheatfate Oct 5, 2025
bd9ea53
Dissect ColumnMap from blob_quarantine to its own module.
cheatfate Oct 5, 2025
0d5302b
Move BlockBuffer tests to test suite.
cheatfate Oct 6, 2025
cc78425
Add BlockBuffer invalidation.
cheatfate Oct 6, 2025
56862f8
Update backfill queues in updateQueues().
cheatfate Oct 7, 2025
8d62838
Post-rebase fixes.
cheatfate Oct 7, 2025
bb60de3
MissingSidecars should not affect rewinds.
cheatfate Oct 7, 2025
e7805d7
Add more debugging values to overseer.
cheatfate Oct 7, 2025
34a6e15
Remove sync_dag debugging logs.
cheatfate Oct 7, 2025
2dbf178
Start root sync earlier.
cheatfate Oct 7, 2025
ab9993b
Fix issue with block validation response check.
cheatfate Oct 7, 2025
096d532
Update performance counters.
cheatfate Oct 7, 2025
ef67507
Fix crash.
cheatfate Oct 7, 2025
4222a4f
Remove code duplicates from performance counters.
cheatfate Oct 8, 2025
489688b
Some fixes for roots syncing.
cheatfate Oct 8, 2025
285c3a8
Add peerLog logging.
cheatfate Oct 8, 2025
b49d72e
Fix sidecars syncer conditions.
cheatfate Oct 9, 2025
750f3ec
Remove peer_log.
cheatfate Oct 9, 2025
db5f10e
Remove some debugging log statements.
cheatfate Oct 9, 2025
4be7705
Missing sidecars helper functions.
cheatfate Oct 10, 2025
57adc14
Simplify getMissingSidecarIndices(columns).
cheatfate Oct 13, 2025
29f0c5b
Add missing sidecar indices to logs, so it possible to track columns …
cheatfate Oct 13, 2025
2ec01e3
Fix test_quarantine.
cheatfate Oct 13, 2025
e166dfb
Add some columns debugging statements.
cheatfate Oct 13, 2025
f09ff79
Attempt to fix weird chronicles assertion.
cheatfate Oct 14, 2025
06cf1ea
Fix column distribution and rate logging.
cheatfate Oct 14, 2025
5bf9732
Fix `You should not pop so many requests` assertion crash and start u…
cheatfate Oct 14, 2025
f054e11
Add quarantine shortLog to check what is happening.
cheatfate Oct 14, 2025
4b541a1
Add shortLog(columns).
cheatfate Oct 14, 2025
dad5332
Do not request columns if we already have it.
cheatfate Oct 14, 2025
aed6e48
Fix new columns calculations.
cheatfate Oct 14, 2025
5212288
One more fix.
cheatfate Oct 14, 2025
4fb97e0
Optimize getMissingSidecarIndices() and introduce getMissingColumnsMa…
cheatfate Oct 15, 2025
1a84297
Some updates to blob_quarantine.
cheatfate Oct 15, 2025
4388058
Add SyncDag path to main debug log statement.
cheatfate Oct 15, 2025
354de67
Investigating blobs in columns age, more logs and fixes.
cheatfate Oct 16, 2025
73e348d
Still unclear where columns are lost.
cheatfate Oct 16, 2025
e6b506f
Remove blob quarantine processing after finalization.
cheatfate Oct 16, 2025
883a1fe
Fix: Do not remove blobs/columns on MissingSidecars/MissingParent err…
cheatfate Oct 16, 2025
b6aba92
Fix compilation issue.
cheatfate Oct 16, 2025
a1ea180
Log full root map to understand why there missing blocks.
cheatfate Oct 17, 2025
f6bbc74
Fix use sidecarless quarantine as source of blocks too.
cheatfate Oct 19, 2025
df90814
Fix BlockBuffer not properly handles MissingParent detection.
cheatfate Oct 20, 2025
bb38f14
Fix not-in-range detection for sidecars queue.
cheatfate Oct 20, 2025
3ea2497
Fix compilation problem.
cheatfate Oct 20, 2025
f8284a3
Enable earliest_avalailable_slot check.
cheatfate Oct 20, 2025
130ce93
Add peer_map to by root sidecars requests.
cheatfate Oct 20, 2025
915a1f0
Earliest available slot is only for columns, not blocks.
cheatfate Oct 20, 2025
a683b7d
Post-rebase fixes.
cheatfate Oct 21, 2025
e7d1756
Add MissingSidecars cleanups.
cheatfate Oct 21, 2025
b0f60ef
Fix pruning errors.
cheatfate Oct 21, 2025
2d68b18
Proper backfill check.
cheatfate Oct 21, 2025
9f73a3d
One more fix to backfill detection algorithm.
cheatfate Oct 22, 2025
1331bbc
Update backfill queue limits calculation.
cheatfate Oct 22, 2025
1414704
Fix compilation error.
cheatfate Oct 22, 2025
844eb21
One more calculation update.
cheatfate Oct 22, 2025
cff22bf
Refactor sidecars queue limits calculation methods.
cheatfate Oct 22, 2025
a521cf4
Add edge cases handling.
cheatfate Oct 22, 2025
7b3466f
Make one edge-case non-fatal to avoid syncing being stuck.
cheatfate Oct 23, 2025
d263b17
Post-rebase fixes.
cheatfate Oct 23, 2025
ca65d3d
Eliminate useless changes.
cheatfate Oct 23, 2025
d5951f3
Fix block monitoring event loop.
cheatfate Oct 23, 2025
e8c50fa
Increase period when rootsync starts.
cheatfate Oct 23, 2025
d675c0f
Fix SECONDS_PER_SLOT issue.
cheatfate Oct 24, 2025
d1a30ca
Tuning getStatusPeriod() function to be more precise in edge-cases.
cheatfate Oct 24, 2025
3c4e02a
Remove unnecessary helpers.
cheatfate Oct 24, 2025
33cb2f4
Do some BlockBuffer adding refactoring and fixing tests.
cheatfate Oct 24, 2025
a70ac44
Update AllTests.
cheatfate Oct 24, 2025
49fe0ae
SLOT_DURATION.
cheatfate Oct 24, 2025
e74db01
Fix REST handlers.
cheatfate Oct 24, 2025
0665f41
Fix peer's status stale information should not appear too early.
cheatfate Oct 27, 2025
444a422
Initialize SyncDag with genesis root/slot to avoid downloading.
cheatfate Oct 28, 2025
ee5de6a
Genesis is special case not an ordinary root.
cheatfate Oct 28, 2025
d327e64
One more place for genesis handling.
cheatfate Oct 28, 2025
910b23f
Another one more genesis fix.
cheatfate Oct 28, 2025
663dfc1
Fix crash when backfill is not needed.
cheatfate Oct 28, 2025
481121b
Post-rebase fixes.
cheatfate Nov 3, 2025
c216162
Eliminate warnings.
cheatfate Nov 4, 2025
db73853
Post-rebase fixes.
cheatfate Nov 10, 2025
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
42 changes: 23 additions & 19 deletions AllTests-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ AllTests-mainnet
+ atSlot sanity OK
+ parent sanity OK
```
## BlocksRangeBuffer test suite
```diff
+ Add and query blocks test [backward] OK
+ Add and query blocks test [forward] OK
+ Block insertion test [backward] OK
+ Block insertion test [forward] OK
+ Buffer advance test [backward] OK
+ Buffer advance test [forward] OK
+ Buffer invalidate test [backward] OK
+ Buffer invalidate test [forward] OK
+ Range peek real test cases [forward] OK
+ Range peek test [backward] OK
+ Range peek test [forward] OK
```
## ColumnMap test suite
```diff
+ and() operation test OK
Expand Down Expand Up @@ -1001,29 +1015,19 @@ AllTests-mainnet
## SyncManager test suite
```diff
+ [SyncManager] groupBlobs() test OK
+ [SyncQueue# & Backward] Combination of missing parent and good blocks [3 peers] test OK
+ [SyncQueue# & Backward] Empty responses should not advance queue until other peers will no OK
+ [SyncQueue# & Backward] Empty responses should not be accounted [3 peers] test OK
+ [SyncQueue# & Backward] Failure request push test OK
+ [SyncQueue# & Backward] Invalid block [3 peers] test OK
+ [SyncQueue# & Backward] Smoke [3 peers] test OK
+ [SyncQueue# & Backward] Smoke [single peer] test OK
+ [SyncQueue# & Backward] Unviable block [3 peers] test OK
+ [SyncQueue# & Backward] epochFilter() test OK
+ [SyncQueue# & Forward] Combination of missing parent and good blocks [3 peers] test OK
+ [SyncQueue# & Forward] Empty responses should not advance queue until other peers will not OK
+ [SyncQueue# & Forward] Empty responses should not be accounted [3 peers] test OK
+ [SyncQueue# & Forward] Failure request push test OK
+ [SyncQueue# & Forward] Invalid block [3 peers] test OK
+ [SyncQueue# & Forward] Smoke [3 peers] test OK
+ [SyncQueue# & Forward] Smoke [single peer] test OK
+ [SyncQueue# & Forward] Unviable block [3 peers] test OK
+ [SyncQueue# & Forward] epochFilter() test OK
+ [SyncQueue#Backward] Combination of missing parent and good blocks [3 peers] test OK
+ [SyncQueue#Backward] Empty responses should not advance queue until other peers will not c OK
+ [SyncQueue#Backward] Empty responses should not be accounted [3 peers] test OK
+ [SyncQueue#Backward] Failure request push test OK
+ [SyncQueue#Backward] Invalid block [3 peers] test OK
+ [SyncQueue#Backward] Missing parent and exponential rewind [3 peers] test OK
+ [SyncQueue#Backward] Smoke [3 peers] test OK
+ [SyncQueue#Backward] Smoke [single peer] test OK
+ [SyncQueue#Backward] Unviable block [3 peers] test OK
+ [SyncQueue#Backward] epochFilter() test OK
+ [SyncQueue#Backward] getRewindPoint() test OK
+ [SyncQueue#Forward] Missing parent and exponential rewind [3 peers] test OK
+ [SyncQueue#Forward] getRewindPoint() test OK
+ [SyncQueue] checkBlobsResponse() test OK
+ [SyncQueue] checkResponse() test OK
+ [SyncQueue] hasEndGap() test OK
```
Expand Down
7 changes: 4 additions & 3 deletions beacon_chain/beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import
./spec/datatypes/[base, altair],
./spec/eth2_apis/dynamic_fee_recipients,
./spec/signatures_batch,
./sync/[sync_manager, request_manager, sync_types, validator_custody],
./sync/[sync_overseer2, sync_manager, request_manager, sync_types, validator_custody],
./validators/[
action_tracker, message_router, validator_monitor, validator_pool,
keystore_management],
Expand All @@ -41,13 +41,14 @@ export
eth2_network, el_manager, request_manager, sync_manager,
eth2_processor, optimistic_processor, blockchain_dag, block_quarantine,
base, message_router, validator_monitor, validator_pool,
consensus_manager, dynamic_fee_recipients, sync_types
consensus_manager, dynamic_fee_recipients, sync_types, sync_overseer2

type
EventBus* = object
headQueue*: AsyncEventQueue[HeadChangeInfoObject]
blocksQueue*: AsyncEventQueue[EventBeaconBlockObject]
blockGossipQueue*: AsyncEventQueue[EventBeaconBlockGossipObject]
blockGossipPeerQueue*: AsyncEventQueue[EventBeaconBlockGossipPeerObject]
phase0AttestQueue*: AsyncEventQueue[phase0.Attestation]
singleAttestQueue*: AsyncEventQueue[SingleAttestation]
exitQueue*: AsyncEventQueue[SignedVoluntaryExit]
Expand Down Expand Up @@ -100,7 +101,7 @@ type
syncManager*: SyncManager[Peer, PeerId]
backfiller*: SyncManager[Peer, PeerId]
untrustedManager*: SyncManager[Peer, PeerId]
syncOverseer*: SyncOverseerRef
syncOverseer*: SyncOverseerRef2
processor*: ref Eth2Processor
batchVerifier*: ref BatchVerifier
blockProcessor*: ref BlockProcessor
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/beacon_node_light_client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ proc initLightClient*(
optimisticProcessor = initOptimisticProcessor(
cfg.timeParams, getBeaconTime, optimisticHandler)

shouldInhibitSync = func(): bool =
shouldInhibitSync = proc(): bool =
if isNil(node.syncOverseer):
false
else:
Expand Down
40 changes: 38 additions & 2 deletions beacon_chain/consensus_object_pools/block_pools_types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import
# Standard library
std/[tables, hashes],
# Status libraries
chronicles,
results,
chronicles, libp2p/peerid, results,
# Internals
../spec/[signatures_batch, forks, helpers],
".."/[beacon_chain_db, era_db],
Expand Down Expand Up @@ -46,6 +45,9 @@ type
Duplicate
## We've seen this value already, can't add again

MissingSidecars
## We do not have sidecars at the moment

OnBlockCallback* =
proc(data: ForkedTrustedSignedBeaconBlock) {.gcsafe, raises: [].}
OnBlockGossipCallback* =
Expand Down Expand Up @@ -336,6 +338,30 @@ type
slot*: Slot
block_root* {.serializedFieldName: "block".}: Eth2Digest

EventBeaconBlockGossipPeerObject* = object
blck*: ForkedSignedBeaconBlock
src*: PeerId

template OnBlockAddedCallback*(kind: static ConsensusFork): auto =
when kind == ConsensusFork.Gloas:
typedesc[OnGloasBlockAdded]
elif kind == ConsensusFork.Fulu:
typedesc[OnFuluBlockAdded]
elif kind == ConsensusFork.Electra:
typedesc[OnElectraBlockAdded]
elif kind == ConsensusFork.Deneb:
typedesc[OnDenebBlockAdded]
elif kind == ConsensusFork.Capella:
typedesc[OnCapellaBlockAdded]
elif kind == ConsensusFork.Bellatrix:
typedesc[OnBellatrixBlockAdded]
elif kind == ConsensusFork.Altair:
typedesc[OnAltairBlockAdded]
elif kind == ConsensusFork.Phase0:
typedesc[OnPhase0BlockAdded]
else:
static: raiseAssert "Unreachable"

template timeParams*(dag: ChainDAGRef): TimeParams =
dag.cfg.timeParams

Expand Down Expand Up @@ -470,3 +496,13 @@ func init*(t: typedesc[EventBeaconBlockGossipObject],
slot: forkyBlck.message.slot,
block_root: forkyBlck.root
)

func init*(
t: typedesc[EventBeaconBlockGossipPeerObject],
v: ForkySignedBeaconBlock,
s: PeerId
): EventBeaconBlockGossipPeerObject =
EventBeaconBlockGossipPeerObject(
blck: ForkedSignedBeaconBlock.init(v),
src: s
)
5 changes: 5 additions & 0 deletions beacon_chain/consensus_object_pools/block_quarantine.nim
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,11 @@ func getColumnless*(
): Opt[ForkedSignedBeaconBlock] =
quarantine.sidecarless.peek(root)

func peekSidecarless*(
quarantine: var Quarantine, root: Eth2Digest
): Opt[ForkedSignedBeaconBlock] =
quarantine.sidecarless.peek(root)

iterator peekSidecarless*(quarantine: Quarantine): ForkedSignedBeaconBlock =
for k, v in quarantine.sidecarless.pairs():
yield v
4 changes: 4 additions & 0 deletions beacon_chain/gossip_processing/block_processor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ proc storeBackfillBlock(
res
of VerifierError.Duplicate:
res
of VerifierError.MissingSidecars:
res
else:
# Only store side cars after successfully establishing block viability.
self.storeSidecars(sidecarsOpt)
Expand Down Expand Up @@ -835,3 +837,5 @@ proc addBlock*(
err(res.error())
of VerifierError.Duplicate:
err(res.error())
of VerifierError.MissingSidecars:
err(res.error())
140 changes: 71 additions & 69 deletions beacon_chain/nimbus_beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import
./spec/datatypes/[altair, bellatrix, phase0],
./spec/[
engine_authentication, weak_subjectivity, peerdas_helpers],
./sync/[sync_protocol, light_client_protocol, sync_overseer, validator_custody],
./sync/[sync_protocol, light_client_protocol, sync_overseer2, validator_custody],
./validators/[keystore_management, beacon_validators],
./[
beacon_node, beacon_node_light_client, buildinfo, deposits,
Expand Down Expand Up @@ -538,56 +538,57 @@ proc initFullNode(
{SyncManagerFlag.NoGenesisSync}
else:
{}
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,
getLocalWallSlot, getFirstSlotAtFinalizedEpoch, getBackfillSlot,
getFrontfillSlot, isWithinWeakSubjectivityPeriod,
dag.tail.slot, blockVerifier, forkAtEpoch,
shutdownEvent = node.shutdownEvent,
flags = syncManagerFlags)
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,
getLocalWallSlot, getFirstSlotAtFinalizedEpoch, getBackfillSlot,
getFrontfillSlot, isWithinWeakSubjectivityPeriod,
dag.backfill.slot, blockVerifier, forkAtEpoch, maxHeadAge = 0,
shutdownEvent = node.shutdownEvent,
flags = syncManagerFlags)
clistPivotSlot =
if clist.tail.isSome():
clist.tail.get().blck.slot()
else:
getLocalWallSlot()
# 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,
# getLocalWallSlot, getFirstSlotAtFinalizedEpoch, getBackfillSlot,
# getFrontfillSlot, isWithinWeakSubjectivityPeriod,
# dag.tail.slot, blockVerifier, forkAtEpoch,
# shutdownEvent = node.shutdownEvent,
# flags = syncManagerFlags)
# 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,
# getLocalWallSlot, getFirstSlotAtFinalizedEpoch, getBackfillSlot,
# getFrontfillSlot, isWithinWeakSubjectivityPeriod,
# dag.backfill.slot, blockVerifier, forkAtEpoch, maxHeadAge = 0,
# shutdownEvent = node.shutdownEvent,
# flags = syncManagerFlags)
# clistPivotSlot =
# if clist.tail.isSome():
# clist.tail.get().blck.slot()
# else:
# getLocalWallSlot()
eaSlot = dag.head.slot
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,
getLocalWallSlot, getFirstSlotAtFinalizedEpoch, getUntrustedBackfillSlot,
getFrontfillSlot, isWithinWeakSubjectivityPeriod,
clistPivotSlot, untrustedBlockVerifier, forkAtEpoch, maxHeadAge = 0,
shutdownEvent = node.shutdownEvent,
flags = syncManagerFlags)
erSlot = dag.head.slot
# 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,
# getLocalWallSlot, getFirstSlotAtFinalizedEpoch, getUntrustedBackfillSlot,
# getFrontfillSlot, isWithinWeakSubjectivityPeriod,
# clistPivotSlot, untrustedBlockVerifier, forkAtEpoch, maxHeadAge = 0,
# shutdownEvent = node.shutdownEvent,
# flags = syncManagerFlags)
router = (ref MessageRouter)(
processor: processor,
network: node.network)
requestManager = RequestManager.init(
node.network, supernode, custodyColumns,
dag.cfg.DENEB_FORK_EPOCH, getBeaconTime, (proc(): bool = syncManager.inProgress),
quarantine, blobQuarantine, dataColumnQuarantine, rmanBlockVerifier,
rmanBlockLoader, rmanBlobLoader, rmanDataColumnLoader)
# requestManager = RequestManager.init(
# node.network, supernode, custodyColumns,
# dag.cfg.DENEB_FORK_EPOCH, getBeaconTime, (proc(): bool = syncManager.inProgress),
# quarantine, blobQuarantine, dataColumnQuarantine, rmanBlockVerifier,
# rmanBlockLoader, rmanBlobLoader, rmanDataColumnLoader)
validatorCustody = ValidatorCustodyRef.init(node.network, dag, custodyColumns,
dataColumnQuarantine)

Expand Down Expand Up @@ -650,22 +651,18 @@ proc initFullNode(
node.batchVerifier = batchVerifier
node.blockProcessor = blockProcessor
node.consensusManager = consensusManager
node.requestManager = requestManager
node.validatorCustody = validatorCustody
node.syncManager = syncManager
node.backfiller = backfiller
node.untrustedManager = untrustedManager
node.syncOverseer = SyncOverseerRef.new(node.consensusManager,
node.validatorMonitor,
config,
getBeaconTime,
node.list,
node.beaconClock,
node.eventBus.optFinHeaderUpdateQueue,
node.network.peerPool,
node.batchVerifier,
syncManager, backfiller,
untrustedManager)
# node.requestManager = requestManager
# node.syncManager = syncManager
# node.backfiller = backfiller
# node.untrustedManager = untrustedManager
node.syncOverseer =
SyncOverseerRef2.new(node.network, node.consensusManager, config,
getBeaconTime, node.beaconClock, blockProcessor,
quarantine, blobQuarantine, dataColumnQuarantine,
node.eventBus.blockGossipPeerQueue,
node.eventBus.blocksQueue,
node.eventBus.finalQueue)
node.router = router

await node.addValidators()
Expand Down Expand Up @@ -783,6 +780,7 @@ proc init*(
headQueue: newAsyncEventQueue[HeadChangeInfoObject](),
blocksQueue: newAsyncEventQueue[EventBeaconBlockObject](),
blockGossipQueue: newAsyncEventQueue[EventBeaconBlockGossipObject](),
blockGossipPeerQueue: newAsyncEventQueue[EventBeaconBlockGossipPeerObject](),
phase0AttestQueue: newAsyncEventQueue[phase0.Attestation](),
singleAttestQueue: newAsyncEventQueue[SingleAttestation](),
exitQueue: newAsyncEventQueue[SignedVoluntaryExit](),
Expand Down Expand Up @@ -1836,8 +1834,6 @@ proc onSlotEnd(node: BeaconNode, slot: Slot) {.async.} =
.pruneAfterFinalization(
node.dag.finalizedHead.slot.epoch()
)
node.processor.blobQuarantine[].pruneAfterFinalization(
node.dag.finalizedHead.slot.epoch(), node.dag.needsBackfill())
node.processor.quarantine[].pruneAfterFinalization(
node.dag.finalizedHead.slot.epoch(), node.dag.needsBackfill())

Expand Down Expand Up @@ -2172,7 +2168,7 @@ proc onSlotStart(node: BeaconNode, wallTime: BeaconTime,
node.consensusManager[].updateHead(wallSlot)

await node.handleValidatorDuties(lastSlot, wallSlot)
node.requestManager.switchToColumnLoop()
# node.requestManager.switchToColumnLoop()
await onSlotEnd(node, wallSlot)

# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#registration-dissemination
Expand Down Expand Up @@ -2322,9 +2318,15 @@ proc installMessageValidators(node: BeaconNode) =
node.optimisticProcessor.processSignedBeaconBlock(
signedBlock))
else:
toValidationResult(
node.processor[].processSignedBeaconBlock(
MsgSource.gossip, signedBlock)))
let res =
toValidationResult(
node.processor[].processSignedBeaconBlock(
MsgSource.gossip, signedBlock))
if res == ValidationResult.Accept:
node.eventBus.blockGossipPeerQueue.emit(
EventBeaconBlockGossipPeerObject.init(signedBlock, src))
res
)

# execution_payload_bid
# https://github.com/ethereum/consensus-specs/blob/v1.6.0-beta.1/specs/gloas/p2p-interface.md#execution_payload_bid
Expand Down Expand Up @@ -2606,7 +2608,7 @@ proc run*(node: BeaconNode, stopper: StopFuture) {.raises: [CatchableError].} =
wallSlot = wallTime.slotOrZero(node.dag.timeParams)

node.startLightClient()
node.requestManager.start()
# node.requestManager.start()
node.syncOverseer.start()

waitFor node.updateGossipStatus(wallSlot)
Expand Down
Loading
Loading