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: correctly count chunk produced #2535

Merged
merged 3 commits into from
Apr 28, 2020
Merged

Conversation

bowenwang1996
Copy link
Collaborator

@bowenwang1996 bowenwang1996 commented Apr 28, 2020

The current way of counting expected number of chunks for a chunk producer is flawed. While I took into consideration that when a block is not produced, not chunk can be included in that block, I failed to realize that if block at height h is not produced, chunks at height h can be included in block h+1, if it is produced. Therefore, what we really need to count when processing a block is whether chunk producers for height prev_block_height + 1 produced their chunks. Resolves #2534.

Test plan

test_expected_chunks_prev_block_not_produced that tests when a chunk producer failed to produce a chunk due to the block at previous height not being produced, it does not get kicked out.

@gitpod-io
Copy link

gitpod-io bot commented Apr 28, 2020

@bowenwang1996 bowenwang1996 merged commit 7c75fe5 into master Apr 28, 2020
@bowenwang1996 bowenwang1996 deleted the fix-chunk-produced-counting branch April 28, 2020 01:39
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.

Incorrect counting of chunk produced
2 participants