Skip to content

Commit ebd743b

Browse files
committed
TOSQUASH typos
1 parent 215a0ec commit ebd743b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

ouroboros-consensus/src/unstable-consensus-testlib/Test/CsjModel.hs

+13-13
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ data CsjClientState p = CsjClientState {
9494
-- | the greatest point the peer has accepted as part of a jump
9595
--
9696
-- If 'latestJump' is 'Origin', then this is the immutable tip as of when
97-
-- the peer connected (and so is the Dynamo's, which means the Dynamo'S
97+
-- the peer connected (and so is the Dynamo's, which means the Dynamo's
9898
-- 'comm' cannot be any younger than this peer's 'comm').
9999
comm :: !(WithOrigin p)
100100
}
@@ -183,8 +183,8 @@ trimCandidate y =
183183

184184
-- | A 'MsgFindIntersect' for 'comm'
185185
--
186-
-- minor optimization opportunity: if the Jumpers latest response was
187-
-- @MsgIntersectionFound@ then this could be 'NoReset'.
186+
-- Minor optimization opportunity: if the Jumper's latest response was
187+
-- @MsgIntersectionFound@ then this could be skipped.
188188
promotionMessage :: CsjClientState p -> CsjReaction p
189189
promotionMessage = MsgFindIntersect . comm
190190

@@ -269,12 +269,12 @@ nextMsgFindIntersect2 bi =
269269
-- Dynamo, and so by offering the whole jump in the first message,
270270
-- load on honest Jumpers is minimized: one message per jump.
271271
Just{} -> neMid nyd
272-
-- TODO At least for the reference Haskell Cardano node, each
273-
-- additional point in the 'MsgFindIntersect' message is most
274-
-- negligible unless they're in different ImmDB chunk files. So
275-
-- this logic here could include more points (perhaps once all of
276-
-- @nyd@ is in the same chunk file) in order to ensure the
277-
-- bisection requires fewer round trips while only increasing the
272+
-- TODO At least for the reference Haskell Cardano node, the cost
273+
-- of each additional point in the 'MsgFindIntersect' message is
274+
-- mostly negligible unless they're in different ImmDB chunk files.
275+
-- So this logic here could include more points (perhaps once all
276+
-- of @nyd@ is in the same chunk file) in order to ensure the
277+
-- bisection requires fewer round trips while increasing the
278278
-- upstream per-message cost only negligibly.
279279
where
280280
nyd = notYetDetermined bi
@@ -971,7 +971,7 @@ csjReactions env x pid = fmap (issueNextJump env . backfill) . \case
971971
--
972972
-- Beyond those invariants, it doesn't matter which Jumper or Objector
973973
-- backfills as the Dynamo nor which Jumper backfills as the Objector for the
974-
-- oldest 'comm', as long as ties are broken in a way that ensures a peer that
974+
-- oldest 'Class', as long as ties are broken in a way that ensures a peer that
975975
-- satisifes the Honest Availability Assumption will eventually become Dynamo.
976976
-- The 'queue' mechanism achieves that without overreacting to 'Starvation'
977977
-- events (which are inevitable due to the imperfection of the public Internet
@@ -983,10 +983,10 @@ csjReactions env x pid = fmap (issueNextJump env . backfill) . \case
983983
-- is if the Dynamo starves ChainSel. It is excusable to demote that Dynamo
984984
-- since it will only happen at most once to each honest peer until a peer that
985985
-- satisfies the Honest Availability Assumption becomes the Dynamo, which will
986-
-- remain the Dynamo until the end of the sync.
986+
-- remain the Dynamo until the end of the sync (or the next networking hiccup).
987987
--
988-
-- The prohibition on demoting Objectors prevents the CSJ design from doing
989-
-- both of the following.
988+
-- The prohibition on demoting Objectors is incompatible with a specification
989+
-- that does both of the following simultaneously.
990990
--
991991
-- - Promoting a Jumper to Objector before all Jumpers have finished bisecting.
992992
--

ouroboros-consensus/src/unstable-consensus-testlib/Test/CsjModel/NonEmptySeq.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data BinarySearchResult =
6262

6363
neBinarySearch :: (a -> Bool) -> NonEmptySeq a -> BinarySearchResult
6464
neBinarySearch predicate (UnsafeNonEmptySeq xs) =
65-
finish $ go l0 r0
65+
finish $ go l0 r0
6666
where
6767
l0 = negate 1
6868
r0 = length xs

0 commit comments

Comments
 (0)