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

skip hydrate if missing kernels, just request full block #3090

Merged

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Oct 7, 2019

When processing a compact block if we have missing kernels after looking in the txpool then we know hydration will fail (we do not have all the necessary txs).

We were waiting for the hydration step to fail. Hydration was guaranteed to fail here as we did not have the necessary txs in the txpool to hydrate the block.

We should just check if we have anything missing, stop processing and go request the full block.

The "hooks" will now only fire if our compact block can be successfully hydrated. We no longer (incorrectly) state we received a block when if fact we have not yet received it in its valid form -

20191010 10:04:51.899 DEBUG grin_servers::common::adapters - Received compact_block 000003d26bc5 at 383922 from 52.57.14.225:3414 [out/kern/kern_ids: 1/1/0] going to process.
20191010 10:04:51.900 DEBUG grin_servers::common::hooks - Received block 000003d26bc5 at 383922 from 52.57.14.225:3414 [in/out/kern: 0/1/1] going to process.
20191010 10:04:51.900 DEBUG grin_chain::pipe - pipe: process_block 000003d26bc5 at 383922 [in/out/kern: 0/1/1]

@antiochp antiochp added this to the 3.0.0 milestone Oct 7, 2019
@antiochp antiochp force-pushed the skip_hydrate_if_kernels_missing branch from ebf8bc3 to 05534c9 Compare October 10, 2019 08:46
@antiochp antiochp force-pushed the skip_hydrate_if_kernels_missing branch from 05534c9 to 1ee9c56 Compare October 10, 2019 09:15
@antiochp antiochp merged commit da2e752 into mimblewimble:master Oct 10, 2019
@antiochp antiochp deleted the skip_hydrate_if_kernels_missing branch October 10, 2019 15:46
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants