More blob tweaks/fixes from running in devnet (#4933)
* BeaconNode: don't call fetchMissingblobs with empty list * More logging * BlockProcessor.checkBloblessSignature: Add missing return value
This commit is contained in:
parent
4e715c877f
commit
be3f5b1eac
|
@ -378,6 +378,7 @@ proc checkBloblessSignature(self: BlockProcessor,
|
||||||
dag.validatorKey(proposer).get(),
|
dag.validatorKey(proposer).get(),
|
||||||
signed_beacon_block.signature):
|
signed_beacon_block.signature):
|
||||||
return err("checkBloblessSignature: Invalid proposer signature")
|
return err("checkBloblessSignature: Invalid proposer signature")
|
||||||
|
ok()
|
||||||
|
|
||||||
proc storeBlock*(
|
proc storeBlock*(
|
||||||
self: ref BlockProcessor, src: MsgSource, wallTime: BeaconTime,
|
self: ref BlockProcessor, src: MsgSource, wallTime: BeaconTime,
|
||||||
|
|
|
@ -1377,8 +1377,9 @@ proc handleMissingBlobs(node: BeaconNode) =
|
||||||
blobless.root)
|
blobless.root)
|
||||||
)
|
)
|
||||||
node.quarantine[].removeBlobless(blobless)
|
node.quarantine[].removeBlobless(blobless)
|
||||||
debug "Requesting detected missing blobs", blobs = shortLog(fetches)
|
if fetches.len > 0:
|
||||||
node.requestManager.fetchMissingBlobs(fetches)
|
debug "Requesting detected missing blobs", blobs = shortLog(fetches)
|
||||||
|
node.requestManager.fetchMissingBlobs(fetches)
|
||||||
|
|
||||||
proc handleMissingBlocks(node: BeaconNode) =
|
proc handleMissingBlocks(node: BeaconNode) =
|
||||||
let missingBlocks = node.quarantine[].checkMissing()
|
let missingBlocks = node.quarantine[].checkMissing()
|
||||||
|
|
|
@ -598,6 +598,7 @@ func shortLog*(v: SomeBeaconBlock): auto =
|
||||||
sync_committee_participants: v.body.sync_aggregate.num_active_participants,
|
sync_committee_participants: v.body.sync_aggregate.num_active_participants,
|
||||||
block_number: 0'u64, # Bellatrix compat
|
block_number: 0'u64, # Bellatrix compat
|
||||||
fee_recipient: "",
|
fee_recipient: "",
|
||||||
|
blob_kzg_commitments_len: 0, # Deneb compat
|
||||||
)
|
)
|
||||||
|
|
||||||
func shortLog*(v: SomeSignedBeaconBlock): auto =
|
func shortLog*(v: SomeSignedBeaconBlock): auto =
|
||||||
|
|
|
@ -403,6 +403,7 @@ func shortLog*(v: SomeBeaconBlock): auto =
|
||||||
block_number: v.body.execution_payload.block_number,
|
block_number: v.body.execution_payload.block_number,
|
||||||
# TODO checksum hex? shortlog?
|
# TODO checksum hex? shortlog?
|
||||||
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
|
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
|
||||||
|
blob_kzg_commitments_len: 0, # Deneb compat
|
||||||
)
|
)
|
||||||
|
|
||||||
func shortLog*(v: SomeSignedBeaconBlock): auto =
|
func shortLog*(v: SomeSignedBeaconBlock): auto =
|
||||||
|
|
|
@ -587,6 +587,7 @@ func shortLog*(v: SomeBeaconBlock): auto =
|
||||||
block_number: v.body.execution_payload.block_number,
|
block_number: v.body.execution_payload.block_number,
|
||||||
# TODO checksum hex? shortlog?
|
# TODO checksum hex? shortlog?
|
||||||
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
|
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
|
||||||
|
blob_kzg_commitments_len: 0, # Deneb compat
|
||||||
)
|
)
|
||||||
|
|
||||||
func shortLog*(v: SomeSignedBeaconBlock): auto =
|
func shortLog*(v: SomeSignedBeaconBlock): auto =
|
||||||
|
|
|
@ -534,6 +534,7 @@ func shortLog*(v: SomeBeaconBlock): auto =
|
||||||
block_number: v.body.execution_payload.block_number,
|
block_number: v.body.execution_payload.block_number,
|
||||||
# TODO checksum hex? shortlog?
|
# TODO checksum hex? shortlog?
|
||||||
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
|
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
|
||||||
|
blob_kzg_commitments_len: v.body.blob_kzg_commitments.len(),
|
||||||
)
|
)
|
||||||
|
|
||||||
func shortLog*(v: BlobSidecar): auto =
|
func shortLog*(v: BlobSidecar): auto =
|
||||||
|
|
|
@ -298,6 +298,7 @@ func shortLog*(v: SomeBeaconBlock): auto =
|
||||||
sync_committee_participants: -1, # Altair logging compatibility
|
sync_committee_participants: -1, # Altair logging compatibility
|
||||||
block_number: 0'u64, # Bellatrix compat
|
block_number: 0'u64, # Bellatrix compat
|
||||||
fee_recipient: "",
|
fee_recipient: "",
|
||||||
|
blob_kzg_commitments_len: 0, # Deneb compat
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: There should be only a single generic HashedBeaconState definition
|
# TODO: There should be only a single generic HashedBeaconState definition
|
||||||
|
|
|
@ -85,6 +85,7 @@ func shortLog*(v: BlindedBeaconBlock): auto =
|
||||||
block_number: v.body.execution_payload_header.block_number,
|
block_number: v.body.execution_payload_header.block_number,
|
||||||
# TODO checksum hex? shortlog?
|
# TODO checksum hex? shortlog?
|
||||||
fee_recipient: to0xHex(v.body.execution_payload_header.fee_recipient.data),
|
fee_recipient: to0xHex(v.body.execution_payload_header.fee_recipient.data),
|
||||||
|
blob_kzg_commitments_len: 0, # Deneb compat
|
||||||
)
|
)
|
||||||
|
|
||||||
func shortLog*(v: SignedBlindedBeaconBlock): auto =
|
func shortLog*(v: SignedBlindedBeaconBlock): auto =
|
||||||
|
|
|
@ -74,6 +74,7 @@ func shortLog*(v: BlindedBeaconBlock): auto =
|
||||||
# TODO checksum hex? shortlog?
|
# TODO checksum hex? shortlog?
|
||||||
fee_recipient: to0xHex(v.body.execution_payload_header.fee_recipient.data),
|
fee_recipient: to0xHex(v.body.execution_payload_header.fee_recipient.data),
|
||||||
#bls_to_execution_changes_len: v.body.bls_to_execution_changes.len(), # TODO validator_client/block_service.nim seems to want same shape of shortLogs across all block types
|
#bls_to_execution_changes_len: v.body.bls_to_execution_changes.len(), # TODO validator_client/block_service.nim seems to want same shape of shortLogs across all block types
|
||||||
|
blob_kzg_commitments_len: 0, # Deneb compat
|
||||||
)
|
)
|
||||||
|
|
||||||
func shortLog*(v: SignedBlindedBeaconBlock): auto =
|
func shortLog*(v: SignedBlindedBeaconBlock): auto =
|
||||||
|
|
|
@ -153,6 +153,9 @@ proc fetchAncestorBlocksFromNetwork(rman: RequestManager,
|
||||||
peer_score = peer.getScore()
|
peer_score = peer.getScore()
|
||||||
peer.updateScore(PeerScoreUnviableFork)
|
peer.updateScore(PeerScoreUnviableFork)
|
||||||
elif gotGoodBlock:
|
elif gotGoodBlock:
|
||||||
|
debug "Request manager got good block",
|
||||||
|
peer = peer, blocks = shortLog(items)
|
||||||
|
|
||||||
# We reward peer only if it returns something.
|
# We reward peer only if it returns something.
|
||||||
peer.updateScore(PeerScoreGoodValues)
|
peer.updateScore(PeerScoreGoodValues)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue