-
Notifications
You must be signed in to change notification settings - Fork 720
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
Add fix and test for foldBlocks
#4627
Conversation
72e6017
to
a2bb587
Compare
Cardano testnet now succesfully starts and foldBlocks test (occasionally) succeeds. I say occasionally because the test is flaky: testnet nodes do start but quite frequently in the test runs they don't start posting anything to the local chain sync protocol and the test fails with a timeout. The good thing is that the config files now allow the testnet to start, but why the socket is not written to remains to be researched. Another thing that might be good to pursue is that while monitoring linux processes, the cardano node's start relatively early in the test, but the local chainsync socket starts to receive updates ~20 seconds in -- is that time required, e.g spending it on reaching consensus, or could it be cut much shorter? It would greatly benefit the convenience of testing if that time could be cut shorter. |
703f476
to
fcda2fa
Compare
This PR is now ready for review. In addition to amending the node configuration file, there were two other issues that made this test flaky:
|
fcda2fa
to
6c01fcb
Compare
either (throw . FoldBlocksException) (\_ -> pure ()) e | ||
link a -- Throw async thread's exceptions in main thread | ||
|
||
_ <- liftIO $ IO.readMVar lock |
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.
Can you explain further what this test is testing? Specifically wrt the put/readMVar.
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.
The MVar
is written to from within the handler
that is passed to foldBlocks
, it simply tests that a ledger state is received and the handler is called (which writes to the lock
and allows the test to finish).
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.
Ah right I understand. Can you include this in a comment? I'll approve after.
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.
Yup, will also add all fixes done here to the other PR as well (the one that's against the release/1.35
branch).
Closing this PR in favor of this one: #4679 |
Creating this draft pull request in relation to the
foldBlocks
issue here #4624.Due to adding genesis hashes to node config file (72e6017) cardano-testnet now does start (without adding the hashes it exceptioned out as described in the issue), but foldBlocks still doesn't receive ledger states and hangs indefinitely.
(Should I break out the 72e6017 to a separate PR so we could merge that?)