mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-17 00:47:03 +00:00
add some log data for fishy trusted attestations (#4049)
This commit is contained in:
parent
574b84f96f
commit
59092e5b3b
@ -99,28 +99,38 @@ iterator get_attesting_indices*(
|
|||||||
let
|
let
|
||||||
slot =
|
slot =
|
||||||
check_attestation_slot_target(attestation.data).valueOr:
|
check_attestation_slot_target(attestation.data).valueOr:
|
||||||
warn "Invalid attestation slot"
|
warn "Invalid attestation slot in trusted attestation",
|
||||||
|
attestation = shortLog(attestation.data)
|
||||||
doAssert strictVerification notin dag.updateFlags
|
doAssert strictVerification notin dag.updateFlags
|
||||||
break
|
break
|
||||||
blck =
|
blck =
|
||||||
dag.getBlockRef(attestation.data.beacon_block_root).valueOr:
|
dag.getBlockRef(attestation.data.beacon_block_root).valueOr:
|
||||||
# Attestation block unknown
|
# Attestation block unknown - this is fairly common because we
|
||||||
|
# discard alternative histories on restart
|
||||||
break
|
break
|
||||||
target =
|
target =
|
||||||
blck.atCheckpoint(attestation.data.target).valueOr:
|
blck.atCheckpoint(attestation.data.target).valueOr:
|
||||||
warn "Invalid attestation target"
|
warn "Unknown attestation target in trusted attestation",
|
||||||
|
blck = shortLog(blck),
|
||||||
|
attestation = shortLog(attestation.data)
|
||||||
doAssert strictVerification notin dag.updateFlags
|
doAssert strictVerification notin dag.updateFlags
|
||||||
break
|
break
|
||||||
shufflingRef =
|
shufflingRef =
|
||||||
dag.getShufflingRef(target.blck, target.slot.epoch, false).valueOr:
|
dag.getShufflingRef(target.blck, target.slot.epoch, false).valueOr:
|
||||||
warn "Attestation shuffling not found"
|
warn "Attestation shuffling not found",
|
||||||
|
blck = shortLog(blck),
|
||||||
|
attestation = shortLog(attestation.data)
|
||||||
|
|
||||||
doAssert strictVerification notin dag.updateFlags
|
doAssert strictVerification notin dag.updateFlags
|
||||||
break
|
break
|
||||||
|
|
||||||
committeesPerSlot = get_committee_count_per_slot(shufflingRef)
|
committeesPerSlot = get_committee_count_per_slot(shufflingRef)
|
||||||
committeeIndex =
|
committeeIndex =
|
||||||
CommitteeIndex.init(attestation.data.index, committeesPerSlot).valueOr:
|
CommitteeIndex.init(attestation.data.index, committeesPerSlot).valueOr:
|
||||||
warn "Unexpected committee index in block attestation"
|
warn "Unexpected committee index in trusted attestation",
|
||||||
|
blck = shortLog(blck),
|
||||||
|
attestation = shortLog(attestation.data)
|
||||||
|
|
||||||
doAssert strictVerification notin dag.updateFlags
|
doAssert strictVerification notin dag.updateFlags
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user