Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(temporary mitigation): Skip genesis bootstrapping for statelessnet #11727

Merged
merged 5 commits into from
Jul 5, 2024

Conversation

tayfunelmas
Copy link
Contributor

This is a mitigation for the failure that is caused by the stabilization PR #11701.

Zulip thread

Context: In statelessnet, the genesis version is above 68, so it assumes that genesis has the congestion control is enabled and hitting an issue that attempts to bootstrap congestion info (again) and hitting missing state roots.

We attempted to move the version numbers for congestion control and stateless validation back to 80 and 81 to mitigate the problem, in this PR but it became unnecessarily complex and risky.

Thus, in this PR, we simply bypass the problematic bootstrap for statelessnet only. We moved the check for the chain id after the genesis protocol version check so we will not run it for testnet and mainnet.

@tayfunelmas tayfunelmas marked this pull request as ready for review July 4, 2024 18:50
@tayfunelmas tayfunelmas requested a review from a team as a code owner July 4, 2024 18:50
@tayfunelmas tayfunelmas requested review from akhi3030 and wacban and removed request for akhi3030 July 4, 2024 18:50
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.76%. Comparing base (4e9e742) to head (c1125ff).
Report is 1 commits behind head on master.

Files Patch % Lines
chain/chain/src/chain.rs 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11727   +/-   ##
=======================================
  Coverage   71.75%   71.76%           
=======================================
  Files         792      792           
  Lines      162429   162442   +13     
  Branches   162429   162442   +13     
=======================================
+ Hits       116556   116570   +14     
- Misses      40826    40830    +4     
+ Partials     5047     5042    -5     
Flag Coverage Δ
backward-compatibility 0.23% <0.00%> (-0.01%) ⬇️
db-migration 0.23% <0.00%> (-0.01%) ⬇️
genesis-check 1.35% <0.00%> (-0.01%) ⬇️
integration-tests 37.89% <86.66%> (-0.02%) ⬇️
linux 71.32% <86.66%> (+0.01%) ⬆️
linux-nightly 71.34% <86.66%> (+<0.01%) ⬆️
macos 52.96% <86.66%> (-1.61%) ⬇️
pytests 1.58% <0.00%> (-0.01%) ⬇️
sanity-checks 1.38% <0.00%> (-0.01%) ⬇️
unittests 66.17% <86.66%> (-0.01%) ⬇️
upgradability 0.28% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@wacban wacban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tayfunelmas tayfunelmas added this pull request to the merge queue Jul 5, 2024
Merged via the queue into near:master with commit dfd2ca0 Jul 5, 2024
30 checks passed
@tayfunelmas tayfunelmas deleted the statelessnet-bootstrap branch July 5, 2024 12:53
tayfunelmas added a commit that referenced this pull request Jul 5, 2024
#11727)

This is a mitigation for the failure that is caused by the stabilization
PR #11701.

[Zulip
thread](https://near.zulipchat.com/#narrow/stream/308695-nearone.2Fprivate/topic/Cherrypicks.20to.20statelessnet.20branch/near/449016937)

Context: In statelessnet, the genesis version is above 68, so it assumes
that genesis has the congestion control is enabled and hitting an issue
that attempts to bootstrap congestion info (again) and hitting missing
state roots.

We attempted to move the version numbers for congestion control and
stateless validation back to 80 and 81 to mitigate the problem, [in this
PR](#11719) but it became
unnecessarily complex and risky.

Thus, in this PR, we simply bypass the problematic bootstrap for
statelessnet only. We moved the check for the chain id after the genesis
protocol version check so we will not run it for testnet and mainnet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants