Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

RevertReason changed to BytesValue #1746

Merged
merged 37 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
639b410
RevertReason changed to BytesValue
Jul 24, 2019
8bd82ae
post review
Jul 25, 2019
20f4316
Added static nodes acceptance test (#1745)
lucassaldanha Jul 24, 2019
a85980a
update vertx to 2.8.0 (#1748)
Jul 24, 2019
5b78518
Reduce number of builds retained for master (#1751)
ajsutton Jul 24, 2019
5c67f04
PIE-1792: Added chainId validation to PrivateTransactionValidator (#1…
lucassaldanha Jul 24, 2019
2f9818a
Added note about private transaction nonce (#1740)
MadelineMurray Jul 25, 2019
c3bf607
[PAN-2950] Use java.time.Clock instead of System.currentTimeMillis() …
Jul 25, 2019
09fb64c
Report node local address as the coinbase in Clique and IBFT. (#1758)
ajsutton Jul 25, 2019
fbb8736
Renamed HA section to make clearer what it is (#1750)
MadelineMurray Jul 25, 2019
e88de17
[PAN-2845] Added eea_getPrivateTransaction (#1729)
MadelineMurray Jul 25, 2019
8e6364d
Fixes PIE-1669 typo (#1763)
sgregglives Jul 25, 2019
6c07566
[PAN-2943] Renames various eea methods to priv methods, with associat…
josh-richardson Jul 25, 2019
ec7cfa0
[PAN-2727] Permissioning Acceptance Test - Verify OnChain Nodes Out o…
usmansaleem Jul 26, 2019
825242a
PAN-2723: Testing permissioning with static nodes behaviour (#1764)
lucassaldanha Jul 26, 2019
e38bec0
trying to fix stuff
Jul 26, 2019
a118716
Fixed RevertReasonAT
Jul 26, 2019
66d2b2d
Cleanup
Jul 26, 2019
d7af3d4
not sure what this one is about
Jul 26, 2019
ae80d96
repair empty revert reason
Jul 26, 2019
6bf9ff5
fixes PAN-2958 list typo (missing new line) (#1742)
NicolasMassart Jul 26, 2019
35278e7
Revert "[PAN-2950] Use java.time.Clock instead of System.currentTimeM…
Jul 26, 2019
168dcf4
[PAN-2444] Add CLI flag for setting WorldStateDownloader task cache …
Jul 26, 2019
b439d7f
Moved priv methods into priv section (#1770)
MadelineMurray Jul 27, 2019
7082eb4
[PAN-2881] [PAN-2885] Updated onchain permissioning to include accoun…
MadelineMurray Jul 27, 2019
c5f6a0a
Added privacy group methods for web3.js-eea (#1761)
MadelineMurray Jul 27, 2019
89a39a2
[PAN-2957] Add Java 11+ as a prerequisite for installing Pantheon usi…
bgravenorst Jul 27, 2019
6412d95
Updated revert reason example (#1754)
MadelineMurray Jul 27, 2019
5f4b5be
Typo doc in word "exceptoinal" (#1767)
helderjnpinto Jul 29, 2019
4c7b677
Added content on deploying for production (#1774)
MadelineMurray Jul 29, 2019
8e9bd85
Repaired empty revert reason output
Jul 29, 2019
4ed31e8
Merge remote-tracking branch 'upstream/master' into revert
Jul 29, 2019
ec7b1bf
Transaction receipt inserts 0x for empty revert reason
Jul 29, 2019
58b75cc
Merge remote-tracking branch 'upstream/master' into revert
Jul 29, 2019
e64e574
Repair failing AT
Jul 29, 2019
98fe982
Merge branch 'master' into revert
rain-on Jul 30, 2019
0ae3d4c
Merge branch 'master' into revert
rain-on Jul 30, 2019
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
Prev Previous commit
Next Next commit
[PAN-2444] Add CLI flag for setting WorldStateDownloader task cache s…
…ize (#1749)
  • Loading branch information
Karim T authored and tmohay committed Jul 29, 2019
commit 168dcf42c8790a6b1bb7f10ee6d386b668b9092a
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

import tech.pegasys.pantheon.services.tasks.CachingTaskCollection;
import tech.pegasys.pantheon.util.uint.UInt256;

import java.util.concurrent.TimeUnit;
Expand All @@ -41,6 +42,8 @@ public class SynchronizerConfiguration {
public static final int DEFAULT_DOWNLOADER_PARALLELISM = 4;
public static final int DEFAULT_TRANSACTIONS_PARALLELISM = 2;
public static final int DEFAULT_COMPUTATION_PARALLELISM = 2;
public static final int DEFAULT_WORLD_STATE_TASK_CACHE_SIZE =
CachingTaskCollection.DEFAULT_CACHE_SIZE;

// Fast sync config
private final int fastSyncPivotDistance;
Expand All @@ -49,6 +52,7 @@ public class SynchronizerConfiguration {
private final int worldStateHashCountPerRequest;
private final int worldStateRequestParallelism;
private final int worldStateMaxRequestsWithoutProgress;
private final int worldStateTaskCacheSize;

// Block propagation config
private final Range<Long> blockPropagationRange;
Expand Down Expand Up @@ -76,6 +80,7 @@ private SynchronizerConfiguration(
final int worldStateRequestParallelism,
final int worldStateMaxRequestsWithoutProgress,
final long worldStateMinMillisBeforeStalling,
final int worldStateTaskCacheSize,
final Range<Long> blockPropagationRange,
final SyncMode syncMode,
final long downloaderChangeTargetThresholdByHeight,
Expand All @@ -94,6 +99,7 @@ private SynchronizerConfiguration(
this.worldStateRequestParallelism = worldStateRequestParallelism;
this.worldStateMaxRequestsWithoutProgress = worldStateMaxRequestsWithoutProgress;
this.worldStateMinMillisBeforeStalling = worldStateMinMillisBeforeStalling;
this.worldStateTaskCacheSize = worldStateTaskCacheSize;
this.blockPropagationRange = blockPropagationRange;
this.syncMode = syncMode;
this.downloaderChangeTargetThresholdByHeight = downloaderChangeTargetThresholdByHeight;
Expand Down Expand Up @@ -203,6 +209,10 @@ public long getWorldStateMinMillisBeforeStalling() {
return worldStateMinMillisBeforeStalling;
}

public int getWorldStateTaskCacheSize() {
return worldStateTaskCacheSize;
}

public int getMaxTrailingPeers() {
return maxTrailingPeers;
}
Expand Down Expand Up @@ -230,6 +240,7 @@ public static class Builder {
private int worldStateMaxRequestsWithoutProgress =
DEFAULT_WORLD_STATE_MAX_REQUESTS_WITHOUT_PROGRESS;
private long worldStateMinMillisBeforeStalling = DEFAULT_WORLD_STATE_MIN_MILLIS_BEFORE_STALLING;
private int worldStateTaskCacheSize = DEFAULT_WORLD_STATE_TASK_CACHE_SIZE;

public Builder fastSyncPivotDistance(final int distance) {
fastSyncPivotDistance = distance;
Expand Down Expand Up @@ -327,6 +338,11 @@ public Builder worldStateMinMillisBeforeStalling(final long worldStateMinMillisB
return this;
}

public Builder worldStateTaskCacheSize(final int worldStateTaskCacheSize) {
this.worldStateTaskCacheSize = worldStateTaskCacheSize;
return this;
}

public Builder maxTrailingPeers(final int maxTailingPeers) {
this.maxTrailingPeers = maxTailingPeers;
return this;
Expand All @@ -341,6 +357,7 @@ public SynchronizerConfiguration build() {
worldStateRequestParallelism,
worldStateMaxRequestsWithoutProgress,
worldStateMinMillisBeforeStalling,
worldStateTaskCacheSize,
blockPropagationRange,
syncMode,
downloaderChangeTargetThresholdByHeight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public static <C> Optional<FastSyncDownloader<C>> create(

final CachingTaskCollection<NodeDataRequest> taskCollection =
createWorldStateDownloaderTaskCollection(
getStateQueueDirectory(dataDirectory), metricsSystem);
getStateQueueDirectory(dataDirectory),
metricsSystem,
syncConfig.getWorldStateTaskCacheSize());
final WorldStateDownloader worldStateDownloader =
new WorldStateDownloader(
ethContext,
Expand Down Expand Up @@ -116,11 +118,14 @@ private static void ensureDirectoryExists(final File dir) {
}

private static CachingTaskCollection<NodeDataRequest> createWorldStateDownloaderTaskCollection(
final Path dataDirectory, final MetricsSystem metricsSystem) {
final Path dataDirectory,
final MetricsSystem metricsSystem,
final int worldStateTaskCacheSize) {
final CachingTaskCollection<NodeDataRequest> taskCollection =
new CachingTaskCollection<>(
new FlatFileTaskCollection<>(
dataDirectory, NodeDataRequest::serialize, NodeDataRequest::deserialize));
dataDirectory, NodeDataRequest::serialize, NodeDataRequest::deserialize),
worldStateTaskCacheSize);

metricsSystem.createLongGauge(
PantheonMetricCategory.SYNCHRONIZER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public class SynchronizerOptions implements CLIOptions<SynchronizerConfiguration
"--Xsynchronizer-world-state-max-requests-without-progress";
private static final String WORLD_STATE_MIN_MILLIS_BEFORE_STALLING_FLAG =
"--Xsynchronizer-world-state-min-millis-before-stalling";
private static final String WORLD_STATE_TASK_CACHE_SIZE_FLAG =
"--Xsynchronizer-world-state-task-cache-size";

@CommandLine.Option(
names = BLOCK_PROPAGATION_RANGE_FLAG,
Expand Down Expand Up @@ -196,6 +198,16 @@ public void parseBlockPropagationRange(final String arg) {
private long worldStateMinMillisBeforeStalling =
SynchronizerConfiguration.DEFAULT_WORLD_STATE_MIN_MILLIS_BEFORE_STALLING;

@CommandLine.Option(
names = WORLD_STATE_TASK_CACHE_SIZE_FLAG,
hidden = true,
defaultValue = "1000000",
paramLabel = "<INTEGER>",
description =
"The max number of pending node data requests cached in-memory during fast sync world state download. (default: ${DEFAULT-VALUE})")
private int worldStateTaskCacheSize =
SynchronizerConfiguration.DEFAULT_WORLD_STATE_TASK_CACHE_SIZE;

private SynchronizerOptions() {}

public static SynchronizerOptions create() {
Expand All @@ -221,6 +233,7 @@ public static SynchronizerOptions fromConfig(final SynchronizerConfiguration con
options.worldStateRequestParallelism = config.getWorldStateRequestParallelism();
options.worldStateMaxRequestsWithoutProgress = config.getWorldStateMaxRequestsWithoutProgress();
options.worldStateMinMillisBeforeStalling = config.getWorldStateMinMillisBeforeStalling();
options.worldStateTaskCacheSize = config.getWorldStateTaskCacheSize();
return options;
}

Expand All @@ -242,6 +255,7 @@ public SynchronizerConfiguration.Builder toDomainObject() {
builder.worldStateRequestParallelism(worldStateRequestParallelism);
builder.worldStateMaxRequestsWithoutProgress(worldStateMaxRequestsWithoutProgress);
builder.worldStateMinMillisBeforeStalling(worldStateMinMillisBeforeStalling);
builder.worldStateTaskCacheSize(worldStateTaskCacheSize);
return builder;
}

Expand Down Expand Up @@ -277,6 +291,8 @@ public List<String> getCLIOptions() {
WORLD_STATE_MAX_REQUESTS_WITHOUT_PROGRESS_FLAG,
OptionParser.format(worldStateMaxRequestsWithoutProgress),
WORLD_STATE_MIN_MILLIS_BEFORE_STALLING_FLAG,
OptionParser.format(worldStateMinMillisBeforeStalling));
OptionParser.format(worldStateMinMillisBeforeStalling),
WORLD_STATE_TASK_CACHE_SIZE_FLAG,
OptionParser.format(worldStateTaskCacheSize));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ SynchronizerConfiguration.Builder createCustomizedDomainObject() {
SynchronizerConfiguration.DEFAULT_WORLD_STATE_MAX_REQUESTS_WITHOUT_PROGRESS * 2)
.worldStateMinMillisBeforeStalling(
SynchronizerConfiguration.DEFAULT_WORLD_STATE_MIN_MILLIS_BEFORE_STALLING * 2)
.worldStateTaskCacheSize(SynchronizerConfiguration.DEFAULT_WORLD_STATE_TASK_CACHE_SIZE + 1)
.blockPropagationRange(
Range.closed(
SynchronizerConfiguration.DEFAULT_BLOCK_PROPAGATION_RANGE.lowerEndpoint() - 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import java.util.Set;

public class CachingTaskCollection<T> implements TaskCollection<T> {
private static final int DEFAULT_CACHE_SIZE = 1_000_000;

public static final int DEFAULT_CACHE_SIZE = 1_000_000;
private final int maxCacheSize;

// The underlying collection
Expand Down