Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement miner_setMinPriorityFee and miner_getMinPriorityFee #6080

Merged
merged 40 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c57c2ac
Refactor mining options
fab-10 Oct 10, 2023
b408b64
Fix null pointer exception
fab-10 Oct 10, 2023
da79e09
fix another null pointer exception
fab-10 Oct 10, 2023
7684d7e
uncomment code
fab-10 Oct 10, 2023
78741da
Move miner options tests
fab-10 Oct 11, 2023
18bcce3
Unit test fixes
fab-10 Oct 12, 2023
59fbe8e
Removed the commented code
fab-10 Oct 12, 2023
8f14dd3
WIP
fab-10 Oct 13, 2023
2280e02
Merge branch 'main' into mining-options-refactor
fab-10 Oct 13, 2023
65bdabd
WIP
fab-10 Oct 13, 2023
5e012d0
New miner option: min-priority-fee
fab-10 Oct 16, 2023
84919f4
Remove not relevant for this feature
fab-10 Oct 16, 2023
e89a244
Remove not relevant for this feature
fab-10 Oct 16, 2023
20e498b
Merge branch 'main' into mining-options-refactor
fab-10 Oct 16, 2023
a260a7d
Merge branch 'mining-options-refactor' into min-priority-fee
fab-10 Oct 16, 2023
86b9a6e
Merge branch 'main' into mining-options-refactor
fab-10 Oct 17, 2023
2267bc7
Fix javadoc
fab-10 Oct 17, 2023
c6b56d2
Remove code not belonging to this PR
fab-10 Oct 17, 2023
477acf9
coinbase is an updatable parameter
fab-10 Oct 17, 2023
4626230
Move MiningOptions to upper package
fab-10 Oct 17, 2023
25b1522
Fix coinbase for *bft
fab-10 Oct 17, 2023
38feb6d
Merge branch 'mining-options-refactor' into min-priority-fee
fab-10 Oct 17, 2023
b7f4213
Implement methods to get and set min priority fee
Gabriel-Trintinalia Oct 18, 2023
ae775ae
Merge branch 'main' into mining-options-refactor
fab-10 Oct 18, 2023
31f2183
Fix spotless
Gabriel-Trintinalia Oct 19, 2023
16315a4
Merge branch 'main' into mining-options-refactor
macfarla Oct 20, 2023
2700930
Merge branch 'mining-options-refactor' of github.com:fab-10/besu into…
fab-10 Oct 23, 2023
e55392b
Apply suggestions from code review
fab-10 Oct 23, 2023
d710e5c
Merge branch 'main' into mining-options-refactor
fab-10 Oct 24, 2023
639af82
Update besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
fab-10 Oct 24, 2023
232caa6
Merge branch 'mining-options-refactor' of github.com:fab-10/besu into…
fab-10 Oct 24, 2023
878969d
Merge branch 'main' into mining-options-refactor
fab-10 Oct 24, 2023
07dc4e0
Merge branch 'mining-options-refactor' into min-priority-fee
fab-10 Oct 24, 2023
4cb4f6c
Merge branch 'min-priority-fee' into change-min-priority-fee
Gabriel-Trintinalia Oct 24, 2023
e2bf4e4
Add new config option to everything config
Gabriel-Trintinalia Oct 24, 2023
65b84e5
Fix unit test
Gabriel-Trintinalia Oct 25, 2023
2e823ac
Merge branch 'main' into change-min-priority-fee
Gabriel-Trintinalia Oct 25, 2023
9027349
Merge branch 'main' into change-min-priority-fee
pinges Oct 25, 2023
f0a4c97
Accept PR suggestions
Gabriel-Trintinalia Oct 25, 2023
dca9676
Merge branch 'change-min-priority-fee' of https://github.com/Gabriel-…
Gabriel-Trintinalia Oct 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ public Runner build() {
blockchainQueries,
synchronizer,
transactionPool,
miningParameters,
miningCoordinator,
metricsSystem,
supportedCapabilities,
Expand Down Expand Up @@ -847,6 +848,7 @@ public Runner build() {
blockchainQueries,
synchronizer,
transactionPool,
miningParameters,
miningCoordinator,
metricsSystem,
supportedCapabilities,
Expand Down Expand Up @@ -937,6 +939,7 @@ public Runner build() {
blockchainQueries,
synchronizer,
transactionPool,
miningParameters,
miningCoordinator,
metricsSystem,
supportedCapabilities,
Expand Down Expand Up @@ -1019,6 +1022,7 @@ public Runner build() {
blockchainQueries,
synchronizer,
transactionPool,
miningParameters,
miningCoordinator,
metricsSystem,
supportedCapabilities,
Expand Down Expand Up @@ -1187,6 +1191,7 @@ private Map<String, JsonRpcMethod> jsonRpcMethods(
final BlockchainQueries blockchainQueries,
final Synchronizer synchronizer,
final TransactionPool transactionPool,
final MiningParameters miningParameters,
final MiningCoordinator miningCoordinator,
final ObservableMetricsSystem metricsSystem,
final Set<Capability> supportedCapabilities,
Expand Down Expand Up @@ -1218,6 +1223,7 @@ private Map<String, JsonRpcMethod> jsonRpcMethods(
protocolContext,
filterManager,
transactionPool,
miningParameters,
miningCoordinator,
metricsSystem,
supportedCapabilities,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static java.util.Arrays.asList;
import static org.hyperledger.besu.ethereum.core.MiningParameters.MutableInitValues.DEFAULT_EXTRA_DATA;
import static org.hyperledger.besu.ethereum.core.MiningParameters.MutableInitValues.DEFAULT_MIN_BLOCK_OCCUPANCY_RATIO;
import static org.hyperledger.besu.ethereum.core.MiningParameters.MutableInitValues.DEFAULT_MIN_PRIORITY_FEE_PER_GAS;
import static org.hyperledger.besu.ethereum.core.MiningParameters.MutableInitValues.DEFAULT_MIN_TRANSACTION_GAS_PRICE;
import static org.hyperledger.besu.ethereum.core.MiningParameters.Unstable.DEFAULT_MAX_OMMERS_DEPTH;
import static org.hyperledger.besu.ethereum.core.MiningParameters.Unstable.DEFAULT_POS_BLOCK_CREATION_MAX_TIME;
Expand Down Expand Up @@ -93,10 +94,19 @@ public class MiningOptions implements CLIOptions<MiningParameters> {
arity = "1")
private Wei minTransactionGasPrice = DEFAULT_MIN_TRANSACTION_GAS_PRICE;

@Option(
names = {"--min-priority-fee"},
description =
"Minimum priority fee per gas (in Wei) offered by a transaction for it to be included in a "
+ "block (default: ${DEFAULT-VALUE})",
arity = "1")
private Wei minPriorityFeePerGas = DEFAULT_MIN_PRIORITY_FEE_PER_GAS;

@Option(
names = {"--target-gas-limit"},
description =
"Sets target gas limit per block. If set, each block's gas limit will approach this setting over time if the current gas limit is different.")
"Sets target gas limit per block."
+ " If set, each block's gas limit will approach this setting over time.")
private Long targetGasLimit = null;

@CommandLine.ArgGroup(validate = false)
Expand Down Expand Up @@ -202,6 +212,7 @@ public void validate(
asList(
"--miner-coinbase",
"--min-gas-price",
"--min-priority-fee",
"--min-block-occupancy-ratio",
"--miner-extra-data"));

Expand Down Expand Up @@ -238,6 +249,7 @@ static MiningOptions fromConfig(final MiningParameters miningParameters) {
miningOptions.stratumPort = miningParameters.getStratumPort();
miningOptions.extraData = miningParameters.getExtraData();
miningOptions.minTransactionGasPrice = miningParameters.getMinTransactionGasPrice();
miningOptions.minPriorityFeePerGas = miningParameters.getMinPriorityFeePerGas();
miningOptions.minBlockOccupancyRatio = miningParameters.getMinBlockOccupancyRatio();
miningOptions.unstableOptions.remoteSealersLimit =
miningParameters.getUnstable().getRemoteSealersLimit();
Expand Down Expand Up @@ -266,6 +278,7 @@ public MiningParameters toDomainObject() {
.isMiningEnabled(isMiningEnabled)
.extraData(extraData)
.minTransactionGasPrice(minTransactionGasPrice)
.minPriorityFeePerGas(minPriorityFeePerGas)
.minBlockOccupancyRatio(minBlockOccupancyRatio);

if (targetGasLimit != null) {
Expand Down
1 change: 1 addition & 0 deletions besu/src/test/resources/everything_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ miner-stratum-enabled=false
miner-coinbase="0x0000000000000000000000000000000000000002"
miner-extra-data="0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021"
min-gas-price=1
min-priority-fee=0
min-block-occupancy-ratio=0.7
miner-stratum-host="0.0.0.0"
miner-stratum-port=8008
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.hyperledger.besu.ethereum.chain.MutableBlockchain;
import org.hyperledger.besu.ethereum.core.Block;
import org.hyperledger.besu.ethereum.core.BlockImporter;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.eth.manager.EthPeers;
Expand Down Expand Up @@ -128,6 +129,7 @@ public Map<String, JsonRpcMethod> methods() {
final P2PNetwork peerDiscovery = mock(P2PNetwork.class);
final EthPeers ethPeers = mock(EthPeers.class);
final TransactionPool transactionPool = mock(TransactionPool.class);
final MiningParameters miningParameters = mock(MiningParameters.class);
final PoWMiningCoordinator miningCoordinator = mock(PoWMiningCoordinator.class);
final ObservableMetricsSystem metricsSystem = new NoOpMetricsSystem();
final Optional<AccountLocalConfigPermissioningController> accountWhitelistController =
Expand Down Expand Up @@ -169,6 +171,7 @@ public Map<String, JsonRpcMethod> methods() {
context,
filterManager,
transactionPool,
miningParameters,
miningCoordinator,
metricsSystem,
new HashSet<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ public enum RpcMethod {
MINER_SET_ETHERBASE("miner_setEtherbase"),
MINER_START("miner_start"),
MINER_STOP("miner_stop"),
MINER_GET_MIN_PRIORITY_FEE("miner_getMinPriorityFee"),
MINER_SET_MIN_PRIORITY_FEE("miner_setMinPriorityFee"),
NET_ENODE("net_enode"),
NET_LISTENING("net_listening"),
NET_PEER_COUNT("net_peerCount"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright Hyperledger Besu Contributors.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner;

import org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.hyperledger.besu.ethereum.core.MiningParameters;

public class MinerGetMinPriorityFee implements JsonRpcMethod {
private final MiningParameters miningParameters;

public MinerGetMinPriorityFee(final MiningParameters miningParameters) {
this.miningParameters = miningParameters;
}

@Override
public String getName() {
return RpcMethod.MINER_GET_MIN_PRIORITY_FEE.getMethodName();
}

@Override
public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {
return new JsonRpcSuccessResponse(
requestContext.getRequest().getId(), miningParameters.getMinPriorityFeePerGas().getValue());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright Hyperledger Besu Contributors.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner;

import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.hyperledger.besu.ethereum.core.MiningParameters;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MinerSetMinPriorityFee implements JsonRpcMethod {
private static final Logger LOG = LoggerFactory.getLogger(MinerSetMinPriorityFee.class);

private final MiningParameters miningParameters;

public MinerSetMinPriorityFee(final MiningParameters miningParameters) {
this.miningParameters = miningParameters;
}

@Override
public String getName() {
return RpcMethod.MINER_SET_MIN_PRIORITY_FEE.getMethodName();
}

@Override
public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {
try {
final Wei minPriorityFeePerGas = Wei.of(requestContext.getRequiredParameter(0, Long.class));
Copy link
Contributor

@Filter94 Filter94 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a slight concern on the signed Long usage for Wei, which is much smaller than UInt256, which is what under the hood of Wei and is a theoretical maximum.

miningParameters.setMinPriorityFeePerGas(minPriorityFeePerGas);
LOG.debug("min priority fee per gas changed to {}", minPriorityFeePerGas);
return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), true);
} catch (final IllegalArgumentException invalidJsonRpcParameters) {
return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;
import org.hyperledger.besu.ethereum.blockcreation.MiningCoordinator;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.eth.manager.EthPeers;
Expand Down Expand Up @@ -62,6 +63,7 @@ public Map<String, JsonRpcMethod> methods(
final ProtocolContext protocolContext,
final FilterManager filterManager,
final TransactionPool transactionPool,
final MiningParameters miningParameters,
final MiningCoordinator miningCoordinator,
final ObservableMetricsSystem metricsSystem,
final Set<Capability> supportedCapabilities,
Expand Down Expand Up @@ -126,7 +128,7 @@ public Map<String, JsonRpcMethod> methods(
jsonRpcConfiguration,
webSocketConfiguration,
metricsConfiguration),
new MinerJsonRpcMethods(miningCoordinator),
new MinerJsonRpcMethods(miningParameters, miningCoordinator),
new PermJsonRpcMethods(accountsAllowlistController, nodeAllowlistController),
new PrivJsonRpcMethods(
blockchainQueries,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,25 @@
import org.hyperledger.besu.ethereum.api.jsonrpc.RpcApis;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner.MinerChangeTargetGasLimit;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner.MinerGetMinPriorityFee;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner.MinerSetCoinbase;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner.MinerSetEtherbase;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner.MinerSetMinPriorityFee;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner.MinerStart;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.miner.MinerStop;
import org.hyperledger.besu.ethereum.blockcreation.MiningCoordinator;
import org.hyperledger.besu.ethereum.core.MiningParameters;

import java.util.Map;

public class MinerJsonRpcMethods extends ApiGroupJsonRpcMethods {

private final MiningCoordinator miningCoordinator;
private final MiningParameters miningParameters;

public MinerJsonRpcMethods(final MiningCoordinator miningCoordinator) {
public MinerJsonRpcMethods(
final MiningParameters miningParameters, final MiningCoordinator miningCoordinator) {
this.miningParameters = miningParameters;
this.miningCoordinator = miningCoordinator;
}

Expand All @@ -46,6 +52,8 @@ protected Map<String, JsonRpcMethod> create() {
new MinerStop(miningCoordinator),
minerSetCoinbase,
new MinerSetEtherbase(minerSetCoinbase),
new MinerChangeTargetGasLimit(miningCoordinator));
new MinerChangeTargetGasLimit(miningCoordinator),
new MinerGetMinPriorityFee(miningParameters),
new MinerSetMinPriorityFee(miningParameters));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;
import org.hyperledger.besu.ethereum.blockcreation.PoWMiningCoordinator;
import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.core.Transaction;
Expand Down Expand Up @@ -133,6 +134,7 @@ protected Map<String, JsonRpcMethod> getRpcMethods(
final Synchronizer synchronizerMock = mock(Synchronizer.class);
final P2PNetwork peerDiscoveryMock = mock(P2PNetwork.class);
final TransactionPool transactionPoolMock = mock(TransactionPool.class);
final MiningParameters miningParameters = mock(MiningParameters.class);
final PoWMiningCoordinator miningCoordinatorMock = mock(PoWMiningCoordinator.class);
when(transactionPoolMock.addTransactionViaApi(any(Transaction.class)))
.thenReturn(ValidationResult.valid());
Expand Down Expand Up @@ -173,6 +175,7 @@ protected Map<String, JsonRpcMethod> getRpcMethods(
protocolContext,
filterManager,
transactionPoolMock,
miningParameters,
miningCoordinatorMock,
new NoOpMetricsSystem(),
supportedCapabilities,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;
import org.hyperledger.besu.ethereum.blockcreation.PoWMiningCoordinator;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.eth.EthProtocol;
Expand Down Expand Up @@ -110,6 +111,7 @@ public void initServerAndClient() throws Exception {
mock(ProtocolContext.class),
mock(FilterManager.class),
mock(TransactionPool.class),
mock(MiningParameters.class),
mock(PoWMiningCoordinator.class),
new NoOpMetricsSystem(),
supportedCapabilities,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;
import org.hyperledger.besu.ethereum.blockcreation.PoWMiningCoordinator;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.eth.EthProtocol;
Expand Down Expand Up @@ -139,6 +140,7 @@ public static void initServerAndClient() throws Exception {
mock(ProtocolContext.class),
mock(FilterManager.class),
mock(TransactionPool.class),
mock(MiningParameters.class),
mock(PoWMiningCoordinator.class),
new NoOpMetricsSystem(),
supportedCapabilities,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.hyperledger.besu.ethereum.chain.MutableBlockchain;
import org.hyperledger.besu.ethereum.core.Block;
import org.hyperledger.besu.ethereum.core.InMemoryKeyValueStorageProvider;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.ProtocolScheduleFixture;
import org.hyperledger.besu.ethereum.core.Synchronizer;
Expand Down Expand Up @@ -212,6 +213,7 @@ private JsonRpcHttpService createJsonRpcHttpServiceWithRpcApis(final JsonRpcConf
mock(ProtocolContext.class),
mock(FilterManager.class),
mock(TransactionPool.class),
mock(MiningParameters.class),
mock(PoWMiningCoordinator.class),
new NoOpMetricsSystem(),
supportedCapabilities,
Expand Down Expand Up @@ -321,6 +323,7 @@ private JsonRpcHttpService createJsonRpcHttpService(
mock(ProtocolContext.class),
mock(FilterManager.class),
mock(TransactionPool.class),
mock(MiningParameters.class),
mock(PoWMiningCoordinator.class),
new NoOpMetricsSystem(),
supportedCapabilities,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.hyperledger.besu.ethereum.blockcreation.PoWMiningCoordinator;
import org.hyperledger.besu.ethereum.chain.Blockchain;
import org.hyperledger.besu.ethereum.chain.ChainHead;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.eth.EthProtocol;
Expand Down Expand Up @@ -118,6 +119,7 @@ public static void initServerAndClient() throws Exception {
mock(ProtocolContext.class),
mock(FilterManager.class),
mock(TransactionPool.class),
mock(MiningParameters.class),
mock(PoWMiningCoordinator.class),
new NoOpMetricsSystem(),
supportedCapabilities,
Expand Down