avoid copying keys for trusted signatures

this removes `is_valid_indexed_attestion` from performance benchmarks
when replaying blocks
This commit is contained in:
Jacek Sieka 2021-01-25 17:09:31 +01:00 committed by zah
parent 8f6ce4f88d
commit 5ca10d3de2
2 changed files with 3 additions and 3 deletions

View File

@ -131,7 +131,7 @@ proc is_valid_indexed_attestation*(
return err("indexed attestation: indices not sorted and unique")
# Verify aggregate signature
if skipBLSValidation notin flags:
if not (skipBLSValidation in flags or indexed_attestation.signature is TrustedSig):
let pubkeys = mapIt(
indexed_attestation.attesting_indices, epochRef.validator_keys[it])
if not verify_attestation_signature(
@ -155,7 +155,7 @@ proc is_valid_indexed_attestation*(
return err("indexed_attestation: no attesting indices")
# Verify aggregate signature
if skipBLSValidation notin flags:
if not (skipBLSValidation in flags or attestation.signature is TrustedSig):
let pubkeys = mapIt(
attesting_indices, epochRef.validator_keys[it])
if not verify_attestation_signature(

View File

@ -465,7 +465,7 @@ proc is_valid_indexed_attestation*(
return err("indexed attestation: indices not sorted and unique")
# Verify aggregate signature
if skipBLSValidation notin flags:
if not (skipBLSValidation in flags or indexed_attestation.signature is TrustedSig):
let pubkeys = mapIt(
indexed_attestation.attesting_indices, state.validators[it].pubkey)
if not verify_attestation_signature(