forked from near/nearcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: epoch analysis tool (near#11343)
Tool to analyse epoch infos in two modes: * `check-consistency` - regenerate next next epoch info based on two previous epochs and check that it matches the epoch info stored in DB; * `backtest` - regenerate epoch infos with existing proposals, rewards and kickouts as if `PROTOCOL_VERSION` was always in place. The `backtest` was used to estimate new algorithm for chunk producer shard assignments and showed that on average there is only one state sync happening, if we use start epoch height >= 545. Epoch info for 544 can't be retrieved for some reason, see near#11477. Consistency check revealed that some epochs in the past can't be replayed, see near#11476. Expected output of it, note that epoch T generates epoch T+2: ``` $ neard view-state epoch-analysis --start-height 1359 check-consistency HEIGHT | VERSION | STATE SYNCS 1361 | 53 | 0 1362 | 53 | 8 1363 | 54 | 8 1364 | 54 | 8 1365 | 54 | 24 1366 | 54 | 12 ... ```
- Loading branch information
1 parent
5026612
commit 23e22d5
Showing
5 changed files
with
268 additions
and
10 deletions.
There are no files selected for viewing
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.