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.
test: chunk validator kickout (near#11672)
Express the power of TestLoop by implementing scenario where chunk validator-only node is kicked out due to low endorsement stats. The logic is to simply prevent all chunks validated by selected accounts from appearing on chain. But implementing this without adding extra logic to `Client`, `ShardsManagerActor` and `Network` is a challenge. TestLoop, however, can add overrides to itself, which are generic enough to use for testing other scenarios, like ones in `chunks_management` tests. New components are: * `TestLoopChunksStorage` - global storage for all chunks ever observed by monitoring client messages. Other options would be to extend network messages content or understand how to query `ShardsManagerActor` on network message override. However, global test loop storage makes sense to me as it can serve for measuring health of the whole chain, if we test other disruption scenarios. * `partial_encoded_chunks_dropper` - overrides processing of network messages related to chunks; if chunk is validated by the given account, the message is dropped. The logic is generic enough to be extended to kickout specific block/chunk producers, drop chunks for specific heights/shards, etc. --------- Co-authored-by: Bowen Wang <[email protected]>
- Loading branch information
1 parent
80f08d7
commit a134185
Showing
7 changed files
with
332 additions
and
19 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.