-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tests): add resharding chain fork tests (#12440)
PR to add simple chain fork and block double signing tests to the existing resharding_v3 test loop. The implementation is a bit hacky, but I couldn't find a better way. - Refactored adversarial block production to extrapolate a method in `Client` with additional functionality. - Ignoring `Challenge`s in test loop. - Refactored `resharding_v3` test structure to pass more parameters to the base test scenario. - Added an "hook" to execute arbitrary test code inside test loop iteration of `resharding_v3`. Both tests fail at the moment. They seems to do trigger the behavior we want to test. For forks consecutive resharding starts: ``` {block_hash=F5zmejS8RxnGwnJhtfH5JK4V5VbciBDrfJMwKuxpio1L block_height=13 parent_shard_uid=s1.v3}: memtrie: Freezing parent memtrie, creating children memtries... parent_shard_uid=s1.v3 children_shard_uids=[s2.v3, s3.v3] ... {block_hash=9kPADkyL3uKKFfupzunTxXTTchu5ek4CZ5eeWyvxzken block_height=18 parent_shard_uid=s1.v3}: memtrie: Freezing parent memtrie, creating children memtries... parent_shard_uid=s1.v3 children_shard_uids=[s2.v3, s3.v3] ``` For double signing two resharding at the same height: ``` {block_hash=F5zmejS8RxnGwnJhtfH5JK4V5VbciBDrfJMwKuxpio1L block_height=13 parent_shard_uid=s1.v3}: memtrie: Freezing parent memtrie, creating children memtries... parent_shard_uid=s1.v3 children_shard_uids=[s2.v3, s3.v3] ... {block_hash=EjweFJq1aekKSQKgZpMQ9sgNt6RrHYCADV91p7uLLUnv block_height=13 parent_shard_uid=s1.v3}: memtrie: Freezing parent memtrie, creating children memtries... parent_shard_uid=s1.v3 children_shard_uids=[s2.v3, s3.v3] ```
- Loading branch information
Showing
3 changed files
with
314 additions
and
59 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
Oops, something went wrong.