Search in sources :

Example 1 with MiningParameters

use of org.hyperledger.besu.ethereum.core.MiningParameters in project besu by hyperledger.

the class RunnerBuilder method build.

public Runner build() {
    Preconditions.checkNotNull(besuController);
    final DiscoveryConfiguration discoveryConfiguration = DiscoveryConfiguration.create().setBindHost(p2pListenInterface).setBindPort(p2pListenPort).setAdvertisedHost(p2pAdvertisedHost);
    if (discovery) {
        final List<EnodeURL> bootstrap;
        if (ethNetworkConfig.getBootNodes() == null) {
            bootstrap = EthNetworkConfig.getNetworkConfig(NetworkName.MAINNET).getBootNodes();
        } else {
            bootstrap = ethNetworkConfig.getBootNodes();
        }
        discoveryConfiguration.setBootnodes(bootstrap);
        discoveryConfiguration.setDnsDiscoveryURL(ethNetworkConfig.getDnsDiscoveryUrl());
    } else {
        discoveryConfiguration.setActive(false);
    }
    final NodeKey nodeKey = besuController.getNodeKey();
    final SubProtocolConfiguration subProtocolConfiguration = besuController.getSubProtocolConfiguration();
    final ProtocolSchedule protocolSchedule = besuController.getProtocolSchedule();
    final ProtocolContext context = besuController.getProtocolContext();
    final List<SubProtocol> subProtocols = subProtocolConfiguration.getSubProtocols();
    final List<ProtocolManager> protocolManagers = subProtocolConfiguration.getProtocolManagers();
    final Set<Capability> supportedCapabilities = protocolManagers.stream().flatMap(protocolManager -> protocolManager.getSupportedCapabilities().stream()).collect(Collectors.toSet());
    final RlpxConfiguration rlpxConfiguration = RlpxConfiguration.create().setBindHost(p2pListenInterface).setBindPort(p2pListenPort).setMaxPeers(maxPeers).setSupportedProtocols(subProtocols).setClientId(BesuInfo.nodeName(identityString)).setLimitRemoteWireConnectionsEnabled(limitRemoteWireConnectionsEnabled).setFractionRemoteWireConnectionsAllowed(fractionRemoteConnectionsAllowed);
    networkingConfiguration.setRlpx(rlpxConfiguration).setDiscovery(discoveryConfiguration);
    final PeerPermissionsDenylist bannedNodes = PeerPermissionsDenylist.create();
    bannedNodeIds.forEach(bannedNodes::add);
    final List<EnodeURL> bootnodes = discoveryConfiguration.getBootnodes();
    final Synchronizer synchronizer = besuController.getSynchronizer();
    final TransactionSimulator transactionSimulator = new TransactionSimulator(context.getBlockchain(), context.getWorldStateArchive(), protocolSchedule);
    final Bytes localNodeId = nodeKey.getPublicKey().getEncodedBytes();
    final Optional<NodePermissioningController> nodePermissioningController = buildNodePermissioningController(bootnodes, synchronizer, transactionSimulator, localNodeId, context.getBlockchain());
    final PeerPermissions peerPermissions = nodePermissioningController.map(nodePC -> new PeerPermissionsAdapter(nodePC, bootnodes, context.getBlockchain())).map(nodePerms -> PeerPermissions.combine(nodePerms, bannedNodes)).orElse(bannedNodes);
    LOG.info("Detecting NAT service.");
    final boolean fallbackEnabled = natMethod == NatMethod.AUTO || natMethodFallbackEnabled;
    final NatService natService = new NatService(buildNatManager(natMethod), fallbackEnabled);
    final NetworkBuilder inactiveNetwork = caps -> new NoopP2PNetwork();
    final NetworkBuilder activeNetwork = caps -> DefaultP2PNetwork.builder().vertx(vertx).nodeKey(nodeKey).config(networkingConfiguration).peerPermissions(peerPermissions).metricsSystem(metricsSystem).supportedCapabilities(caps).natService(natService).randomPeerPriority(randomPeerPriority).storageProvider(storageProvider).forkIdSupplier(forkIdSupplier).p2pTLSConfiguration(p2pTLSConfiguration).build();
    final NetworkRunner networkRunner = NetworkRunner.builder().protocolManagers(protocolManagers).subProtocols(subProtocols).network(p2pEnabled ? activeNetwork : inactiveNetwork).metricsSystem(metricsSystem).build();
    final P2PNetwork network = networkRunner.getNetwork();
    // ForkId in Ethereum Node Record needs updating when we transition to a new protocol spec
    context.getBlockchain().observeBlockAdded(blockAddedEvent -> {
        if (protocolSchedule.streamMilestoneBlocks().anyMatch(blockNumber -> blockNumber == blockAddedEvent.getBlock().getHeader().getNumber())) {
            network.updateNodeRecord();
        }
    });
    nodePermissioningController.ifPresent(n -> n.setInsufficientPeersPermissioningProvider(new InsufficientPeersPermissioningProvider(network, bootnodes)));
    final TransactionPool transactionPool = besuController.getTransactionPool();
    final MiningCoordinator miningCoordinator = besuController.getMiningCoordinator();
    final BlockchainQueries blockchainQueries = new BlockchainQueries(context.getBlockchain(), context.getWorldStateArchive(), Optional.of(dataDir.resolve(CACHE_PATH)), Optional.of(besuController.getProtocolManager().ethContext().getScheduler()), apiConfiguration);
    final PrivacyParameters privacyParameters = besuController.getPrivacyParameters();
    final FilterManager filterManager = new FilterManagerBuilder().blockchainQueries(blockchainQueries).transactionPool(transactionPool).privacyParameters(privacyParameters).build();
    vertx.deployVerticle(filterManager);
    createPrivateTransactionObserver(filterManager, privacyParameters);
    final P2PNetwork peerNetwork = networkRunner.getNetwork();
    final MiningParameters miningParameters = besuController.getMiningParameters();
    Optional<StratumServer> stratumServer = Optional.empty();
    if (miningParameters.isStratumMiningEnabled()) {
        var powMiningCoordinator = miningCoordinator;
        if (miningCoordinator instanceof TransitionCoordinator) {
            LOG.debug("fetching powMiningCoordinator from TransitionCoordinator");
            powMiningCoordinator = ((TransitionCoordinator) miningCoordinator).getPreMergeObject();
        }
        stratumServer = Optional.of(new StratumServer(vertx, powMiningCoordinator, miningParameters.getStratumPort(), miningParameters.getStratumNetworkInterface(), miningParameters.getStratumExtranonce(), metricsSystem));
        miningCoordinator.addEthHashObserver(stratumServer.get());
        LOG.debug("added ethash observer: {}", stratumServer.get());
    }
    sanitizePeers(network, staticNodes).map(DefaultPeer::fromEnodeURL).forEach(peerNetwork::addMaintainedConnectionPeer);
    final Optional<NodeLocalConfigPermissioningController> nodeLocalConfigPermissioningController = nodePermissioningController.flatMap(NodePermissioningController::localConfigController);
    final Optional<AccountPermissioningController> accountPermissioningController = buildAccountPermissioningController(permissioningConfiguration, besuController, transactionSimulator, context.getBlockchain());
    final Optional<AccountLocalConfigPermissioningController> accountLocalConfigPermissioningController = accountPermissioningController.flatMap(AccountPermissioningController::getAccountLocalConfigPermissioningController);
    Optional<JsonRpcHttpService> jsonRpcHttpService = Optional.empty();
    if (jsonRpcConfiguration.isEnabled()) {
        final Map<String, JsonRpcMethod> nonEngineMethods = jsonRpcMethods(protocolSchedule, context, besuController, peerNetwork, blockchainQueries, synchronizer, transactionPool, miningCoordinator, metricsSystem, supportedCapabilities, jsonRpcConfiguration.getRpcApis().stream().filter(apiGroup -> !apiGroup.toLowerCase().startsWith("engine")).collect(Collectors.toList()), filterManager, accountLocalConfigPermissioningController, nodeLocalConfigPermissioningController, privacyParameters, jsonRpcConfiguration, webSocketConfiguration, metricsConfiguration, natService, besuPluginContext.getNamedPlugins(), dataDir, rpcEndpointServiceImpl);
        jsonRpcHttpService = Optional.of(new JsonRpcHttpService(vertx, dataDir, jsonRpcConfiguration, metricsSystem, natService, nonEngineMethods, new HealthService(new LivenessCheck()), new HealthService(new ReadinessCheck(peerNetwork, synchronizer))));
    }
    Optional<JsonRpcService> engineJsonRpcService = Optional.empty();
    if (engineJsonRpcConfiguration.isPresent() && engineJsonRpcConfiguration.get().isEnabled()) {
        final Map<String, JsonRpcMethod> engineMethods = jsonRpcMethods(protocolSchedule, context, besuController, peerNetwork, blockchainQueries, synchronizer, transactionPool, miningCoordinator, metricsSystem, supportedCapabilities, engineJsonRpcConfiguration.get().getRpcApis(), filterManager, accountLocalConfigPermissioningController, nodeLocalConfigPermissioningController, privacyParameters, engineJsonRpcConfiguration.get(), webSocketConfiguration, metricsConfiguration, natService, besuPluginContext.getNamedPlugins(), dataDir, rpcEndpointServiceImpl);
        Optional<AuthenticationService> authToUse = engineJsonRpcConfiguration.get().isAuthenticationEnabled() ? Optional.of(new EngineAuthService(vertx, Optional.ofNullable(engineJsonRpcConfiguration.get().getAuthenticationPublicKeyFile()), dataDir)) : Optional.empty();
        WebSocketConfiguration engineSocketConfig = webSocketConfiguration.isEnabled() ? webSocketConfiguration : WebSocketConfiguration.createEngineDefault();
        engineJsonRpcService = Optional.of(new JsonRpcService(vertx, dataDir, engineJsonRpcConfiguration.orElse(JsonRpcConfiguration.createEngineDefault()), metricsSystem, natService, engineMethods, Optional.ofNullable(engineSocketConfig), besuController.getProtocolManager().ethContext().getScheduler(), authToUse, new HealthService(new LivenessCheck()), new HealthService(new ReadinessCheck(peerNetwork, synchronizer))));
    }
    Optional<GraphQLHttpService> graphQLHttpService = Optional.empty();
    if (graphQLConfiguration.isEnabled()) {
        final GraphQLDataFetchers fetchers = new GraphQLDataFetchers(supportedCapabilities, privacyParameters.getGoQuorumPrivacyParameters());
        final Map<GraphQLContextType, Object> graphQlContextMap = new ConcurrentHashMap<>();
        graphQlContextMap.putIfAbsent(GraphQLContextType.BLOCKCHAIN_QUERIES, blockchainQueries);
        graphQlContextMap.putIfAbsent(GraphQLContextType.PROTOCOL_SCHEDULE, protocolSchedule);
        graphQlContextMap.putIfAbsent(GraphQLContextType.TRANSACTION_POOL, transactionPool);
        graphQlContextMap.putIfAbsent(GraphQLContextType.MINING_COORDINATOR, miningCoordinator);
        graphQlContextMap.putIfAbsent(GraphQLContextType.SYNCHRONIZER, synchronizer);
        final GraphQL graphQL;
        try {
            graphQL = GraphQLProvider.buildGraphQL(fetchers);
        } catch (final IOException ioe) {
            throw new RuntimeException(ioe);
        }
        graphQLHttpService = Optional.of(new GraphQLHttpService(vertx, dataDir, graphQLConfiguration, graphQL, graphQlContextMap, besuController.getProtocolManager().ethContext().getScheduler()));
    }
    Optional<WebSocketService> webSocketService = Optional.empty();
    if (webSocketConfiguration.isEnabled()) {
        final Map<String, JsonRpcMethod> nonEngineMethods = jsonRpcMethods(protocolSchedule, context, besuController, peerNetwork, blockchainQueries, synchronizer, transactionPool, miningCoordinator, metricsSystem, supportedCapabilities, webSocketConfiguration.getRpcApis().stream().filter(apiGroup -> !apiGroup.toLowerCase().startsWith("engine")).collect(Collectors.toList()), filterManager, accountLocalConfigPermissioningController, nodeLocalConfigPermissioningController, privacyParameters, jsonRpcConfiguration, webSocketConfiguration, metricsConfiguration, natService, besuPluginContext.getNamedPlugins(), dataDir, rpcEndpointServiceImpl);
        final SubscriptionManager subscriptionManager = createSubscriptionManager(vertx, transactionPool, blockchainQueries);
        createLogsSubscriptionService(context.getBlockchain(), context.getWorldStateArchive(), subscriptionManager, privacyParameters);
        createNewBlockHeadersSubscriptionService(context.getBlockchain(), blockchainQueries, subscriptionManager);
        createSyncingSubscriptionService(synchronizer, subscriptionManager);
        webSocketService = Optional.of(createWebsocketService(vertx, webSocketConfiguration, subscriptionManager, nonEngineMethods, privacyParameters, protocolSchedule, blockchainQueries, DefaultAuthenticationService.create(vertx, webSocketConfiguration), metricsSystem));
        createPrivateTransactionObserver(subscriptionManager, privacyParameters);
    }
    Optional<MetricsService> metricsService = createMetricsService(vertx, metricsConfiguration);
    final Optional<EthStatsService> ethStatsService;
    if (!Strings.isNullOrEmpty(ethstatsUrl)) {
        ethStatsService = Optional.of(new EthStatsService(NetstatsUrl.fromParams(ethstatsUrl, ethstatsContact), blockchainQueries, besuController.getProtocolManager(), transactionPool, miningCoordinator, besuController.getSyncState(), vertx, BesuInfo.nodeName(identityString), besuController.getGenesisConfigOptions(), network));
    } else {
        ethStatsService = Optional.empty();
    }
    final Optional<JsonRpcIpcService> jsonRpcIpcService;
    if (jsonRpcIpcConfiguration.isEnabled()) {
        Map<String, JsonRpcMethod> ipcMethods = jsonRpcMethods(protocolSchedule, context, besuController, peerNetwork, blockchainQueries, synchronizer, transactionPool, miningCoordinator, metricsSystem, supportedCapabilities, jsonRpcIpcConfiguration.getEnabledApis().stream().filter(apiGroup -> !apiGroup.toLowerCase().startsWith("engine")).collect(Collectors.toList()), filterManager, accountLocalConfigPermissioningController, nodeLocalConfigPermissioningController, privacyParameters, jsonRpcConfiguration, webSocketConfiguration, metricsConfiguration, natService, besuPluginContext.getNamedPlugins(), dataDir, rpcEndpointServiceImpl);
        jsonRpcIpcService = Optional.of(new JsonRpcIpcService(vertx, jsonRpcIpcConfiguration.getPath(), new JsonRpcExecutor(new BaseJsonRpcProcessor(), ipcMethods)));
    } else {
        jsonRpcIpcService = Optional.empty();
    }
    return new Runner(vertx, networkRunner, natService, jsonRpcHttpService, engineJsonRpcService, graphQLHttpService, webSocketService, jsonRpcIpcService, stratumServer, metricsService, ethStatsService, besuController, dataDir, pidPath, autoLogBloomCaching ? blockchainQueries.getTransactionLogBloomCacher() : Optional.empty(), context.getBlockchain());
}
Also used : NoopP2PNetwork(org.hyperledger.besu.ethereum.p2p.network.NoopP2PNetwork) PermissioningConfiguration(org.hyperledger.besu.ethereum.permissioning.PermissioningConfiguration) NodeLocalConfigPermissioningController(org.hyperledger.besu.ethereum.permissioning.NodeLocalConfigPermissioningController) AuthenticationService(org.hyperledger.besu.ethereum.api.jsonrpc.authentication.AuthenticationService) WebSocketConfiguration(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketConfiguration) DockerDetector(org.hyperledger.besu.nat.docker.DockerDetector) FilterManagerBuilder(org.hyperledger.besu.ethereum.api.jsonrpc.internal.filter.FilterManagerBuilder) Map(java.util.Map) DiscoveryConfiguration(org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration) Objects.isNull(java.util.Objects.isNull) BesuPluginContextImpl(org.hyperledger.besu.services.BesuPluginContextImpl) NetworkUtility(org.hyperledger.besu.util.NetworkUtility) Path(java.nio.file.Path) ProtocolManager(org.hyperledger.besu.ethereum.p2p.network.ProtocolManager) PendingTransactionDroppedSubscriptionService(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.subscription.pending.PendingTransactionDroppedSubscriptionService) FlexiblePrivacyPrecompiledContract(org.hyperledger.besu.ethereum.mainnet.precompiles.privacy.FlexiblePrivacyPrecompiledContract) NetworkingConfiguration(org.hyperledger.besu.ethereum.p2p.config.NetworkingConfiguration) ReadinessCheck(org.hyperledger.besu.ethereum.api.jsonrpc.health.ReadinessCheck) BlockchainQueries(org.hyperledger.besu.ethereum.api.query.BlockchainQueries) PeerPermissionsDenylist(org.hyperledger.besu.ethereum.p2p.permissions.PeerPermissionsDenylist) Set(java.util.Set) GraphQLProvider(org.hyperledger.besu.ethereum.api.graphql.GraphQLProvider) P2PNetwork(org.hyperledger.besu.ethereum.p2p.network.P2PNetwork) PrivateTransactionObserver(org.hyperledger.besu.ethereum.privacy.PrivateTransactionObserver) Stream(java.util.stream.Stream) SyncingSubscriptionService(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.subscription.syncing.SyncingSubscriptionService) NewBlockHeadersSubscriptionService(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.subscription.blockheaders.NewBlockHeadersSubscriptionService) WebSocketService(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketService) PendingTransactionSubscriptionService(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.subscription.pending.PendingTransactionSubscriptionService) LogsSubscriptionService(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.subscription.logs.LogsSubscriptionService) Capability(org.hyperledger.besu.ethereum.p2p.rlpx.wire.Capability) Predicate.not(java.util.function.Predicate.not) FLEXIBLE_PRIVACY(org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY) JsonRpcExecutor(org.hyperledger.besu.ethereum.api.jsonrpc.execution.JsonRpcExecutor) LivenessCheck(org.hyperledger.besu.ethereum.api.jsonrpc.health.LivenessCheck) MetricsService(org.hyperledger.besu.metrics.MetricsService) JsonRpcProcessor(org.hyperledger.besu.ethereum.api.jsonrpc.execution.JsonRpcProcessor) AccountPermissioningController(org.hyperledger.besu.ethereum.permissioning.account.AccountPermissioningController) Bytes(org.apache.tuweni.bytes.Bytes) Supplier(java.util.function.Supplier) TLSConfiguration(org.hyperledger.besu.ethereum.p2p.rlpx.connections.netty.TLSConfiguration) KubernetesNatManager(org.hyperledger.besu.nat.kubernetes.KubernetesNatManager) ArrayList(java.util.ArrayList) ProtocolSchedule(org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule) PrivacyQueries(org.hyperledger.besu.ethereum.api.query.PrivacyQueries) Strings(com.google.common.base.Strings) FilterManager(org.hyperledger.besu.ethereum.api.jsonrpc.internal.filter.FilterManager) JsonRpcMethodsFactory(org.hyperledger.besu.ethereum.api.jsonrpc.methods.JsonRpcMethodsFactory) MiningCoordinator(org.hyperledger.besu.ethereum.blockcreation.MiningCoordinator) InsufficientPeersPermissioningProvider(org.hyperledger.besu.ethereum.permissioning.node.InsufficientPeersPermissioningProvider) DefaultAuthenticationService(org.hyperledger.besu.ethereum.api.jsonrpc.authentication.DefaultAuthenticationService) TransactionSimulator(org.hyperledger.besu.ethereum.transaction.TransactionSimulator) JsonRpcHttpService(org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcHttpService) StratumServer(org.hyperledger.besu.ethereum.stratum.StratumServer) Vertx(io.vertx.core.Vertx) Predicate.isEqual(java.util.function.Predicate.isEqual) NatMethod(org.hyperledger.besu.nat.NatMethod) GraphQLConfiguration(org.hyperledger.besu.ethereum.api.graphql.GraphQLConfiguration) IOException(java.io.IOException) MetricsConfiguration(org.hyperledger.besu.metrics.prometheus.MetricsConfiguration) DockerNatManager(org.hyperledger.besu.nat.docker.DockerNatManager) TransitionCoordinator(org.hyperledger.besu.consensus.merge.blockcreation.TransitionCoordinator) AccountPermissioningControllerFactory(org.hyperledger.besu.ethereum.permissioning.account.AccountPermissioningControllerFactory) NetworkBuilder(org.hyperledger.besu.ethereum.p2p.network.NetworkRunner.NetworkBuilder) WebSocketMethodsFactory(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.methods.WebSocketMethodsFactory) Preconditions(com.google.common.base.Preconditions) PrivacyParameters(org.hyperledger.besu.ethereum.core.PrivacyParameters) PrivateWebSocketMethodsFactory(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.methods.PrivateWebSocketMethodsFactory) BesuPlugin(org.hyperledger.besu.plugin.BesuPlugin) LoggerFactory(org.slf4j.LoggerFactory) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) JsonRpcIpcService(org.hyperledger.besu.ethereum.api.jsonrpc.ipc.JsonRpcIpcService) StorageProvider(org.hyperledger.besu.ethereum.storage.StorageProvider) Synchronizer(org.hyperledger.besu.ethereum.core.Synchronizer) NetworkName(org.hyperledger.besu.cli.config.NetworkName) DefaultP2PNetwork(org.hyperledger.besu.ethereum.p2p.network.DefaultP2PNetwork) WebSocketMessageHandler(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketMessageHandler) Collection(java.util.Collection) Blockchain(org.hyperledger.besu.ethereum.chain.Blockchain) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) MiningParameters(org.hyperledger.besu.ethereum.core.MiningParameters) Collectors(java.util.stream.Collectors) GraphQLHttpService(org.hyperledger.besu.ethereum.api.graphql.GraphQLHttpService) EthStatsService(org.hyperledger.besu.ethstats.EthStatsService) List(java.util.List) UpnpNatManager(org.hyperledger.besu.nat.upnp.UpnpNatManager) Optional(java.util.Optional) KubernetesDetector(org.hyperledger.besu.nat.kubernetes.KubernetesDetector) NodeKey(org.hyperledger.besu.crypto.NodeKey) ApiConfiguration(org.hyperledger.besu.ethereum.api.ApiConfiguration) GraphQLContextType(org.hyperledger.besu.ethereum.api.graphql.GraphQLContextType) SubProtocolConfiguration(org.hyperledger.besu.ethereum.p2p.config.SubProtocolConfiguration) NatManager(org.hyperledger.besu.nat.core.NatManager) GraphQL(graphql.GraphQL) EthNetworkConfig(org.hyperledger.besu.cli.config.EthNetworkConfig) CACHE_PATH(org.hyperledger.besu.controller.BesuController.CACHE_PATH) EngineAuthService(org.hyperledger.besu.ethereum.api.jsonrpc.authentication.EngineAuthService) NodePermissioningController(org.hyperledger.besu.ethereum.permissioning.node.NodePermissioningController) SubProtocol(org.hyperledger.besu.ethereum.p2p.rlpx.wire.SubProtocol) NetworkRunner(org.hyperledger.besu.ethereum.p2p.network.NetworkRunner) BesuController(org.hyperledger.besu.controller.BesuController) PermissioningServiceImpl(org.hyperledger.besu.services.PermissioningServiceImpl) JsonRpcConfiguration(org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcConfiguration) RpcEndpointServiceImpl(org.hyperledger.besu.services.RpcEndpointServiceImpl) DefaultPeer(org.hyperledger.besu.ethereum.p2p.peers.DefaultPeer) HealthService(org.hyperledger.besu.ethereum.api.jsonrpc.health.HealthService) WorldStateArchive(org.hyperledger.besu.ethereum.worldstate.WorldStateArchive) BaseJsonRpcProcessor(org.hyperledger.besu.ethereum.api.jsonrpc.execution.BaseJsonRpcProcessor) RlpxConfiguration(org.hyperledger.besu.ethereum.p2p.config.RlpxConfiguration) TransactionPool(org.hyperledger.besu.ethereum.eth.transactions.TransactionPool) Logger(org.slf4j.Logger) NodePermissioningControllerFactory(org.hyperledger.besu.ethereum.permissioning.NodePermissioningControllerFactory) PeerPermissionsAdapter(org.hyperledger.besu.ethereum.permissioning.node.PeerPermissionsAdapter) NetstatsUrl(org.hyperledger.besu.ethstats.util.NetstatsUrl) AccountLocalConfigPermissioningController(org.hyperledger.besu.ethereum.permissioning.AccountLocalConfigPermissioningController) GraphQLDataFetchers(org.hyperledger.besu.ethereum.api.graphql.GraphQLDataFetchers) EnodeURL(org.hyperledger.besu.plugin.data.EnodeURL) JsonRpcService(org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcService) SubscriptionManager(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.subscription.SubscriptionManager) JsonRpcIpcConfiguration(org.hyperledger.besu.ethereum.api.jsonrpc.ipc.JsonRpcIpcConfiguration) ObservableMetricsSystem(org.hyperledger.besu.metrics.ObservableMetricsSystem) ProtocolContext(org.hyperledger.besu.ethereum.ProtocolContext) PeerPermissions(org.hyperledger.besu.ethereum.p2p.permissions.PeerPermissions) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Collections(java.util.Collections) JsonRpcMethod(org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod) NatService(org.hyperledger.besu.nat.NatService) AuthenticatedJsonRpcProcessor(org.hyperledger.besu.ethereum.api.jsonrpc.execution.AuthenticatedJsonRpcProcessor) StratumServer(org.hyperledger.besu.ethereum.stratum.StratumServer) DiscoveryConfiguration(org.hyperledger.besu.ethereum.p2p.config.DiscoveryConfiguration) AccountLocalConfigPermissioningController(org.hyperledger.besu.ethereum.permissioning.AccountLocalConfigPermissioningController) SubscriptionManager(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.subscription.SubscriptionManager) RlpxConfiguration(org.hyperledger.besu.ethereum.p2p.config.RlpxConfiguration) EnodeURL(org.hyperledger.besu.plugin.data.EnodeURL) Bytes(org.apache.tuweni.bytes.Bytes) MiningParameters(org.hyperledger.besu.ethereum.core.MiningParameters) ReadinessCheck(org.hyperledger.besu.ethereum.api.jsonrpc.health.ReadinessCheck) HealthService(org.hyperledger.besu.ethereum.api.jsonrpc.health.HealthService) LivenessCheck(org.hyperledger.besu.ethereum.api.jsonrpc.health.LivenessCheck) SubProtocol(org.hyperledger.besu.ethereum.p2p.rlpx.wire.SubProtocol) EngineAuthService(org.hyperledger.besu.ethereum.api.jsonrpc.authentication.EngineAuthService) ProtocolContext(org.hyperledger.besu.ethereum.ProtocolContext) TransactionSimulator(org.hyperledger.besu.ethereum.transaction.TransactionSimulator) NodeKey(org.hyperledger.besu.crypto.NodeKey) JsonRpcExecutor(org.hyperledger.besu.ethereum.api.jsonrpc.execution.JsonRpcExecutor) PeerPermissionsAdapter(org.hyperledger.besu.ethereum.permissioning.node.PeerPermissionsAdapter) Synchronizer(org.hyperledger.besu.ethereum.core.Synchronizer) TransactionPool(org.hyperledger.besu.ethereum.eth.transactions.TransactionPool) Capability(org.hyperledger.besu.ethereum.p2p.rlpx.wire.Capability) WebSocketConfiguration(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketConfiguration) NatService(org.hyperledger.besu.nat.NatService) GraphQL(graphql.GraphQL) ProtocolSchedule(org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule) PrivacyParameters(org.hyperledger.besu.ethereum.core.PrivacyParameters) JsonRpcIpcService(org.hyperledger.besu.ethereum.api.jsonrpc.ipc.JsonRpcIpcService) SubProtocolConfiguration(org.hyperledger.besu.ethereum.p2p.config.SubProtocolConfiguration) ProtocolManager(org.hyperledger.besu.ethereum.p2p.network.ProtocolManager) NodePermissioningController(org.hyperledger.besu.ethereum.permissioning.node.NodePermissioningController) GraphQLDataFetchers(org.hyperledger.besu.ethereum.api.graphql.GraphQLDataFetchers) JsonRpcHttpService(org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcHttpService) EthStatsService(org.hyperledger.besu.ethstats.EthStatsService) NetworkRunner(org.hyperledger.besu.ethereum.p2p.network.NetworkRunner) GraphQLHttpService(org.hyperledger.besu.ethereum.api.graphql.GraphQLHttpService) NodeLocalConfigPermissioningController(org.hyperledger.besu.ethereum.permissioning.NodeLocalConfigPermissioningController) MiningCoordinator(org.hyperledger.besu.ethereum.blockcreation.MiningCoordinator) FilterManager(org.hyperledger.besu.ethereum.api.jsonrpc.internal.filter.FilterManager) AccountPermissioningController(org.hyperledger.besu.ethereum.permissioning.account.AccountPermissioningController) PeerPermissionsDenylist(org.hyperledger.besu.ethereum.p2p.permissions.PeerPermissionsDenylist) BaseJsonRpcProcessor(org.hyperledger.besu.ethereum.api.jsonrpc.execution.BaseJsonRpcProcessor) NetworkBuilder(org.hyperledger.besu.ethereum.p2p.network.NetworkRunner.NetworkBuilder) TransitionCoordinator(org.hyperledger.besu.consensus.merge.blockcreation.TransitionCoordinator) BlockchainQueries(org.hyperledger.besu.ethereum.api.query.BlockchainQueries) WebSocketService(org.hyperledger.besu.ethereum.api.jsonrpc.websocket.WebSocketService) NetworkRunner(org.hyperledger.besu.ethereum.p2p.network.NetworkRunner) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) InsufficientPeersPermissioningProvider(org.hyperledger.besu.ethereum.permissioning.node.InsufficientPeersPermissioningProvider) NoopP2PNetwork(org.hyperledger.besu.ethereum.p2p.network.NoopP2PNetwork) MetricsService(org.hyperledger.besu.metrics.MetricsService) NoopP2PNetwork(org.hyperledger.besu.ethereum.p2p.network.NoopP2PNetwork) P2PNetwork(org.hyperledger.besu.ethereum.p2p.network.P2PNetwork) DefaultP2PNetwork(org.hyperledger.besu.ethereum.p2p.network.DefaultP2PNetwork) FilterManagerBuilder(org.hyperledger.besu.ethereum.api.jsonrpc.internal.filter.FilterManagerBuilder) IOException(java.io.IOException) GraphQLContextType(org.hyperledger.besu.ethereum.api.graphql.GraphQLContextType) JsonRpcService(org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcService) JsonRpcMethod(org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod) PeerPermissions(org.hyperledger.besu.ethereum.p2p.permissions.PeerPermissions) AuthenticationService(org.hyperledger.besu.ethereum.api.jsonrpc.authentication.AuthenticationService) DefaultAuthenticationService(org.hyperledger.besu.ethereum.api.jsonrpc.authentication.DefaultAuthenticationService)

Example 2 with MiningParameters

use of org.hyperledger.besu.ethereum.core.MiningParameters in project besu by hyperledger.

the class TransitionBesuControllerBuilder method createMiningCoordinator.

@Override
protected MiningCoordinator createMiningCoordinator(final ProtocolSchedule protocolSchedule, final ProtocolContext protocolContext, final TransactionPool transactionPool, final MiningParameters miningParameters, final SyncState syncState, final EthProtocolManager ethProtocolManager) {
    // cast to transition schedule for explicit access to pre and post objects:
    final TransitionProtocolSchedule transitionProtocolSchedule = (TransitionProtocolSchedule) protocolSchedule;
    // PoA consensus mines by default, get consensus-specific mining parameters for
    // TransitionCoordinator:
    MiningParameters transitionMiningParameters = preMergeBesuControllerBuilder.getMiningParameterOverrides(miningParameters);
    // construct a transition backward sync context
    BackwardSyncContext transitionBackwardsSyncContext = new TransitionBackwardSyncContext(protocolContext, transitionProtocolSchedule, metricsSystem, ethProtocolManager.ethContext(), syncState, storageProvider);
    final TransitionCoordinator composedCoordinator = new TransitionCoordinator(preMergeBesuControllerBuilder.createMiningCoordinator(transitionProtocolSchedule.getPreMergeSchedule(), protocolContext, transactionPool, new MiningParameters.Builder(miningParameters).miningEnabled(false).build(), syncState, ethProtocolManager), mergeBesuControllerBuilder.createTransitionMiningCoordinator(transitionProtocolSchedule, protocolContext, transactionPool, transitionMiningParameters, syncState, ethProtocolManager, transitionBackwardsSyncContext));
    initTransitionWatcher(protocolContext, composedCoordinator);
    return composedCoordinator;
}
Also used : MiningParameters(org.hyperledger.besu.ethereum.core.MiningParameters) TransitionCoordinator(org.hyperledger.besu.consensus.merge.blockcreation.TransitionCoordinator) TransitionProtocolSchedule(org.hyperledger.besu.consensus.merge.TransitionProtocolSchedule) TransitionBackwardSyncContext(org.hyperledger.besu.consensus.merge.TransitionBackwardSyncContext) BackwardSyncContext(org.hyperledger.besu.ethereum.eth.sync.backwardsync.BackwardSyncContext) TransitionBackwardSyncContext(org.hyperledger.besu.consensus.merge.TransitionBackwardSyncContext)

Example 3 with MiningParameters

use of org.hyperledger.besu.ethereum.core.MiningParameters in project besu by hyperledger.

the class QbftBlockCreatorFactoryTest method setUp.

@Before
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
    final MiningParameters miningParams = mock(MiningParameters.class);
    when(miningParams.getExtraData()).thenReturn(Bytes.wrap("Qbft tests".getBytes(UTF_8)));
    final MutableQbftConfigOptions qbftConfigOptions = new MutableQbftConfigOptions(JsonQbftConfigOptions.DEFAULT);
    qbftConfigOptions.setValidatorContractAddress(Optional.of("1"));
    final ForkSpec<QbftConfigOptions> spec = new ForkSpec<>(0, qbftConfigOptions);
    final ForksSchedule<QbftConfigOptions> forksSchedule = mock(ForksSchedule.class);
    when(forksSchedule.getFork(anyLong())).thenReturn(spec);
    qbftBlockCreatorFactory = new QbftBlockCreatorFactory(mock(AbstractPendingTransactionsSorter.class), mock(ProtocolContext.class), mock(ProtocolSchedule.class), forksSchedule, miningParams, mock(Address.class), extraDataCodec);
}
Also used : MiningParameters(org.hyperledger.besu.ethereum.core.MiningParameters) ForkSpec(org.hyperledger.besu.consensus.common.ForkSpec) MutableQbftConfigOptions(org.hyperledger.besu.consensus.qbft.MutableQbftConfigOptions) QbftConfigOptions(org.hyperledger.besu.config.QbftConfigOptions) JsonQbftConfigOptions(org.hyperledger.besu.config.JsonQbftConfigOptions) MutableQbftConfigOptions(org.hyperledger.besu.consensus.qbft.MutableQbftConfigOptions) Before(org.junit.Before)

Example 4 with MiningParameters

use of org.hyperledger.besu.ethereum.core.MiningParameters in project besu by hyperledger.

the class BesuNodeFactory method createNodeWithMultiTenantedPrivacy.

public BesuNode createNodeWithMultiTenantedPrivacy(final String name, final String enclaveUrl, final String authFile, final String privTransactionSigningKey, final boolean enableFlexiblePrivacy) throws IOException, URISyntaxException {
    final PrivacyParameters.Builder privacyParametersBuilder = new PrivacyParameters.Builder();
    final PrivacyParameters privacyParameters = privacyParametersBuilder.setMultiTenancyEnabled(true).setEnabled(true).setFlexiblePrivacyGroupsEnabled(enableFlexiblePrivacy).setStorageProvider(new InMemoryPrivacyStorageProvider()).setEnclaveFactory(new EnclaveFactory(Vertx.vertx())).setEnclaveUrl(URI.create(enclaveUrl)).setPrivateKeyPath(Paths.get(ClassLoader.getSystemResource(privTransactionSigningKey).toURI())).build();
    final MiningParameters miningParameters = new MiningParameters.Builder().minTransactionGasPrice(Wei.ZERO).coinbase(AddressHelpers.ofValue(1)).miningEnabled(true).build();
    return create(new BesuNodeConfigurationBuilder().name(name).jsonRpcEnabled().jsonRpcAuthenticationConfiguration(authFile).enablePrivateTransactions().privacyParameters(privacyParameters).miningConfiguration(miningParameters).build());
}
Also used : EnclaveFactory(org.hyperledger.besu.enclave.EnclaveFactory) MiningParameters(org.hyperledger.besu.ethereum.core.MiningParameters) PrivacyParameters(org.hyperledger.besu.ethereum.core.PrivacyParameters) InMemoryPrivacyStorageProvider(org.hyperledger.besu.ethereum.core.InMemoryPrivacyStorageProvider)

Example 5 with MiningParameters

use of org.hyperledger.besu.ethereum.core.MiningParameters in project besu by hyperledger.

the class TestContextBuilder method createControllerAndFinalState.

private static ControllerAndState createControllerAndFinalState(final MutableBlockchain blockChain, final WorldStateArchive worldStateArchive, final StubValidatorMulticaster multicaster, final NodeKey nodeKey, final Clock clock, final BftEventQueue bftEventQueue, final Gossiper gossiper, final SynchronizerUpdater synchronizerUpdater, final boolean useValidatorContract, final List<QbftFork> qbftForks) {
    final MiningParameters miningParams = new MiningParameters.Builder().coinbase(AddressHelpers.ofValue(1)).minTransactionGasPrice(Wei.ZERO).extraData(Bytes.wrap("Qbft Int tests".getBytes(UTF_8))).miningEnabled(true).build();
    final StubGenesisConfigOptions genesisConfigOptions = new StubGenesisConfigOptions();
    final Map<String, Object> qbftConfigValues = useValidatorContract ? Map.of(JsonQbftConfigOptions.VALIDATOR_CONTRACT_ADDRESS, VALIDATOR_CONTRACT_ADDRESS.toHexString()) : Collections.emptyMap();
    final QbftConfigOptions qbftConfigOptions = createGenesisConfig(useValidatorContract);
    genesisConfigOptions.byzantiumBlock(0);
    genesisConfigOptions.qbftConfigOptions(new JsonQbftConfigOptions(JsonUtil.objectNodeFromMap(qbftConfigValues)));
    genesisConfigOptions.transitions(TestTransitions.createQbftTestTransitions(qbftForks));
    genesisConfigOptions.qbftConfigOptions(qbftConfigOptions);
    final EpochManager epochManager = new EpochManager(EPOCH_LENGTH);
    final BftBlockInterface blockInterface = new BftBlockInterface(BFT_EXTRA_DATA_ENCODER);
    final ForksSchedule<QbftConfigOptions> forksSchedule = QbftForksSchedulesFactory.create(genesisConfigOptions);
    final ProtocolSchedule protocolSchedule = QbftProtocolSchedule.create(genesisConfigOptions, forksSchedule, BFT_EXTRA_DATA_ENCODER, EvmConfiguration.DEFAULT);
    final BftValidatorOverrides validatorOverrides = convertBftForks(qbftForks);
    final TransactionSimulator transactionSimulator = new TransactionSimulator(blockChain, worldStateArchive, protocolSchedule);
    final BlockValidatorProvider blockValidatorProvider = BlockValidatorProvider.forkingValidatorProvider(blockChain, epochManager, blockInterface, validatorOverrides);
    final TransactionValidatorProvider transactionValidatorProvider = new TransactionValidatorProvider(blockChain, new ValidatorContractController(transactionSimulator), forksSchedule);
    final ValidatorProvider validatorProvider = new ForkingValidatorProvider(blockChain, forksSchedule, blockValidatorProvider, transactionValidatorProvider);
    final ProtocolContext protocolContext = new ProtocolContext(blockChain, worldStateArchive, new QbftContext(validatorProvider, epochManager, blockInterface, Optional.empty()));
    final GasPricePendingTransactionsSorter pendingTransactions = new GasPricePendingTransactionsSorter(TransactionPoolConfiguration.DEFAULT_TX_RETENTION_HOURS, 1, clock, metricsSystem, blockChain::getChainHeadHeader, TransactionPoolConfiguration.DEFAULT_PRICE_BUMP);
    final Address localAddress = Util.publicKeyToAddress(nodeKey.getPublicKey());
    final BftBlockCreatorFactory<?> blockCreatorFactory = new QbftBlockCreatorFactory(// changed from QbftBesuController
    pendingTransactions, protocolContext, protocolSchedule, forksSchedule, miningParams, localAddress, BFT_EXTRA_DATA_ENCODER);
    final ProposerSelector proposerSelector = new ProposerSelector(blockChain, blockInterface, true, validatorProvider);
    final BftExecutors bftExecutors = BftExecutors.create(new NoOpMetricsSystem(), BftExecutors.ConsensusType.QBFT);
    final BftFinalState finalState = new BftFinalState(protocolContext.getConsensusContext(BftContext.class).getValidatorProvider(), nodeKey, Util.publicKeyToAddress(nodeKey.getPublicKey()), proposerSelector, multicaster, new RoundTimer(bftEventQueue, ROUND_TIMER_SEC, bftExecutors), new BlockTimer(bftEventQueue, forksSchedule, bftExecutors, TestClock.fixed()), blockCreatorFactory, clock);
    final MessageFactory messageFactory = new MessageFactory(nodeKey);
    final MessageValidatorFactory messageValidatorFactory = new MessageValidatorFactory(proposerSelector, protocolSchedule, protocolContext, BFT_EXTRA_DATA_ENCODER);
    final Subscribers<MinedBlockObserver> minedBlockObservers = Subscribers.create();
    final MessageTracker duplicateMessageTracker = new MessageTracker(DUPLICATE_MESSAGE_LIMIT);
    final FutureMessageBuffer futureMessageBuffer = new FutureMessageBuffer(FUTURE_MESSAGES_MAX_DISTANCE, FUTURE_MESSAGES_LIMIT, blockChain.getChainHeadBlockNumber());
    final BftEventHandler qbftController = new QbftController(blockChain, finalState, new QbftBlockHeightManagerFactory(finalState, new QbftRoundFactory(finalState, protocolContext, protocolSchedule, minedBlockObservers, messageValidatorFactory, messageFactory, BFT_EXTRA_DATA_ENCODER), messageValidatorFactory, messageFactory, new ValidatorModeTransitionLogger(forksSchedule)), gossiper, duplicateMessageTracker, futureMessageBuffer, synchronizerUpdater, BFT_EXTRA_DATA_ENCODER);
    final EventMultiplexer eventMultiplexer = new EventMultiplexer(qbftController);
    return new ControllerAndState(bftExecutors, qbftController, finalState, eventMultiplexer, messageFactory, validatorProvider);
}
Also used : BftBlockInterface(org.hyperledger.besu.consensus.common.bft.BftBlockInterface) MinedBlockObserver(org.hyperledger.besu.ethereum.chain.MinedBlockObserver) ForkingValidatorProvider(org.hyperledger.besu.consensus.qbft.validator.ForkingValidatorProvider) Address(org.hyperledger.besu.datatypes.Address) ValidatorModeTransitionLogger(org.hyperledger.besu.consensus.qbft.validator.ValidatorModeTransitionLogger) QbftContext(org.hyperledger.besu.consensus.qbft.QbftContext) RoundTimer(org.hyperledger.besu.consensus.common.bft.RoundTimer) BftEventHandler(org.hyperledger.besu.consensus.common.bft.statemachine.BftEventHandler) JsonQbftConfigOptions(org.hyperledger.besu.config.JsonQbftConfigOptions) QbftBlockCreatorFactory(org.hyperledger.besu.consensus.qbft.blockcreation.QbftBlockCreatorFactory) EventMultiplexer(org.hyperledger.besu.consensus.common.bft.EventMultiplexer) BftValidatorOverrides(org.hyperledger.besu.consensus.common.BftValidatorOverrides) BftFinalState(org.hyperledger.besu.consensus.common.bft.statemachine.BftFinalState) ProposerSelector(org.hyperledger.besu.consensus.common.bft.blockcreation.ProposerSelector) TransactionValidatorProvider(org.hyperledger.besu.consensus.qbft.validator.TransactionValidatorProvider) ForkingValidatorProvider(org.hyperledger.besu.consensus.qbft.validator.ForkingValidatorProvider) BlockValidatorProvider(org.hyperledger.besu.consensus.common.validator.blockbased.BlockValidatorProvider) TransactionValidatorProvider(org.hyperledger.besu.consensus.qbft.validator.TransactionValidatorProvider) ValidatorProvider(org.hyperledger.besu.consensus.common.validator.ValidatorProvider) BftExecutors(org.hyperledger.besu.consensus.common.bft.BftExecutors) MiningParameters(org.hyperledger.besu.ethereum.core.MiningParameters) ProtocolContext(org.hyperledger.besu.ethereum.ProtocolContext) ValidatorContractController(org.hyperledger.besu.consensus.qbft.validator.ValidatorContractController) TransactionSimulator(org.hyperledger.besu.ethereum.transaction.TransactionSimulator) MessageFactory(org.hyperledger.besu.consensus.qbft.payload.MessageFactory) MessageValidatorFactory(org.hyperledger.besu.consensus.qbft.validation.MessageValidatorFactory) ProtocolSchedule(org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule) QbftProtocolSchedule(org.hyperledger.besu.consensus.qbft.QbftProtocolSchedule) MessageTracker(org.hyperledger.besu.consensus.common.bft.MessageTracker) BlockValidatorProvider(org.hyperledger.besu.consensus.common.validator.blockbased.BlockValidatorProvider) QbftBlockHeightManagerFactory(org.hyperledger.besu.consensus.qbft.statemachine.QbftBlockHeightManagerFactory) QbftController(org.hyperledger.besu.consensus.qbft.statemachine.QbftController) FutureMessageBuffer(org.hyperledger.besu.consensus.common.bft.statemachine.FutureMessageBuffer) NoOpMetricsSystem(org.hyperledger.besu.metrics.noop.NoOpMetricsSystem) BlockTimer(org.hyperledger.besu.consensus.common.bft.BlockTimer) MutableQbftConfigOptions(org.hyperledger.besu.consensus.qbft.MutableQbftConfigOptions) QbftConfigOptions(org.hyperledger.besu.config.QbftConfigOptions) JsonQbftConfigOptions(org.hyperledger.besu.config.JsonQbftConfigOptions) StubGenesisConfigOptions(org.hyperledger.besu.config.StubGenesisConfigOptions) GasPricePendingTransactionsSorter(org.hyperledger.besu.ethereum.eth.transactions.sorter.GasPricePendingTransactionsSorter) EpochManager(org.hyperledger.besu.consensus.common.EpochManager) QbftRoundFactory(org.hyperledger.besu.consensus.qbft.statemachine.QbftRoundFactory)

Aggregations

MiningParameters (org.hyperledger.besu.ethereum.core.MiningParameters)11 Test (org.junit.Test)5 GasPricePendingTransactionsSorter (org.hyperledger.besu.ethereum.eth.transactions.sorter.GasPricePendingTransactionsSorter)4 EthNetworkConfig (org.hyperledger.besu.cli.config.EthNetworkConfig)3 TransitionCoordinator (org.hyperledger.besu.consensus.merge.blockcreation.TransitionCoordinator)3 Address (org.hyperledger.besu.datatypes.Address)3 ProtocolContext (org.hyperledger.besu.ethereum.ProtocolContext)3 JsonQbftConfigOptions (org.hyperledger.besu.config.JsonQbftConfigOptions)2 QbftConfigOptions (org.hyperledger.besu.config.QbftConfigOptions)2 StubGenesisConfigOptions (org.hyperledger.besu.config.StubGenesisConfigOptions)2 EpochManager (org.hyperledger.besu.consensus.common.EpochManager)2 BftBlockInterface (org.hyperledger.besu.consensus.common.bft.BftBlockInterface)2 BftExecutors (org.hyperledger.besu.consensus.common.bft.BftExecutors)2 BlockTimer (org.hyperledger.besu.consensus.common.bft.BlockTimer)2 EventMultiplexer (org.hyperledger.besu.consensus.common.bft.EventMultiplexer)2 MessageTracker (org.hyperledger.besu.consensus.common.bft.MessageTracker)2 RoundTimer (org.hyperledger.besu.consensus.common.bft.RoundTimer)2 ProposerSelector (org.hyperledger.besu.consensus.common.bft.blockcreation.ProposerSelector)2 BftEventHandler (org.hyperledger.besu.consensus.common.bft.statemachine.BftEventHandler)2 BftFinalState (org.hyperledger.besu.consensus.common.bft.statemachine.BftFinalState)2