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(x/staking)!: Add metadata field to validator info #21315

Merged
merged 47 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
455084d
feat(staking/validator): add metadata field to validator detail proto
ziscky Aug 15, 2024
79f694e
feat(staking/validator): protogen
ziscky Aug 15, 2024
65c95fb
feat(staking/validator): update NewDescription to update metadata
ziscky Aug 15, 2024
1a4717d
feat(staking/validator): use the new Description.IsEmpty()
ziscky Aug 15, 2024
3282d5e
feat(staking/validator): update cli to parse metadata
ziscky Aug 15, 2024
83f6327
test(staking/validator): update tests
ziscky Aug 15, 2024
1d4d236
feat(staking/validator): add metadata to create validator sim
ziscky Aug 15, 2024
fbb892f
feat(staking/validator): protogen
ziscky Aug 15, 2024
809a84d
feat(staking/validator): update metadata type to struct
ziscky Aug 22, 2024
6b3de76
feat(staking/validator): update metadata type to struct
ziscky Aug 22, 2024
14eaff9
feat(staking/validator): refactor metadata type
ziscky Aug 22, 2024
a81a3d2
feat(staking/validator): update metadata to object
ziscky Aug 22, 2024
33ca14a
feat(staking/validator): refactor metadata type
ziscky Aug 22, 2024
ca43238
feat(staking/validator): add fn to generate rand uris
ziscky Aug 27, 2024
4337306
feat(staking/validator): update sims
ziscky Aug 27, 2024
e927d50
test(staking/validator): update integration tests
ziscky Aug 27, 2024
fcc82a0
feat(staking/validator): merge main
ziscky Aug 27, 2024
839d578
fix(staking/validator): update metadata flags to accept each metadata…
ziscky Aug 28, 2024
2ebe2a9
test(staking/validator): update tests
ziscky Aug 28, 2024
97b5613
test(staking/validator): update expected gas
ziscky Aug 28, 2024
4d442ed
test(staking/validator): use md generator
ziscky Aug 28, 2024
ba8bc39
feat(staking/validator): update cli arg for profile pic
ziscky Aug 28, 2024
5493969
chore(staking/validator): changelog
ziscky Aug 28, 2024
e403ee3
fix(staking/validator): formatting
ziscky Aug 28, 2024
0befe0c
feat(staking/validator): merge main
ziscky Aug 28, 2024
3df3149
feat(staking/validator): move RandUriOfLength to staking module
ziscky Aug 28, 2024
97e84a9
fix(staking/validator): check DoNotModifyDesc for profile pic uri
ziscky Aug 28, 2024
107cd23
fix(staking/validator): move RandUriOfLength to staking module
ziscky Aug 28, 2024
2478f44
chore(staking/validator): update changelog
ziscky Aug 28, 2024
f77f60b
Merge branch 'main' into ziscky/9988-staking-validator-metadata
ziscky Aug 29, 2024
5e5c817
fix(staking/validator): make rand uri fn more concise
ziscky Aug 30, 2024
4317ac2
test(staking/validator): add test for rand uri fn
ziscky Aug 30, 2024
85d42b0
feat(staking/validator): add social handles field
ziscky Aug 30, 2024
c817001
feat(staking/validator): add IsEmpty() method to Description
ziscky Aug 30, 2024
b742425
feat(staking/validator): add social handles parsing to cli
ziscky Aug 30, 2024
c522e24
test(staking/validator): update sims and tests to include social handles
ziscky Aug 30, 2024
75c9b57
chore(staking/validator): changelog
ziscky Sep 5, 2024
0d3db0a
feat(staking/validator): merge main
ziscky Sep 5, 2024
1ac2085
chore(staking/validator): changelog
ziscky Sep 13, 2024
e651b3c
chore(staking/validator): merge main
ziscky Sep 13, 2024
4631ad1
chore(staking/validator): lint fix
ziscky Sep 21, 2024
a5fc0fe
chore(staking/validator): merge main
ziscky Sep 21, 2024
05bea00
chore(staking/validator): lint fix
ziscky Sep 21, 2024
c894be1
feat(staking/validator): add fn to generate random SocialHandleURIs
ziscky Sep 21, 2024
1862040
feat(staking/validator): add fn to generate random SocialHandleURIs
ziscky Sep 21, 2024
25986ca
chore(staking/validator): lint fix
ziscky Sep 21, 2024
8ac40a0
chore(staking/validator): lint fix
ziscky Sep 21, 2024
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,715 changes: 1,209 additions & 506 deletions api/cosmos/staking/v1beta1/staking.pulsar.go

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions server/v2/api/grpc/gogoreflection/fix_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ func getExtension(extID int32, m proto.Message) *gogoproto.ExtensionDesc {
for id, desc := range proto.RegisteredExtensions(m) { //nolint:staticcheck // keep for backward compatibility
if id == extID {
return &gogoproto.ExtensionDesc{
ExtendedType: desc.ExtendedType,
ExtensionType: desc.ExtensionType,
Field: desc.Field,
Name: desc.Name,
Tag: desc.Tag,
Filename: desc.Filename,
ExtendedType: desc.ExtendedType,
ExtensionType: desc.ExtensionType,
Field: desc.Field,
Name: desc.Name,
Tag: desc.Tag,
Filename: desc.Filename,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion simapp/simd/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func initTestnetFiles(
valStr,
valPubKeys[i],
sdk.NewCoin(args.bondTokenDenom, valTokens),
stakingtypes.NewDescription(nodeDirName, "", "", "", ""),
stakingtypes.NewDescription(nodeDirName, "", "", "", "", stakingtypes.Metadata{}),
ziscky marked this conversation as resolved.
Show resolved Hide resolved
stakingtypes.NewCommissionRates(math.LegacyOneDec(), math.LegacyOneDec(), math.LegacyOneDec()),
math.OneInt(),
)
Expand Down
2 changes: 1 addition & 1 deletion simapp/v2/simdv2/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func initTestnetFiles[T transaction.Tx](
valStr,
valPubKeys[i],
sdk.NewCoin(args.bondTokenDenom, valTokens),
stakingtypes.NewDescription(nodeDirName, "", "", "", ""),
stakingtypes.NewDescription(nodeDirName, "", "", "", "", stakingtypes.Metadata{}),
stakingtypes.NewCommissionRates(math.LegacyOneDec(), math.LegacyOneDec(), math.LegacyOneDec()),
math.OneInt(),
)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/gov/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
var (
valTokens = sdk.TokensFromConsensusPower(42, sdk.DefaultPowerReduction)
TestProposal = v1beta1.NewTextProposal("Test", "description")
TestDescription = stakingtypes.NewDescription("T", "E", "S", "T", "Z")
TestDescription = stakingtypes.NewDescription("T", "E", "S", "T", "Z", stakingtypes.Metadata{})
ziscky marked this conversation as resolved.
Show resolved Hide resolved
TestCommissionRates = stakingtypes.NewCommissionRates(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec())
)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/slashing/slashing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestSlashingMsgs(t *testing.T) {

require.NoError(t, err)

description := stakingtypes.NewDescription("foo_moniker", "", "", "", "")
description := stakingtypes.NewDescription("foo_moniker", "", "", "", "", stakingtypes.Metadata{})
commission := stakingtypes.NewCommissionRates(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec())

addrStrVal, err := valaddrCodec.BytesToString(addr1)
Expand Down
41 changes: 33 additions & 8 deletions tests/integration/staking/keeper/deterministic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package keeper_test

import (
"context"
"fmt"
"net/url"
"testing"
"time"

Expand Down Expand Up @@ -214,6 +216,26 @@ func bondTypeGenerator() *rapid.Generator[stakingtypes.BondStatus] {
})
}

func metadataGenerator() *rapid.Generator[stakingtypes.Metadata] {
return rapid.Custom(func(t *rapid.T) stakingtypes.Metadata {
return stakingtypes.Metadata{
ProfilePicUri: generateUri(t),
SocialHandleUris: []string{generateUri(t), generateUri(t)},
}
})
}

func generateUri(t *rapid.T) string {
host := fmt.Sprintf("%s.com", rapid.StringN(5, 250, 255).Draw(t, "host"))
path := rapid.StringN(5, 250, 255).Draw(t, "path")
uri := url.URL{
Scheme: "https",
Host: host,
Path: path,
}
return uri.String()
}

// createValidator creates a validator with random values.
func createValidator(t *testing.T, rt *rapid.T, _ *deterministicFixture) stakingtypes.Validator {
t.Helper()
Expand All @@ -233,6 +255,7 @@ func createValidator(t *testing.T, rt *rapid.T, _ *deterministicFixture) staking
rapid.StringN(5, 250, 255).Draw(rt, "website"),
rapid.StringN(5, 250, 255).Draw(rt, "securityContact"),
rapid.StringN(5, 250, 255).Draw(rt, "details"),
metadataGenerator().Draw(rt, "metadata"),
),
UnbondingHeight: rapid.Int64Min(1).Draw(rt, "unbonding-height"),
UnbondingTime: time.Now().Add(durationGenerator().Draw(rt, "duration")),
Expand Down Expand Up @@ -308,6 +331,7 @@ func getStaticValidator(t *testing.T, f *deterministicFixture) stakingtypes.Vali
"website",
"securityContact",
"details",
stakingtypes.Metadata{},
),
UnbondingHeight: 10,
UnbondingTime: time.Date(2022, 10, 1, 0, 0, 0, 0, time.UTC),
Expand Down Expand Up @@ -343,6 +367,7 @@ func getStaticValidator2(t *testing.T, f *deterministicFixture) stakingtypes.Val
"website",
"securityContact",
"details",
stakingtypes.Metadata{},
),
UnbondingHeight: 100132,
UnbondingTime: time.Date(2025, 10, 1, 0, 0, 0, 0, time.UTC),
Expand Down Expand Up @@ -408,7 +433,7 @@ func TestGRPCValidator(t *testing.T) {
ValidatorAddr: val.OperatorAddress,
}

testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.Validator, 1915, false)
testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.Validator, 1921, false)
}

func TestGRPCValidators(t *testing.T) {
Expand All @@ -434,7 +459,7 @@ func TestGRPCValidators(t *testing.T) {
getStaticValidator(t, f)
getStaticValidator2(t, f)

testdata.DeterministicIterations(t, f.ctx, &stakingtypes.QueryValidatorsRequest{}, f.queryClient.Validators, 2862, false)
testdata.DeterministicIterations(t, f.ctx, &stakingtypes.QueryValidatorsRequest{}, f.queryClient.Validators, 2880, false)
}

func TestGRPCValidatorDelegations(t *testing.T) {
Expand Down Expand Up @@ -479,7 +504,7 @@ func TestGRPCValidatorDelegations(t *testing.T) {
ValidatorAddr: validator.OperatorAddress,
}

testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.ValidatorDelegations, 14610, false)
testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.ValidatorDelegations, 14628, false)
}

func TestGRPCValidatorUnbondingDelegations(t *testing.T) {
Expand Down Expand Up @@ -569,7 +594,7 @@ func TestGRPCDelegation(t *testing.T) {
DelegatorAddr: delegator1,
}

testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.Delegation, 4680, false)
testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.Delegation, 4686, false)
}

func TestGRPCUnbondingDelegation(t *testing.T) {
Expand Down Expand Up @@ -652,7 +677,7 @@ func TestGRPCDelegatorDelegations(t *testing.T) {
DelegatorAddr: delegator1,
}

testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.DelegatorDelegations, 4283, false)
testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.DelegatorDelegations, 4289, false)
}

func TestGRPCDelegatorValidator(t *testing.T) {
Expand Down Expand Up @@ -690,7 +715,7 @@ func TestGRPCDelegatorValidator(t *testing.T) {
ValidatorAddr: validator.OperatorAddress,
}

testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.DelegatorValidator, 3563, false)
testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.DelegatorValidator, 3569, false)
}

func TestGRPCDelegatorUnbondingDelegations(t *testing.T) {
Expand Down Expand Up @@ -772,7 +797,7 @@ func TestGRPCDelegatorValidators(t *testing.T) {
assert.NilError(t, err)

req := &stakingtypes.QueryDelegatorValidatorsRequest{DelegatorAddr: delegator1}
testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.DelegatorValidators, 3166, false)
testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.DelegatorValidators, 3172, false)
}

func TestGRPCPool(t *testing.T) {
Expand Down Expand Up @@ -856,7 +881,7 @@ func TestGRPCRedelegations(t *testing.T) {
DstValidatorAddr: validator2,
}

testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.Redelegations, 3920, false)
testdata.DeterministicIterations(t, f.ctx, req, f.queryClient.Redelegations, 3926, false)
}

func TestGRPCParams(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/staking/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestInitGenesis(t *testing.T) {
Status: types.Bonded,
Tokens: valTokens,
DelegatorShares: math.LegacyNewDecFromInt(valTokens),
Description: types.NewDescription("hoop", "", "", "", ""),
Description: types.NewDescription("hoop", "", "", "", "", types.Metadata{}),
}
assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, bondedVal))

Expand All @@ -67,15 +67,15 @@ func TestInitGenesis(t *testing.T) {
Status: types.Bonded,
Tokens: valTokens,
DelegatorShares: math.LegacyNewDecFromInt(valTokens),
Description: types.NewDescription("hoop", "", "", "", ""),
Description: types.NewDescription("hoop", "", "", "", "", types.Metadata{}),
}
bondedVal2 := types.Validator{
OperatorAddress: sdk.ValAddress(addrs[2]).String(),
ConsensusPubkey: pk2,
Status: types.Bonded,
Tokens: valTokens,
DelegatorShares: math.LegacyNewDecFromInt(valTokens),
Description: types.NewDescription("bloop", "", "", "", ""),
Description: types.NewDescription("bloop", "", "", "", "", types.Metadata{}),
}

// append new bonded validators to the list
Expand Down Expand Up @@ -148,7 +148,7 @@ func TestInitGenesis_PoolsBalanceMismatch(t *testing.T) {
Jailed: false,
Tokens: math.NewInt(10),
DelegatorShares: math.LegacyNewDecFromInt(math.NewInt(10)),
Description: types.NewDescription("bloop", "", "", "", ""),
Description: types.NewDescription("bloop", "", "", "", "", types.Metadata{}),
}

params := types.Params{
Expand Down Expand Up @@ -195,7 +195,7 @@ func TestInitGenesisLargeValidatorSet(t *testing.T) {
validators[i], err = types.NewValidator(
sdk.ValAddress(addrs[i]).String(),
PKs[i],
types.NewDescription(fmt.Sprintf("#%d", i), "", "", "", ""),
types.NewDescription(fmt.Sprintf("#%d", i), "", "", "", "", types.Metadata{}),
)
assert.NilError(t, err)
validators[i].Status = types.Bonded
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/staking/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestCancelUnbondingDelegation(t *testing.T) {
delegatorAddr := addrs[1]

// setup a new validator with bonded status
validator, err := types.NewValidator(valAddr.String(), PKs[0], types.NewDescription("Validator", "", "", "", ""))
validator, err := types.NewValidator(valAddr.String(), PKs[0], types.NewDescription("Validator", "", "", "", "", types.Metadata{}))
validator.Status = types.Bonded
assert.NilError(t, err)
assert.NilError(t, f.stakingKeeper.SetValidator(ctx, validator))
Expand Down
10 changes: 6 additions & 4 deletions tests/integration/tx/aminojson/aminojson_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,12 @@ func TestAminoJSON_LegacyParity(t *testing.T) {
"staking/create_validator": {
gogo: &stakingtypes.MsgCreateValidator{Pubkey: pubkeyAny},
pulsar: &stakingapi.MsgCreateValidator{
Pubkey: pubkeyAnyPulsar,
Description: &stakingapi.Description{},
Commission: &stakingapi.CommissionRates{},
Value: &v1beta1.Coin{},
Pubkey: pubkeyAnyPulsar,
Description: &stakingapi.Description{
Metadata: &stakingapi.Metadata{},
},
Commission: &stakingapi.CommissionRates{},
Value: &v1beta1.Coin{},
},
},
"staking/msg_cancel_unbonding_delegation_response": {
Expand Down
2 changes: 1 addition & 1 deletion testutil/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func New(l Logger, baseDir string, cfg Config) (NetworkI, error) {
sdk.ValAddress(addr).String(),
valPubKeys[i],
sdk.NewCoin(cfg.BondDenom, cfg.BondedTokens),
stakingtypes.NewDescription(nodeDirName, "", "", "", ""),
stakingtypes.NewDescription(nodeDirName, "", "", "", "", stakingtypes.Metadata{}),
stakingtypes.NewCommissionRates(commission, sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()),
sdkmath.OneInt(),
)
Expand Down
2 changes: 1 addition & 1 deletion x/auth/vesting/types/vesting.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 x/genutil/gentx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
pk2 = priv2.PubKey()
addr1 = sdk.AccAddress(pk1.Address())
addr2 = sdk.AccAddress(pk2.Address())
desc = stakingtypes.NewDescription("testname", "", "", "", "")
desc = stakingtypes.NewDescription("testname", "", "", "", "", stakingtypes.Metadata{})
comm = stakingtypes.CommissionRates{}
)

Expand Down
4 changes: 2 additions & 2 deletions x/genutil/types/genesis_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestNetGenesisState(t *testing.T) {
}

func TestValidateGenesisMultipleMessages(t *testing.T) {
desc := stakingtypes.NewDescription("testname", "", "", "", "")
desc := stakingtypes.NewDescription("testname", "", "", "", "", stakingtypes.Metadata{})
comm := stakingtypes.CommissionRates{}
valAc := codectestutil.CodecOptions{}.GetValidatorCodec()

Expand All @@ -66,7 +66,7 @@ func TestValidateGenesisMultipleMessages(t *testing.T) {
}

func TestValidateGenesisBadMessage(t *testing.T) {
desc := stakingtypes.NewDescription("testname", "", "", "", "")
desc := stakingtypes.NewDescription("testname", "", "", "", "", stakingtypes.Metadata{})
pk1Addr, err := codectestutil.CodecOptions{}.GetValidatorCodec().BytesToString(pk1.Address())
require.NoError(t, err)
msg1 := stakingtypes.NewMsgEditValidator(pk1Addr, desc, nil, nil)
Expand Down
11 changes: 9 additions & 2 deletions x/staking/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

* [#19537](https://github.com/cosmos/cosmos-sdk/pull/19537) Changing `MinCommissionRate` in `MsgUpdateParams` now updates the minimum commission rate for all validators.
* [#20434](https://github.com/cosmos/cosmos-sdk/pull/20434) Add consensus address to validator query response
* [#21315](https://github.com/cosmos/cosmos-sdk/pull/21315) Create metadata type and add metadata field in validator details proto
* Add parsing of `metadata-profile-pic-uri` in `create-validator` JSON.
* Add cli flag: `metadata-profile-pic-uri` to `edit-validator` cmd.

### Improvements

Expand All @@ -42,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#19277](https://github.com/cosmos/cosmos-sdk/pull/19277) Hooks calls on `SetUnbondingDelegationEntry`, `SetRedelegationEntry`, `Slash` and `RemoveValidator` returns errors instead of logging just like other hooks calls.
* [#18636](https://github.com/cosmos/cosmos-sdk/pull/18636) `IterateBondedValidatorsByPower`, `GetDelegatorBonded`, `Delegate`, `Unbond`, `Slash`, `Jail`, `SlashRedelegation`, `ApplyAndReturnValidatorSetUpdates` methods no longer panics on any kind of errors but instead returns appropriate errors.
* [#18506](https://github.com/cosmos/cosmos-sdk/pull/18506) Detect the length of the ed25519 pubkey in CreateValidator to prevent panic.
* [#21315](https://github.com/cosmos/cosmos-sdk/pull/21315) Add a `Validate` method to the `Description` type that validates the metadata as well as other description details.


### API Breaking Changes
Expand Down Expand Up @@ -96,8 +100,11 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#17335](https://github.com/cosmos/cosmos-sdk/pull/17335) Remove usage of `"cosmossdk.io/x/staking/types".Infraction_*` in favour of `"cosmossdk.io/api/cosmos/staking/v1beta1".Infraction_` in order to remove dependency between modules on staking
* [#20295](https://github.com/cosmos/cosmos-sdk/pull/20295) `GetValidatorByConsAddr` now returns the Cosmos SDK `cryptotypes.Pubkey` instead of `cometcrypto.Publickey`. The caller is responsible to translate the returned value to the expected type.
* Remove `CmtConsPublicKey()` and `TmConsPublicKey()` from `Validator` interface and as methods on the `Validator` struct.
* [#21480](https://github.com/cosmos/cosmos-sdk/pull/21480) ConsensusKeeper is required to be passed to the keeper.

* [#21480](https://github.com/cosmos/cosmos-sdk/pull/21480) ConsensusKeeper is required to be passed to the keeper.
* [#21315](https://github.com/cosmos/cosmos-sdk/pull/21315) New struct `Metadata` to store extra validator information.
* New field `Metadata` introduced in `types`: `Description`.
* The signature of `NewDescription` has changed to accept an extra argument of type `Metadata`.

### State Breaking changes

* [#18841](https://github.com/cosmos/cosmos-sdk/pull/18841) In a undelegation or redelegation if the shares being left delegated correspond to less than 1 token (in base denom) the entire delegation gets removed.
Expand Down
16 changes: 10 additions & 6 deletions x/staking/client/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ const (
FlagSharesAmount = "shares-amount"
FlagSharesFraction = "shares-fraction"

FlagMoniker = "moniker"
FlagEditMoniker = "new-moniker"
FlagIdentity = "identity"
FlagWebsite = "website"
FlagSecurityContact = "security-contact"
FlagDetails = "details"
FlagMoniker = "moniker"
FlagEditMoniker = "new-moniker"
FlagIdentity = "identity"
FlagWebsite = "website"
FlagSecurityContact = "security-contact"
FlagDetails = "details"
FlagMetadataProfilePicUri = "metadata-profile-pic-uri"
FlagMetadataSocialHandleUris = "metadata-social-handle-uris"

FlagCommissionRate = "commission-rate"
FlagCommissionMaxRate = "commission-max-rate"
Expand Down Expand Up @@ -89,6 +91,8 @@ func flagSetDescriptionEdit() *flag.FlagSet {
fs.String(FlagWebsite, types.DoNotModifyDesc, "The validator's (optional) website")
fs.String(FlagSecurityContact, types.DoNotModifyDesc, "The validator's (optional) security contact email")
fs.String(FlagDetails, types.DoNotModifyDesc, "The validator's (optional) details")
fs.String(FlagMetadataProfilePicUri, "", "The validator's profile pic uri")
fs.StringArray(FlagMetadataSocialHandleUris, []string{}, "The validator's social handles uris")

return fs
}
Expand Down
Loading
Loading