near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.31k stars 615 forks source link

Update nayduck test to reduce transaction failure rate #11819

Closed tayfunelmas closed 1 month ago

tayfunelmas commented 1 month ago

In the current version of the memtrie_disktrie_switch.py, we create the accounts using the same validator's signing key. Since the create-account transactions are issued in parallel, they may be reordered and the chain can see non-increasing sequence of nonces. This is seen when running the test multiple times, where it fails when creating the accounts first.

To avoid this, we use different validators' signing keys to create the accounts instead of using the same account, so different nonces are used.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.76%. Comparing base (f8d9142) to head (b127558).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11819 +/- ## ========================================== - Coverage 71.76% 71.76% -0.01% ========================================== Files 796 796 Lines 163183 163183 Branches 163183 163183 ========================================== - Hits 117103 117101 -2 - Misses 41030 41033 +3 + Partials 5050 5049 -1 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | Coverage Δ | | |---|---|---| | [backward-compatibility](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.35% <ø> (ø)` | | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `37.82% <ø> (+0.06%)` | :arrow_up: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.37% <ø> (-0.02%)` | :arrow_down: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.35% <ø> (ø)` | | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `54.59% <ø> (-0.02%)` | :arrow_down: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.62% <ø> (ø)` | | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.42% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `66.21% <ø> (-0.01%)` | :arrow_down: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11819/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.