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

node incorrectly suppresses header broadcast for full blocks (after failing to hydrate a compact block) #3089

Merged

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Oct 7, 2019

Resolves #3087.

Related #2349.

If we receive a compact block but cannot successfully hydrate it based on the txs in the txpool then we will fallback to requesting the full block. In this situation we incorrectly suppress block broadcast to our peers.

It is not sufficient to simply track which blocks we request from a peer (suppressing header broadcast if we requested the block).

We need to track the originating opts=SYNC|NONE for each requested block.

We then only suppress the broadcast for blocks received after requesting them as part of sync.
Blocks received as part of compact block hydration should be broadcast normally.

This surfaced because we also suppress the "block_received" callback log msgs and we were not logging some compact blocks after hydration failed.

@antiochp antiochp added the bug label Oct 7, 2019
@antiochp antiochp changed the title track opts when requesting blocks (not just if we requested them) node incorrectly suppresses header broadcast for full blocks (after failing to hydrate a compact block) Oct 7, 2019
@antiochp antiochp merged commit 8f4a1cb into mimblewimble:master Oct 10, 2019
@antiochp antiochp deleted the broadcast_unless_requested_during_sync branch October 10, 2019 08:38
@antiochp antiochp mentioned this pull request Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

block_accepted "REORG!" log msg without corresponding "fork?" log msg
2 participants