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

compact-block: try to ensure response consistency #4586

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

hdevalence
Copy link
Member

Describe your changes

Wraps the mpsc used to transmit compact blocks with a stateful wrapper that tracks the expected next block height and rejects the send if it mismatches. This should act as a guard against any problem where the node misses or duplicates blocks in the response stream, by converting those to internal server errors that cause the stream to terminate and the client to reopen the connection.

Issue ticket number and link

Related to #4577

Checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    rpc changes only

Copy link
Contributor

@cronokirby cronokirby left a comment

Choose a reason for hiding this comment

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

Looks good to me, also I think both our view service implementations will work with interruptions like this, so.

Copy link
Contributor

@cratelyn cratelyn left a comment

Choose a reason for hiding this comment

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

excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants