mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 23:47:57 -05:00
Update ethsigner version to be used in Acceptance Tests (#1987)
* Upgrade ethsigner dependency version to 21.3.0 Signed-off-by: Usman Saleem <usman@usmans.info>
This commit is contained in:
@@ -42,7 +42,7 @@ dependencies {
|
||||
implementation 'org.web3j:abi'
|
||||
implementation 'org.web3j:besu'
|
||||
implementation 'org.web3j:crypto'
|
||||
implementation 'tech.pegasys.ethsigner.internal:core'
|
||||
implementation 'tech.pegasys.ethsigner.internal:file-based'
|
||||
implementation 'tech.pegasys.ethsigner.internal:signing-api'
|
||||
implementation 'tech.pegasys.ethsigner.internal:ethsigner-core'
|
||||
implementation 'tech.pegasys.signers.internal:signing-secp256k1-api'
|
||||
implementation 'tech.pegasys.signers.internal:signing-secp256k1-impl'
|
||||
}
|
||||
|
||||
@@ -14,11 +14,20 @@
|
||||
*/
|
||||
package org.hyperledger.besu.tests.acceptance.dsl.ethsigner.testutil;
|
||||
|
||||
import org.hyperledger.besu.plugin.services.metrics.MetricCategory;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import tech.pegasys.ethsigner.core.Config;
|
||||
import tech.pegasys.ethsigner.core.config.Config;
|
||||
import tech.pegasys.ethsigner.core.config.TlsOptions;
|
||||
import tech.pegasys.ethsigner.core.config.tls.client.ClientTlsOptions;
|
||||
import tech.pegasys.ethsigner.core.signing.ChainIdProvider;
|
||||
|
||||
public class EthSignerConfig implements Config {
|
||||
@@ -66,6 +75,11 @@ public class EthSignerConfig implements Config {
|
||||
return downStreamHttpPort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDownstreamHttpPath() {
|
||||
return "/";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Duration getDownstreamHttpRequestTimeout() {
|
||||
return downstreamHttpRequestTimeout;
|
||||
@@ -90,4 +104,44 @@ public class EthSignerConfig implements Config {
|
||||
public Path getDataPath() {
|
||||
return dataDirectory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<TlsOptions> getTlsOptions() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<ClientTlsOptions> getClientTlsOptions() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<String> getCorsAllowedOrigins() {
|
||||
return List.of("*");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isMetricsEnabled() {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getMetricsPort() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMetricsHost() {
|
||||
return "localhost";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<MetricCategory> getMetricCategories() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getMetricsHostAllowList() {
|
||||
return List.of("localhost", "127.0.0.1");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ import org.web3j.crypto.CipherException;
|
||||
import org.web3j.crypto.WalletUtils;
|
||||
import tech.pegasys.ethsigner.core.EthSigner;
|
||||
import tech.pegasys.ethsigner.core.signing.ConfigurationChainId;
|
||||
import tech.pegasys.ethsigner.core.signing.SingleTransactionSignerProvider;
|
||||
import tech.pegasys.ethsigner.signer.filebased.CredentialTransactionSigner;
|
||||
import tech.pegasys.signers.secp256k1.api.SingleSignerProvider;
|
||||
import tech.pegasys.signers.secp256k1.filebased.CredentialSigner;
|
||||
|
||||
public class EthSignerTestHarnessFactory {
|
||||
|
||||
@@ -62,8 +62,8 @@ public class EthSignerTestHarnessFactory {
|
||||
final EthSigner ethSigner =
|
||||
new EthSigner(
|
||||
config,
|
||||
new SingleTransactionSignerProvider(
|
||||
new CredentialTransactionSigner(
|
||||
new SingleSignerProvider(
|
||||
new CredentialSigner(
|
||||
WalletUtils.loadCredentials("", keyFilePath.toAbsolutePath().toFile()))));
|
||||
ethSigner.run();
|
||||
|
||||
|
||||
@@ -53,8 +53,6 @@ dependencies {
|
||||
testImplementation 'org.awaitility:awaitility'
|
||||
testImplementation 'org.web3j:abi'
|
||||
testImplementation 'org.web3j:besu'
|
||||
testImplementation 'tech.pegasys.ethsigner.internal:core'
|
||||
testImplementation 'tech.pegasys.ethsigner.internal:file-based'
|
||||
}
|
||||
|
||||
test.enabled = false
|
||||
|
||||
@@ -155,8 +155,10 @@ dependencyManagement {
|
||||
|
||||
dependency 'tech.pegasys.discovery:discovery:0.4.3'
|
||||
|
||||
dependency 'tech.pegasys.ethsigner.internal:core:0.4.0'
|
||||
dependency 'tech.pegasys.ethsigner.internal:file-based:0.4.0'
|
||||
dependency 'tech.pegasys.ethsigner.internal:signing-api:0.4.0'
|
||||
dependency 'tech.pegasys.ethsigner.internal:ethsigner-core:21.3.0'
|
||||
dependencySet(group: 'tech.pegasys.signers.internal', version: '1.0.16') {
|
||||
entry 'signing-secp256k1-api'
|
||||
entry 'signing-secp256k1-impl'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user