-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Cosmos transaction signing support #54
Comments
tarcieri
pushed a commit
that referenced
this issue
Jun 18, 2020
Implements #54 This adds a transaction signer based on the `stdtx` crate which presently polls a remote JSONRPC endpoint looking for transactions to sign, parses them, signs them, and broadcasts them via RPC.
tarcieri
pushed a commit
that referenced
this issue
Jun 18, 2020
Implements #54 This adds a transaction signer based on the `stdtx` crate which presently polls a remote JSONRPC endpoint looking for transactions to sign, parses them, signs them, and broadcasts them via RPC. Additionally updates `tmkms yubihsm keys list` to display the Bech32-serialized addresses (computed from a compressed secp256k1 curve point) for ECDSA K-256 keys.
Merged
tarcieri
pushed a commit
that referenced
this issue
Jun 18, 2020
Implements #54 This adds a transaction signer based on the `stdtx` crate which presently polls a remote JSONRPC endpoint looking for transactions to sign, parses them, signs them, and broadcasts them via RPC. Additionally updates `tmkms yubihsm keys list` to display the Bech32-serialized addresses (computed from a compressed secp256k1 curve point) for ECDSA K-256 keys.
tony-iqlusion
added a commit
that referenced
this issue
Jun 18, 2020
Implements #54 This adds a transaction signer based on the `stdtx` crate which presently polls a remote JSONRPC endpoint looking for transactions to sign, parses them, signs them, and broadcasts them via RPC. Additionally updates `tmkms yubihsm keys list` to display the Bech32-serialized addresses (computed from a compressed secp256k1 curve point) for ECDSA K-256 keys.
This landed in #78. It's tested and working in production for us now and being used for Terra Oracle voting. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NOTE: this issue was originally opened as tendermint/tmkms#386
Presently Tendermint KMS only supports signing consensus proposals/votes. That said, the prerequisites are all in place, both in the
tendermint
crate and theyubihsm
crate, to sign data using account keys as well.This proposal is to add first class support to sign transactions in the format used by the Cosmos SDK. Though this project is "Tendermint KMS" and intended to be agnostic to specific Tendermint applications, the Cosmos SDK's transaction format seems widely adopted among Tendermint applications, enough to warrant this support. (In the future there are various ways this support could be generalized to signing other transaction/object types, using e.g. WASM, but that sort of approach is considered out-of-scope for this particular proposal)
Motivation
Our initial use case at iqlusion is signing transactions for a Terra exchange rate oracle. The KMS-side goal of this proposal is to avoid making the KMS-side functionality hardcoded to this particular application, but rather to place a set of constraints (provided via
tmkms.toml
) on the transactions to be signed, and having the KMS assert those constraints are being met. Ideally this will allow the KMS to provide hardware-backed signing functionality for any type of Cosmos transaction, outsourcing the transaction composition to a separate service, but still allowing the KMS to constrain aspects of the signed transaction.High-level Design
There are several ways such a feature could be implemented. The proposal below is one, with debatable details, which presently targets doing things as similarly to the existing Tendermint consensus signing as possible:
SignTxRequest
) to the KMS containing a transaction (or declaration of the desired transaction, with actual serialization handled by the KMS itself)Design Rationale
Here's a brief rationale and some alternatives to consider for each of these options:
tendermint-rs
as well astmkms
itself import the main Protobuf library we'd like to use, Prost, in a way which precludes using it for proper Protobufs. We could pull in an additional Protobuf library now, but the other alternative there is to just use Amino for now and switch things over to Protobufs when Tendermint itself makes that transition. Once this has been addressed it would also be possible to consider e.g. gRPC libraries based on Prost, like Tonic.Open Questions
The text was updated successfully, but these errors were encountered: