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(state sync): handle StateResponse on state_parts_future_spawner #12205

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

saketh-are
Copy link
Collaborator

@saketh-are saketh-are commented Oct 10, 2024

Before this PR, when a state part arrived via a network message from a peer, it was validated and stored by the client actor. As a result, the client actor could become slow to apply blocks causing the node to fall behind the chain.

Instead, the state parts should be handled async on state_parts_future_spawner the same way they are when downloaded from external storage.

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 58.65385% with 43 lines in your changes missing coverage. Please review.

Project coverage is 71.75%. Comparing base (30e4ace) to head (d0e6dd0).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
chain/client/src/sync/state.rs 61.00% 34 Missing and 5 partials ⚠️
chain/client/src/client_actor.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12205   +/-   ##
=======================================
  Coverage   71.74%   71.75%           
=======================================
  Files         825      825           
  Lines      165697   165753   +56     
  Branches   165697   165753   +56     
=======================================
+ Hits       118884   118928   +44     
- Misses      41633    41640    +7     
- Partials     5180     5185    +5     
Flag Coverage Δ
backward-compatibility 0.17% <0.00%> (-0.01%) ⬇️
db-migration 0.17% <0.00%> (-0.01%) ⬇️
genesis-check 1.26% <0.00%> (-0.01%) ⬇️
integration-tests 38.90% <48.07%> (+<0.01%) ⬆️
linux 71.43% <58.65%> (-0.02%) ⬇️
linux-nightly 71.33% <58.65%> (-0.01%) ⬇️
macos 54.33% <11.53%> (+1.18%) ⬆️
pytests 1.57% <0.00%> (-0.01%) ⬇️
sanity-checks 1.38% <0.00%> (-0.01%) ⬇️
unittests 65.52% <11.53%> (+<0.01%) ⬆️
upgradability 0.21% <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.

chain/client/src/sync/state.rs Show resolved Hide resolved
chain/client/src/sync/state.rs Show resolved Hide resolved
chain/client/src/sync/state.rs Show resolved Hide resolved
@saketh-are saketh-are marked this pull request as ready for review October 11, 2024 14:03
@saketh-are saketh-are requested a review from a team as a code owner October 11, 2024 14:03
@saketh-are saketh-are requested review from Longarithm and VanBarbascu and removed request for Longarithm October 11, 2024 14:03
@saketh-are saketh-are added this pull request to the merge queue Oct 11, 2024
Merged via the queue into near:master with commit 2b022a6 Oct 11, 2024
27 of 30 checks passed
@saketh-are saketh-are deleted the fix-handler-state-response branch October 11, 2024 15:04
marcelo-gonzalez added a commit to marcelo-gonzalez/nearcore that referenced this pull request Oct 11, 2024
…ear#12205)

Before this PR, when a state part arrived via a network message from a
peer, it was validated and stored by the client actor. As a result, the
client actor could become slow to apply blocks causing the node to fall
behind the chain.

Instead, the state parts should be handled async on
`state_parts_future_spawner` the same way they are when downloaded from
external storage.

---------

Co-authored-by: Marcelo Diop-Gonzalez <[email protected]>
marcelo-gonzalez added a commit to marcelo-gonzalez/nearcore that referenced this pull request Oct 11, 2024
…ear#12205)

Before this PR, when a state part arrived via a network message from a
peer, it was validated and stored by the client actor. As a result, the
client actor could become slow to apply blocks causing the node to fall
behind the chain.

Instead, the state parts should be handled async on
`state_parts_future_spawner` the same way they are when downloaded from
external storage.

---------

Co-authored-by: Marcelo Diop-Gonzalez <[email protected]>
@marcelo-gonzalez marcelo-gonzalez mentioned this pull request Oct 11, 2024
marcelo-gonzalez added a commit that referenced this pull request Oct 11, 2024
bump version string and cherry pick
#12205

---------

Co-authored-by: Saketh Are <[email protected]>
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