-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to acquire tip by LocalStateQuery protocol client. #2875
Conversation
`IO a` is a monoid (semigroup) whenever `a` is a monoid (semigroup). This patch provides similar instance for `IOSim`.
QuickCheck property which checks that two codecs are compatible. Encoding a message with one of them and decoding it with the other one yields the original message.
6ccc61b
to
0379993
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Very neat, step by step.
ouroboros-network/protocol-tests/Ouroboros/Network/Protocol/LocalStateQuery/Test.hs
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/LocalStateQuery/Server.hs
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/Protocol/LocalStateQuery/Codec.hs
Outdated
Show resolved
Hide resolved
0984bd2
to
64ede0f
Compare
^ this is solved. |
64ede0f
to
6039aae
Compare
bors merge |
ouroboros-network/src/Ouroboros/Network/Protocol/LocalStateQuery/Codec.hs
Show resolved
Hide resolved
Build succeeded: |
@@ -140,16 +143,19 @@ checkOutcome k chain = conjoin . map (uncurry checkResult) | |||
(property False) | |||
| otherwise | |||
-> tabulate "Acquired" ["AcquireFailurePointTooOld"] $ property True | |||
checkResult Nothing = \case | |||
Right _result -> tabulate "Acquired" ["Success"] True | |||
Left failure -> counterexample ("acuire tip point resulted in " ++ show failure) False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"acuire" -> "acquired"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this in another pr.
@@ -1,5 +1,6 @@ | |||
{-# LANGUAGE NamedFieldPuns #-} | |||
{-# LANGUAGE ScopedTypeVariables #-} | |||
{-# LANGUAGE TupleSections #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just use (,,) pt
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this in another pr.
2875: Allow to acquire tip by LocalStateQuery protocol client. r=coot a=coot * Change mini-protocol description * Redefine codec, add a test which ensures that the new version of the codec is compatible with the previous one. * Updated consensus, including the server. * Added new supported version in `ouroboros-consensus-cardano` As a bonus: * `instance Monoid a => Monoid (IOSim s a)` Co-authored-by: Marcin Szamotulski <profunctor@pm.me>
ouroboros-consensus-cardano
As a bonus:
instance Monoid a => Monoid (IOSim s a)