avoid copying keys for trusted signatures
this removes `is_valid_indexed_attestion` from performance benchmarks when replaying blocks
This commit is contained in:
parent
8f6ce4f88d
commit
5ca10d3de2
|
@ -131,7 +131,7 @@ proc is_valid_indexed_attestation*(
|
||||||
return err("indexed attestation: indices not sorted and unique")
|
return err("indexed attestation: indices not sorted and unique")
|
||||||
|
|
||||||
# Verify aggregate signature
|
# Verify aggregate signature
|
||||||
if skipBLSValidation notin flags:
|
if not (skipBLSValidation in flags or indexed_attestation.signature is TrustedSig):
|
||||||
let pubkeys = mapIt(
|
let pubkeys = mapIt(
|
||||||
indexed_attestation.attesting_indices, epochRef.validator_keys[it])
|
indexed_attestation.attesting_indices, epochRef.validator_keys[it])
|
||||||
if not verify_attestation_signature(
|
if not verify_attestation_signature(
|
||||||
|
@ -155,7 +155,7 @@ proc is_valid_indexed_attestation*(
|
||||||
return err("indexed_attestation: no attesting indices")
|
return err("indexed_attestation: no attesting indices")
|
||||||
|
|
||||||
# Verify aggregate signature
|
# Verify aggregate signature
|
||||||
if skipBLSValidation notin flags:
|
if not (skipBLSValidation in flags or attestation.signature is TrustedSig):
|
||||||
let pubkeys = mapIt(
|
let pubkeys = mapIt(
|
||||||
attesting_indices, epochRef.validator_keys[it])
|
attesting_indices, epochRef.validator_keys[it])
|
||||||
if not verify_attestation_signature(
|
if not verify_attestation_signature(
|
||||||
|
|
|
@ -465,7 +465,7 @@ proc is_valid_indexed_attestation*(
|
||||||
return err("indexed attestation: indices not sorted and unique")
|
return err("indexed attestation: indices not sorted and unique")
|
||||||
|
|
||||||
# Verify aggregate signature
|
# Verify aggregate signature
|
||||||
if skipBLSValidation notin flags:
|
if not (skipBLSValidation in flags or indexed_attestation.signature is TrustedSig):
|
||||||
let pubkeys = mapIt(
|
let pubkeys = mapIt(
|
||||||
indexed_attestation.attesting_indices, state.validators[it].pubkey)
|
indexed_attestation.attesting_indices, state.validators[it].pubkey)
|
||||||
if not verify_attestation_signature(
|
if not verify_attestation_signature(
|
||||||
|
|
Loading…
Reference in New Issue