mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
e2e: use ed25519 for secretConn (remote signer) (#5678)
## Description Hardcode ed25519 to dialTCPFn in e2e tests. I will backport `DefaultRequestHandler` fixes This will be replaced when grpc is implemented.
This commit is contained in:
@@ -24,14 +24,17 @@ func DefaultValidationRequestHandler(
|
||||
switch r := req.Sum.(type) {
|
||||
case *privvalproto.Message_PubKeyRequest:
|
||||
if r.PubKeyRequest.GetChainId() != chainID {
|
||||
res = mustWrapMsg(&privvalproto.SignedVoteResponse{
|
||||
Vote: tmproto.Vote{}, Error: &privvalproto.RemoteSignerError{
|
||||
res = mustWrapMsg(&privvalproto.PubKeyResponse{
|
||||
PubKey: cryptoproto.PublicKey{}, Error: &privvalproto.RemoteSignerError{
|
||||
Code: 0, Description: "unable to provide pubkey"}})
|
||||
return res, fmt.Errorf("want chainID: %s, got chainID: %s", r.PubKeyRequest.GetChainId(), chainID)
|
||||
}
|
||||
|
||||
var pubKey crypto.PubKey
|
||||
pubKey, err = privVal.GetPubKey()
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
pk, err := cryptoenc.PubKeyToProto(pubKey)
|
||||
if err != nil {
|
||||
return res, err
|
||||
@@ -64,8 +67,8 @@ func DefaultValidationRequestHandler(
|
||||
|
||||
case *privvalproto.Message_SignProposalRequest:
|
||||
if r.SignProposalRequest.GetChainId() != chainID {
|
||||
res = mustWrapMsg(&privvalproto.SignedVoteResponse{
|
||||
Vote: tmproto.Vote{}, Error: &privvalproto.RemoteSignerError{
|
||||
res = mustWrapMsg(&privvalproto.SignedProposalResponse{
|
||||
Proposal: tmproto.Proposal{}, Error: &privvalproto.RemoteSignerError{
|
||||
Code: 0,
|
||||
Description: "unable to sign proposal"}})
|
||||
return res, fmt.Errorf("want chainID: %s, got chainID: %s", r.SignProposalRequest.GetChainId(), chainID)
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
"github.com/tendermint/tendermint/abci/server"
|
||||
"github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/crypto/ed25519"
|
||||
tmflags "github.com/tendermint/tendermint/libs/cli/flags"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
tmnet "github.com/tendermint/tendermint/libs/net"
|
||||
@@ -178,7 +179,7 @@ func startSigner(cfg *Config) error {
|
||||
var dialFn privval.SocketDialer
|
||||
switch protocol {
|
||||
case "tcp":
|
||||
dialFn = privval.DialTCPFn(address, 3*time.Second, filePV.Key.PrivKey)
|
||||
dialFn = privval.DialTCPFn(address, 3*time.Second, ed25519.GenPrivKey())
|
||||
case "unix":
|
||||
dialFn = privval.DialUnixFn(address)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user