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

feat: add required params for cons pubkey rotation #18142

Merged
merged 28 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
73c508d
proto
atheeshp Oct 17, 2023
0c3ff40
updates
atheeshp Oct 17, 2023
2024850
feat: add proto for cons rotate key
atheeshp Oct 17, 2023
6c66c9a
fix tests
atheeshp Oct 17, 2023
4e70611
fix typo
atheeshp Oct 17, 2023
bc3a7b8
fix type
atheeshp Oct 17, 2023
0a21620
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-params
atheeshp Oct 17, 2023
698493b
Merge branch 'main' into ap/consensus-key-rotation-proto
atheeshp Oct 17, 2023
84680a6
Merge branch 'ap/consensus-key-rotation-proto' of github.com:cosmos/c…
atheeshp Oct 17, 2023
b63359e
feat: add required parasm for cons pubkey rotation
atheeshp Oct 17, 2023
ff6b260
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-pubke…
atheeshp Oct 17, 2023
105261b
tests
atheeshp Oct 17, 2023
edf8d20
Merge branch 'main' into ap/consensus-key-rotation-proto
atheeshp Oct 17, 2023
9506504
Merge branch 'ap/consensus-key-rotation-proto' of github.com:cosmos/c…
atheeshp Oct 17, 2023
b008991
proto-gen
atheeshp Oct 17, 2023
a1acd5b
params
atheeshp Oct 17, 2023
ff5b5b2
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-pubke…
atheeshp Oct 17, 2023
61ae584
fix tests
atheeshp Oct 18, 2023
35c4020
proto
atheeshp Oct 18, 2023
fe7f097
fix tests
atheeshp Oct 18, 2023
9d1aa5a
fix tests
atheeshp Oct 18, 2023
675f515
changelog
atheeshp Oct 18, 2023
8666bcc
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-pubke…
atheeshp Oct 18, 2023
68be849
review change
atheeshp Oct 18, 2023
d0abe0a
review changes
atheeshp Oct 18, 2023
b0f4804
Merge branch 'main' of github.com:cosmos/cosmos-sdk into ap/add-pubke…
atheeshp Oct 18, 2023
159b615
proto-gen
atheeshp Oct 18, 2023
29e8a01
Merge branch 'main' into ap/add-pubkey-rotation-params
atheeshp Oct 18, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features

* (x/staking) [#18142](https://github.com/cosmos/cosmos-sdk/pull/18142) introduce `key_rotation_fee` param to calculate fees while rotating the keys
* (client) [#18101](https://github.com/cosmos/cosmos-sdk/pull/18101) Add a `keyring-default-keyname` in `client.toml` for specifying a default key name, and skip the need to use the `--from` flag when signing transactions.
* (tests) [#17868](https://github.com/cosmos/cosmos-sdk/pull/17868) Added helper method `SubmitTestTx` in testutil to broadcast test txns to test e2e tests.
* (x/protocolpool) [#17657](https://github.com/cosmos/cosmos-sdk/pull/17657) Create a new `x/protocolpool` module that is responsible for handling community pool funds. This module is split out into a new module from x/distribution.
Expand Down
127 changes: 111 additions & 16 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.

16 changes: 8 additions & 8 deletions api/cosmos/staking/v1beta1/tx.pulsar.go

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

4 changes: 4 additions & 0 deletions proto/cosmos/staking/v1beta1/staking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ message Params {
(amino.dont_omitempty) = true,
(cosmos_proto.scalar) = "cosmos.Dec"
];

// key_rotation_fee is fee to be spent when rotating validator's key
// (either consensus pubkey or operator key)
cosmos.base.v1beta1.Coin key_rotation_fee = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
tac0turtle marked this conversation as resolved.
Show resolved Hide resolved
}

// DelegationResponse is equivalent to Delegation except that it contains a
Expand Down
4 changes: 2 additions & 2 deletions proto/cosmos/staking/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@
// MsgRotateConsPubKey is the Msg/RotateConsPubKey request type.
//
// Since: cosmos-sdk 0.51
message MsgRotateConsPubKey {

Check failure on line 216 in proto/cosmos/staking/v1beta1/tx.proto

View workflow job for this annotation

GitHub Actions / break-check

Previously present field "3" with name "new_pubkey" on message "MsgRotateConsPubKey" was deleted.
option (cosmos.msg.v1.signer) = "validator_address";
option (amino.name) = "cosmos-sdk/MsgRotateConsPubKey";

option (gogoproto.goproto_getters) = false;
option (gogoproto.equal) = false;

string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];
google.protobuf.Any new_pubkey = 3 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"];
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];
tac0turtle marked this conversation as resolved.
Show resolved Hide resolved
google.protobuf.Any new_pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"];

Check failure on line 224 in proto/cosmos/staking/v1beta1/tx.proto

View workflow job for this annotation

GitHub Actions / break-check

Field "2" with name "new_pubkey" on message "MsgRotateConsPubKey" changed option "json_name" from "validatorAddress" to "newPubkey".

Check failure on line 224 in proto/cosmos/staking/v1beta1/tx.proto

View workflow job for this annotation

GitHub Actions / break-check

Field "2" on message "MsgRotateConsPubKey" changed type from "string" to "message".

Check failure on line 224 in proto/cosmos/staking/v1beta1/tx.proto

View workflow job for this annotation

GitHub Actions / break-check

Field "2" on message "MsgRotateConsPubKey" changed name from "validator_address" to "new_pubkey".
}

// MsgRotateConsPubKeyResponse defines the response structure for executing a
Expand Down
2 changes: 1 addition & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/cosmos/cosmos-sdk/tests
go 1.21

require (
cosmossdk.io/api v0.7.2
cosmossdk.io/api v0.7.3-0.20231018072017-35c402025504
cosmossdk.io/collections v0.4.0
cosmossdk.io/core v0.12.0
cosmossdk.io/depinject v1.0.0-alpha.4
Expand Down
4 changes: 2 additions & 2 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX
cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg=
cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0=
cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M=
cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4=
cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38=
cosmossdk.io/api v0.7.3-0.20231018072017-35c402025504 h1:DrOuHptmmjB+jIsOG/eLq9cLdb5BZy3y70E60gnZINw=
cosmossdk.io/api v0.7.3-0.20231018072017-35c402025504/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38=
cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s=
cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0=
cosmossdk.io/core v0.12.0 h1:aFuvkG6eDv0IQC+UDjx86wxNWVAxdCFk7OABJ1Vh4RU=
Expand Down
Loading
Loading