fix failing lead verification

This commit is contained in:
mohab metwally
2022-11-25 19:51:00 +02:00
parent 1d5bfe492d
commit 30ba9705ed
2 changed files with 2 additions and 4 deletions

View File

@@ -61,9 +61,7 @@ pub struct LeadCoin {
pub coin2_commitment: pallas::Point,
/// Coin index
pub idx: u32,
/// Coin slot ID,
pub sl: pallas::Base,
/// Coin timestamp
/// Coin timestamp as slot index.
pub tau: pallas::Base,
/// Coin nonce
pub nonce: pallas::Base,
@@ -154,7 +152,6 @@ impl LeadCoin {
coin2_commitment,
// TODO: Should be abs slot
idx: u32::try_from(usize::from(leaf_pos)).unwrap(),
sl: pallas::Base::from(slot_index),
// Assume tau is sl for simplicity
tau,
nonce: pallas::Base::from(seed),

View File

@@ -847,6 +847,7 @@ impl ValidatorState {
return Err(Error::ProposalPublicValuesMismatched)
}
// Verify proposal public inputs
let prop_sn = lf.public_inputs[constants::PI_NULLIFIER_INDEX];
for sn in &self.consensus.leaders_nullifiers {