-
Notifications
You must be signed in to change notification settings - Fork 108
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
Test if checkpoint verifier and state service are correctly reset on block commit errors #2654
Comments
I think we can test using the fake network upgrade heights, and the fake transaction version conversion methods. |
Hey team! Please add your planning poker estimate with ZenHub @conradoplg @dconnolly @jvff @oxarbitrage @teor2345 @upbqdn |
We don't have any post-NU5 checkpoints yet. This ticket is optional until we do. |
redistributing issues that can be separately worked from Epic #2311 |
This is an obscure case, we can test it if it causes problems later. |
We might need to do this for #4937 |
Just to expand on my last comment a bit more: #4937 changes how error handling works in the state, and makes it more complicated, so we probably need to test that it actually works. |
let's timebox this to one day's work and move on if it's too hard... |
We think we want to do these tests here:
|
I can help. |
Just a reminder that this task has a time limit of 1 day, so if it's not done by the end of the sprint, we should just close it. We're looking for a really quick test here, we just need to send one error, and check that the state doesn't crash or hang. |
@mpguerra we decided not to do this in this sprint, because it's not a release blocker, and we've done enough manual testing. |
re-opening for #5377 |
Closing for now. See test-block-commit-service for draft solution in case we want to pick this up again in future. |
The corresponding PR is #5377. |
Motivation
We want to test that errors in the state are handled correctly.
Design
We want to do these tests here:
If these tests take longer than a day to write, we're going to close this ticket as "too hard for now".
Old Description
#2633 adds ZIP-221/244 block commitment validation in the checkpoint verifier. The check is actually done in the finalized state, and when that happens, the checkpoint verifier is reset to the tip of the finalized state in order to keep running correctly.
However, this hasn't been tested, since it is tricky to test.
Implement a test to verify that it's working correctly.
(Note that is only required if/when we have a checkpoint post-Nu5. Before that all block contents are committed to by the block hash, so they must be correct. Nu5-onward that no longer applies due to ZIP-244.)
Previous attempt
I attempted to write this test in #2633 but gave up because it was too difficult and we had to keep working on other stuff.
See discussion. However, most of the problems were caused by trying to test it along with the "fake activation heights" feature in that PR, which would require generating fake blocks with correct difficulties, etc. in order to pass the checkpoint verifier. Another alternative would be to use real blocks similar to the
continuous_blockchain
- but the problem would then be how to ensure that one block fails to be comitted in order to test if that's handled correctly (the real blocks have small heights, and thus they don't use the block commitment in the header, so there is nothing to corrupt)The text was updated successfully, but these errors were encountered: