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

Check that the peer sends us a body exactly when we ask for it #2291

Merged
merged 3 commits into from
May 16, 2024

Conversation

hrxi
Copy link
Contributor

@hrxi hrxi commented Mar 6, 2024

Probably helps with #2289.

Also validate gossipsub messages for blocks we already know.

self.report_validation_result(
pubsub_id,
if info.on_main_chain {
MsgAcceptance::Accept
Copy link
Member

Choose a reason for hiding this comment

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

To me if the block is already known, we should use Ignore: Gossipsub is not supposed to send duplicate messages and an Accept will forward the message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think gossipsub deduplicates the message already. Since this is the first time that we see this message in gossipsub, we should probably forward it, even if we got it by other means. … I'd think, at least.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I see your point. Let's use accept then

@hrxi hrxi force-pushed the hrxi/block_bodies branch from 9d88e69 to bbde0ff Compare March 11, 2024 13:54
Copy link
Member

@jsdanielh jsdanielh left a comment

Choose a reason for hiding this comment

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

Could you rebase the branch?

@hrxi hrxi force-pushed the hrxi/block_bodies branch from bbde0ff to ae5a5ba Compare May 16, 2024 07:32
@jsdanielh jsdanielh force-pushed the hrxi/block_bodies branch from ae5a5ba to c3f939d Compare May 16, 2024 18:37
@jsdanielh jsdanielh merged commit c3f939d into albatross May 16, 2024
6 checks passed
@jsdanielh jsdanielh deleted the hrxi/block_bodies branch May 16, 2024 20:28
@jsdanielh jsdanielh added this to the Nimiq PoS Mainnet milestone May 16, 2024
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.

2 participants