-
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
Don't wait forever in TokNext TokMustReply #1871
Conversation
dd9b161
to
c7e7c52
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.
I'd like to find out what really happens, though.
ouroboros-network/src/Ouroboros/Network/Protocol/ChainSync/Codec.hs
Outdated
Show resolved
Hide resolved
In the (TokNext TokMustReply) state the responder has indicated that it currently doesn't have a new tip for us and we should wait. This patch limits the time we wait to 70s which means that we don't end up waiting forever incase of network problems. This is implemented in the form of a parameter to timeLimitsChainSync in order to get around troublesome testcases in ouroboros-consensus-mock which don't handle any reasonable timeouts.
89dd544
to
3786275
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.
LGTM.
bors merge |
@@ -209,6 +209,8 @@ run tracers protocolTracers chainDbTracer diffusionTracers diffusionArguments | |||
nodeKernel | |||
protocolTracers | |||
(protocolCodecs (getTopLevelConfig nodeKernel) version) | |||
(Just 70) -- timeout after waiting this long for the next header | |||
-- 70s allows for 3 slots (3 * 20s) |
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.
3 * 20s /= 70s 😏
742: Windows fixes from latest network package r=dcoutts a=dcoutts - [x] sensible pipe buffer size IntersectMBO/ouroboros-network#1876 - [ ] to more reliably connect to the node with multiple clients simultaneously IntersectMBO/ouroboros-network#1881 - [ ] a fix/workaround for the "DNS getting stuck on the second go on windows" problem IntersectMBO/ouroboros-network#1878 - [x] a timeout in the wait case of chain sync IntersectMBO/ouroboros-network#1871 Co-authored-by: Duncan Coutts <[email protected]>
In the (TokNext TokMustReply) state the responder has indicated that it
currently doesn't have a new tip for us and we should wait.
This patch limits the time we wait to 70s which means that we don't end
up waiting forever incase of network problems.