Fix bugs: (1) infinite loop in e2e tests (2) missing Vote Extensions at PrepareProposal
time
#539
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributes to #10
While running e2e tests locally, I detected a hard-to-diagnose bug with vote extensions. This PR contains the fix.
Since I did this in isolation (due to remote work), I'll make an effort at explaining the troubleshooting process in this PR. Hence, this PR will be a succession of commits which show the sketch on how I diagnosed and fixed the bug. So, if the reviewer wants to understand what the problem was and how it was solved, the presence of the little ❌ or ✅ next to each commit below is important (you can click and check how the e2e tests failed/passed).
Additionally, I also found that the e2e tests where blocking forever when a node was crashing. This is fixed in the first commit.
ci.toml
to only have one validator, since the bug appears when a recovered node has to propose.VoteExtensionsEnableHeight
, we plant apanic
to have the backtrace if it happens.ci.toml
is set to 1007 from genesis, so we should never return zero in this test case.reconstructLastCommit
method ofState
, immediately after we callupdateToState
. Therefore the state object whose method we are calling is incomplete. The fix just queries the complete object, which is passed as a normal parameter (and which will be given toupdateToState
immediately after).PR checklist
.changelog
(we use unclog to manage our changelog)docs/
orspec/
) and code comments