diff --git a/cryptarchia/cryptarchia.py b/cryptarchia/cryptarchia.py index 98ca0df..c88f83d 100644 --- a/cryptarchia/cryptarchia.py +++ b/cryptarchia/cryptarchia.py @@ -477,7 +477,7 @@ class Follower: ) -> bool: threshold_0, threshold_1 = lottery_threshold(self.config.active_slot_coeff, epoch_state.total_active_stake()) return ( - proof.verify(slot, current_state.nonce, threshold_0, threshold_1, current_state.commitments_lead, parent) # verify slot leader proof + proof.verify(slot, epoch_state.nonce() , threshold_0, threshold_1, current_state.commitments_lead, parent) # verify slot leader proof # TODO: remove it because membership verification is included in the proof verification along with the PoS lottery: and ( current_state.verify_eligible_to_lead(proof.commitment) diff --git a/cryptarchia/test_common.py b/cryptarchia/test_common.py index 2c2586e..05c6894 100644 --- a/cryptarchia/test_common.py +++ b/cryptarchia/test_common.py @@ -27,7 +27,7 @@ class TestNode: parent = self.follower.tip_id() epoch_state = self.epoch_state(slot) # TODO: use the correct leader commitment set - if leader_proof := self.leader.try_prove_slot_leader(epoch_state.total_active_stake(), self.follower.tip_state().nonce, slot, {self.leader.coin.commitment()}, parent): + if leader_proof := self.leader.try_prove_slot_leader(epoch_state.total_active_stake(), epoch_state.nonce(), slot, {self.leader.coin.commitment()}, parent): orphans = self.follower.unimported_orphans(parent) self.leader.coin = self.leader.coin.evolve() return BlockHeader(