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

state sync: tune request timeout and chunkers #6566

Merged
merged 7 commits into from
Jun 15, 2021

Conversation

alexanderbez
Copy link
Contributor

closes: #6564

@alexanderbez alexanderbez added the C:sync Component: Fast Sync, State Sync label Jun 10, 2021
@codecov
Copy link

codecov bot commented Jun 10, 2021

Codecov Report

Merging #6566 (61e91db) into master (886519e) will decrease coverage by 0.09%.
The diff coverage is 36.36%.

@@            Coverage Diff             @@
##           master    #6566      +/-   ##
==========================================
- Coverage   61.22%   61.13%   -0.10%     
==========================================
  Files         295      295              
  Lines       27914    27932      +18     
==========================================
- Hits        17091    17076      -15     
- Misses       9111     9135      +24     
- Partials     1712     1721       +9     
Impacted Files Coverage Δ
config/toml.go 59.09% <ø> (ø)
internal/statesync/reactor.go 58.71% <9.09%> (-1.29%) ⬇️
config/config.go 74.10% <50.00%> (-0.75%) ⬇️
internal/statesync/syncer.go 78.74% <100.00%> (+0.08%) ⬆️
node/node.go 51.76% <100.00%> (+0.07%) ⬆️
privval/signer_listener_endpoint.go 80.00% <0.00%> (-9.42%) ⬇️
libs/events/events.go 92.94% <0.00%> (-5.89%) ⬇️
privval/socket_listeners.go 78.72% <0.00%> (-4.26%) ⬇️
internal/mempool/v0/reactor.go 72.41% <0.00%> (-4.14%) ⬇️
privval/secret_connection.go 72.68% <0.00%> (-3.61%) ⬇️
... and 15 more

@alexanderbez alexanderbez marked this pull request as ready for review June 10, 2021 21:01
Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

👍

I introduced a similar concept with reverse sync as I modelled it off how chunks are sent and received so there's also 4 blockFetchers and a timeout of 10 seconds. Do you think there's any need to make these configurable.

config/config.go Outdated Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
@alexanderbez
Copy link
Contributor Author

👍

I introduced a similar concept with reverse sync as I modelled it off how chunks are sent and received so there's also 4 blockFetchers and a timeout of 10 seconds. Do you think there's any need to make these configurable.

Yeah, I think so. If you feel it's reasonable 👍

@cmwaters
Copy link
Contributor

We could use the same config i.e. amount of ChunkFetchers equals the amount of LightBlockFetchers and just call it Fetchers or something appropriate since I imagine we'll want them to be the same values

@cmwaters
Copy link
Contributor

Just as a side thought, the priority of chunks is 1 (lowest possible). Would it make sense, if there are networks who want to have specific seed nodes for providing state that they are also able to change the priority here. I have a feeling - although not properly tested - that the occasional failures we see arise because the peer receives the request and then prepares the chunk but then the envelope gets dropped before being sent

@alexanderbez alexanderbez added the S:backport-to-v0.34.x Tell mergify to backport the PR to v0.34.x label Jun 15, 2021
@alexanderbez alexanderbez merged commit 7d961b5 into master Jun 15, 2021
@alexanderbez alexanderbez deleted the bez/6564-tune-state-sync branch June 15, 2021 18:33
mergify bot pushed a commit that referenced this pull request Jun 15, 2021
(cherry picked from commit 7d961b5)

# Conflicts:
#	CHANGELOG_PENDING.md
#	config/config.go
#	internal/statesync/reactor.go
#	internal/statesync/reactor_test.go
#	node/node.go
#	statesync/syncer.go
alexanderbez added a commit that referenced this pull request Jun 15, 2021
* state sync: tune request timeout and chunkers (#6566)

(cherry picked from commit 7d961b5)

# Conflicts:
#	CHANGELOG_PENDING.md
#	config/config.go
#	internal/statesync/reactor.go
#	internal/statesync/reactor_test.go
#	node/node.go
#	statesync/syncer.go

* fix build

* fix config

* fix config

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:sync Component: Fast Sync, State Sync S:backport-to-v0.34.x Tell mergify to backport the PR to v0.34.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

statesync: increase chunk request timeout and decrease chunkFetchers
3 participants