Skip to content

[CHORE] Imporve fast sync config params #682

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

Merged
merged 5 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ mantis {

# Retry interval for resuming fast sync after all connections to peers were lost
# Also retry interval in regular sync: for picking blocks batch and retrying requests
sync-retry-interval = 15.seconds
sync-retry-interval = 0.5 seconds

# Response time-out from peer during sync. If a peer fails to respond within this limit, it will be blacklisted
peer-response-timeout = 3.minutes
Expand Down Expand Up @@ -325,7 +325,7 @@ mantis {

# During fast-sync when most up to date block is determined from peers, the actual target block number
# will be decreased by this value
target-block-offset = 500
target-block-offset = 128

# How often to query peers for new blocks after the top of the chain has been reached
check-for-new-block-interval = 10.seconds
Expand All @@ -335,7 +335,7 @@ mantis {
fastsync-block-chain-only-peers-pool = 100

# time between 2 consecutive requests to peer when doing fast sync, this is to prevent flagging us as spammer
fastsync-throttle = 0.3 seconds
fastsync-throttle = 0.1 seconds

# When we receive a branch that is not rooted in our chain (we don't have a parent for the first header), it means
# we found a fork. To resolve it, we need to query the same peer for previous headers, to find a common ancestor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ class FastSync(
if (assignedHandlers.nonEmpty) {
log.debug("There are no available peers, waiting for responses")
} else {
log.debug("There are no peers to download from, scheduling a retry in {}", syncRetryInterval)
scheduler.scheduleOnce(syncRetryInterval, self, ProcessSyncing)
}
} else {
Expand Down