From 1040c80cd8dfd7cf7cdbb670f742fb3ba071caf1 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sun, 8 Sep 2019 16:28:01 -0400 Subject: [PATCH] Add noisey debugging to attestation processing --- .../per_block_processing/is_valid_indexed_attestation.rs | 9 +++++++++ eth2/utils/bls/src/signature_set.rs | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs b/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs index 54a48d7b7..34802ef02 100644 --- a/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs +++ b/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs @@ -55,6 +55,15 @@ pub fn is_valid_indexed_attestation( check_sorted(&bit_0_indices)?; check_sorted(&bit_1_indices)?; + dbg!(indexed_attestation_signature_set( + state, + &indexed_attestation.signature, + &indexed_attestation, + spec + )?); + dbg!(&bit_0_indices); + dbg!(&bit_1_indices); + if verify_signatures.is_true() { verify!( indexed_attestation_signature_set( diff --git a/eth2/utils/bls/src/signature_set.rs b/eth2/utils/bls/src/signature_set.rs index 4b6065f9f..df1636f1d 100644 --- a/eth2/utils/bls/src/signature_set.rs +++ b/eth2/utils/bls/src/signature_set.rs @@ -7,7 +7,7 @@ use milagro_bls::AggregateSignature as RawAggregateSignature; type Message = Vec; type Domain = u64; -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct SignedMessage<'a> { signing_keys: Vec<&'a G1Point>, message: Message, @@ -25,7 +25,7 @@ impl<'a> SignedMessage<'a> { } } -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct SignatureSet<'a> { pub signature: &'a G2Point, signed_messages: Vec>,