Skip to content

Commit

Permalink
Merge branch 'main' into emeritus-at
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarla committed Sep 30, 2024
2 parents a1ff488 + c3aa3f4 commit 41b942f
Show file tree
Hide file tree
Showing 154 changed files with 3,410 additions and 1,764 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ concurrency:
cancel-in-progress: true

env:
GRADLE_OPTS: "-Xmx6g"
total-runners: 12
GRADLE_OPTS: "-Xmx7g"
total-runners: 14

jobs:
acceptanceTestEthereum:
Expand All @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: true
matrix:
runner_index: [0,1,2,3,4,5,6,7,8,9,10,11]
runner_index: [0,1,2,3,4,5,6,7,8,9,10,11,12,13]
steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

env:
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.parallel=true"
total-runners: 8
total-runners: 10

jobs:
repolint:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
strategy:
fail-fast: true
matrix:
runner_index: [0,1,2,3,4,5,6,7]
runner_index: [0,1,2,3,4,5,6,7,8,9]
steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reference-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true -Dorg.gradle.caching=true"
total-runners: 10
total-runners: 8

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: true
matrix:
runner_index: [1,2,3,4,5,6,7,8,9,10]
runner_index: [1,2,3,4,5,6,7,8]
steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ jobs:
steps:
- name: Pre-process Release Name
id: pre_process_release_name
env:
RELEASE_NAME: "${{ github.event.release.name }}"
run: |
RELEASE_NAME="${{ github.event.release.name }}"
# strip all whitespace
RELEASE_NAME="${RELEASE_NAME//[[:space:]]/}"
if [[ ! "$RELEASE_NAME" =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?(-.*)?$ ]]; then
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@
- k8s (KUBERNETES) Nat method is now deprecated and will be removed in a future release

### Breaking Changes
- Besu will now fail to start if any plugins encounter errors during initialization. To allow Besu to continue running despite plugin errors, use the `--plugin-continue-on-error` option. [#7662](https://github.com/hyperledger/besu/pull/7662)

### Additions and Improvements
- Remove privacy test classes support [#7569](https://github.com/hyperledger/besu/pull/7569)
- Add Blob Transaction Metrics [#7622](https://github.com/hyperledger/besu/pull/7622)
- Implemented support for emptyBlockPeriodSeconds in QBFT [#6965](https://github.com/hyperledger/besu/pull/6965)
- LUKSO Cancun Hardfork [#7686](https://github.com/hyperledger/besu/pull/7686)
- Add configuration of Consolidation Request Contract Address via genesis configuration [#7647](https://github.com/hyperledger/besu/pull/7647)
- Interrupt pending transaction processing on block creation timeout [#7673](https://github.com/hyperledger/besu/pull/7673)

### Bug fixes
- Fix mounted data path directory permissions for besu user [#7575](https://github.com/hyperledger/besu/pull/7575)
- Fix for `debug_traceCall` to handle transactions without specified gas price. [#7510](https://github.com/hyperledger/besu/pull/7510)
- Corrects a regression where custom plugin services are not initialized correctly. [#7625](https://github.com/hyperledger/besu/pull/7625)
- Fix for IBFT2 chains using the BONSAI DB format [#7631](https://github.com/hyperledger/besu/pull/7631)
- Fix reading `tx-pool-min-score` option from configuration file [#7623](https://github.com/hyperledger/besu/pull/7623)

## 24.9.1

Expand Down
4 changes: 2 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
| Matthew Whitehead| matthew1001 | matthew.whitehead |
| Meredith Baxter | mbaxter | mbaxter |
| Stefan Pingel | pinges | pinges |
| Danno Ferrin | shemnon | shemnon |
| Simon Dudley | siladu | siladu |
| Usman Saleem | usmansaleem | usmansaleem |

Expand Down Expand Up @@ -52,6 +51,7 @@
| Rai Sur | RatanRSur | ratanraisur |
| Rob Dawson | rojotek | RobDawson |
| Sajida Zouarhi | sajz | SajidaZ |
| Danno Ferrin | shemnon | shemnon |
| Taccat Isid | taccatisid | taccatisid |
| Tim Beiko | timbeiko | timbeiko |
| Vijay Michalik | vmichalik | VijayMichalik |
Expand Down Expand Up @@ -82,7 +82,7 @@ The following steps must occur for a contributor to be "upgraded" as a maintaine
- The proposed maintainer accepts the nomination and expresses a willingness
to be a long-term (more than 6 month) committer by adding a comment in the proposal PR.
- The PR will be communicated in all appropriate communication channels
including at least [besu-contributors channel on Hyperledger Discord](https://discord.gg/hyperledger),
including at least [besu-contributors channel on Discord](https://discord.gg/hyperledger),
the [mailing list](https://lists.hyperledger.org/g/besu)
and any maintainer/community call.
- Approval by at least 3 current maintainers within two weeks of the proposal or
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Besu is an Apache 2.0 licensed, MainNet compatible, Ethereum client written in J

* [Besu User Documentation]
* [Besu Issues]
* [Besu Wiki](https://wiki.hyperledger.org/display/BESU/Hyperledger+Besu)
* [Besu Wiki](https://wiki.hyperledger.org/display/BESU/Besu)
* [How to Contribute to Besu](https://wiki.hyperledger.org/display/BESU/How+to+Contribute)
* [Besu Roadmap & Planning](https://wiki.hyperledger.org/pages/viewpage.action?pageId=24781786)

Expand Down
10 changes: 5 additions & 5 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Hyperledger Besu Support
# Besu Support

Welcome to the Besu repository! The following links are a set of guidelines for contributing to this repo and its packages. These are mostly guidelines, not rules. Use your best judgement, and feel free to propose changes to this document in a pull request. Contributions come in the form of code submissions, writing documentation, raising issues, helping others in chat, and any other actions that help develop Besu.

### Github/Discord/LF Accounts

Having Github, Discord, and Linux Foundation accounts is necessary for obtaining support for Besu through the community channels, wiki and issue management.
* If you want to raise an issue, you can do so [on the github issue tab](https://github.com/hyperledger/besu/issues).
* Hyperledger Discord requires a [Discord account].
* The Hyperledger wiki also requires a [Linux Foundation (LF) account] in order to edit pages.
* Discord requires a [Discord account].
* The Besu wiki also requires a [Linux Foundation (LF) account] in order to edit pages.

### Useful support links

* [Besu User Documentation]
* [Besu channel on Hyperledger Discord]
* [Besu channel on Discord]
* [I just have a quick question](https://wiki.hyperledger.org/display/BESU/I+just+have+a+quick+question)
* [Did you find a bug?](https://wiki.hyperledger.org/display/BESU/Reporting+Bugs)
* [Issues](https://wiki.hyperledger.org/display/BESU/Issues)
* [Contributing Guidelines]


[Besu User Documentation]: https://besu.hyperledger.org
[Besu channel on Hyperledger Discord]: https://discord.gg/hyperledger
[Besu channel on Discord]: https://discord.gg/hyperledger
[Contributing Guidelines]: CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,70 @@ public void startNode(final BesuNode node) {

final Path dataDir = node.homeDirectory();

final List<String> params = commandlineArgs(node, dataDir);

LOG.info("Creating besu process with params {}", params);
final ProcessBuilder processBuilder =
new ProcessBuilder(params)
.directory(new File(System.getProperty("user.dir")).getParentFile().getParentFile())
.redirectErrorStream(true)
.redirectInput(Redirect.INHERIT);
if (!node.getPlugins().isEmpty()) {
processBuilder
.environment()
.put(
"BESU_OPTS",
"-Dbesu.plugins.dir=" + dataDir.resolve("plugins").toAbsolutePath().toString());
}
// Use non-blocking randomness for acceptance tests
processBuilder
.environment()
.put(
"JAVA_OPTS",
"-Djava.security.properties="
+ "acceptance-tests/tests/build/resources/test/acceptanceTesting.security");
// add additional environment variables
processBuilder.environment().putAll(node.getEnvironment());

try {
int debugPort = Integer.parseInt(System.getenv("BESU_DEBUG_CHILD_PROCESS_PORT"));
LOG.warn("Waiting for debugger to attach to SUSPENDED child process");
String debugOpts =
" -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:" + debugPort;
String prevJavaOpts = processBuilder.environment().get("JAVA_OPTS");
if (prevJavaOpts == null) {
processBuilder.environment().put("JAVA_OPTS", debugOpts);
} else {
processBuilder.environment().put("JAVA_OPTS", prevJavaOpts + debugOpts);
}

} catch (NumberFormatException e) {
LOG.debug(
"Child process may be attached to by exporting BESU_DEBUG_CHILD_PROCESS_PORT=<port> to env");
}

try {
checkState(
isNotAliveOrphan(node.getName()),
"A live process with name: %s, already exists. Cannot create another with the same name as it would orphan the first",
node.getName());

final Process process = processBuilder.start();
process.onExit().thenRun(() -> node.setExitCode(process.exitValue()));
outputProcessorExecutor.execute(() -> printOutput(node, process));
besuProcesses.put(node.getName(), process);
} catch (final IOException e) {
LOG.error("Error starting BesuNode process", e);
}

if (node.getRunCommand().isEmpty()) {
waitForFile(dataDir, "besu.ports");
waitForFile(dataDir, "besu.networks");
}
MDC.remove("node");
}

private List<String> commandlineArgs(final BesuNode node, final Path dataDir) {
final List<String> params = new ArrayList<>();
params.add("build/install/besu/bin/besu");

Expand Down Expand Up @@ -388,66 +452,7 @@ public void startNode(final BesuNode node) {
}

params.addAll(node.getRunCommand());

LOG.info("Creating besu process with params {}", params);
final ProcessBuilder processBuilder =
new ProcessBuilder(params)
.directory(new File(System.getProperty("user.dir")).getParentFile().getParentFile())
.redirectErrorStream(true)
.redirectInput(Redirect.INHERIT);
if (!node.getPlugins().isEmpty()) {
processBuilder
.environment()
.put(
"BESU_OPTS",
"-Dbesu.plugins.dir=" + dataDir.resolve("plugins").toAbsolutePath().toString());
}
// Use non-blocking randomness for acceptance tests
processBuilder
.environment()
.put(
"JAVA_OPTS",
"-Djava.security.properties="
+ "acceptance-tests/tests/build/resources/test/acceptanceTesting.security");
// add additional environment variables
processBuilder.environment().putAll(node.getEnvironment());

try {
int debugPort = Integer.parseInt(System.getenv("BESU_DEBUG_CHILD_PROCESS_PORT"));
LOG.warn("Waiting for debugger to attach to SUSPENDED child process");
String debugOpts =
" -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:" + debugPort;
String prevJavaOpts = processBuilder.environment().get("JAVA_OPTS");
if (prevJavaOpts == null) {
processBuilder.environment().put("JAVA_OPTS", debugOpts);
} else {
processBuilder.environment().put("JAVA_OPTS", prevJavaOpts + debugOpts);
}

} catch (NumberFormatException e) {
LOG.debug(
"Child process may be attached to by exporting BESU_DEBUG_CHILD_PROCESS_PORT=<port> to env");
}

try {
checkState(
isNotAliveOrphan(node.getName()),
"A live process with name: %s, already exists. Cannot create another with the same name as it would orphan the first",
node.getName());

final Process process = processBuilder.start();
process.onExit().thenRun(() -> node.setExitCode(process.exitValue()));
outputProcessorExecutor.execute(() -> printOutput(node, process));
besuProcesses.put(node.getName(), process);
} catch (final IOException e) {
LOG.error("Error starting BesuNode process", e);
}

if (node.getRunCommand().isEmpty()) {
waitForFile(dataDir, "besu.ports");
waitForFile(dataDir, "besu.networks");
}
MDC.remove("node");
return params;
}

private boolean isNotAliveOrphan(final String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ public void startNode(final BesuNode node) {
final PermissioningServiceImpl permissioningService = new PermissioningServiceImpl();

GlobalOpenTelemetry.resetForTest();
final ObservableMetricsSystem metricsSystem = component.getObservableMetricsSystem();
final ObservableMetricsSystem metricsSystem =
(ObservableMetricsSystem) component.getMetricsSystem();
final List<EnodeURL> bootnodes =
node.getConfiguration().getBootnodes().stream().map(EnodeURLImpl::fromURI).toList();

Expand Down Expand Up @@ -280,6 +281,16 @@ public BesuNodeProviderModule(final BesuNode toProvide) {
this.toProvide = toProvide;
}

@Provides
@Singleton
MetricsConfiguration provideMetricsConfiguration() {
if (toProvide.getMetricsConfiguration() != null) {
return toProvide.getMetricsConfiguration();
} else {
return MetricsConfiguration.builder().build();
}
}

@Provides
public BesuNode provideBesuNodeRunner() {
return toProvide;
Expand Down Expand Up @@ -410,13 +421,13 @@ public BesuControllerBuilder provideBesuControllerBuilder(
public BesuController provideBesuController(
final SynchronizerConfiguration synchronizerConfiguration,
final BesuControllerBuilder builder,
final ObservableMetricsSystem metricsSystem,
final MetricsSystem metricsSystem,
final KeyValueStorageProvider storageProvider,
final MiningParameters miningParameters) {

builder
.synchronizerConfiguration(synchronizerConfiguration)
.metricsSystem(metricsSystem)
.metricsSystem((ObservableMetricsSystem) metricsSystem)
.dataStorageConfiguration(DataStorageConfiguration.DEFAULT_FOREST_CONFIG)
.ethProtocolConfiguration(EthProtocolConfiguration.defaultConfig())
.clock(Clock.systemUTC())
Expand Down Expand Up @@ -492,8 +503,9 @@ public BesuPluginContextImpl providePluginContext(
besuPluginContext.addService(PermissioningService.class, permissioningService);
besuPluginContext.addService(PrivacyPluginService.class, new PrivacyPluginServiceImpl());

besuPluginContext.registerPlugins(
besuPluginContext.initialize(
new PluginConfiguration.Builder().pluginsDir(pluginsPath).build());
besuPluginContext.registerPlugins();
commandLine.parseArgs(extraCLIOptions.toArray(new String[0]));

// register built-in plugins
Expand Down Expand Up @@ -562,12 +574,6 @@ BesuCommand provideBesuCommand(final BesuPluginContextImpl pluginContext) {
return besuCommand;
}

@Provides
@Singleton
MetricsConfiguration provideMetricsConfiguration() {
return MetricsConfiguration.builder().build();
}

@Provides
@Named("besuCommandLogger")
@Singleton
Expand Down
Loading

0 comments on commit 41b942f

Please sign in to comment.