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

Incorrect counting of chunk produced #2534

Closed
bowenwang1996 opened this issue Apr 28, 2020 · 0 comments · Fixed by #2535
Closed

Incorrect counting of chunk produced #2534

bowenwang1996 opened this issue Apr 28, 2020 · 0 comments · Fixed by #2535
Assignees
Labels
A-chain Area: Chain, client & related C-bug Category: This is a bug

Comments

@bowenwang1996
Copy link
Collaborator

When the block at height h is not produced, chunk producer at height h+1 cannot produce their chunk and we do not account for this when counting the number of expected chunks, which causes some validators to be incorrectly kicked out.

@bowenwang1996 bowenwang1996 self-assigned this Apr 28, 2020
@bowenwang1996 bowenwang1996 added C-bug Category: This is a bug A-chain Area: Chain, client & related labels Apr 28, 2020
bowenwang1996 added a commit that referenced this issue 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-chain Area: Chain, client & related C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant