Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: tool to validate state witness (#11388)
Completes the lifetime of state witness saved to disk: Save latest state witnesses for given selection: ``` neard --unsafe-fast-startup view-state --readwrite state-witness latest --shard-id 4 --height 118772867 --binary > witness.txt ``` To validate it: ``` RUST_LOG=debug neard --unsafe-fast-startup view-state --readwrite state-witness validate --input-file witness.txt ``` The huge diff is explained by the need to move lots of state witness validation code and metrics from near-client to near-chain, and it actually belong there. Probably quick look is enough to check that I didn't break it. The only new logic is `ValidateWitnessCmd` which just calls existing function for shadow validation. I checked manually that with `RUST_LOG=debug` it shows error on invalid witness and success on the valid one.
- Loading branch information