Search in sources :

Example 1 with DEFAULT_METRICS_CATEGORIES

use of tech.pegasys.teku.infrastructure.metrics.MetricsConfig.DEFAULT_METRICS_CATEGORIES in project teku by ConsenSys.

the class BeaconNodeCommandTest method expectedDefaultConfigurationBuilder.

private TekuConfiguration.Builder expectedDefaultConfigurationBuilder() {
    final Eth2NetworkConfiguration networkConfig = Eth2NetworkConfiguration.builder("mainnet").build();
    return expectedConfigurationBuilder().eth2NetworkConfig(b -> b.applyNetworkDefaults("mainnet")).executionEngine(b -> b.endpoint(null)).powchain(b -> {
        b.depositContract(networkConfig.getEth1DepositContractAddress());
        b.eth1Endpoints(new ArrayList<>()).depositContractDeployBlock(networkConfig.getEth1DepositContractDeployBlock());
    }).storageConfiguration(b -> b.eth1DepositContract(networkConfig.getEth1DepositContractAddress())).metrics(b -> b.metricsCategories(DEFAULT_METRICS_CATEGORIES)).restApi(b -> b.eth1DepositContractAddress(networkConfig.getEth1DepositContractAddress())).p2p(p -> p.peerRateLimit(500).peerRequestLimit(50)).discovery(d -> d.isDiscoveryEnabled(true).listenUdpPort(9000).bootnodes(networkConfig.getDiscoveryBootnodes())).network(n -> n.advertisedPort(OptionalInt.empty()).networkInterface("0.0.0.0").listenPort(9000).privateKeyFile("")).validator(b -> b.validatorKeystoreLockingEnabled(true).validatorPerformanceTrackingMode(ValidatorPerformanceTrackingMode.ALL)).interop(b -> b.interopEnabled(false).interopGenesisTime(0).interopOwnedValidatorCount(0));
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) PRUNE(tech.pegasys.teku.storage.server.StateStorageMode.PRUNE) URL(java.net.URL) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ValidatorPerformanceTrackingMode(tech.pegasys.teku.validator.api.ValidatorPerformanceTrackingMode) OptionalInt(java.util.OptionalInt) StringUtils(org.apache.commons.lang3.StringUtils) ArrayList(java.util.ArrayList) LIBP2P(tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.LIBP2P) DEFAULT_BOTH(tech.pegasys.teku.infrastructure.logging.LoggingDestination.DEFAULT_BOTH) BEACON(tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.BEACON) Duration(java.time.Duration) Map(java.util.Map) SLASH(tech.pegasys.teku.cli.OSUtils.SLASH) VersionedDatabaseFactory(tech.pegasys.teku.storage.server.VersionedDatabaseFactory) NETWORK(tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.NETWORK) LoggingConfigBuilder(tech.pegasys.teku.infrastructure.logging.LoggingConfig.LoggingConfigBuilder) BOTH(tech.pegasys.teku.infrastructure.logging.LoggingDestination.BOTH) FileBackedGraffitiProvider(tech.pegasys.teku.validator.api.FileBackedGraffitiProvider) Path(java.nio.file.Path) CommandLine(picocli.CommandLine) LOG_FILE_PREFIX(tech.pegasys.teku.cli.BeaconNodeCommand.LOG_FILE_PREFIX) Resources(com.google.common.io.Resources) UTF_8(java.nio.charset.StandardCharsets.UTF_8) NatMethod(tech.pegasys.teku.networking.nat.NatMethod) Set(java.util.Set) IOException(java.io.IOException) EVENTBUS(tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.EVENTBUS) CONFIG_FILE_OPTION_NAME(tech.pegasys.teku.cli.BeaconNodeCommand.CONFIG_FILE_OPTION_NAME) Eth1Address(tech.pegasys.teku.spec.datastructures.eth1.Eth1Address) Test(org.junit.jupiter.api.Test) BeaconRestApiConfig(tech.pegasys.teku.beaconrestapi.BeaconRestApiConfig) PROCESS(org.hyperledger.besu.metrics.StandardMetricCategory.PROCESS) List(java.util.List) TekuConfiguration(tech.pegasys.teku.config.TekuConfiguration) Eth2NetworkConfiguration(tech.pegasys.teku.networks.Eth2NetworkConfiguration) DEFAULT_METRICS_CATEGORIES(tech.pegasys.teku.infrastructure.metrics.MetricsConfig.DEFAULT_METRICS_CATEGORIES) DatabaseVersion(tech.pegasys.teku.storage.server.DatabaseVersion) JVM(org.hyperledger.besu.metrics.StandardMetricCategory.JVM) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) LoggingConfig(tech.pegasys.teku.infrastructure.logging.LoggingConfig) Collections(java.util.Collections) InteropConfig(tech.pegasys.teku.validator.api.InteropConfig) ArrayList(java.util.ArrayList) Eth2NetworkConfiguration(tech.pegasys.teku.networks.Eth2NetworkConfiguration)

Aggregations

Resources (com.google.common.io.Resources)1 IOException (java.io.IOException)1 URL (java.net.URL)1 UTF_8 (java.nio.charset.StandardCharsets.UTF_8)1 Path (java.nio.file.Path)1 Duration (java.time.Duration)1 ArrayList (java.util.ArrayList)1 Collections (java.util.Collections)1 List (java.util.List)1 Map (java.util.Map)1 Optional (java.util.Optional)1 OptionalInt (java.util.OptionalInt)1 Set (java.util.Set)1 Pattern (java.util.regex.Pattern)1 StringUtils (org.apache.commons.lang3.StringUtils)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 JVM (org.hyperledger.besu.metrics.StandardMetricCategory.JVM)1 PROCESS (org.hyperledger.besu.metrics.StandardMetricCategory.PROCESS)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 Test (org.junit.jupiter.api.Test)1