-
Notifications
You must be signed in to change notification settings - Fork 332
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
Non-determinism unit test #2414
Comments
the goal of this test is to ensure that whatever branch is capable of syncing from scratch. In theory, we can do this with just unit tests, however there are so many different hyper werid edge cases that we don't know what all of those are yet. for example, we could execute one transaction per block, for every possible transaction type with the v1 binary, save those roots somewhere, and then compare the roots against whatever the result is of the other branch. we could maybe also run some deterministic (same inputs to each) fuzzing script on each version, and save those results. whatever branch would have to have identical results to process proposal. |
Just noting the OP proposes two distinct tests so we could split this into two issues:
IMO the first one is more valuable than the second because I expect we'll be able to run the first one in CI and make it a required check prior to PR merge. I expect the second test will take much longer to run and may only be able to run via the nightly (or weekly 😨) CI jobs. That means we'll get delayed signal via the second test. If we're committing to single binary syncs then IMO we still need the second test. But ideally the first test gives us confidence to merge PRs and the second test gives us confidence that new release candidates still preserve the single binary feature.
I really like this idea. |
We discussed this in a sync and came to the conclusion that this test:
is a nice to have.
is release blocking but it can be performed manually via the |
Evan and I paired on a prototype for the first test: https://github.com/celestiaorg/celestia-app/tree/rp/pair-with-evan |
If we take the route of expanding the existing knuu infrastructure, we could run this test directly after a PR is merged instead of nightly. |
Spun out #3490 so that this issue can focus on the first test in the OP:
|
Notes:
Ideas:
|
So my take on this is that we already have a script for syncing a node from genesis. Which we should use before every release. If we want it to be faster then we can have some beefy machine we run and just spin up a new node in the same machine (to skip the p2p overhead). Or if we wanted this to be a unit test we could persists only the block and state stores and run the application over the set of transactions (kind of like a local block sync) and compare the app hashes. The second thing I would advocate for is to add the main docker image to the When we upgrade to v2, we will need to modify TestMinorVersionCompatibility to move from v1 state machine to v2 state machine for future v2 minor releases. We could create more elaborate tests but I want to review our single binary syncs approach before continuing. |
## Overview adding genesis to utils as part of #2414
## Overview Fixes #2414 ### This test is split up in a few parts: - Execute transactions deterministically on v1 and save the AppHash. #3522 ([includes genesis folder backport from utils](#3520)) - Set up the same testApp environment on main, execute transactions and assert that the AppHash matches the one from v1 ### Verifying the AppHash: If you want to make sure that the expected AppHash is correct, you can run the [non determinism test on v1.x](#3522) that generates it. ### Follow-ups: #3509 #3540 --------- Co-authored-by: Rootul P <[email protected]>
Description
Write a non-determinism unit test for the state machine. The test will involve creating a set of transactions, executing them, and comparing the resulting apphash with an expected value.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: