Skip to content
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

ADR 016: Validator Consensus Key Rotation #9016

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions proto/cosmos/staking/v1beta1/staking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,25 @@ message Pool {
(gogoproto.moretags) = "yaml:\"bonded_tokens\""
];
}

// ConsPubKeyRotationHistory contains a validator's consensus public key rotation history.
message ConsPubKeyRotationHistory {
option (gogoproto.equal) = false;
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;

// operator_address defines the address of the validator's operator; bech encoded in JSON.
string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""];
// old_cons_pub_key is the old consensus public key of the validator, as a Protobuf Any.
google.protobuf.Any old_cons_pub_key = 2 [
(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey",
(gogoproto.moretags) = "yaml:\"old_consensus_pubkey\""
];
// new_cons_pub_key is the new consensus public key of the validator, as a Protobuf Any.
google.protobuf.Any new_cons_pub_key = 3 [
(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey",
(gogoproto.moretags) = "yaml:\"new_consensus_pubkey\""
];
// height defines the block height at which the rotation event occured.
uint64 height = 4;
}
15 changes: 15 additions & 0 deletions proto/cosmos/staking/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ service Msg {
// Undelegate defines a method for performing an undelegation from a
// delegate and a validator.
rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse);

// RotateConsPubKey defines a method for performing a rotation of a validator's consensus public key.
rpc RotateConsPubKey(MsgRotateConsPubKey) returns (MsgRotateConsPubKeyResponse);
}

// MsgCreateValidator defines a SDK message for creating a new validator.
Expand Down Expand Up @@ -124,3 +127,15 @@ message MsgUndelegate {
message MsgUndelegateResponse {
google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}

// MsgRotateConsPubKey defines a SDK message for performing a rotation of a validator's consensus public key.
message MsgRotateConsPubKey {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""];
google.protobuf.Any new_cons_pub_key = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"];
}

// MsgRotateConsPubKeyResponse defines the Msg/RotateConsPubKey response type.
message MsgRotateConsPubKeyResponse {}
Loading