sync rework

This commit is contained in:
Agnish Ghosh 2024-10-10 00:08:07 +05:30
parent 1927366eaa
commit 028925851c
2 changed files with 4 additions and 5 deletions

View File

@ -426,8 +426,8 @@ proc initFullNode(
# to put it in columnless quarantine.
if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck):
return err(VerifierError.UnviableFork)
return err(VerifierError.MissingParent)
else:
return err(VerifierError.MissingParent)
else:
let data_columns = dataColumnQuarantine[].popDataColumns(forkyBlck.root, forkyBlck)
return await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,

View File

@ -360,12 +360,11 @@ func groupDataColumns*[T](req: SyncRequest[T],
# The following data column sidecars, where they exist, MUST be sent in consecutive (slot, index) order.
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/_features/eip7594/p2p-interface.md
let header = forkyBlck.toSignedBeaconBlockHeader()
for column_idx, kzg_commitment in kzgs:
for column_idx in data_columns
if column_cursor >= data_columns.len:
return err("DataColumnSidecar: response too short")
let data_column_sidecar = data_columns[column_cursor]
if kzg_commitment notin data_column_sidecar.kzg_commitments:
return err("DataColumnSidecar: unexpected kzg_commitment")
if data_column_sidecar.index != ColumnIndex column_idx
if data_column_sidecar.signed_block_header != header:
return err("DataColumnSidecar: unexpected signed_block_header")
grouped[block_idx].add(data_column_sidecar)