Skip to content
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

Merged
merged 5 commits into from
Apr 18, 2023

Conversation

bolt12
Copy link
Contributor

@bolt12 bolt12 commented Mar 2, 2023

Closes #4389

@bolt12 bolt12 changed the title Fix DiffusionTrace and coverage tests Implement header-body split (make block-fetch actually work) in diffusion tests Mar 2, 2023
ouroboros-network/test/Test/Ouroboros/Network/Testnet.hs Outdated Show resolved Hide resolved
. withTimeNameTraceEvents
@DiffusionTestTrace
@NtNAddr
. Trace.fromList (MainReturn (Time 0) () [])
Copy link
Contributor

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?

Copy link
Contributor Author

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 .

Copy link
Contributor

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.

Copy link
Contributor Author

@bolt12 bolt12 Apr 6, 2023

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

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.
@bolt12
Copy link
Contributor Author

bolt12 commented Apr 12, 2023

bump

Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bolt12
Copy link
Contributor Author

bolt12 commented Apr 18, 2023

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Apr 18, 2023

@iohk-bors iohk-bors bot merged commit e4a222f into master Apr 18, 2023
@iohk-bors iohk-bors bot deleted the bolt12/4389 branch April 18, 2023 13:49
@coot coot added the networking label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Finish header-body split in net-sim
2 participants