Search in sources :

Example 1 with HttpClientExternalSignerFactory

use of tech.pegasys.teku.validator.client.loader.HttpClientExternalSignerFactory in project teku by ConsenSys.

the class ExternalSignerUpcheckTLSIntegrationTest method buildExternalSignerUpcheck.

private static ExternalSignerUpcheck buildExternalSignerUpcheck(final URL serverUrl) {
    final ValidatorConfig config = ValidatorConfig.builder().validatorExternalSignerPublicKeySources(List.of(KEYPAIR.getPublicKey().toString())).validatorExternalSignerUrl(serverUrl).validatorExternalSignerTimeout(TIMEOUT).validatorExternalSignerKeystore(TEKU_KEYSTORE).validatorExternalSignerKeystorePasswordFile(PASSWORD_FILE).validatorExternalSignerTruststore(EXTERNAL_SIGNER_TRUSTSTORE).validatorExternalSignerTruststorePasswordFile(PASSWORD_FILE).build();
    final HttpClientExternalSignerFactory httpClientExternalSignerFactory = new HttpClientExternalSignerFactory(config);
    return new ExternalSignerUpcheck(httpClientExternalSignerFactory.get(), config.getValidatorExternalSignerUrl(), config.getValidatorExternalSignerTimeout());
}
Also used : HttpClientExternalSignerFactory(tech.pegasys.teku.validator.client.loader.HttpClientExternalSignerFactory) ValidatorConfig(tech.pegasys.teku.validator.api.ValidatorConfig)

Example 2 with HttpClientExternalSignerFactory

use of tech.pegasys.teku.validator.client.loader.HttpClientExternalSignerFactory in project teku by ConsenSys.

the class ExternalSignerAltairIntegrationTest method setup.

@BeforeEach
void setup(final ClientAndServer client) throws MalformedURLException {
    this.client = client;
    final ValidatorConfig config = ValidatorConfig.builder().validatorExternalSignerPublicKeySources(List.of(KEYPAIR.getPublicKey().toString())).validatorExternalSignerUrl(new URL("http://127.0.0.1:" + client.getLocalPort())).validatorExternalSignerTimeout(TIMEOUT).build();
    final HttpClientExternalSignerFactory httpClientExternalSignerFactory = new HttpClientExternalSignerFactory(config);
    externalSigner = new ExternalSigner(spec, httpClientExternalSignerFactory.get(), config.getValidatorExternalSignerUrl(), KEYPAIR.getPublicKey(), TIMEOUT, queue, metricsSystem);
}
Also used : URL(java.net.URL) HttpClientExternalSignerFactory(tech.pegasys.teku.validator.client.loader.HttpClientExternalSignerFactory) ValidatorConfig(tech.pegasys.teku.validator.api.ValidatorConfig) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with HttpClientExternalSignerFactory

use of tech.pegasys.teku.validator.client.loader.HttpClientExternalSignerFactory in project teku by ConsenSys.

the class ExternalSignerIntegrationTest method setup.

@BeforeEach
void setup(final ClientAndServer client) throws MalformedURLException {
    this.client = client;
    final ValidatorConfig config = ValidatorConfig.builder().validatorExternalSignerPublicKeySources(List.of(KEYPAIR.getPublicKey().toString())).validatorExternalSignerUrl(new URL("http://127.0.0.1:" + client.getLocalPort())).validatorExternalSignerTimeout(TIMEOUT).build();
    final HttpClientExternalSignerFactory httpClientExternalSignerFactory = new HttpClientExternalSignerFactory(config);
    externalSigner = new ExternalSigner(spec, httpClientExternalSignerFactory.get(), config.getValidatorExternalSignerUrl(), KEYPAIR.getPublicKey(), TIMEOUT, queue, metricsSystem);
}
Also used : URL(java.net.URL) HttpClientExternalSignerFactory(tech.pegasys.teku.validator.client.loader.HttpClientExternalSignerFactory) ValidatorConfig(tech.pegasys.teku.validator.api.ValidatorConfig) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ValidatorConfig (tech.pegasys.teku.validator.api.ValidatorConfig)3 HttpClientExternalSignerFactory (tech.pegasys.teku.validator.client.loader.HttpClientExternalSignerFactory)3 URL (java.net.URL)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2