Skip to content

Commit

Permalink
Adjust Protocol Update generators to honour extended voting period
Browse files Browse the repository at this point in the history
  • Loading branch information
uroboros committed Mar 17, 2020
1 parent b7a5402 commit 0e72f19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -434,12 +434,12 @@ getKESPeriodRenewalNo keys (KESPeriod kp) =
then n
else go rest (n + 1) k

-- | True if the given slot is within the last `slotsPrior`
-- | True if the given slot is within the last `2 * slotsPrior`
-- slots of the current epoch.
tooLateInEpoch :: SlotNo -> Bool
tooLateInEpoch s = runShelleyBase $ do
ei <- asks epochInfo
firstSlotNo <- epochInfoFirst ei (epochFromSlotNo s + 1)
slotsPrior_ <- asks slotsPrior

return (s >= firstSlotNo *- Duration slotsPrior_)
return (s >= firstSlotNo *- Duration (2 * slotsPrior_))
2 changes: 1 addition & 1 deletion shelley/chain-and-ledger/formal-spec/update.tex
Expand Up @@ -84,7 +84,7 @@ \subsection{Protocol Parameter Update Proposals}
Protocol updates are only allowed up until ($2\cdot\SlotsPrior$)-many slots before the
end of the epoch. The reason for this involves how we safely predict hard forks.
Changing the protocol version can result in a hard fork, and we would like an
entire stability period between when we know that an hard fork will neccessarily happen
entire stability period between when we know that a hard fork will necessarily happen
and when the current epoch ends.

\begin{itemize}
Expand Down

0 comments on commit 0e72f19

Please sign in to comment.