Skip to content

Commit

Permalink
Merge branch 'main' into chore/EngineGetClientVersionV1Fails
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarla authored Sep 29, 2024
2 parents c5abc3a + f9695c1 commit ed9ae47
Show file tree
Hide file tree
Showing 68 changed files with 1,374 additions and 1,388 deletions.
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
- 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)
- 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ConsenSys AG.
* Copyright contributors to Hyperledger Besu.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -32,16 +32,25 @@
public class TestPicoCLIPlugin implements BesuPlugin {
private static final Logger LOG = LoggerFactory.getLogger(TestPicoCLIPlugin.class);

private static final String UNSET = "UNSET";
private static final String FAIL_REGISTER = "FAILREGISTER";
private static final String FAIL_BEFORE_EXTERNAL_SERVICES = "FAILBEFOREEXTERNALSERVICES";
private static final String FAIL_START = "FAILSTART";
private static final String FAIL_AFTER_EXTERNAL_SERVICE_POST_MAIN_LOOP =
"FAILAFTEREXTERNALSERVICEPOSTMAINLOOP";
private static final String FAIL_STOP = "FAILSTOP";
private static final String PLUGIN_LIFECYCLE_PREFIX = "pluginLifecycle.";

@Option(
names = {"--Xplugin-test-option"},
hidden = true,
defaultValue = "UNSET")
defaultValue = UNSET)
String testOption = System.getProperty("testPicoCLIPlugin.testOption");

@Option(
names = {"--plugin-test-stable-option"},
hidden = true,
defaultValue = "UNSET")
defaultValue = UNSET)
String stableOption = "";

private String state = "uninited";
Expand All @@ -52,7 +61,7 @@ public void register(final BesuContext context) {
LOG.info("Registering. Test Option is '{}'", testOption);
state = "registering";

if ("FAILREGISTER".equals(testOption)) {
if (FAIL_REGISTER.equals(testOption)) {
state = "failregister";
throw new RuntimeException("I was told to fail at registration");
}
Expand All @@ -66,12 +75,26 @@ public void register(final BesuContext context) {
state = "registered";
}

@Override
public void beforeExternalServices() {
LOG.info("Before external services. Test Option is '{}'", testOption);
state = "beforeExternalServices";

if (FAIL_BEFORE_EXTERNAL_SERVICES.equals(testOption)) {
state = "failbeforeExternalServices";
throw new RuntimeException("I was told to fail before external services");
}

writeSignal("beforeExternalServices");
state = "beforeExternalServicesFinished";
}

@Override
public void start() {
LOG.info("Starting. Test Option is '{}'", testOption);
state = "starting";

if ("FAILSTART".equals(testOption)) {
if (FAIL_START.equals(testOption)) {
state = "failstart";
throw new RuntimeException("I was told to fail at startup");
}
Expand All @@ -80,12 +103,26 @@ public void start() {
state = "started";
}

@Override
public void afterExternalServicePostMainLoop() {
LOG.info("After external services post main loop. Test Option is '{}'", testOption);
state = "afterExternalServicePostMainLoop";

if (FAIL_AFTER_EXTERNAL_SERVICE_POST_MAIN_LOOP.equals(testOption)) {
state = "failafterExternalServicePostMainLoop";
throw new RuntimeException("I was told to fail after external services post main loop");
}

writeSignal("afterExternalServicePostMainLoop");
state = "afterExternalServicePostMainLoopFinished";
}

@Override
public void stop() {
LOG.info("Stopping. Test Option is '{}'", testOption);
state = "stopping";

if ("FAILSTOP".equals(testOption)) {
if (FAIL_STOP.equals(testOption)) {
state = "failstop";
throw new RuntimeException("I was told to fail at stop");
}
Expand All @@ -103,7 +140,7 @@ public String getState() {
@SuppressWarnings("ResultOfMethodCallIgnored")
private void writeSignal(final String signal) {
try {
final File callbackFile = new File(callbackDir, "pluginLifecycle." + signal);
final File callbackFile = new File(callbackDir, PLUGIN_LIFECYCLE_PREFIX + signal);
if (!callbackFile.getParentFile().exists()) {
callbackFile.getParentFile().mkdirs();
callbackFile.getParentFile().deleteOnExit();
Expand Down
Loading

0 comments on commit ed9ae47

Please sign in to comment.