Skip to content

adopt columns into the BN, except column syncing #6945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 173 commits into
base: unstable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
eebbdc5
init: columns to the block/eth2 processor
agnxsh Jan 19, 2025
3ff4c33
add columns to message router
agnxsh Jan 20, 2025
222cff0
add columns to initializers of Eth2 and BlockProcessor
agnxsh Jan 20, 2025
21d771a
save progress
agnxsh Jan 20, 2025
d3309d5
save progress 2
agnxsh Jan 20, 2025
d4139e0
add column to block verifier
agnxsh Jan 20, 2025
1197f09
save progress, need to rework untrusted syncing
agnxsh Jan 21, 2025
e73379e
add column support to light forward sync
agnxsh Jan 21, 2025
7c75875
save progress test sync manager
agnxsh Jan 21, 2025
c1a2013
fix createDataColumns
agnxsh Jan 21, 2025
38b0421
fix more
agnxsh Jan 21, 2025
8a1825b
added fulu message handlers for column subnets
agnxsh Jan 21, 2025
3dfb2af
activated data column sidecar processing at Fulu
agnxsh Jan 21, 2025
7d79166
fix compilation issues
agnxsh Jan 22, 2025
9756cce
added to T list
agnxsh Jan 22, 2025
d527648
other fixes
agnxsh Jan 22, 2025
2f5e216
fix test
agnxsh Jan 22, 2025
1fc210a
fix result situation in get data column sidecars
agnxsh Jan 24, 2025
514bb3c
fix message router issue
agnxsh Jan 24, 2025
4819e43
gate blob publishing upto deneb
agnxsh Jan 24, 2025
71fdf66
fix message router blob and column progressions
agnxsh Jan 24, 2025
8128944
drop dataColumnOpt from message router
agnxsh Jan 24, 2025
9b5feb6
reversing rman blockVerifier order
agnxsh Jan 25, 2025
3592d34
fixes
agnxsh Jan 25, 2025
e7bc436
several fixes
agnxsh Jan 25, 2025
4077bb4
added debug logs for devnet testing
agnxsh Jan 25, 2025
749a5a9
add blobsOpt isSome check
agnxsh Jan 25, 2025
ceff705
fix copyright years
agnxsh Jan 25, 2025
d82c3f5
couple of fixes and debug logs
agnxsh Jan 26, 2025
9351c26
fix issue
agnxsh Jan 27, 2025
1fef674
resolved review comments, enabled more debug logs, fixed a couple of …
agnxsh Jan 27, 2025
7b3304b
fix indentation
agnxsh Jan 27, 2025
97a190f
limit processBlobSidecar < Fulu
agnxsh Jan 27, 2025
947a71b
try to gate a few operations to < Fulu
agnxsh Jan 27, 2025
3762c2c
gate more
agnxsh Jan 27, 2025
0afb4a2
halt rman blob loop post fulu fork epoch
agnxsh Jan 28, 2025
9a6f749
removed debugEchoes
agnxsh Jan 28, 2025
bdd3d50
don't ignore data column sidecars, even if you already have block
agnxsh Jan 28, 2025
609ed1d
typo
agnxsh Jan 28, 2025
80c36a7
fix upgrade to fulu function
agnxsh Jan 28, 2025
302407d
modify upgrade to fulu
agnxsh Jan 28, 2025
656ce11
gate blob publishing upto < Fulu
agnxsh Jan 28, 2025
c6ef55a
fix indentation
agnxsh Jan 28, 2025
6cc5ae2
fix fulu state upgrade
agnxsh Jan 28, 2025
5d9badc
updated processDataColumnSidecar ordering
agnxsh Jan 28, 2025
bebe9cb
add upto Capella message handlers and data column sidecars topics in …
agnxsh Jan 28, 2025
4cd6413
fix message handlers
agnxsh Jan 29, 2025
90ad075
fix copyright year
agnxsh Jan 29, 2025
7c7bc22
another fix in upgrade to fulu
agnxsh Jan 29, 2025
c434daf
refine DA checking more
agnxsh Jan 29, 2025
c5461a1
log out time taken to reconstruct
agnxsh Feb 1, 2025
07ce6ef
log out sidecar comms and proof len for testing
agnxsh Feb 1, 2025
a7af551
address review comments
agnxsh Feb 5, 2025
27f2723
fix typo
agnxsh Feb 5, 2025
4cf8a58
use disjoint
agnxsh Feb 5, 2025
0a79a51
remove column support from SyncManager and LFS
agnxsh Feb 22, 2025
c0753d4
Merge branch 'unstable' into column-syncer
agnxsh Feb 22, 2025
b0e0071
Merge branch 'unstable' into column-syncer
agnxsh Mar 4, 2025
26b0ce3
rm useless commented code
agnxsh Mar 4, 2025
72ca013
fix post rebase issue
agnxsh Mar 4, 2025
ff48abd
fix some style issues, and rm debug echoes
agnxsh Mar 4, 2025
0c77fb2
fixed more styling related reviews
agnxsh Mar 4, 2025
66986ed
Merge branch 'unstable' into column-syncer
agnxsh Mar 5, 2025
55c4cc1
address review comments
agnxsh Mar 17, 2025
fbad256
add cancelAndWait
agnxsh Mar 24, 2025
c95fb91
Merge branch 'unstable' into column-syncer
agnxsh Mar 24, 2025
a65c76d
Extend configurability of peerDAS values (#7032)
agnxsh Mar 26, 2025
fc42f0a
Merge branch 'unstable' into column-syncer
agnxsh Mar 26, 2025
6f345dc
extend configs to rest config api
agnxsh Mar 27, 2025
00c22d0
Merge branch 'unstable' into column-syncer
agnxsh Mar 31, 2025
dfc5970
Merge branch 'unstable' into column-syncer
agnxsh Apr 7, 2025
c0af472
Merge branch 'unstable' into column-syncer
agnxsh Apr 9, 2025
1f05a66
fix some cfg stuff
agnxsh Apr 10, 2025
d948800
Merge branch 'unstable' into column-syncer
agnxsh Apr 17, 2025
47820de
fix quarantine
agnxsh Apr 18, 2025
0368c59
Merge branch 'unstable' into column-syncer
agnxsh Apr 18, 2025
baae652
some more logging fixes
agnxsh Apr 18, 2025
083ed10
some fixes to data column reqman
agnxsh Apr 20, 2025
4a69a2b
fix
agnxsh Apr 20, 2025
1885b3f
Merge branch 'unstable' into column-syncer
agnxsh Apr 23, 2025
9309633
Merge branch 'unstable' into column-syncer
agnxsh May 3, 2025
6d759d3
fix regression
agnxsh May 3, 2025
566257e
Merge branch 'unstable' into column-syncer
agnxsh May 12, 2025
1962131
fix test block processor
agnxsh May 15, 2025
5234990
Merge branch 'unstable' into column-syncer
agnxsh May 20, 2025
3d1038c
Merge branch 'unstable' into column-syncer
agnxsh May 20, 2025
c69e50f
made some rebase related fixes
agnxsh May 20, 2025
cb7df93
fix unsused imports
agnxsh May 21, 2025
3e4e606
Merge branch 'unstable' into column-syncer
agnxsh May 21, 2025
89fc7ad
integrate new column quarantine into the column flow (#7187)
agnxsh May 23, 2025
1ed3b35
Merge branch 'unstable' into column-syncer
agnxsh May 23, 2025
27f7d59
Merge branch 'unstable' into column-syncer
agnxsh May 25, 2025
b020321
update restest rules
agnxsh May 25, 2025
7497790
add `getBlobsV2` and `payloadV5` (#7123)
agnxsh Jun 2, 2025
94092f7
resolve custody columns to hashset (#7210)
agnxsh Jun 6, 2025
767aca4
bump nim-eth-scenarios
tersec Jun 9, 2025
3aed051
added new mechanism of getting proposer indices in fulu
agnxsh Jun 10, 2025
47eb1a3
fix get beacon proposer index code
agnxsh Jun 10, 2025
c56fa52
fix at process sync agg
agnxsh Jun 10, 2025
1c3544d
fixes
agnxsh Jun 10, 2025
d0217f3
more fixes
agnxsh Jun 10, 2025
5ac0203
other fixes
agnxsh Jun 10, 2025
f471f9b
slot instead of state.slot
agnxsh Jun 10, 2025
cc30d80
Merge branch 'unstable' into column-syncer
agnxsh Jun 12, 2025
35f1182
added sse for data column sidecars (#7227)
agnxsh Jun 13, 2025
9be5f77
fix merge conflicts
tersec Jun 13, 2025
a81f7db
at gossip transition, use per-epoch/BPO forkdigest (#7232)
tersec Jun 13, 2025
5149a43
add gossip val per-bpo (#7233)
tersec Jun 13, 2025
3547de8
Merge branch 'unstable' into column-syncer
agnxsh Jun 16, 2025
97e7658
Merge branch 'unstable' into column-syncer
agnxsh Jun 20, 2025
b1dcac8
make changes to cater to improved sidecar quarantine
agnxsh Jun 21, 2025
993af88
Merge branch 'unstable' into column-syncer
agnxsh Jun 23, 2025
21da12c
Merge branch 'unstable' into column-syncer
agnxsh Jun 25, 2025
08c67a7
Merge remote-tracking branch 'origin/unstable' into column-syncer
tersec Jun 26, 2025
1fa6c95
Merge branch 'unstable' into column-syncer
agnxsh Jun 26, 2025
bc286cb
resolve conflicts
agnxsh Jun 26, 2025
7808525
follow gossip also for BPOs (#7267)
tersec Jun 26, 2025
f9b53f8
Merge branch 'unstable' into column-syncer
agnxsh Jun 26, 2025
c63b43f
update nfd field in ENR (#7268)
tersec Jun 26, 2025
70716ee
use correct forkdigest pre-BPO in Fulu (#7270)
tersec Jun 26, 2025
121f30a
Merge branch 'unstable' into column-syncer
agnxsh Jul 9, 2025
77cbfc0
prevent double verification of data column sidecar kzg proofs (#7301)
agnxsh Jul 17, 2025
53c1557
implement validator custody with column refill mechanism (#7127)
agnxsh Jul 18, 2025
3fac1e3
restore gossip fork transition tests (#7317)
tersec Jul 23, 2025
58835d8
resolved merge conflicts
agnxsh Jul 25, 2025
f68bd79
match vendors as unstable
agnxsh Jul 25, 2025
a1c77c4
match vendors as unstable
agnxsh Jul 25, 2025
9d81e64
Merge branch 'column-syncer' of https://github.com/status-im/nimbus-e…
agnxsh Jul 25, 2025
5ef43c0
Merge branch 'column-syncer' of https://github.com/status-im/nimbus-e…
agnxsh Jul 25, 2025
1a06344
Merge branch 'column-syncer' of https://github.com/status-im/nimbus-e…
agnxsh Jul 25, 2025
f6df7a6
other fixes
agnxsh Jul 25, 2025
4869dcb
Merge branch 'unstable' into column-syncer
agnxsh Jul 28, 2025
33a9a22
some validator custody improvements (#7349)
agnxsh Aug 3, 2025
b708d06
Merge branch 'unstable' into column-syncer
agnxsh Aug 6, 2025
28bfc50
resolve conflict
agnxsh Aug 6, 2025
b5de24c
Merge branch 'unstable' into column-syncer
agnxsh Aug 6, 2025
2e9d5fe
Merge branch 'unstable' into column-syncer
tersec Aug 7, 2025
af91a6b
Merge branch 'unstable' into column-syncer
agnxsh Aug 7, 2025
7ca83a9
Update beacon_chain/spec/peerdas_helpers.nim
tersec Aug 8, 2025
798fded
Update beacon_chain/gossip_processing/gossip_validation.nim
tersec Aug 8, 2025
7261a15
Update beacon_chain/sync/request_manager.nim
tersec Aug 8, 2025
c2a8ccd
Update beacon_chain/sync/validator_custody.nim
tersec Aug 8, 2025
a170dba
Update beacon_chain/gossip_processing/eth2_processor.nim
tersec Aug 8, 2025
d337766
Merge branch 'unstable' into column-syncer
tersec Aug 8, 2025
09e401c
Apply suggestions from code review
tersec Aug 8, 2025
60a4c3b
fusaka devnet 3 branch (#7320)
agnxsh Aug 8, 2025
d829695
assorted fixes
tersec Aug 8, 2025
1cc0b57
synchronize slightly with unstable branch
tersec Aug 8, 2025
7f40b77
Merge branch 'unstable' into column-syncer
tersec Aug 8, 2025
fc5cd14
resolve wss sim review
agnxsh Aug 8, 2025
cabe9cb
removed redundant whitespaces from eth2processor
agnxsh Aug 8, 2025
5d30716
more cfork < fulu fixes
agnxsh Aug 8, 2025
325e620
fix indent
agnxsh Aug 8, 2025
882fe1a
fix some debugEchos
agnxsh Aug 8, 2025
0b5fedb
custodyColumns
agnxsh Aug 8, 2025
62bdc7f
remove minDa
agnxsh Aug 8, 2025
d314228
remove unused start slot
agnxsh Aug 8, 2025
439a804
epochSlot
agnxsh Aug 8, 2025
50d3f98
nodeId
agnxsh Aug 8, 2025
422e8bc
replace with bpo blob count getter
agnxsh Aug 8, 2025
eb23040
rm unused var
agnxsh Aug 8, 2025
07107ce
rename var
agnxsh Aug 8, 2025
a9b074c
fix merge conflicts
tersec Aug 9, 2025
3e7332d
increase maxblobless in block quarantine
tersec Aug 9, 2025
22f978c
log some block things
tersec Aug 10, 2025
bb1be88
find what's adding unviables
tersec Aug 10, 2025
d6cb6c2
should plug the last logging holes in what can add to unviables
tersec Aug 11, 2025
8e2931a
adjust which slots finalized checkpoints cover for sidecarless pruning
tersec Aug 11, 2025
b3d520f
hm
tersec Aug 12, 2025
eac23d6
hm2
tersec Aug 12, 2025
a0dc078
get in some vcus reviews
agnxsh Aug 12, 2025
7a5248e
bump up max sidecarless
agnxsh Aug 15, 2025
2d1b70a
elide one copy
tersec Aug 18, 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
5 changes: 3 additions & 2 deletions beacon_chain/beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import
blockchain_dag, blob_quarantine, block_quarantine, consensus_manager,
attestation_pool, sync_committee_msg_pool, validator_change_pool,
blockchain_list],
./spec/datatypes/[base, altair],
./spec/datatypes/[base, altair, fulu],
./spec/eth2_apis/dynamic_fee_recipients,
./spec/signatures_batch,
./sync/[sync_manager, request_manager, sync_types],
./sync/[sync_manager, request_manager, sync_types, validator_custody],
./validators/[
action_tracker, message_router, validator_monitor, validator_pool,
keystore_management],
Expand Down Expand Up @@ -96,6 +96,7 @@ type
eventBus*: EventBus
vcProcess*: Process
requestManager*: RequestManager
validatorCustody*: ValidatorCustodyRef
syncManager*: SyncManager[Peer, PeerId]
backfiller*: SyncManager[Peer, PeerId]
untrustedManager*: SyncManager[Peer, PeerId]
Expand Down
3 changes: 3 additions & 0 deletions beacon_chain/consensus_object_pools/blob_quarantine.nim
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ type

BlobQuarantine* =
SidecarQuarantine[BlobSidecar, OnBlobSidecarCallback]

ColumnQuarantine* =
SidecarQuarantine[DataColumnSidecar, OnDataColumnSidecarCallback]

ColumnQuarantineRef* = ref ColumnQuarantine

func isEmpty[A](holder: SidecarHolder[A]): bool =
holder.kind == SidecarHolderKind.Empty

Expand Down
19 changes: 11 additions & 8 deletions beacon_chain/consensus_object_pools/block_pools_types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ type

era*: EraDB

eaSlot*: Slot
## Earliest available slot is the earliest slot at which the BN can
## guarantee serving blocks with sidecars.

erSlot*: Slot
## Earliest refilled slot is the earliest slot at which excess
## DataColumnSidecar downloading finishes, if erSlot = GENESIS_SLOT
## we can deduce that validator custody is inactive.

validatorMonitor*: ref ValidatorMonitor

forkBlocks*: HashSet[KeyedBlockRef]
Expand Down Expand Up @@ -291,6 +300,7 @@ type
BlockData* = object
blck*: ForkedSignedBeaconBlock
blob*: Opt[BlobSidecars]
dataColumn*: Opt[DataColumnSidecars]

OnBlockAdded*[T: ForkyTrustedSignedBeaconBlock] = proc(
blckRef: BlockRef, blck: T, epochRef: EpochRef,
Expand Down Expand Up @@ -397,14 +407,7 @@ func horizon*(dag: ChainDAGRef): Slot =
GENESIS_SLOT

func earliestAvailableSlot*(dag: ChainDAGRef): Slot =
if dag.backfill.slot < dag.tail.slot and
dag.backfill.slot != GENESIS_SLOT:
# When the BN is backfilling, backfill slot is the earliest
# persisted block.
dag.backfill.slot
else:
# When the BN has backfilled, tail moves progressively.
dag.tail.slot
max(dag.eaSlot, dag.erSlot)

template epoch*(e: EpochRef): Epoch = e.key.epoch

Expand Down
36 changes: 27 additions & 9 deletions beacon_chain/consensus_object_pools/block_quarantine.nim
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func cleanupUnviable(quarantine: var Quarantine) =
break # Cannot modify while for-looping
quarantine.unviable.del(toDel)

func removeUnviableOrphanTree(
proc removeUnviableOrphanTree(
quarantine: var Quarantine,
toCheck: var seq[Eth2Digest],
tbl: var OrderedTable[(Eth2Digest, ValidatorSig), ForkedSignedBeaconBlock]
Expand All @@ -192,13 +192,15 @@ func removeUnviableOrphanTree(

for k in toRemove:
tbl.del k
info "FOO9 in removeUnviableOrphans",
blockRoot = shortLog(k[0])
quarantine.unviable[k[0]] = ()

toRemove.setLen(0)

checked

func removeUnviableSidecarlessTree(
proc removeUnviableSidecarlessTree(
quarantine: var Quarantine,
toCheck: var seq[Eth2Digest],
tbl: var OrderedTable[Eth2Digest, ForkedSignedBeaconBlock]) =
Expand All @@ -218,11 +220,16 @@ func removeUnviableSidecarlessTree(

for k in toRemove:
tbl.del k
quarantine.unviable[k] = ()
info "FOOA in removeUnviableSidecarlessTree",
blockRoot = shortLog(k)
#quarantine.unviable[k] = ()

toRemove.setLen(0)

func addUnviable*(quarantine: var Quarantine, root: Eth2Digest) =
# TODO revert to func when addUnviable logging gone
proc addUnviable*(quarantine: var Quarantine, root: Eth2Digest) =
info "FOO8 in addUnviable", blockRoot = shortLog(root), st = getStackTrace()

# Unviable - don't try to download again!
quarantine.missing.del(root)

Expand All @@ -236,7 +243,8 @@ func addUnviable*(quarantine: var Quarantine, root: Eth2Digest) =

quarantine.unviable[root] = ()

func cleanupOrphans(quarantine: var Quarantine, finalizedSlot: Slot) =
# TODO revert to func when addUnviable logging gone
proc cleanupOrphans(quarantine: var Quarantine, finalizedSlot: Slot) =
var toDel: seq[(Eth2Digest, ValidatorSig)]

for k, v in quarantine.orphans:
Expand All @@ -247,7 +255,8 @@ func cleanupOrphans(quarantine: var Quarantine, finalizedSlot: Slot) =
quarantine.addUnviable k[0]
quarantine.orphans.del k

func cleanupSidecarless(quarantine: var Quarantine, finalizedSlot: Slot) =
# TODO revert to func when addUnviable logging gone
proc cleanupSidecarless(quarantine: var Quarantine, finalizedSlot: Slot) =
var toDel: seq[Eth2Digest]

for k, v in quarantine.sidecarless:
Expand All @@ -265,7 +274,8 @@ func clearAfterReorg*(quarantine: var Quarantine) =
quarantine.missing.reset()
quarantine.orphans.reset()

func pruneAfterFinalization*(
# TODO revert to func when addUnviable logging gone
proc pruneAfterFinalization*(
quarantine: var Quarantine,
epoch: Epoch,
needsBackfill: bool
Expand All @@ -276,14 +286,14 @@ func pruneAfterFinalization*(
# Because Quarantine could be used as temporary storage for blocks which
# do not have sidecars yet, we should not prune blocks which are behind
# `MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS` epoch. Otherwise we will not
# be able to backfill this blocks properly.
# be able to backfill these blocks properly.
if epoch < quarantine.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS:
Epoch(0)
else:
epoch - quarantine.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
else:
epoch
slot = (startEpoch + 1).start_slot()
slot = startEpoch.start_slot()

quarantine.cleanupSidecarless(slot)

Expand Down Expand Up @@ -422,6 +432,14 @@ func popColumnless*(
): Opt[ForkedSignedBeaconBlock] {.deprecated.} =
quarantine.popSidecarless(root)

func getColumnless*(
quarantine: var Quarantine,
root: Eth2Digest): Opt[ForkedSignedBeaconBlock] =
try:
Opt.some(quarantine.sidecarless[root])
except KeyError:
Opt.none(ForkedSignedBeaconBlock)

func popBlobless*(
quarantine: var Quarantine,
root: Eth2Digest
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/consensus_object_pools/blockchain_list.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# beacon_chain
# Copyright (c) 2018-2024 Status Research & Development GmbH
# Copyright (c) 2018-2025 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
Expand Down
1 change: 0 additions & 1 deletion beacon_chain/el/el_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,6 @@ proc sendGetBlobsV2*(
return err()

let deadline = sleepAsync(GETBLOBS_TIMEOUT)

var bestIdx: Opt[int]

while true:
Expand Down
4 changes: 2 additions & 2 deletions beacon_chain/el/engine_api_conversions.nim
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ func asConsensusType*(
# The `mapIt` calls below are necessary only because we use different distinct
# types for KZG commitments and Blobs in the `web3` and the `deneb` spec types.
# Both are defined as `array[N, byte]` under the hood.
blobsBundle: deneb.BlobsBundle(
blobsBundle: fulu.BlobsBundleV2(
commitments: KzgCommitments.init(
payload.blobsBundle.commitments.mapIt(
kzg_abi.KzgCommitment(bytes: it.data))),
proofs: KzgProofs.init(
proofs: KzgProofsV2.init(
payload.blobsBundle.proofs.mapIt(
kzg_abi.KzgProof(bytes: it.data))),
blobs: Blobs.init(
Expand Down
Loading