Skip to content

Commit

Permalink
Merge branch 'main' into 7311-add-GetHeadersFromPeerTask
Browse files Browse the repository at this point in the history
  • Loading branch information
Matilda-Clerke authored Nov 26, 2024
2 parents f002ba3 + 0e908d2 commit 75b091a
Show file tree
Hide file tree
Showing 175 changed files with 1,379 additions and 717 deletions.
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
# Changelog

## [Unreleased]
- Added isLabelsObserved to LabelledGauge in plugin-api. Default implementation returns false.

### Breaking Changes
- Removed Retesteth rpc service and commands [#7833](https://github.com/hyperledger/besu/pull/7783)

### Upcoming Breaking Changes
- Plugin API will be deprecating the BesuContext interface to be replaced with the ServiceManager interface.
- `MetricSystem::createLabelledGauge` is deprecated and will be removed in a future release, replace it with `MetricSystem::createLabelledSuppliedGauge`
- k8s (KUBERNETES) Nat method is now deprecated and will be removed in a future release
- `--host-whitelist` has been deprecated in favor of `--host-allowlist` since 2020 and will be removed in a future release
- Sunsetting features - for more context on the reasoning behind the deprecation of these features, including alternative options, read [this blog post](https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu)
- Tessera privacy
- Smart-contract-based permissioning
- Proof of Work consensus
- Fast Sync

### Additions and Improvements
- Fine tune already seen txs tracker when a tx is removed from the pool [#7755](https://github.com/hyperledger/besu/pull/7755)
- Support for enabling and configuring TLS/mTLS in WebSocket service. [#7854](https://github.com/hyperledger/besu/pull/7854)
- Create and publish Besu BOM (Bill of Materials) [#7615](https://github.com/hyperledger/besu/pull/7615)
- Update Java dependencies [#7786](https://github.com/hyperledger/besu/pull/7786)
- Add a method to get all the transaction in the pool, to the `TransactionPoolService`, to easily access the transaction pool content from plugins [#7813](https://github.com/hyperledger/besu/pull/7813)
- Upgrade RocksDB JNI library from version 8.3.2 to 9.7.3 [#7817](https://github.com/hyperledger/besu/pull/7817)
- Add a method to check if a metric category is enabled to the plugin API [#7832](https://github.com/hyperledger/besu/pull/7832)
- Add account and state overrides to `eth_call` and `eth_estimateGas` [#7801](https://github.com/hyperledger/besu/pull/7801)
- Add a new metric collector for counters which get their value from suppliers [#7894](https://github.com/hyperledger/besu/pull/7894)
- Add account and state overrides to `eth_call` [#7801](https://github.com/hyperledger/besu/pull/7801) and `eth_estimateGas` [#7890](https://github.com/hyperledger/besu/pull/7890)

### Bug fixes
- Fix registering new metric categories from plugins [#7825](https://github.com/hyperledger/besu/pull/7825)
- Fix CVE-2024-47535 [7878](https://github.com/hyperledger/besu/pull/7878)
- Fix QBFT prepared block based proposal validation [#7875](https://github.com/hyperledger/besu/pull/7875)

## 24.10.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@
import org.hyperledger.besu.plugin.services.TransactionSelectionService;
import org.hyperledger.besu.plugin.services.TransactionSimulationService;
import org.hyperledger.besu.plugin.services.metrics.MetricCategoryRegistry;
import org.hyperledger.besu.plugin.services.mining.MiningService;
import org.hyperledger.besu.plugin.services.storage.rocksdb.RocksDBPlugin;
import org.hyperledger.besu.plugin.services.transactionpool.TransactionPoolService;
import org.hyperledger.besu.services.BesuConfigurationImpl;
import org.hyperledger.besu.services.BesuEventsImpl;
import org.hyperledger.besu.services.BesuPluginContextImpl;
import org.hyperledger.besu.services.BlockchainServiceImpl;
import org.hyperledger.besu.services.MiningServiceImpl;
import org.hyperledger.besu.services.PermissioningServiceImpl;
import org.hyperledger.besu.services.PicoCLIOptionsImpl;
import org.hyperledger.besu.services.PrivacyPluginServiceImpl;
Expand Down Expand Up @@ -220,6 +222,8 @@ public void startNode(final BesuNode node) {
besuPluginContext.addService(
TransactionPoolService.class,
new TransactionPoolServiceImpl(besuController.getTransactionPool()));
besuPluginContext.addService(
MiningService.class, new MiningServiceImpl(besuController.getMiningCoordinator()));

component.rpcEndpointService().init(runner.getInProcessRpcMethods());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import static java.nio.charset.StandardCharsets.UTF_8;

import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.PicoCLIOptions;

import java.io.File;
Expand All @@ -39,7 +39,7 @@ public class BadCLIOptionsPlugin implements BesuPlugin {
private File callbackDir;

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager context) {
LOG.info("Registering BadCliOptionsPlugin");
callbackDir = new File(System.getProperty("besu.plugins.dir", "plugins"));
writeStatus("init");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
package org.hyperledger.besu.tests.acceptance.plugins;

import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.data.BlockHeader;
import org.hyperledger.besu.plugin.data.PropagatedBlockContext;
import org.hyperledger.besu.plugin.services.BesuEvents;
Expand All @@ -35,14 +35,14 @@
public class TestBesuEventsPlugin implements BesuPlugin {
private static final Logger LOG = LoggerFactory.getLogger(TestBesuEventsPlugin.class);

private BesuContext context;
private ServiceManager context;

private Optional<Long> subscriptionId;
private final AtomicInteger blockCounter = new AtomicInteger();
private File callbackDir;

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager context) {
this.context = context;
LOG.info("Registered");
callbackDir = new File(System.getProperty("besu.plugins.dir", "plugins"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType;
import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.data.BlockContext;
import org.hyperledger.besu.plugin.services.BlockchainService;
import org.hyperledger.besu.plugin.services.RpcEndpointService;
Expand All @@ -40,19 +40,19 @@ public class TestBlockchainServiceFinalizedPlugin implements BesuPlugin {
private static final String RPC_METHOD_SAFE_BLOCK = "updateSafeBlockV1";

@Override
public void register(final BesuContext besuContext) {
public void register(final ServiceManager serviceManager) {
LOG.trace("Registering plugin ...");

final RpcEndpointService rpcEndpointService =
besuContext
serviceManager
.getService(RpcEndpointService.class)
.orElseThrow(
() ->
new RuntimeException(
"Failed to obtain RpcEndpointService from the BesuContext."));

final BlockchainService blockchainService =
besuContext
serviceManager
.getService(BlockchainService.class)
.orElseThrow(
() ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package org.hyperledger.besu.tests.acceptance.plugins;

import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.PicoCLIOptions;
import org.hyperledger.besu.plugin.services.RpcEndpointService;
import org.hyperledger.besu.plugin.services.rpc.RpcResponseType;
Expand All @@ -36,7 +36,7 @@ public class TestInProcessRpcServicePlugin implements BesuPlugin {
long minGasPrice = -1;

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager context) {
final PicoCLIOptions cmdlineOptions =
context
.getService(PicoCLIOptions.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
package org.hyperledger.besu.tests.acceptance.plugins;

import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.MetricsSystem;
import org.hyperledger.besu.plugin.services.metrics.MetricCategory;
import org.hyperledger.besu.plugin.services.metrics.MetricCategoryRegistry;
Expand All @@ -30,12 +30,12 @@
@AutoService(BesuPlugin.class)
public class TestMetricsPlugin implements BesuPlugin {
private static final Logger LOG = LoggerFactory.getLogger(TestMetricsPlugin.class);
private BesuContext besuContext;
private ServiceManager serviceManager;

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager context) {
LOG.info("Registering TestMetricsPlugin");
besuContext = context;
serviceManager = context;
context
.getService(MetricCategoryRegistry.class)
.orElseThrow()
Expand All @@ -45,7 +45,7 @@ public void register(final BesuContext context) {
@Override
public void start() {
LOG.info("Starting TestMetricsPlugin");
besuContext
serviceManager
.getService(MetricsSystem.class)
.orElseThrow()
.createGauge(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
package org.hyperledger.besu.tests.acceptance.plugins;

import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.PermissioningService;
import org.hyperledger.besu.plugin.services.PicoCLIOptions;

Expand All @@ -40,7 +40,7 @@ public class TestPermissioningPlugin implements BesuPlugin {
PermissioningService service;

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager context) {
context.getService(PicoCLIOptions.class).orElseThrow().addPicoCLIOptions("permissioning", this);
service = context.getService(PermissioningService.class).orElseThrow();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
package org.hyperledger.besu.tests.acceptance.plugins;

import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.PicoCLIOptions;

import java.io.File;
Expand Down Expand Up @@ -57,7 +57,7 @@ public class TestPicoCLIPlugin implements BesuPlugin {
private File callbackDir;

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager context) {
LOG.info("Registering. Test Option is '{}'", testOption);
state = "registering";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
package org.hyperledger.besu.tests.acceptance.plugins;

import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.PicoCLIOptions;
import org.hyperledger.besu.plugin.services.PrivacyPluginService;
import org.hyperledger.besu.tests.acceptance.plugins.privacy.TestPrivacyGroupGenesisProvider;
Expand All @@ -32,15 +32,15 @@ public class TestPrivacyServicePlugin implements BesuPlugin {
private static final Logger LOG = LoggerFactory.getLogger(TestPrivacyServicePlugin.class);

PrivacyPluginService pluginService;
BesuContext context;
ServiceManager context;

TestPrivacyGroupGenesisProvider privacyGroupGenesisProvider =
new TestPrivacyGroupGenesisProvider();
TestSigningPrivateMarkerTransactionFactory privateMarkerTransactionFactory =
new TestSigningPrivateMarkerTransactionFactory();

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager context) {
this.context = context;

context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import static com.google.common.base.Preconditions.checkArgument;

import org.hyperledger.besu.plugin.BesuContext;
import org.hyperledger.besu.plugin.BesuPlugin;
import org.hyperledger.besu.plugin.ServiceManager;
import org.hyperledger.besu.plugin.services.RpcEndpointService;
import org.hyperledger.besu.plugin.services.rpc.PluginRpcRequest;

Expand Down Expand Up @@ -51,7 +51,7 @@ private String throwException(final PluginRpcRequest request) {
}

@Override
public void register(final BesuContext context) {
public void register(final ServiceManager context) {
context
.getService(RpcEndpointService.class)
.ifPresent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Deprecated(since = "24.11.0")
public class TestPrivacyPluginPayloadProvider implements PrivacyPluginPayloadProvider {
private static final Logger LOG = LoggerFactory.getLogger(TestPrivacyPluginPayloadProvider.class);
private String prefix;
Expand Down
Loading

0 comments on commit 75b091a

Please sign in to comment.