You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.6 KiB

  1. syntax = "proto3";
  2. package tendermint.privval;
  3. import "tendermint/crypto/keys.proto";
  4. import "tendermint/types/types.proto";
  5. import "gogoproto/gogo.proto";
  6. option go_package = "github.com/tendermint/tendermint/proto/tendermint/privval";
  7. enum Errors {
  8. ERRORS_UNKNOWN = 0;
  9. ERRORS_UNEXPECTED_RESPONSE = 1;
  10. ERRORS_NO_CONNECTION = 2;
  11. ERRORS_CONNECTION_TIMEOUT = 3;
  12. ERRORS_READ_TIMEOUT = 4;
  13. ERRORS_WRITE_TIMEOUT = 5;
  14. }
  15. message RemoteSignerError {
  16. int32 code = 1;
  17. string description = 2;
  18. }
  19. // PubKeyRequest requests the consensus public key from the remote signer.
  20. message PubKeyRequest {
  21. string chain_id = 1;
  22. }
  23. // PubKeyResponse is a response message containing the public key.
  24. message PubKeyResponse {
  25. tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
  26. RemoteSignerError error = 2;
  27. }
  28. // SignVoteRequest is a request to sign a vote
  29. message SignVoteRequest {
  30. tendermint.types.Vote vote = 1;
  31. string chain_id = 2;
  32. }
  33. // SignedVoteResponse is a response containing a signed vote or an error
  34. message SignedVoteResponse {
  35. tendermint.types.Vote vote = 1 [(gogoproto.nullable) = false];
  36. RemoteSignerError error = 2;
  37. }
  38. // SignProposalRequest is a request to sign a proposal
  39. message SignProposalRequest {
  40. tendermint.types.Proposal proposal = 1;
  41. string chain_id = 2;
  42. }
  43. // SignedProposalResponse is response containing a signed proposal or an error
  44. message SignedProposalResponse {
  45. tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false];
  46. RemoteSignerError error = 2;
  47. }
  48. // PingRequest is a request to confirm that the connection is alive.
  49. message PingRequest {}
  50. // PingResponse is a response to confirm that the connection is alive.
  51. message PingResponse {}
  52. message Message {
  53. oneof sum {
  54. PubKeyRequest pub_key_request = 1;
  55. PubKeyResponse pub_key_response = 2;
  56. SignVoteRequest sign_vote_request = 3;
  57. SignedVoteResponse signed_vote_response = 4;
  58. SignProposalRequest sign_proposal_request = 5;
  59. SignedProposalResponse signed_proposal_response = 6;
  60. PingRequest ping_request = 7;
  61. PingResponse ping_response = 8;
  62. }
  63. }
  64. // AuthSigMessage is duplicated from p2p prior to the P2P refactor.
  65. // It is used for the SecretConnection until we migrate privval to gRPC.
  66. // https://github.com/tendermint/tendermint/issues/4698
  67. message AuthSigMessage {
  68. tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
  69. bytes sig = 2;
  70. }