|
|
@ -85,6 +85,7 @@ public class SynchronizerConfiguration { |
|
|
|
private final int maxTrailingPeers; |
|
|
|
private final int maxTrailingPeers; |
|
|
|
private final long worldStateMinMillisBeforeStalling; |
|
|
|
private final long worldStateMinMillisBeforeStalling; |
|
|
|
private final long propagationManagerGetBlockTimeoutMillis; |
|
|
|
private final long propagationManagerGetBlockTimeoutMillis; |
|
|
|
|
|
|
|
private final boolean isPeerTaskSystemEnabled; |
|
|
|
|
|
|
|
|
|
|
|
private SynchronizerConfiguration( |
|
|
|
private SynchronizerConfiguration( |
|
|
|
final int syncPivotDistance, |
|
|
|
final int syncPivotDistance, |
|
|
@ -108,7 +109,8 @@ public class SynchronizerConfiguration { |
|
|
|
final int computationParallelism, |
|
|
|
final int computationParallelism, |
|
|
|
final int maxTrailingPeers, |
|
|
|
final int maxTrailingPeers, |
|
|
|
final long propagationManagerGetBlockTimeoutMillis, |
|
|
|
final long propagationManagerGetBlockTimeoutMillis, |
|
|
|
final boolean checkpointPostMergeEnabled) { |
|
|
|
final boolean checkpointPostMergeEnabled, |
|
|
|
|
|
|
|
final boolean isPeerTaskSystemEnabled) { |
|
|
|
this.syncPivotDistance = syncPivotDistance; |
|
|
|
this.syncPivotDistance = syncPivotDistance; |
|
|
|
this.fastSyncFullValidationRate = fastSyncFullValidationRate; |
|
|
|
this.fastSyncFullValidationRate = fastSyncFullValidationRate; |
|
|
|
this.syncMinimumPeerCount = syncMinimumPeerCount; |
|
|
|
this.syncMinimumPeerCount = syncMinimumPeerCount; |
|
|
@ -131,6 +133,7 @@ public class SynchronizerConfiguration { |
|
|
|
this.maxTrailingPeers = maxTrailingPeers; |
|
|
|
this.maxTrailingPeers = maxTrailingPeers; |
|
|
|
this.propagationManagerGetBlockTimeoutMillis = propagationManagerGetBlockTimeoutMillis; |
|
|
|
this.propagationManagerGetBlockTimeoutMillis = propagationManagerGetBlockTimeoutMillis; |
|
|
|
this.checkpointPostMergeEnabled = checkpointPostMergeEnabled; |
|
|
|
this.checkpointPostMergeEnabled = checkpointPostMergeEnabled; |
|
|
|
|
|
|
|
this.isPeerTaskSystemEnabled = isPeerTaskSystemEnabled; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static Builder builder() { |
|
|
|
public static Builder builder() { |
|
|
@ -256,6 +259,10 @@ public class SynchronizerConfiguration { |
|
|
|
return propagationManagerGetBlockTimeoutMillis; |
|
|
|
return propagationManagerGetBlockTimeoutMillis; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isPeerTaskSystemEnabled() { |
|
|
|
|
|
|
|
return isPeerTaskSystemEnabled; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static class Builder { |
|
|
|
public static class Builder { |
|
|
|
private SyncMode syncMode = SyncMode.FULL; |
|
|
|
private SyncMode syncMode = SyncMode.FULL; |
|
|
|
private int syncMinimumPeerCount = DEFAULT_SYNC_MINIMUM_PEERS; |
|
|
|
private int syncMinimumPeerCount = DEFAULT_SYNC_MINIMUM_PEERS; |
|
|
@ -280,6 +287,7 @@ public class SynchronizerConfiguration { |
|
|
|
DEFAULT_WORLD_STATE_MAX_REQUESTS_WITHOUT_PROGRESS; |
|
|
|
DEFAULT_WORLD_STATE_MAX_REQUESTS_WITHOUT_PROGRESS; |
|
|
|
private long worldStateMinMillisBeforeStalling = DEFAULT_WORLD_STATE_MIN_MILLIS_BEFORE_STALLING; |
|
|
|
private long worldStateMinMillisBeforeStalling = DEFAULT_WORLD_STATE_MIN_MILLIS_BEFORE_STALLING; |
|
|
|
private int worldStateTaskCacheSize = DEFAULT_WORLD_STATE_TASK_CACHE_SIZE; |
|
|
|
private int worldStateTaskCacheSize = DEFAULT_WORLD_STATE_TASK_CACHE_SIZE; |
|
|
|
|
|
|
|
private boolean isPeerTaskSystemEnabled = false; |
|
|
|
|
|
|
|
|
|
|
|
private long propagationManagerGetBlockTimeoutMillis = |
|
|
|
private long propagationManagerGetBlockTimeoutMillis = |
|
|
|
DEFAULT_PROPAGATION_MANAGER_GET_BLOCK_TIMEOUT_MILLIS; |
|
|
|
DEFAULT_PROPAGATION_MANAGER_GET_BLOCK_TIMEOUT_MILLIS; |
|
|
@ -406,6 +414,11 @@ public class SynchronizerConfiguration { |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Builder isPeerTaskSystemEnabled(final boolean isPeerTaskSystemEnabled) { |
|
|
|
|
|
|
|
this.isPeerTaskSystemEnabled = isPeerTaskSystemEnabled; |
|
|
|
|
|
|
|
return this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public SynchronizerConfiguration build() { |
|
|
|
public SynchronizerConfiguration build() { |
|
|
|
return new SynchronizerConfiguration( |
|
|
|
return new SynchronizerConfiguration( |
|
|
|
syncPivotDistance, |
|
|
|
syncPivotDistance, |
|
|
@ -429,7 +442,8 @@ public class SynchronizerConfiguration { |
|
|
|
computationParallelism, |
|
|
|
computationParallelism, |
|
|
|
maxTrailingPeers, |
|
|
|
maxTrailingPeers, |
|
|
|
propagationManagerGetBlockTimeoutMillis, |
|
|
|
propagationManagerGetBlockTimeoutMillis, |
|
|
|
checkpointPostMergeEnabled); |
|
|
|
checkpointPostMergeEnabled, |
|
|
|
|
|
|
|
isPeerTaskSystemEnabled); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|