From 1a86ae562a24f06dfbc77a383d8c1fa553ba49c9 Mon Sep 17 00:00:00 2001 From: Damian Nadales Date: Wed, 29 May 2019 15:38:35 +0200 Subject: [PATCH] Minor corrections before PR --- byron/ledger/executable-spec/src/Ledger/Update.hs | 5 +++-- byron/ledger/executable-spec/src/Ledger/Update/Generators.hs | 2 +- byron/ledger/formal-spec/notation.tex | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/byron/ledger/executable-spec/src/Ledger/Update.hs b/byron/ledger/executable-spec/src/Ledger/Update.hs index 2675c6105e8..e3428c8d1a8 100644 --- a/byron/ledger/executable-spec/src/Ledger/Update.hs +++ b/byron/ledger/executable-spec/src/Ledger/Update.hs @@ -83,7 +83,8 @@ data PParams = PParams -- TODO: this should be a module of @cs-ledger@. , _cfmThd :: Int -- TODO: this should be a double -- ^ Update proposal confirmation threshold (number of votes) , _upAdptThd :: Double - -- ^ Update adoption threshold (number of block issuers) + -- ^ Update adoption threshold: a proportion of block issuers that have to + -- endorse a given version to become candidate for adoption , _stableAfter :: Core.BlockCount -- ^ Chain stability parameter , _factorA :: Int @@ -554,7 +555,7 @@ instance STS FADS where data UPEND -- | Find the key that corresponds to the value satisfying the given predicate. --- In case more than one key is found this function returns Nothing. +-- In case zero or more than one key is found this function returns Nothing. findKey :: (v -> Bool) -> Map k v -> Maybe (k, v) findKey p m = case Map.toList (Map.filter p m) of diff --git a/byron/ledger/executable-spec/src/Ledger/Update/Generators.hs b/byron/ledger/executable-spec/src/Ledger/Update/Generators.hs index 52e67716e79..db61fd725cc 100644 --- a/byron/ledger/executable-spec/src/Ledger/Update/Generators.hs +++ b/byron/ledger/executable-spec/src/Ledger/Update/Generators.hs @@ -69,7 +69,7 @@ pparamsGen = <*> slotBlockGen <*> Gen.integral (Range.linear (0 :: Natural) 1000) -- scriptVersion <*> Gen.integral (Range.linear 0 1000) -- cfmThd - <*> Gen.double (Range.constant 0 1) -- upAdptThd + <*> Gen.double (Range.constant 0 1) -- upAdptThd <*> pure 0 -- factor @a@ <*> pure 0 -- factor @b@ where diff --git a/byron/ledger/formal-spec/notation.tex b/byron/ledger/formal-spec/notation.tex index a2d466016a6..32201690045 100644 --- a/byron/ledger/formal-spec/notation.tex +++ b/byron/ledger/formal-spec/notation.tex @@ -63,7 +63,7 @@ \section{Notation}\label{sec:notation} pattern, then the premise does not hold, and the rule cannot trigger. \item[Ceiling] Given a number $n \in \mathbb{R}$, $\ceil{n}$ represents the - ceiling of $n$. + ceiling of $n$, and $\floor{n}$ represents its floor. \end{description} \begin{figure}[htb]