use of tech.pegasys.teku.validator.api.ValidatorPerformanceTrackingMode in project teku by ConsenSys.
the class BeaconChainController method initPerformanceTracker.
protected void initPerformanceTracker() {
LOG.debug("BeaconChainController.initPerformanceTracker()");
ValidatorPerformanceTrackingMode mode = beaconConfig.validatorConfig().getValidatorPerformanceTrackingMode();
if (mode.isEnabled()) {
performanceTracker = new DefaultPerformanceTracker(combinedChainDataClient, STATUS_LOG, new ValidatorPerformanceMetrics(metricsSystem), beaconConfig.validatorConfig().getValidatorPerformanceTrackingMode(), activeValidatorTracker, new SyncCommitteePerformanceTracker(spec, combinedChainDataClient), spec);
eventChannels.subscribe(SlotEventsChannel.class, performanceTracker);
} else {
performanceTracker = new NoOpPerformanceTracker();
}
}
use of tech.pegasys.teku.validator.api.ValidatorPerformanceTrackingMode 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));
}
Aggregations