Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

KMS and tendermint can't talk to each other (secret connection) #90

@liamsi

Description

@liamsi

I tried using the KMS as a remote signer:

  • on the kms side I set:
   [validator.connection]
    type = "tcp"
    addr = "127.0.0.1"
    port = 8080
    secret_key_path = "tests/support/secret_connection.key"
  • on the tendermint side I used (after tendermint init):
    /tendermint node --priv_validator_laddr=127.0.0.1:8080 --proxy_app=kvstore

This causes:

18:14:49 [INFO] KMS node ID: rawed255191nqmq3sj94emmzmnrg5lk702332scc60d65fuzfu80wfd95rugmpsvm6af9
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DecodeError { description: "buffer underflow", stack: [] }', libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

on the KMS side; and

I[12116-11-12|19:14:48.783] Starting TCPVal                              module=privval impl=TCPVal
E[12116-11-12|19:14:49.067] OnStart                                      module=privval err="unmarshal to [32]uint8 failed after 21 bytes (Mismatched byte array length: Expected 32, got 20): 1441A9424F4E1841725F390526C18B7AD67423013B673C8FFE1C1469958FEA6C"
ERROR: Failed to create node: Error starting private validator client: unmarshal to [32]uint8 failed after 21 bytes (Mismatched byte array length: Expected 32, got 20): 1441A9424F4E1841725F390526C18B7AD67423013B673C8FFE1C1469958FEA6C

or sometimes sth like:

E[12116-11-12|19:28:20.953] OnStart                                      module=privval err="unmarshal to [32]uint8 failed after 1 bytes (insufficient bytes decoding []byte of length 125): 7D4FEACC6C3A4E86C4302D7CBE33C873A7A9B1A47133D406B886B20885EB3F26"

on the tendermint side.
Looks like an encoding/decoding problem. I'm debugging what is going on here, update the issue accordingly, and provide a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions