mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Fix proof-of-possession issues.
These were introduced in an earlier commit
This commit is contained in:
@@ -140,7 +140,7 @@ fn build_block(state: &mut BeaconState, keypairs: &[Keypair], spec: &ChainSpec)
|
||||
|
||||
// Insert the maximum possible number of `Deposit` objects.
|
||||
for i in 0..spec.max_deposits {
|
||||
builder.insert_deposit(32_000_000_000, state.deposit_index + i, spec);
|
||||
builder.insert_deposit(32_000_000_000, state.deposit_index + i, state, spec);
|
||||
}
|
||||
|
||||
// Insert the maximum possible number of `Exit` objects.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use super::errors::{DepositInvalid as Invalid, DepositValidationError as Error};
|
||||
use bls::verify_proof_of_possession;
|
||||
use hashing::hash;
|
||||
use merkle_proof::verify_merkle_proof;
|
||||
use ssz::ssz_encode;
|
||||
@@ -27,13 +26,14 @@ pub fn verify_deposit(
|
||||
spec: &ChainSpec,
|
||||
) -> Result<(), Error> {
|
||||
verify!(
|
||||
// TODO: update proof of possession.
|
||||
//
|
||||
// https://github.com/sigp/lighthouse/issues/239
|
||||
verify_proof_of_possession(
|
||||
&deposit.deposit_data.deposit_input.proof_of_possession,
|
||||
&deposit.deposit_data.deposit_input.pubkey
|
||||
),
|
||||
deposit
|
||||
.deposit_data
|
||||
.deposit_input
|
||||
.validate_proof_of_possession(
|
||||
state.slot.epoch(spec.slots_per_epoch),
|
||||
&state.fork,
|
||||
spec
|
||||
),
|
||||
Invalid::BadProofOfPossession
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user