The existing integration test for signing was removed with #38. The sign requests used to look like:
/// Sign the given opaque message with the given public key
#[derive(Serialize, Deserialize, Debug)]
pub struct SignRequest {
/// Public key to use to sign the request
pub public_key: Vec<u8>,
/// Message to be signed
pub msg: Vec<u8>,
}
This doesn't match with the messages/requests we receive (and (de)serialize) from the tendermint side. E.g., SignBytes of:
https://github.com/tendermint/tendermint/blob/013b9cef642f875634c614019ab13b17570778ad/types/vote.go#L62-L72
Signing needs to be implemented and the integration test reintroduced. The current integration test only tests the secret connection by sending / handling a message (PoisonPillMsg).
These types and their encoding might change with (we need to track this): tendermint/tendermint#1622
We might need to change this trait (implemented by all types) as it currently can't know about which private key to use for the signing operation:
pub trait TendermintSign {
fn cannonicalize(self, chain_id: &str) -> String;
fn sign(&mut self);
}
We might just remove the sign method from that trait and only have a cannonicalize or SignBytes equivalent.
The existing integration test for signing was removed with #38. The sign requests used to look like:
This doesn't match with the messages/requests we receive (and (de)serialize) from the tendermint side. E.g.,
SignBytesof:https://github.com/tendermint/tendermint/blob/013b9cef642f875634c614019ab13b17570778ad/types/vote.go#L62-L72
Signing needs to be implemented and the integration test reintroduced. The current integration test only tests the secret connection by sending / handling a message (
PoisonPillMsg).These types and their encoding might change with (we need to track this): tendermint/tendermint#1622
We might need to change this trait (implemented by all types) as it currently can't know about which private key to use for the signing operation:
We might just remove the
signmethod from that trait and only have acannonicalizeorSignBytesequivalent.