mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-17 01:51:09 +00:00
disable valid csc set experimentally
This commit is contained in:
parent
121a3687b8
commit
04fd58efbf
@ -349,37 +349,37 @@ proc fetchDataColumnsFromNetwork(rman: RequestManager,
|
|||||||
try:
|
try:
|
||||||
peer = await rman.network.peerPool.acquire()
|
peer = await rman.network.peerPool.acquire()
|
||||||
|
|
||||||
# Create a peer list, which shall be later trimmed off as to which
|
# # Create a peer list, which shall be later trimmed off as to which
|
||||||
# of the peers have the valid custody columns
|
# # of the peers have the valid custody columns
|
||||||
peers.add(peer)
|
# peers.add(peer)
|
||||||
let validPeers = rman.constructValidCustodyPeers(peers)
|
# let validPeers = rman.constructValidCustodyPeers(peers)
|
||||||
if peer in validPeers:
|
# if peer in validPeers:
|
||||||
debug "Requesting data columns by root", peer = peer, columns = shortLog(colIdList),
|
debug "Requesting data columns by root", peer = peer, columns = shortLog(colIdList),
|
||||||
peer_score = peer.getScore()
|
peer_score = peer.getScore()
|
||||||
let columns = await dataColumnSidecarsByRoot(peer, DataColumnIdentifierList colIdList)
|
let columns = await dataColumnSidecarsByRoot(peer, DataColumnIdentifierList colIdList)
|
||||||
|
|
||||||
if columns.isOk:
|
if columns.isOk:
|
||||||
let ucolumns = columns.get()
|
let ucolumns = columns.get()
|
||||||
if not checkResponse(colIdList, ucolumns.asSeq()):
|
if not checkResponse(colIdList, ucolumns.asSeq()):
|
||||||
debug "Mismatched response to data columns by root",
|
debug "Mismatched response to data columns by root",
|
||||||
peer = peer, columns = shortLog(colIdList), ucolumns = len(ucolumns)
|
peer = peer, columns = shortLog(colIdList), ucolumns = len(ucolumns)
|
||||||
# peer.updateScore(PeerScoreBadResponse)
|
# peer.updateScore(PeerScoreBadResponse)
|
||||||
return
|
return
|
||||||
|
|
||||||
for col in ucolumns:
|
for col in ucolumns:
|
||||||
rman.dataColumnQuarantine[].put(col)
|
rman.dataColumnQuarantine[].put(col)
|
||||||
var curRoot: Eth2Digest
|
var curRoot: Eth2Digest
|
||||||
for col in ucolumns:
|
for col in ucolumns:
|
||||||
let block_root = hash_tree_root(col.signed_block_header.message)
|
let block_root = hash_tree_root(col.signed_block_header.message)
|
||||||
if block_root != curRoot:
|
if block_root != curRoot:
|
||||||
curRoot = block_root
|
curRoot = block_root
|
||||||
if (let o = rman.quarantine[].popColumnless(curRoot); o.isSome):
|
if (let o = rman.quarantine[].popColumnless(curRoot); o.isSome):
|
||||||
let col = o.unsafeGet()
|
let col = o.unsafeGet()
|
||||||
discard await rman.blockVerifier(col, false)
|
discard await rman.blockVerifier(col, false)
|
||||||
else:
|
else:
|
||||||
debug "Data columns by root request failed",
|
debug "Data columns by root request failed",
|
||||||
peer = peer, columns = shortLog(colIdList), err = columns.error()
|
peer = peer, columns = shortLog(colIdList), err = columns.error()
|
||||||
# peer.updateScore(PeerScoreNoValues)
|
# peer.updateScore(PeerScoreNoValues)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
if not(isNil(peer)):
|
if not(isNil(peer)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user