diff --git a/config_signer.toml b/config_signer.toml index 206e72f..4561a1b 100644 --- a/config_signer.toml +++ b/config_signer.toml @@ -9,14 +9,14 @@ GRPCPort = "--- Signer GRPC Server PORT like 9091 ---" Type = "local" [ProviderConfigs.LocalConfig] AccountID = "--- Account ID like operator_bls_key ---" - KeyType = "--- Key Type like `BN254` or `ECDSA` ---" - PrivateKeyPath = "--- Path to Private Key ---" - PasswordKeyPath = "--- Path to Keystore Password ---" + KeyType = "--- Key Type like BN254 ---" + PrivateKeyPath = "--- Path to BLS Private Key ---" + PasswordKeyPath = "--- Path to BLS Keystore Password ---" [[ProviderConfigs]] Type = "local" [ProviderConfigs.LocalConfig] AccountID = "--- Account ID like signer_ecdsa_key ---" - KeyType = "--- Key Type like `BN254` or `ECDSA` ---" - PrivateKeyPath = "--- Path to Private Key ---" - PasswordKeyPath = "--- Path to Keystore Password ---" \ No newline at end of file + KeyType = "--- Key Type like ECDSA ---" + PrivateKeyPath = "--- Path to ECDSA Private Key ---" + PasswordKeyPath = "--- Path to ECDSA Keystore Password ---" \ No newline at end of file diff --git a/go.mod b/go.mod index 40b4fb9..ca743d3 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ module github.com/Lagrange-Labs/client-cli require ( github.com/Lagrange-Labs/lagrange-node/core v0.1.0 - github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240821130114-bf15bfc9b2d3 + github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240917211506-ed56fb34350e github.com/consensys/gnark-crypto v0.12.1 github.com/ethereum/go-ethereum v1.13.15 github.com/mitchellh/mapstructure v1.5.0 @@ -87,4 +87,4 @@ require ( rsc.io/tmplfunc v0.0.3 // indirect ) -replace github.com/Lagrange-Labs/lagrange-node/core v0.1.0 => github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240821130114-bf15bfc9b2d3 +replace github.com/Lagrange-Labs/lagrange-node/core v0.1.0 => github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240917211506-ed56fb34350e diff --git a/go.sum b/go.sum index 01a7f90..8ef268f 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240821130114-bf15bfc9b2d3 h1:HEeE10Jy8gbVppowiwY/qIzpJLGt43vgCsyFQ0sqKxI= -github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240821130114-bf15bfc9b2d3/go.mod h1:UPxFEPhGMt5i7oJbgrr81rlcWu/LBiVg4fxuhVX2dwc= -github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240821130114-bf15bfc9b2d3 h1:kqrAW3rFXQT7t6aLZptI4Mw0Fee0+jYyAdBCDa8ulgM= -github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240821130114-bf15bfc9b2d3/go.mod h1:bXMD4bnx1kyM+pP0NWkOEZ3fchqdkBi26hrl0rOHaXQ= +github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240917211506-ed56fb34350e h1:6zAT3rh7rcZGs2eJTtuML1pMnP/F80SPn6owXouHmYw= +github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240917211506-ed56fb34350e/go.mod h1:UPxFEPhGMt5i7oJbgrr81rlcWu/LBiVg4fxuhVX2dwc= +github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240917211506-ed56fb34350e h1:qDVgIWXJdJdyIwtHj+e4bd2iYMqZMA5qdrquiRJi890= +github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240917211506-ed56fb34350e/go.mod h1:bXMD4bnx1kyM+pP0NWkOEZ3fchqdkBi26hrl0rOHaXQ= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= diff --git a/utils/docker.go b/utils/docker.go index 1230f7a..661c265 100644 --- a/utils/docker.go +++ b/utils/docker.go @@ -128,15 +128,17 @@ func GenerateSignerConfigFile(cfg *signer.Config, imageName string) (string, err } signerConfig.CertPaths = map[string]string{} - certPath := "/app/config/ca-crt.pem" - serverKeyPath := "/app/config/server-key.pem" - serverCertPath := "/app/config/server-crt.pem" - signerConfig.CertPaths[cfg.TLSConfig.CACertPath] = certPath - signerConfig.CertPaths[cfg.TLSConfig.NodeKeyPath] = serverKeyPath - signerConfig.CertPaths[cfg.TLSConfig.NodeCertPath] = serverCertPath - cfg.TLSConfig.CACertPath = certPath - cfg.TLSConfig.NodeKeyPath = serverKeyPath - cfg.TLSConfig.NodeCertPath = serverCertPath + if cfg.TLSConfig != nil && len(cfg.TLSConfig.CACertPath) > 0 { + certPath := "/app/config/ca-crt.pem" + serverKeyPath := "/app/config/server-key.pem" + serverCertPath := "/app/config/server-crt.pem" + signerConfig.CertPaths[cfg.TLSConfig.CACertPath] = certPath + signerConfig.CertPaths[cfg.TLSConfig.NodeKeyPath] = serverKeyPath + signerConfig.CertPaths[cfg.TLSConfig.NodeCertPath] = serverCertPath + cfg.TLSConfig.CACertPath = certPath + cfg.TLSConfig.NodeKeyPath = serverKeyPath + cfg.TLSConfig.NodeCertPath = serverCertPath + } signerConfigFilePath := filepath.Join(workDir, "config/config_signer.toml") signerConfig.ConfigFilePath = signerConfigFilePath