Skip to content

Commit

Permalink
feat(x/staking): implement RotateConsPubKey method (#18188)
Browse files Browse the repository at this point in the history
  • Loading branch information
atheeshp authored Nov 15, 2023
1 parent e269c6d commit 0f8c6c2
Show file tree
Hide file tree
Showing 15 changed files with 496 additions and 231 deletions.
74 changes: 38 additions & 36 deletions api/cosmos/staking/v1beta1/staking.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/cosmos/staking/v1beta1/tx_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion collections/indexes/multi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestMultiIndex(t *testing.T) {
return value.City, nil
})

// we crete two reference keys for primary key 1 and 2 associated with "milan"
// we create two reference keys for primary key 1 and 2 associated with "milan"
require.NoError(t, mi.Reference(ctx, 1, company{City: "milan"}, func() (company, error) { return company{}, collections.ErrNotFound }))
require.NoError(t, mi.Reference(ctx, 2, company{City: "milan"}, func() (company, error) { return company{}, collections.ErrNotFound }))

Expand Down
4 changes: 2 additions & 2 deletions proto/cosmos/staking/v1beta1/staking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ message ConsPubKeyRotationHistory {
option (gogoproto.goproto_getters) = false;

// operator_address defines the address of the validator's operator; bech encoded in JSON.
string operator_address = 1;
bytes operator_address = 1;
// old_cons_pubkey is the old consensus public key of the validator, as a Protobuf Any.
google.protobuf.Any old_cons_pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"];
// new_cons_pubkey is the new consensus public key of the validator, as a Protobuf Any.
Expand All @@ -429,5 +429,5 @@ message ConsPubKeyRotationHistory {
// ValAddrsOfRotatedConsKeys contains the array of validator addresses which rotated their keys
// This is to block the validator's next rotation till unbonding period.
message ValAddrsOfRotatedConsKeys {
repeated string addresses = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
repeated bytes addresses = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
2 changes: 1 addition & 1 deletion proto/cosmos/staking/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ service Msg {

// RotateConsPubKey defines an operation for rotating the consensus keys
// of a validator.
// Since: cosmos-sdk 0.48
// Since: cosmos-sdk 0.51
rpc RotateConsPubKey(MsgRotateConsPubKey) returns (MsgRotateConsPubKeyResponse);
}

Expand Down
Loading

0 comments on commit 0f8c6c2

Please sign in to comment.