-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
C:p2pComponent: P2P pkgComponent: P2P pkgT:breakingType: Breaking ChangeType: Breaking ChangeT:validatorType: Validator relatedType: Validator related
Milestone
Description
As discussed in the tendermint-dev call, there are a few places where we use some amino-specifics in the communication with the KMS. It might be worth investigating if we could/should do without them:
in secret connection:
- the interface
crypto.PubKey(used inauthSigMessage) currently always is a ed25519 key:tendermint/p2p/conn/secret_connection.go
Lines 298 to 301 in c086d0a
type authSigMessage struct { Key crypto.PubKey Sig []byte } - the keys shared via
shareEphPubKeyare send as raw bytes but they are length prefixed "twice" (once for the total message, once for the length of the byte slice); we probably do not need that (use marshalbinarybare instead):tendermint/p2p/conn/secret_connection.go
Lines 212 to 222 in c086d0a
var trs, _ = cmn.Parallel( func(_ int) (val interface{}, err error, abort bool) { var _, err1 = cdc.MarshalBinaryLengthPrefixedWriter(conn, locEphPub) if err1 != nil { return nil, err1, true // abort } return nil, nil, false }, func(_ int) (val interface{}, err error, abort bool) { var _remEphPub [32]byte var _, err2 = cdc.UnmarshalBinaryLengthPrefixedReader(conn, &_remEphPub, 1024*1024) // TODO
other usages of interfaces:
PubKeyMsgcontains a crypto.PubKey (again only ed25519 is currently used AFAIK):tendermint/privval/remote_signer.go
Lines 196 to 198 in c086d0a
type PubKeyMsg struct { PubKey crypto.PubKey } RemoteSignerMsgis an interface; it only has a few implementations though:(this could be replaced by oneof IMHO; currently not supported by amino though)tendermint/privval/remote_signer.go
Lines 180 to 190 in c086d0a
type RemoteSignerMsg interface{} func RegisterRemoteSignerMsg(cdc *amino.Codec) { cdc.RegisterInterface((*RemoteSignerMsg)(nil), nil) cdc.RegisterConcrete(&PubKeyMsg{}, "tendermint/remotesigner/PubKeyMsg", nil) cdc.RegisterConcrete(&SignVoteRequest{}, "tendermint/remotesigner/SignVoteRequest", nil) cdc.RegisterConcrete(&SignedVoteResponse{}, "tendermint/remotesigner/SignedVoteResponse", nil) cdc.RegisterConcrete(&SignProposalRequest{}, "tendermint/remotesigner/SignProposalRequest", nil) cdc.RegisterConcrete(&SignedProposalResponse{}, "tendermint/remotesigner/SignedProposalResponse", nil) cdc.RegisterConcrete(&SignHeartbeatRequest{}, "tendermint/remotesigner/SignHeartbeatRequest", nil) cdc.RegisterConcrete(&SignedHeartbeatResponse{}, "tendermint/remotesigner/SignedHeartbeatResponse", nil)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C:p2pComponent: P2P pkgComponent: P2P pkgT:breakingType: Breaking ChangeType: Breaking ChangeT:validatorType: Validator relatedType: Validator related