near / nearcore

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

Remove failing test validator_switch_key.py #11807

Closed tayfunelmas closed 1 month ago

tayfunelmas commented 2 months ago

Related issue: #11750

The test validator_switch_key.py exercises a path where a validator switches to a different node/machine by reusing the same AccountId with a different signature. This makes the stateless-validation code that verifies the self chunk endorsement fail, because the code uses incorrect signing key for the same AccountId to verify the endorsement (since there are two accounts with different keys).

According to the discussion in this thread, the test is attempting to exercise a scenario that the current protocol does not support, thus removing the test instead of fixing it, which would create more confusions.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 71.74%. Comparing base (1364b30) to head (23fe1e4). Report is 21 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11807 +/- ## ========================================== - Coverage 71.80% 71.74% -0.06% ========================================== Files 792 796 +4 Lines 162807 163001 +194 Branches 162807 163001 +194 ========================================== + Hits 116899 116947 +48 - Misses 40855 41002 +147 + Partials 5053 5052 -1 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11807/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/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (+<0.01%)` | :arrow_up: | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (+<0.01%)` | :arrow_up: | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.35% <ø> (+<0.01%)` | :arrow_up: | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `37.88% <ø> (-0.06%)` | :arrow_down: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.37% <ø> (+0.04%)` | :arrow_up: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.34% <ø> (-0.06%)` | :arrow_down: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `54.55% <ø> (+1.57%)` | :arrow_up: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.58% <ø> (+<0.01%)` | :arrow_up: | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.38% <ø> (+<0.01%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `66.19% <ø> (-0.05%)` | :arrow_down: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11807/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <ø> (+<0.01%)` | :arrow_up: | 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.