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

fix(chain): always use the right chunk extra when producing chunks #3056

Merged
merged 3 commits into from
Jul 29, 2020

Conversation

bowenwang1996
Copy link
Collaborator

@bowenwang1996 bowenwang1996 commented Jul 29, 2020

Currently we always use latest chunk extra when producing chunks. However, this might cause problems because the latest chunk extra is determined by the current head, which might not be the block that we are producing chunk on top of. When this happens, it causes invalid chunks to be produced, as mentioned in #3055. This PR fixes it by always using the chunk extra from the block that the chunk is building on. Fixes #3055.

Test plan

test_validate_chunk_extra

@gitpod-io
Copy link

gitpod-io bot commented Jul 29, 2020

@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #3056 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3056   +/-   ##
=======================================
  Coverage   88.37%   88.37%           
=======================================
  Files         212      212           
  Lines       44778    44778           
=======================================
  Hits        39574    39574           
  Misses       5204     5204           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ca4e9d...af9f73a. Read the comment docs.

@bowenwang1996 bowenwang1996 merged commit 13aa111 into master Jul 29, 2020
@bowenwang1996 bowenwang1996 deleted the fix-chunk-extra-bug branch July 29, 2020 22:00
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.

Fail to validate chunk with chunk extra
3 participants