-
Notifications
You must be signed in to change notification settings - Fork 87
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
Implement header-body split (make block-fetch actually work) in diffusion tests #4419
Conversation
. withTimeNameTraceEvents | ||
@DiffusionTestTrace | ||
@NtNAddr | ||
. Trace.fromList (MainReturn (Time 0) () []) |
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 don't think we should use fromList
and then toList
, can we just operate on a list?
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.
There's no easy way to just operate on a single type. The trace comes in a different type and if we only want to analyze 125k worth of traces the easiest way is to convert to a list an take
.
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.
Right, my question was if we can operate on a list without using Trace
by avoiding the toList
.
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 mean we probably can, but it is more convenient to use lists here imo. It should get fused away no? We're going to end up to need a list for tabulate
ouroboros-network/test/Test/Ouroboros/Network/Testnet/Simulation/Node.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/test/Test/Ouroboros/Network/Testnet/Simulation/Node.hs
Outdated
Show resolved
Hide resolved
Also adds a test to check for coverage of TraceFetchClient traces
But only for diffusion tests. For other tests it was more tricky to change this fact because some technical debt exists and it would be more complex to change. For those functions we just plucked 'id' as the 'block -> header' function. Also for the chain sync clients and servers we had to make the Point type to be parameterised by the block instead of the header due to some very specific types used in consensus, since we can just cast the points I went to the least friction path.
bump |
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 |
Closes #4389