From df5266988894f248694de1d186b7ecbcb2a88606 Mon Sep 17 00:00:00 2001 From: Kirk Baird Date: Mon, 11 Mar 2019 11:55:09 +1100 Subject: [PATCH] Add changes of create_proof_of_possession to pull --- beacon_node/src/main.rs | 2 +- eth2/utils/bls/src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon_node/src/main.rs b/beacon_node/src/main.rs index 072315b6b..eb0b38d5f 100644 --- a/beacon_node/src/main.rs +++ b/beacon_node/src/main.rs @@ -108,7 +108,7 @@ fn main() { deposit_input: DepositInput { pubkey: keypair.pk.clone(), withdrawal_credentials: Hash256::zero(), // Withdrawal not possible. - proof_of_possession: create_proof_of_possession(&keypair), + proof_of_possession: create_proof_of_possession(&keypair, Hash256::zero()), }, }, }) diff --git a/eth2/utils/bls/src/lib.rs b/eth2/utils/bls/src/lib.rs index 8b3f8b2ba..95f993ecb 100644 --- a/eth2/utils/bls/src/lib.rs +++ b/eth2/utils/bls/src/lib.rs @@ -20,6 +20,7 @@ pub const BLS_AGG_SIG_BYTE_SIZE: usize = 96; use hashing::hash; use ssz::ssz_encode; +use types::{DepositInput, Hash256}; /// For some signature and public key, ensure that the signature message was the public key and it /// was signed by the secret key that corresponds to that public key. @@ -31,7 +32,7 @@ pub fn verify_proof_of_possession(sig: &Signature, pubkey: &PublicKey) -> bool { // TODO: Update this method // https://github.com/sigp/lighthouse/issues/239 -pub fn create_proof_of_possession(keypair: &Keypair) -> Signature { +pub fn create_proof_of_possession(keypair: &Keypair, withdrawal_credentials: &Hash256) -> Signature { Signature::new(&ssz_encode(&keypair.pk), 0, &keypair.sk) }