-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #6431: test: improve mine rotation quorums for IS in functional…
… tests f8cfda6 refactor: simplify and optimize creation of rotation IS quorum in functional tests (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Mining rotation quorum currently is not trivial. All over a codebase used this template to get a rotating quorum: ``` self.move_to_next_cycle() self.log.info("Cycle H height:" + str(self.nodes[0].getblockcount())) self.move_to_next_cycle() self.log.info("Cycle H+C height:" + str(self.nodes[0].getblockcount())) self.move_to_next_cycle() self.log.info("Cycle H+2C height:" + str(self.nodes[0].getblockcount())) self.mine_cycle_quorum(llmq_type_name='llmq_test_dip0024', llmq_type=103) ``` The performance of this code is not great also because generating 3 or 4 batches of blocks requires time to sync nodes after each batch. ## What was done? This PR move instantly to 3-4 DKG sessions forward and starts from cycling quorum. It's only one cycling quorum (instant-send), so, extra params are also removed. To get it just call: ``` self.mine_cycle_quorum() # first time, which is usually used to get IS feature working in functional tests self.mine_cycle_quorum(is_first=False) # if you don't need preparing 3 DKG sessions in advance ``` ## How Has This Been Tested? Run unit and functional tests By my benchmark it gives roughly 10 seconds for each functional test that uses rotation quorum. ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only) ACKs for top commit: PastaPastaPasta: utACK f8cfda6; I wish that is_first could be automatically detected instead of manually set. UdjinM6: utACK f8cfda6 Tree-SHA512: 993f42b54c0c11ba146e164cc6db8b5c3f302dd78488aa2572b3ed199d25c266d8d1ff1a027a4e450eab2349b691c19fcd8f5859e2c423ccf2357db29ee3d536
- Loading branch information
Showing
11 changed files
with
49 additions
and
113 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
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
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