-
Notifications
You must be signed in to change notification settings - Fork 659
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
[stateless_validation] Handle production of state witness for first chunk after genesis #10502
Labels
A-stateless-validation
Area: stateless validation
Comments
23 tasks
52 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 23, 2024
This PR removes "approve anything" shortcut when previous chunk is part of genesis. The only difference in case of genesis is that we don't want to execute main state transition and instead just check that post state root matches genesis state root for that shard. This also exposed some issue I had to fix to make tests work: * `MockEpochManager::get_epoch_chunk_producers` returns empty Vec which results in `Chain:: should_produce_state_witness_for_this_or_next_epoch` returning `false`. Fixed by adding `is_chunk_producer_for_epoch` as part of `EpochManagerAdapter` so `MockEpochManager` can override it. * `test_chunk_state_witness_bad_shard_id` test started failing: this actually uncovered a real issue which could result in crashing chunk validator when state witness contains invalid shard id, fixed in c5b2c5e Closes #10502.
64 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Longarithm has more context on this problem.
We are currently unable to handle production of the state witness for the first chunk after genesis as it's not possible to run the genesis chunk in runtime. For now we have just hacked up a solution to send an empty state witness and the validators can ignore this and directly send the endorsement.
Note: This is only a problem for starting a new blockchain, and does not affect mainnet, nevertheless should be properly addressed.
The text was updated successfully, but these errors were encountered: