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

Always call applyBlock, even if block is empty #673

Merged
merged 1 commit into from
Sep 3, 2019

Conversation

Anviking
Copy link
Member

@Anviking Anviking commented Sep 2, 2019

Issue Number

#640

Overview

  • I have removed the filter nonEmpty for blocks in restoreBlocks, such that all blocks from the networkLayer get passed to applyBlocks. This should correct the block-height calculation (but it is currently untested / just played with a bit manually).

Comments

  • This does not work correctly on cardano-wallet-http-bridge, because Epoch Boundary Blocks (EBBs) are no longer filtered out ⚠️ The block height will increase an extra (+1) per epoch than it should.
  • Doesn't appear to slow down stack bench cardano-wallet-http-bridge:restore

@Anviking Anviking self-assigned this Sep 2, 2019
@rvl rvl mentioned this pull request Sep 2, 2019
Copy link
Contributor

@rvl rvl left a comment

Choose a reason for hiding this comment

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

OK, good. I guess the reason why we didn't catch the bug before is that, because of its location, this empty block filtering logic could only be tested with integration tests, which did not cover blockHeight. So you have done a good thing removing this code.

Depending on how long the http-bridge backend exists, maybe we can ignore that it produces EBBs.

@Anviking Anviking force-pushed the anviking/640/always-call-applyBlock branch from b99ee8d to 91c39f5 Compare September 3, 2019 06:00
@Anviking Anviking merged commit 8bb3252 into master Sep 3, 2019
@Anviking Anviking deleted the anviking/640/always-call-applyBlock branch September 3, 2019 06:36
@KtorZ KtorZ added this to the Support Rollbacks milestone Sep 13, 2019
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.

3 participants