-
Notifications
You must be signed in to change notification settings - Fork 678
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: basic state witness production (#10413)
Add state transition data to state witness and validate chunk execution against it. Merge `get_chunk_validation_job` with `validate_chunk_state_witness` and remove the first one. All the changes look necessary to make it work. We plan to do a shallow review now and improve the code later, to unblock adding required features separately. Summary of changes: * If a node is a chunk producer for any shard for this or next epoch, it will record state transition data on disk. This is suboptimal, but works for prototype. * If a node produces a chunk, it will aggregate all transition data, create state witness and send it to others. * Aggregating source receipt chunks is not yet implemented and temporarily commented, as everyone tracks receipts anyway. Validating new transactions is also not implemented. * In `validate_chunk_state_witness`, we are using more explicit apply_[new|old_chunk] to simplify code. I temporary make lots of structs `pub` to make it work, but it can be refactored if needed. * test_chunk_validation_basic works again. It is adjusted to make validation against state much less trivial. --------- Co-authored-by: Longarithm <[email protected]>
- Loading branch information
1 parent
c536f46
commit 57e84d8
Showing
13 changed files
with
414 additions
and
575 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.