|
|
@ -164,13 +164,13 @@ import org.hyperledger.besu.plugin.services.BlockchainService; |
|
|
|
import org.hyperledger.besu.plugin.services.MetricsSystem; |
|
|
|
import org.hyperledger.besu.plugin.services.MetricsSystem; |
|
|
|
import org.hyperledger.besu.plugin.services.PermissioningService; |
|
|
|
import org.hyperledger.besu.plugin.services.PermissioningService; |
|
|
|
import org.hyperledger.besu.plugin.services.PicoCLIOptions; |
|
|
|
import org.hyperledger.besu.plugin.services.PicoCLIOptions; |
|
|
|
|
|
|
|
import org.hyperledger.besu.plugin.services.PluginTransactionValidatorService; |
|
|
|
import org.hyperledger.besu.plugin.services.PrivacyPluginService; |
|
|
|
import org.hyperledger.besu.plugin.services.PrivacyPluginService; |
|
|
|
import org.hyperledger.besu.plugin.services.RpcEndpointService; |
|
|
|
import org.hyperledger.besu.plugin.services.RpcEndpointService; |
|
|
|
import org.hyperledger.besu.plugin.services.SecurityModuleService; |
|
|
|
import org.hyperledger.besu.plugin.services.SecurityModuleService; |
|
|
|
import org.hyperledger.besu.plugin.services.StorageService; |
|
|
|
import org.hyperledger.besu.plugin.services.StorageService; |
|
|
|
import org.hyperledger.besu.plugin.services.TraceService; |
|
|
|
import org.hyperledger.besu.plugin.services.TraceService; |
|
|
|
import org.hyperledger.besu.plugin.services.TransactionSelectionService; |
|
|
|
import org.hyperledger.besu.plugin.services.TransactionSelectionService; |
|
|
|
import org.hyperledger.besu.plugin.services.TransactionValidatorService; |
|
|
|
|
|
|
|
import org.hyperledger.besu.plugin.services.exception.StorageException; |
|
|
|
import org.hyperledger.besu.plugin.services.exception.StorageException; |
|
|
|
import org.hyperledger.besu.plugin.services.metrics.MetricCategory; |
|
|
|
import org.hyperledger.besu.plugin.services.metrics.MetricCategory; |
|
|
|
import org.hyperledger.besu.plugin.services.metrics.MetricCategoryRegistry; |
|
|
|
import org.hyperledger.besu.plugin.services.metrics.MetricCategoryRegistry; |
|
|
@ -184,13 +184,13 @@ import org.hyperledger.besu.services.BesuPluginContextImpl; |
|
|
|
import org.hyperledger.besu.services.BlockchainServiceImpl; |
|
|
|
import org.hyperledger.besu.services.BlockchainServiceImpl; |
|
|
|
import org.hyperledger.besu.services.PermissioningServiceImpl; |
|
|
|
import org.hyperledger.besu.services.PermissioningServiceImpl; |
|
|
|
import org.hyperledger.besu.services.PicoCLIOptionsImpl; |
|
|
|
import org.hyperledger.besu.services.PicoCLIOptionsImpl; |
|
|
|
|
|
|
|
import org.hyperledger.besu.services.PluginTransactionValidatorServiceImpl; |
|
|
|
import org.hyperledger.besu.services.PrivacyPluginServiceImpl; |
|
|
|
import org.hyperledger.besu.services.PrivacyPluginServiceImpl; |
|
|
|
import org.hyperledger.besu.services.RpcEndpointServiceImpl; |
|
|
|
import org.hyperledger.besu.services.RpcEndpointServiceImpl; |
|
|
|
import org.hyperledger.besu.services.SecurityModuleServiceImpl; |
|
|
|
import org.hyperledger.besu.services.SecurityModuleServiceImpl; |
|
|
|
import org.hyperledger.besu.services.StorageServiceImpl; |
|
|
|
import org.hyperledger.besu.services.StorageServiceImpl; |
|
|
|
import org.hyperledger.besu.services.TraceServiceImpl; |
|
|
|
import org.hyperledger.besu.services.TraceServiceImpl; |
|
|
|
import org.hyperledger.besu.services.TransactionSelectionServiceImpl; |
|
|
|
import org.hyperledger.besu.services.TransactionSelectionServiceImpl; |
|
|
|
import org.hyperledger.besu.services.TransactionValidatorServiceImpl; |
|
|
|
|
|
|
|
import org.hyperledger.besu.services.kvstore.InMemoryStoragePlugin; |
|
|
|
import org.hyperledger.besu.services.kvstore.InMemoryStoragePlugin; |
|
|
|
import org.hyperledger.besu.util.InvalidConfigurationException; |
|
|
|
import org.hyperledger.besu.util.InvalidConfigurationException; |
|
|
|
import org.hyperledger.besu.util.LogConfigurator; |
|
|
|
import org.hyperledger.besu.util.LogConfigurator; |
|
|
@ -375,7 +375,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
P2PDiscoveryOptionGroup p2PDiscoveryOptionGroup = new P2PDiscoveryOptionGroup(); |
|
|
|
P2PDiscoveryOptionGroup p2PDiscoveryOptionGroup = new P2PDiscoveryOptionGroup(); |
|
|
|
|
|
|
|
|
|
|
|
private final TransactionSelectionServiceImpl transactionSelectionServiceImpl; |
|
|
|
private final TransactionSelectionServiceImpl transactionSelectionServiceImpl; |
|
|
|
private final TransactionValidatorServiceImpl transactionValidatorServiceImpl; |
|
|
|
private final PluginTransactionValidatorServiceImpl transactionValidatorServiceImpl; |
|
|
|
|
|
|
|
|
|
|
|
static class P2PDiscoveryOptionGroup { |
|
|
|
static class P2PDiscoveryOptionGroup { |
|
|
|
|
|
|
|
|
|
|
@ -1360,7 +1360,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
new PkiBlockCreationConfigurationProvider(), |
|
|
|
new PkiBlockCreationConfigurationProvider(), |
|
|
|
new RpcEndpointServiceImpl(), |
|
|
|
new RpcEndpointServiceImpl(), |
|
|
|
new TransactionSelectionServiceImpl(), |
|
|
|
new TransactionSelectionServiceImpl(), |
|
|
|
new TransactionValidatorServiceImpl()); |
|
|
|
new PluginTransactionValidatorServiceImpl()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -1400,7 +1400,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
final PkiBlockCreationConfigurationProvider pkiBlockCreationConfigProvider, |
|
|
|
final PkiBlockCreationConfigurationProvider pkiBlockCreationConfigProvider, |
|
|
|
final RpcEndpointServiceImpl rpcEndpointServiceImpl, |
|
|
|
final RpcEndpointServiceImpl rpcEndpointServiceImpl, |
|
|
|
final TransactionSelectionServiceImpl transactionSelectionServiceImpl, |
|
|
|
final TransactionSelectionServiceImpl transactionSelectionServiceImpl, |
|
|
|
final TransactionValidatorServiceImpl transactionValidatorServiceImpl) { |
|
|
|
final PluginTransactionValidatorServiceImpl transactionValidatorServiceImpl) { |
|
|
|
this.besuComponent = besuComponent; |
|
|
|
this.besuComponent = besuComponent; |
|
|
|
this.logger = besuComponent.getBesuCommandLogger(); |
|
|
|
this.logger = besuComponent.getBesuCommandLogger(); |
|
|
|
this.rlpBlockImporter = rlpBlockImporter; |
|
|
|
this.rlpBlockImporter = rlpBlockImporter; |
|
|
@ -1602,7 +1602,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
besuPluginContext.addService( |
|
|
|
besuPluginContext.addService( |
|
|
|
TransactionSelectionService.class, transactionSelectionServiceImpl); |
|
|
|
TransactionSelectionService.class, transactionSelectionServiceImpl); |
|
|
|
besuPluginContext.addService( |
|
|
|
besuPluginContext.addService( |
|
|
|
TransactionValidatorService.class, transactionValidatorServiceImpl); |
|
|
|
PluginTransactionValidatorService.class, transactionValidatorServiceImpl); |
|
|
|
|
|
|
|
|
|
|
|
// register built-in plugins
|
|
|
|
// register built-in plugins
|
|
|
|
rocksDBPlugin = new RocksDBPlugin(); |
|
|
|
rocksDBPlugin = new RocksDBPlugin(); |
|
|
@ -2243,7 +2243,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
.ethProtocolConfiguration(unstableEthProtocolOptions.toDomainObject()) |
|
|
|
.ethProtocolConfiguration(unstableEthProtocolOptions.toDomainObject()) |
|
|
|
.networkConfiguration(unstableNetworkingOptions.toDomainObject()) |
|
|
|
.networkConfiguration(unstableNetworkingOptions.toDomainObject()) |
|
|
|
.transactionSelectorFactory(getTransactionSelectorFactory()) |
|
|
|
.transactionSelectorFactory(getTransactionSelectorFactory()) |
|
|
|
.pluginTransactionSelectorFactory(getPluginTransactionValidatorFactory()) |
|
|
|
.pluginTransactionValidatorFactory(getPluginTransactionValidatorFactory()) |
|
|
|
.dataDirectory(dataDir()) |
|
|
|
.dataDirectory(dataDir()) |
|
|
|
.miningParameters( |
|
|
|
.miningParameters( |
|
|
|
new MiningParameters.Builder() |
|
|
|
new MiningParameters.Builder() |
|
|
@ -2301,9 +2301,9 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private PluginTransactionValidatorFactory getPluginTransactionValidatorFactory() { |
|
|
|
private PluginTransactionValidatorFactory getPluginTransactionValidatorFactory() { |
|
|
|
final Optional<TransactionValidatorService> txSValidatorService = |
|
|
|
final Optional<PluginTransactionValidatorService> txSValidatorService = |
|
|
|
besuPluginContext.getService(TransactionValidatorService.class); |
|
|
|
besuPluginContext.getService(PluginTransactionValidatorService.class); |
|
|
|
return txSValidatorService.map(TransactionValidatorService::get).orElse(null); |
|
|
|
return txSValidatorService.map(PluginTransactionValidatorService::get).orElse(null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private GraphQLConfiguration graphQLConfiguration() { |
|
|
|
private GraphQLConfiguration graphQLConfiguration() { |
|
|
@ -2935,7 +2935,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private TransactionPoolConfiguration buildTransactionPoolConfiguration() { |
|
|
|
private TransactionPoolConfiguration buildTransactionPoolConfiguration() { |
|
|
|
|
|
|
|
|
|
|
|
final var stableTxPoolOption = stableTransactionPoolOptions.toDomainObject(); |
|
|
|
final var stableTxPoolOption = stableTransactionPoolOptions.toDomainObject(); |
|
|
|
return ImmutableTransactionPoolConfiguration.builder() |
|
|
|
return ImmutableTransactionPoolConfiguration.builder() |
|
|
|
.from(stableTxPoolOption) |
|
|
|
.from(stableTxPoolOption) |
|
|
|