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
1227122
More work
cheatfate Aug 12, 2025
93c6a9f
More changes.
cheatfate Aug 20, 2025
51249b2
Add sync access to engine events.
cheatfate Aug 21, 2025
e28f08a
Add groupSidecars(DataColumnsByRootIdentifier).
cheatfate Aug 25, 2025
8c3ba55
Addressing some TODOs in overseer.
cheatfate Aug 25, 2025
c602fa5
Add missing shortLog()
cheatfate Aug 25, 2025
22fcc79
Replace one more TODO.
cheatfate Aug 25, 2025
b4c197a
Addressing column intersection TODO.
cheatfate Aug 25, 2025
9da220a
Add event handlers.
cheatfate Aug 25, 2025
af15fe1
Update events implementation.
cheatfate Aug 26, 2025
572cbe0
Add some debugging logs.
cheatfate Aug 26, 2025
0fe66a9
Fix crash.
cheatfate Aug 26, 2025
639d036
Fix some issues and add some more debug logging.
cheatfate Aug 27, 2025
d26daf5
Move all the blocks received on `range` step to the BlockBuffer.
cheatfate Aug 27, 2025
b205001
Upgrade BlockBuffer.
cheatfate Sep 1, 2025
cad8052
Fix assertion crash.
cheatfate Sep 1, 2025
18b1aa3
Fix how sidecars checking procedures.
cheatfate Sep 2, 2025
4e03c5d
Do fixes of byroot sync.
cheatfate Sep 2, 2025
2bf1839
Fix compilation issues.
cheatfate Sep 2, 2025
9574fb1
Add loop pause when there is no work to do.
cheatfate Sep 3, 2025
8161cfa
Fix incremental math.
cheatfate Sep 3, 2025
57d2020
Make blobs and columns lists in logs smaller.
cheatfate Sep 3, 2025
c8691b3
Actively reload how columns/blobs are logged.
cheatfate Sep 3, 2025
44059d8
Investigation of peer's endless loop issue.
cheatfate Sep 3, 2025
4b6033e
Add performance meters.
cheatfate Sep 4, 2025
20e28ae
Fix performance counter issues.
cheatfate Sep 4, 2025
245c8b8
Add finalization event pruning.
cheatfate Sep 5, 2025
aedeadf
Post rebase fixes.
cheatfate Sep 5, 2025
4b7868c
Add more conditions to peerPause.
cheatfate Sep 5, 2025
b69a93f
Fix missing dag access.
cheatfate Sep 5, 2025
02a4763
Add earliest_available_slot handling.
cheatfate Sep 8, 2025
0a59ca8
Add some debugging logs.
cheatfate Sep 8, 2025
0ca10af
Fix compilation issue.
cheatfate Sep 8, 2025
04e91ae
Add more debugging statements.
cheatfate Sep 8, 2025
1c09f8b
Move debugging statements.
cheatfate Sep 8, 2025
53bdfc7
Add some more information to debug logging.
cheatfate Sep 8, 2025
cea06f0
Change SyncQueue[T].push method to return number of slots advanced.
cheatfate Sep 9, 2025
d03b198
Add debug information about current checkpoints stored in dag.
cheatfate Sep 10, 2025
8df6f85
Restore inclusion proof verifications.
cheatfate Sep 10, 2025
0cdd8c5
Add async control to block buffer.
cheatfate Sep 15, 2025
2471737
Do not enter block range downloading in case when block buffer is alm…
cheatfate Sep 15, 2025
993bc8e
Add more debugging on RangeBuffer.
cheatfate Sep 15, 2025
3a98a64
Use RangeBuffer shortLog.
cheatfate Sep 15, 2025
fbbe1b5
Fix block buffer advance when empty responses being processed.
cheatfate Sep 15, 2025
f79840c
Fix sync_queue cyrillic C characters.
cheatfate Sep 16, 2025
48f7f55
Remove block_buffer asynchronous handlers.
cheatfate Sep 16, 2025
fc75530
Removal of Checkpoints from SyncDag, maintain single Queues structure.
cheatfate Sep 18, 2025
5381a86
Removal of checkpoints part 2.
cheatfate Sep 18, 2025
ee4c0d1
Fix pruning for blockBuffer and blobQuarantine.
cheatfate Sep 18, 2025
23caa43
Add more debugging statements.
cheatfate Sep 18, 2025
780f3eb
Add logs for investigation lighthouse issue with range response.
cheatfate Sep 18, 2025
2e004a6
Fix getSidecarSlot().
cheatfate Sep 18, 2025
d36623d
More changes in getSidecarSlot().
cheatfate Sep 20, 2025
3ce4ff0
Address runtime crash.
cheatfate Sep 20, 2025
06a0d28
Make SyncQueue return negative integer when rewind is happen.
cheatfate Sep 21, 2025
c8a455e
Address all the warnings.
cheatfate Sep 21, 2025
13291e5
Validate early empty sidecar responses.
cheatfate Sep 21, 2025
b622fc3
Add more debugging output.
cheatfate Sep 22, 2025
9a71310
More debugging output.
cheatfate Sep 22, 2025
87b739c
Add SyncQueue synchronization after rewinds.
cheatfate Sep 22, 2025
11bcae2
Make block_buffer accept blocks before initSlot.
cheatfate Sep 22, 2025
1f6f1fd
VerifierError.MissingSidecars should not affect failures count.
cheatfate Sep 23, 2025
c744843
Disable byRoot syncing while rangeSync is active.
cheatfate Sep 23, 2025
a66f3fb
Post-rebase fixes.
cheatfate Sep 23, 2025
837b079
Fix peer management in Overseer.
cheatfate Sep 23, 2025
c084635
Update pause detector.
cheatfate Sep 23, 2025
6fd4ba5
Fix block_buffer.peekRange() returns incorrect number of blocks.
cheatfate Sep 24, 2025
8459f90
Fix compilation.
cheatfate Sep 24, 2025
5aff5de
More fixes to block_buffer.peekRange().
cheatfate Sep 24, 2025
d781107
Add parent_root into slimLog(blocks).
cheatfate Sep 25, 2025
72947e2
Add SyncQueue synchronization for blocks loop.
cheatfate Sep 26, 2025
aa084f2
Fix sidecars step should not be active when sidecars are not needed.
cheatfate Sep 26, 2025
74f7586
Sidecars check should be done before request has been made.
cheatfate Sep 26, 2025
8b93b18
Remove initSlot from BlockRangeBuffer.
cheatfate Sep 29, 2025
7483407
Fix blocks queue should not rewind sidecars queue, if its not running…
cheatfate Sep 29, 2025
73f1a73
Add SyncPushResponse result for SyncQueue.push().
cheatfate Sep 29, 2025
730524b
Add one more step in debugging MissingParent error returned by BlockP…
cheatfate Sep 30, 2025
d7b54e7
Add more debugging statements to SyncQueue.
cheatfate Sep 30, 2025
0c335ef
Make requests non-relevant more strict.
cheatfate Oct 1, 2025
eff2568
Add more debug statements to verifiers.
cheatfate Oct 1, 2025
35e2a6b
Fix compilation issue.
cheatfate Oct 1, 2025
07b9f73
Add blob index checking to response utils.
cheatfate Oct 1, 2025
569afb2
Disable blob/column quarantine pruning in sidecars step.
cheatfate Oct 1, 2025
791f1a0
Add blob_quarantine logging.
cheatfate Oct 2, 2025
1889bd2
Disable rewind syncing for blocks step.
cheatfate Oct 3, 2025
dbbf332
Add blob/column quarantine pruning for failing/empty requests.
cheatfate Oct 4, 2025
bc69950
Add more debug logging to blob/column quarantine.
cheatfate Oct 4, 2025
93372dd
Store blobs/columns in quarantine right before pushing request to avo…
cheatfate Oct 5, 2025
bea0935
Dissect ColumnMap from blob_quarantine to its own module.
cheatfate Oct 5, 2025
0c8eb93
Move BlockBuffer tests to test suite.
cheatfate Oct 6, 2025
ddb8ef0
Add BlockBuffer invalidation.
cheatfate Oct 6, 2025
0af99ae
Update backfill queues in updateQueues().
cheatfate Oct 7, 2025
5dd956b
Post-rebase fixes.
cheatfate Oct 7, 2025
c1408a8
MissingSidecars should not affect rewinds.
cheatfate Oct 7, 2025
bdbe4ef
Add more debugging values to overseer.
cheatfate Oct 7, 2025
80a31dc
Remove sync_dag debugging logs.
cheatfate Oct 7, 2025
a4657a0
Start root sync earlier.
cheatfate Oct 7, 2025
2f7dbc9
Fix issue with block validation response check.
cheatfate Oct 7, 2025
755bd0e
Update performance counters.
cheatfate Oct 7, 2025
18a626e
Fix crash.
cheatfate Oct 7, 2025
704e650
Remove code duplicates from performance counters.
cheatfate Oct 8, 2025
f9e7540
Some fixes for roots syncing.
cheatfate Oct 8, 2025
2ff4d29
Add peerLog logging.
cheatfate Oct 8, 2025
4911dfa
Fix sidecars syncer conditions.
cheatfate Oct 9, 2025
cb4b118
Remove peer_log.
cheatfate Oct 9, 2025
2a62cdb
Remove some debugging log statements.
cheatfate Oct 9, 2025
4710bb3
Missing sidecars helper functions.
cheatfate Oct 10, 2025
5722a81
Simplify getMissingSidecarIndices(columns).
cheatfate Oct 13, 2025
5a664fc
Add missing sidecar indices to logs, so it possible to track columns …
cheatfate Oct 13, 2025
edd5290
Fix test_quarantine.
cheatfate Oct 13, 2025
4130da3
Add some columns debugging statements.
cheatfate Oct 13, 2025
64d8422
Attempt to fix weird chronicles assertion.
cheatfate Oct 14, 2025
c5b70e2
Fix column distribution and rate logging.
cheatfate Oct 14, 2025
ff5eb42
Fix `You should not pop so many requests` assertion crash and start u…
cheatfate Oct 14, 2025
fd823cb
Add quarantine shortLog to check what is happening.
cheatfate Oct 14, 2025
a0efc19
Add shortLog(columns).
cheatfate Oct 14, 2025
2f916fa
Do not request columns if we already have it.
cheatfate Oct 14, 2025
bfc6233
Fix new columns calculations.
cheatfate Oct 14, 2025
56ef75a
One more fix.
cheatfate Oct 14, 2025
0a9c577
Optimize getMissingSidecarIndices() and introduce getMissingColumnsMa…
cheatfate Oct 15, 2025
1729128
Some updates to blob_quarantine.
cheatfate Oct 15, 2025
c1fddb8
Add SyncDag path to main debug log statement.
cheatfate Oct 15, 2025
75c57f5
Investigating blobs in columns age, more logs and fixes.
cheatfate Oct 16, 2025
626b229
Still unclear where columns are lost.
cheatfate Oct 16, 2025
5907935
Remove blob quarantine processing after finalization.
cheatfate Oct 16, 2025
e98d009
Fix: Do not remove blobs/columns on MissingSidecars/MissingParent err…
cheatfate Oct 16, 2025
d20333b
Fix compilation issue.
cheatfate Oct 16, 2025
26ba739
Log full root map to understand why there missing blocks.
cheatfate Oct 17, 2025
ebddf4e
Fix use sidecarless quarantine as source of blocks too.
cheatfate Oct 19, 2025
bac0133
Fix BlockBuffer not properly handles MissingParent detection.
cheatfate Oct 20, 2025
9ca7e69
Fix not-in-range detection for sidecars queue.
cheatfate Oct 20, 2025
349a77f
Fix compilation problem.
cheatfate Oct 20, 2025
d22b78c
Enable earliest_avalailable_slot check.
cheatfate Oct 20, 2025
8b37311
Add peer_map to by root sidecars requests.
cheatfate Oct 20, 2025
cf2aa22
Earliest available slot is only for columns, not blocks.
cheatfate Oct 20, 2025
021dd03
Post-rebase fixes.
cheatfate Oct 21, 2025
8c23e58
Add MissingSidecars cleanups.
cheatfate Oct 21, 2025
14fe1dd
Fix pruning errors.
cheatfate Oct 21, 2025
555cbf2
Proper backfill check.
cheatfate Oct 21, 2025
efc412c
One more fix to backfill detection algorithm.
cheatfate Oct 22, 2025
a062b82
Update backfill queue limits calculation.
cheatfate Oct 22, 2025
a7e130f
Fix compilation error.
cheatfate Oct 22, 2025
c4bf33b
One more calculation update.
cheatfate Oct 22, 2025
ef0ffa5
Refactor sidecars queue limits calculation methods.
cheatfate Oct 22, 2025
04f02aa
Add edge cases handling.
cheatfate Oct 22, 2025
316d6f9
Make one edge-case non-fatal to avoid syncing being stuck.
cheatfate Oct 23, 2025
a6bb5fa
Post-rebase fixes.
cheatfate Oct 23, 2025
c54f15f
Eliminate useless changes.
cheatfate Oct 23, 2025
5c1e0d2
Fix block monitoring event loop.
cheatfate Oct 23, 2025
b8f4108
Increase period when rootsync starts.
cheatfate Oct 23, 2025
3349774
Fix SECONDS_PER_SLOT issue.
cheatfate Oct 24, 2025
c5dcce8
Tuning getStatusPeriod() function to be more precise in edge-cases.
cheatfate Oct 24, 2025
ef91497
Remove unnecessary helpers.
cheatfate Oct 24, 2025
184c233
Do some BlockBuffer adding refactoring and fixing tests.
cheatfate Oct 24, 2025
5031fd9
Update AllTests.
cheatfate Oct 24, 2025
e710b57
SLOT_DURATION.
cheatfate Oct 24, 2025
f6d9126
Fix REST handlers.
cheatfate Oct 24, 2025
731d482
Fix peer's status stale information should not appear too early.
cheatfate Oct 27, 2025
16449c9
Initialize SyncDag with genesis root/slot to avoid downloading.
cheatfate Oct 28, 2025
47cd6b0
Genesis is special case not an ordinary root.
cheatfate Oct 28, 2025
d3bb95d
One more place for genesis handling.
cheatfate Oct 28, 2025
73efb29
Another one more genesis fix.
cheatfate Oct 28, 2025
f66f5e0
Fix crash when backfill is not needed.
cheatfate Oct 28, 2025
6e9e9c8
Post-rebase fixes.
cheatfate Nov 3, 2025
77ecea1
Eliminate warnings.
cheatfate Nov 4, 2025
40cbb8a
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 @@ -161,6 +161,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 @@ -1009,29 +1023,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 @@ -838,3 +840,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 @@ -2182,7 +2178,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 @@ -2332,9 +2328,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 @@ -2616,7 +2618,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