From e09461944e6722b53ae900815d58faa4611303d5 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Thu, 14 Feb 2019 05:56:18 +1000 Subject: [PATCH] Make default pivot distance from head much closer to the chain head to reduce the chance of pruning limiting it's availability before it's completed. (#847) Request 384 nodes per request instead of 200 since that's how many geth will allow returning. Signed-off-by: Adrian Sutton --- .../pantheon/ethereum/eth/sync/SynchronizerConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SynchronizerConfiguration.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SynchronizerConfiguration.java index b0bb13f000..4d74ac2459 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SynchronizerConfiguration.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SynchronizerConfiguration.java @@ -23,11 +23,11 @@ import com.google.common.collect.Range; public class SynchronizerConfiguration { // TODO: Determine reasonable defaults here - public static final int DEFAULT_PIVOT_DISTANCE_FROM_HEAD = 500; + public static final int DEFAULT_PIVOT_DISTANCE_FROM_HEAD = 50; public static final float DEFAULT_FULL_VALIDATION_RATE = .1f; public static final int DEFAULT_FAST_SYNC_MINIMUM_PEERS = 5; private static final Duration DEFAULT_FAST_SYNC_MAXIMUM_PEER_WAIT_TIME = Duration.ofMinutes(5); - private static final int DEFAULT_WORLD_STATE_HASH_COUNT_PER_REQUEST = 200; + private static final int DEFAULT_WORLD_STATE_HASH_COUNT_PER_REQUEST = 384; private static final int DEFAULT_WORLD_STATE_REQUEST_PARALLELISM = 10; // Fast sync config