mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-17 08:56:45 +00:00
parent
9ad8310157
commit
e14873757e
@ -208,9 +208,8 @@ proc attestationValidator*(
|
|||||||
attestation = shortLog(attestation)
|
attestation = shortLog(attestation)
|
||||||
subnet_id
|
subnet_id
|
||||||
|
|
||||||
let
|
let wallTime = self.getWallTime()
|
||||||
wallTime = self.getWallTime()
|
var (afterGenesis, wallSlot) = wallTime.toSlot()
|
||||||
(afterGenesis, wallSlot) = wallTime.toSlot()
|
|
||||||
|
|
||||||
if not afterGenesis:
|
if not afterGenesis:
|
||||||
notice "Attestation before genesis"
|
notice "Attestation before genesis"
|
||||||
@ -227,9 +226,11 @@ proc attestationValidator*(
|
|||||||
self.batchCrypto, attestation, wallTime, subnet_id, checkSignature)
|
self.batchCrypto, attestation, wallTime, subnet_id, checkSignature)
|
||||||
if v.isErr():
|
if v.isErr():
|
||||||
debug "Dropping attestation", validationError = v.error
|
debug "Dropping attestation", validationError = v.error
|
||||||
|
|
||||||
return v.error[0]
|
return v.error[0]
|
||||||
|
|
||||||
|
# Due to async validation the wallSlot here might have changed
|
||||||
|
(afterGenesis, wallSlot) = self.getWallTime().toSlot()
|
||||||
|
|
||||||
beacon_attestations_received.inc()
|
beacon_attestations_received.inc()
|
||||||
beacon_attestation_delay.observe(delay.toFloatSeconds())
|
beacon_attestation_delay.observe(delay.toFloatSeconds())
|
||||||
|
|
||||||
@ -250,9 +251,8 @@ proc aggregateValidator*(
|
|||||||
aggregate = shortLog(signedAggregateAndProof.message.aggregate)
|
aggregate = shortLog(signedAggregateAndProof.message.aggregate)
|
||||||
signature = shortLog(signedAggregateAndProof.signature)
|
signature = shortLog(signedAggregateAndProof.signature)
|
||||||
|
|
||||||
let
|
let wallTime = self.getWallTime()
|
||||||
wallTime = self.getWallTime()
|
var (afterGenesis, wallSlot) = wallTime.toSlot()
|
||||||
(afterGenesis, wallSlot) = wallTime.toSlot()
|
|
||||||
|
|
||||||
if not afterGenesis:
|
if not afterGenesis:
|
||||||
notice "Aggregate before genesis"
|
notice "Aggregate before genesis"
|
||||||
@ -276,6 +276,9 @@ proc aggregateValidator*(
|
|||||||
wallSlot
|
wallSlot
|
||||||
return v.error[0]
|
return v.error[0]
|
||||||
|
|
||||||
|
# Due to async validation the wallSlot here might have changed
|
||||||
|
(afterGenesis, wallSlot) = self.getWallTime().toSlot()
|
||||||
|
|
||||||
beacon_aggregates_received.inc()
|
beacon_aggregates_received.inc()
|
||||||
beacon_aggregate_delay.observe(delay.toFloatSeconds())
|
beacon_aggregate_delay.observe(delay.toFloatSeconds())
|
||||||
|
|
||||||
@ -286,8 +289,7 @@ proc aggregateValidator*(
|
|||||||
|
|
||||||
trace "Aggregate validated",
|
trace "Aggregate validated",
|
||||||
aggregator_index = signedAggregateAndProof.message.aggregator_index,
|
aggregator_index = signedAggregateAndProof.message.aggregator_index,
|
||||||
selection_proof = signedAggregateAndProof.message.selection_proof,
|
selection_proof = signedAggregateAndProof.message.selection_proof
|
||||||
wallSlot
|
|
||||||
|
|
||||||
self.attestationPool[].addAttestation(
|
self.attestationPool[].addAttestation(
|
||||||
signedAggregateAndProof.message.aggregate, attesting_indices, sig, wallSlot)
|
signedAggregateAndProof.message.aggregate, attesting_indices, sig, wallSlot)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user