revert usage of slot randomness for epoch nonce

This commit is contained in:
thomaslavaur 2024-09-03 07:49:56 +02:00
parent 0ed2cd8aae
commit d50633b48b
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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(