Skip to content

Commit 833d6bf

Browse files
committed
TOSQUASH some TODOs about the GSM leaving CaughtUp
1 parent 8f995d1 commit 833d6bf

File tree

1 file changed

+14
-1
lines changed
  • ouroboros-consensus/src/unstable-consensus-testlib/Test

1 file changed

+14
-1
lines changed

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,19 @@ import Test.CsjModel.StateTypes
4848
-------------------------------------------------------------------------------}
4949

5050
-- | Events the CSJ logic needs to react to
51+
--
52+
-- TODO copy <https://github.com/IntersectMBO/ouroboros-consensus/pull/1492>'s
53+
-- explanation that a @Reengage@ stimulus is unnecessary even when the GSM
54+
-- transitions out of 'Ouroboros.Consensus.Node.GsmState.CaughtUp'
5155
data CsjStimulus p a =
5256
-- | The peer responded to a ChainSync message
5357
ChainSyncReply !(ChainSyncReply p a)
5458
|
55-
-- | The peer just connected
59+
-- | An upstream peer just connected
60+
--
61+
-- Note that this should simply not be called when the Genesis State
62+
-- Machine (GSM) is in the 'Ouroboros.Consensus.Node.GsmState.CaughtUp'
63+
-- state.
5664
--
5765
-- The argument is the payload for the current immutable tip.
5866
Connect !a
@@ -1164,6 +1172,11 @@ newJumpRequest2 y = \jump ->
11641172
-- Discards however much of the new 'JumpRequest' the Jumper has already
11651173
-- rejected via 'anticomm' and then builds the final 'Bisecting' if any jump
11661174
-- points remain.
1175+
--
1176+
-- TODO how much more complicated would this logic be if the invariant for
1177+
-- Jumpers were merely @'candidate' extends 'comm'@ rather than @'candidate' ==
1178+
-- 'comm'@? Letting candidates exceed commitments seems like it could reduce
1179+
-- the cost of the GSM transition from CaughtUp to (Pre)Syncing.
11671180
newJumpRequest3 ::
11681181
Ord p
11691182
=> Set p

0 commit comments

Comments
 (0)