Skip to content

Commit

Permalink
Vertx worker pool size cli option (#946)
Browse files Browse the repository at this point in the history
-- deprecate --Xworker-pool-size
-- Use --vertx-worker-pool-size
-- Update changelog
---------

Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
  • Loading branch information
usmansaleem and siladu committed Nov 9, 2023
1 parent 6111fbe commit b001351
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Changelog

## Next version
## 23.11.0
### Upcoming Breaking Changes
- `--Xworker-pool-size` cli option will be removed in a future release. This option has been replaced with `--vertx-worker-pool-size`.

### Bugs fixed
- Update netty to fix CVE-2023-44487

### Features Added
- Google Cloud Secret Manager bulk loading support for BLS keys in eth2 mode via PR [#928](https://github.com/Consensys/web3signer/pull/928) contributed by [Sergey Kisel](https://github.com/skisel-bt).
- Removed need for KZG trusted setup file and associated --Xtrusted-setup command line argument
- Removed hidden option `--Xtrusted-setup` as Web3Signer does not need KZG trusted setup file anymore.
- Make Vert.x worker pool size configurable using cli option `--vertx-worker-pool-size` (replaces the now deprecated: `--Xworker-pool-size`). [#920](https://github.com/Consensys/web3signer/pull/920)

## 23.9.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import static tech.pegasys.web3signer.commandline.DefaultCommandValues.CONFIG_FILE_OPTION_NAME;
import static tech.pegasys.web3signer.commandline.DefaultCommandValues.FILE_FORMAT_HELP;
import static tech.pegasys.web3signer.commandline.DefaultCommandValues.HOST_FORMAT_HELP;
import static tech.pegasys.web3signer.commandline.DefaultCommandValues.INTEGER_FORMAT_HELP;
import static tech.pegasys.web3signer.commandline.DefaultCommandValues.PORT_FORMAT_HELP;
import static tech.pegasys.web3signer.common.Web3SignerMetricCategory.DEFAULT_METRIC_CATEGORIES;

Expand Down Expand Up @@ -204,10 +205,15 @@ public class Web3SignerBaseCommand implements BaseConfig, Runnable {
private boolean keystoreParallelProcessingEnabled = true;

@Option(
names = "--Xworker-pool-size",
description = "Configure the work pool size used for processing requests",
hidden = true)
private int workerPoolSize = 20;
names = "--vertx-worker-pool-size",
description =
"Configure the Vert.x worker pool size used for processing requests. (default: ${DEFAULT-VALUE})",
paramLabel = INTEGER_FORMAT_HELP)
private int vertxWorkerPoolSize = 20;

@Deprecated
@Option(names = "--Xworker-pool-size", hidden = true)
private Integer deprecatedWorkerPoolSize = null;

@CommandLine.Mixin private PicoCliTlsServerOptions picoCliTlsServerOptions;

Expand Down Expand Up @@ -314,8 +320,11 @@ public boolean keystoreParallelProcessingEnabled() {
}

@Override
public int getWorkerPoolSize() {
return workerPoolSize;
public int getVertxWorkerPoolSize() {
if (deprecatedWorkerPoolSize != null) {
return deprecatedWorkerPoolSize;
}
return vertxWorkerPoolSize;
}

@Override
Expand All @@ -336,7 +345,7 @@ public String toString() {
.add("metricsHostAllowList", metricsHostAllowList)
.add("picoCliTlsServerOptions", picoCliTlsServerOptions)
.add("idleConnectionTimeoutSeconds", idleConnectionTimeoutSeconds)
.add("workerPoolSize", workerPoolSize)
.add("vertxWorkerPoolSize", vertxWorkerPoolSize)
.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public boolean keystoreParallelProcessingEnabled() {
}

@Override
public int getWorkerPoolSize() {
public int getVertxWorkerPoolSize() {
return 20;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private void createVersionMetric(final MetricsSystem metricsSystem) {

private VertxOptions createVertxOptions(final MetricsSystem metricsSystem) {
return new VertxOptions()
.setWorkerPoolSize(baseConfig.getWorkerPoolSize())
.setWorkerPoolSize(baseConfig.getVertxWorkerPoolSize())
.setMetricsOptions(
new MetricsOptions()
.setEnabled(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ public interface BaseConfig {

boolean keystoreParallelProcessingEnabled();

int getWorkerPoolSize();
int getVertxWorkerPoolSize();
}

0 comments on commit b001351

Please sign in to comment.