-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nayduck) - fix flaky state_sync_routed test (#12821)
The test was failing when the node was slow to catch up and was still at height 0 when entering this loop: https://github.com/near/nearcore/blob/ba1ed9f7b26cd6bc20115a9d5350bef4cfbb18bb/pytest/tests/sanity/state_sync_routed.py#L106-L107 In this case the `hash_` here would be the genesis block hash: https://github.com/near/nearcore/blob/ba1ed9f7b26cd6bc20115a9d5350bef4cfbb18bb/pytest/tests/sanity/state_sync_routed.py#L118-L120 The `ctx.send_moar_txs` would send it to a node that is fully caught it and has already garbage collected the genesis block. In this case the transaction would be invalid and the balance check would fail. This would in turn lead to the test being stuck forever in the final loop: https://github.com/near/nearcore/blob/ba1ed9f7b26cd6bc20115a9d5350bef4cfbb18bb/pytest/tests/sanity/state_sync_routed.py#L142-L149 This PR contains a few fixes and improvement: * Fixing the issue described above by using the `boot_node`s head's block hash when creating transactions. * Decreasing the timeout of the test to 100s + 2s per block to make it fail faster (5min instead of 20min) * Always execute the "catch up" loop at least once to make the test more interesting. * More assertions and logs to fail faster * Removed the pool_time overwrite (now the default 0.25 is used). It doesn't make any difference but the code is nicer and shorter. * Random mini refactorings.
- Loading branch information
Showing
6 changed files
with
69 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,7 @@ | |
"locustfile", | ||
"locustfiles", | ||
"Logunov", | ||
"manytx", | ||
"Mbps", | ||
"memtable", | ||
"memtrie", | ||
|
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