From c3de96e5e1ba2cf36033fcfca78140b5a20db29a Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Thu, 2 Jan 2025 10:29:12 +0100 Subject: [PATCH] chore: added additional query parameters --- config.yml | 4 +- docs/static/openapi.yml | 209 ++++++++++++++- proto/kyve/query/v1beta1/query.proto | 29 ++- util/expected_keepers.go | 4 +- x/query/keeper/helper.go | 57 +++- x/query/types/query.pb.go | 374 ++++++++++++++++++++++----- 6 files changed, 580 insertions(+), 97 deletions(-) diff --git a/config.yml b/config.yml index 1924c39d..fd0f22a1 100644 --- a/config.yml +++ b/config.yml @@ -157,7 +157,7 @@ genesis: total_bundles: "0" upload_interval: "60" protocol: - version: "1.1.6" + version: "1.2.8" binaries: "{\"kyve-linux-arm64\":\"https://github.com/KYVENetwork/kyvejs/releases/download/%40kyvejs%2Ftendermint%401.1.6/kyve-linux-arm64.zip\",\"kyve-linux-x64\":\"https://github.com/KYVENetwork/kyvejs/releases/download/%40kyvejs%2Ftendermint%401.1.6/kyve-linux-x64.zip\",\"kyve-macos-x64\":\"https://github.com/KYVENetwork/kyvejs/releases/download/%40kyvejs%2Ftendermint%401.1.6/kyve-macos-x64.zip\"}" last_upgrade: "0" upgrade_plan: @@ -226,4 +226,4 @@ validators: config: consensus: timeout_commit: "2s" - timeout_propose: "2s" \ No newline at end of file + timeout_propose: "2s" diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 6062ba36..82de132f 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -4208,6 +4208,9 @@ paths: address: type: string title: address of the staker + valaddress: + type: string + title: valaddress returns the validator address of the validator validator: type: object properties: @@ -4427,14 +4430,55 @@ paths: bonded shares multiplied by exchange rate. - total_pool_stake: + validator_delegators: + type: string + format: uint64 + title: >- + validator_delegators returns the amount of delegators + which have delegated + + into this validator + validator_self_delegation: + type: string + format: uint64 + title: >- + validator_self_delegation returns the amount in $KYVE the + validator has + + personally delegated + validator_unbonding: + type: string + format: uint64 + title: >- + validator_unbonding returns the amount in $KYVE the + validator is currently + + unbonding from his validator + validator_total_pool_stake: type: string format: uint64 title: >- - total_pool_stake returns the amount the validator has in - total + validator_total_pool_stake returns the amount the + validator has in total staked in all his pools + validator_commission_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. pools: type: array items: @@ -4870,6 +4914,11 @@ paths: address: type: string title: address of the staker + valaddress: + type: string + title: >- + valaddress returns the validator address of the + validator validator: type: object properties: @@ -5089,14 +5138,56 @@ paths: bonded shares multiplied by exchange rate. - total_pool_stake: + validator_delegators: type: string format: uint64 title: >- - total_pool_stake returns the amount the validator has in - total + validator_delegators returns the amount of delegators + which have delegated + + into this validator + validator_self_delegation: + type: string + format: uint64 + title: >- + validator_self_delegation returns the amount in $KYVE + the validator has + + personally delegated + validator_unbonding: + type: string + format: uint64 + title: >- + validator_unbonding returns the amount in $KYVE the + validator is currently + + unbonding from his validator + validator_total_pool_stake: + type: string + format: uint64 + title: >- + validator_total_pool_stake returns the amount the + validator has in total staked in all his pools + validator_commission_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. pools: type: array items: @@ -5636,6 +5727,11 @@ paths: address: type: string title: address of the staker + valaddress: + type: string + title: >- + valaddress returns the validator address of the + validator validator: type: object properties: @@ -5855,14 +5951,56 @@ paths: bonded shares multiplied by exchange rate. - total_pool_stake: + validator_delegators: + type: string + format: uint64 + title: >- + validator_delegators returns the amount of delegators + which have delegated + + into this validator + validator_self_delegation: + type: string + format: uint64 + title: >- + validator_self_delegation returns the amount in $KYVE + the validator has + + personally delegated + validator_unbonding: + type: string + format: uint64 + title: >- + validator_unbonding returns the amount in $KYVE the + validator is currently + + unbonding from his validator + validator_total_pool_stake: type: string format: uint64 title: >- - total_pool_stake returns the amount the validator has in - total + validator_total_pool_stake returns the amount the + validator has in total staked in all his pools + validator_commission_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. pools: type: array items: @@ -6311,6 +6449,11 @@ paths: address: type: string title: address of the staker + valaddress: + type: string + title: >- + valaddress returns the validator address of the + validator validator: type: object properties: @@ -6530,14 +6673,56 @@ paths: bonded shares multiplied by exchange rate. - total_pool_stake: + validator_delegators: + type: string + format: uint64 + title: >- + validator_delegators returns the amount of delegators + which have delegated + + into this validator + validator_self_delegation: type: string format: uint64 title: >- - total_pool_stake returns the amount the validator has in - total + validator_self_delegation returns the amount in $KYVE + the validator has + + personally delegated + validator_unbonding: + type: string + format: uint64 + title: >- + validator_unbonding returns the amount in $KYVE the + validator is currently + + unbonding from his validator + validator_total_pool_stake: + type: string + format: uint64 + title: >- + validator_total_pool_stake returns the amount the + validator has in total staked in all his pools + validator_commission_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. pools: type: array items: diff --git a/proto/kyve/query/v1beta1/query.proto b/proto/kyve/query/v1beta1/query.proto index c1e9d51f..33658cb6 100644 --- a/proto/kyve/query/v1beta1/query.proto +++ b/proto/kyve/query/v1beta1/query.proto @@ -73,15 +73,36 @@ message FullStaker { // address of the staker string address = 1; - cosmos.staking.v1beta1.Validator validator = 2; + // valaddress returns the validator address of the validator + string valaddress = 2; - // total_pool_stake returns the amount the validator has in total + cosmos.staking.v1beta1.Validator validator = 3; + + // validator_delegators returns the amount of delegators which have delegated + // into this validator + uint64 validator_delegators = 4; + + // validator_self_delegation returns the amount in $KYVE the validator has + // personally delegated + uint64 validator_self_delegation = 5; + + // validator_unbonding returns the amount in $KYVE the validator is currently + // unbonding from his validator + uint64 validator_unbonding = 6; + + // validator_total_pool_stake returns the amount the validator has in total // staked in all his pools - uint64 total_pool_stake = 3; + uint64 validator_total_pool_stake = 7; + + repeated cosmos.base.v1beta1.Coin validator_commission_rewards = 8 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; // pools is a list of all pools the staker is currently // participating, i.e. allowed to vote and upload data. - repeated PoolMembership pools = 4; + repeated PoolMembership pools = 9; } // CommissionChangeEntry shows when the old commission diff --git a/util/expected_keepers.go b/util/expected_keepers.go index c33381e2..5f80596b 100644 --- a/util/expected_keepers.go +++ b/util/expected_keepers.go @@ -2,7 +2,6 @@ package util import ( "context" - "cosmossdk.io/core/address" "cosmossdk.io/math" distributionTypes "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -47,6 +46,9 @@ type StakingKeeper interface { GetDelegatorBonded(ctx context.Context, delegator sdk.AccAddress) (math.Int, error) GetDelegatorValidators(ctx context.Context, delegatorAddr sdk.AccAddress, maxRetrieve uint32) (stakingtypes.Validators, error) GetDelegatorUnbonding(ctx context.Context, delegator sdk.AccAddress) (math.Int, error) + IterateDelegatorUnbondingDelegations(ctx context.Context, delegator sdk.AccAddress, cb func(ubd stakingtypes.UnbondingDelegation) (stop bool)) error + GetValidatorDelegations(ctx context.Context, valAddr sdk.ValAddress) (delegations []stakingtypes.Delegation, err error) + GetDelegation(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (stakingtypes.Delegation, error) } type UpgradeKeeper interface { diff --git a/x/query/keeper/helper.go b/x/query/keeper/helper.go index a52e3620..246a5d0f 100644 --- a/x/query/keeper/helper.go +++ b/x/query/keeper/helper.go @@ -1,17 +1,56 @@ package keeper import ( + "cosmossdk.io/math" + "github.com/KYVENetwork/chain/util" globalTypes "github.com/KYVENetwork/chain/x/global/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" "github.com/KYVENetwork/chain/x/query/types" sdk "github.com/cosmos/cosmos-sdk/types" + stakingTypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.FullStaker { - validator, _ := k.stakerKeeper.GetValidator(ctx, stakerAddress) + valAddress, err := sdk.ValAddressFromBech32(util.MustValaddressFromOperatorAddress(stakerAddress)) + if err != nil { + return &types.FullStaker{} + } + validator, err := k.stakingKeeper.GetValidator(ctx, valAddress) + if err != nil { + return &types.FullStaker{} + } + + validatorAccAddress, _ := sdk.AccAddressFromBech32(stakerAddress) + validatorUnbonding := math.ZeroInt() + err = k.stakingKeeper.IterateDelegatorUnbondingDelegations(ctx, validatorAccAddress, func(ubd stakingTypes.UnbondingDelegation) bool { + if ubd.ValidatorAddress == validator.OperatorAddress { + for _, entry := range ubd.Entries { + validatorUnbonding = validatorUnbonding.Add(entry.Balance) + } + } + return false + }) + if err != nil { + return &types.FullStaker{} + } + + validatorDelegations, err := k.stakingKeeper.GetValidatorDelegations(ctx, valAddress) + if err != nil { + return &types.FullStaker{} + } + + validatorSelfDelegation, err := k.stakingKeeper.GetDelegation(ctx, validatorAccAddress, valAddress) + if err != nil { + return &types.FullStaker{} + } + + validatorCommissionRewards, err := k.distrkeeper.GetValidatorAccumulatedCommission(ctx, valAddress) + if err != nil { + return &types.FullStaker{} + } var poolMemberships []*types.PoolMembership - totalPoolStake := uint64(0) + validatorTotalPoolStake := uint64(0) for _, poolAccount := range k.stakerKeeper.GetPoolAccountsFromStaker(ctx, stakerAddress) { pool, _ := k.poolKeeper.GetPool(ctx, poolAccount.PoolId) @@ -38,7 +77,7 @@ func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.Full } poolStake := k.stakerKeeper.GetValidatorPoolStake(ctx, stakerAddress, pool.Id) - totalPoolStake += poolStake + validatorTotalPoolStake += poolStake poolMemberships = append( poolMemberships, &types.PoolMembership{ @@ -67,10 +106,14 @@ func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.Full } return &types.FullStaker{ - Address: stakerAddress, - Validator: &validator, - TotalPoolStake: totalPoolStake, - Pools: poolMemberships, + Address: stakerAddress, + Validator: &validator, + ValidatorDelegators: uint64(len(validatorDelegations)), + ValidatorUnbonding: validatorUnbonding.Uint64(), + ValidatorSelfDelegation: uint64(validator.TokensFromSharesTruncated(validatorSelfDelegation.Shares).TruncateInt64()), + ValidatorTotalPoolStake: validatorTotalPoolStake, + ValidatorCommissionRewards: util.TruncateDecCoins(validatorCommissionRewards.Commission), + Pools: poolMemberships, } } diff --git a/x/query/types/query.pb.go b/x/query/types/query.pb.go index cbc2597a..9a86c645 100644 --- a/x/query/types/query.pb.go +++ b/x/query/types/query.pb.go @@ -149,14 +149,26 @@ func (m *BasicPool) GetStatus() types1.PoolStatus { // It contains almost all needed information for a convenient usage type FullStaker struct { // address of the staker - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Validator *types2.Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator,omitempty"` - // total_pool_stake returns the amount the validator has in total + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // valaddress returns the validator address of the validator + Valaddress string `protobuf:"bytes,2,opt,name=valaddress,proto3" json:"valaddress,omitempty"` + Validator *types2.Validator `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` + // validator_delegators returns the amount of delegators which have delegated + // into this validator + ValidatorDelegators uint64 `protobuf:"varint,4,opt,name=validator_delegators,json=validatorDelegators,proto3" json:"validator_delegators,omitempty"` + // validator_self_delegation returns the amount in $KYVE the validator has + // personally delegated + ValidatorSelfDelegation uint64 `protobuf:"varint,5,opt,name=validator_self_delegation,json=validatorSelfDelegation,proto3" json:"validator_self_delegation,omitempty"` + // validator_unbonding returns the amount in $KYVE the validator is currently + // unbonding from his validator + ValidatorUnbonding uint64 `protobuf:"varint,6,opt,name=validator_unbonding,json=validatorUnbonding,proto3" json:"validator_unbonding,omitempty"` + // validator_total_pool_stake returns the amount the validator has in total // staked in all his pools - TotalPoolStake uint64 `protobuf:"varint,3,opt,name=total_pool_stake,json=totalPoolStake,proto3" json:"total_pool_stake,omitempty"` + ValidatorTotalPoolStake uint64 `protobuf:"varint,7,opt,name=validator_total_pool_stake,json=validatorTotalPoolStake,proto3" json:"validator_total_pool_stake,omitempty"` + ValidatorCommissionRewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,8,rep,name=validator_commission_rewards,json=validatorCommissionRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"validator_commission_rewards"` // pools is a list of all pools the staker is currently // participating, i.e. allowed to vote and upload data. - Pools []*PoolMembership `protobuf:"bytes,4,rep,name=pools,proto3" json:"pools,omitempty"` + Pools []*PoolMembership `protobuf:"bytes,9,rep,name=pools,proto3" json:"pools,omitempty"` } func (m *FullStaker) Reset() { *m = FullStaker{} } @@ -199,6 +211,13 @@ func (m *FullStaker) GetAddress() string { return "" } +func (m *FullStaker) GetValaddress() string { + if m != nil { + return m.Valaddress + } + return "" +} + func (m *FullStaker) GetValidator() *types2.Validator { if m != nil { return m.Validator @@ -206,13 +225,41 @@ func (m *FullStaker) GetValidator() *types2.Validator { return nil } -func (m *FullStaker) GetTotalPoolStake() uint64 { +func (m *FullStaker) GetValidatorDelegators() uint64 { + if m != nil { + return m.ValidatorDelegators + } + return 0 +} + +func (m *FullStaker) GetValidatorSelfDelegation() uint64 { + if m != nil { + return m.ValidatorSelfDelegation + } + return 0 +} + +func (m *FullStaker) GetValidatorUnbonding() uint64 { if m != nil { - return m.TotalPoolStake + return m.ValidatorUnbonding } return 0 } +func (m *FullStaker) GetValidatorTotalPoolStake() uint64 { + if m != nil { + return m.ValidatorTotalPoolStake + } + return 0 +} + +func (m *FullStaker) GetValidatorCommissionRewards() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.ValidatorCommissionRewards + } + return nil +} + func (m *FullStaker) GetPools() []*PoolMembership { if m != nil { return m.Pools @@ -469,59 +516,66 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/query.proto", fileDescriptor_6b41255feae93a15) } var fileDescriptor_6b41255feae93a15 = []byte{ - // 831 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x6f, 0xdc, 0x44, - 0x14, 0x8e, 0xb3, 0xee, 0x26, 0x9e, 0x6d, 0x17, 0x18, 0x95, 0xe2, 0x06, 0xe2, 0xa4, 0x5b, 0x24, - 0x96, 0x0a, 0x6c, 0x25, 0xa8, 0x12, 0x37, 0x44, 0x92, 0x46, 0x02, 0x0a, 0x42, 0x8e, 0x54, 0x54, - 0x2e, 0xd6, 0xac, 0x3d, 0xf1, 0x8e, 0xd6, 0x9e, 0x71, 0x3d, 0xb3, 0x5b, 0xf6, 0xc8, 0x99, 0x0b, - 0x3f, 0x03, 0x21, 0x0e, 0xfc, 0x03, 0xae, 0x95, 0xb8, 0xf4, 0x88, 0x38, 0x14, 0x94, 0x1c, 0xf8, - 0x1b, 0x68, 0xde, 0xcc, 0x6c, 0x37, 0x61, 0x91, 0xda, 0x5e, 0x92, 0x79, 0xef, 0x7d, 0xf3, 0xde, - 0xf7, 0xde, 0xf7, 0x66, 0x8d, 0xa2, 0xc9, 0x7c, 0x46, 0x93, 0x47, 0x53, 0xda, 0xce, 0x93, 0xd9, - 0xde, 0x88, 0x2a, 0xb2, 0x67, 0xac, 0xb8, 0x69, 0x85, 0x12, 0x18, 0xeb, 0x78, 0x6c, 0x3c, 0x36, - 0xbe, 0xf5, 0x06, 0xa9, 0x19, 0x17, 0x09, 0xfc, 0x35, 0xb0, 0xad, 0x28, 0x17, 0xb2, 0x16, 0x32, - 0x19, 0x11, 0x49, 0x17, 0x79, 0x72, 0xc1, 0xb8, 0x8d, 0xbf, 0x6b, 0xe3, 0x52, 0x91, 0x09, 0xe3, - 0xe5, 0x02, 0x62, 0x6d, 0x8b, 0xba, 0x5e, 0x8a, 0x52, 0xc0, 0x31, 0xd1, 0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97, 0xa3, - 0x2b, 0x64, 0xdd, 0x7c, 0x65, 0x59, 0x05, 0xda, 0x76, 0x94, 0x2f, 0xe6, 0x74, 0xb4, 0x03, 0xa0, - 0xfd, 0xc1, 0x2a, 0xda, 0xff, 0xb7, 0x77, 0xe9, 0x96, 0x4d, 0xb9, 0x02, 0xa0, 0x45, 0x5c, 0x7a, - 0x92, 0x08, 0x54, 0x08, 0x1a, 0xf7, 0x1a, 0x0f, 0x8e, 0x9e, 0x9c, 0x45, 0xde, 0xd3, 0xb3, 0xc8, - 0xfb, 0xfb, 0x2c, 0xf2, 0x7e, 0x3c, 0x8f, 0xd6, 0x9e, 0x9e, 0x47, 0x6b, 0x7f, 0x9c, 0x47, 0x6b, - 0xdf, 0xde, 0x59, 0xfa, 0x39, 0xfb, 0xe2, 0xe1, 0x83, 0x7b, 0x5f, 0x51, 0xf5, 0x58, 0xb4, 0x93, - 0x24, 0x1f, 0x13, 0xc6, 0x93, 0xef, 0xec, 0x57, 0x0c, 0x7e, 0xd6, 0x46, 0x5d, 0xf8, 0x3a, 0x7c, - 0xf4, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, 0x7d, 0xd3, 0x35, 0xe0, 0x06, 0x00, 0x00, + // 932 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x26, 0xae, 0x13, 0x3f, 0xb7, 0x46, 0x0c, 0xa1, 0xdd, 0x84, 0x66, 0x93, 0xba, 0x48, + 0x98, 0x0a, 0x76, 0x95, 0xa0, 0x4a, 0x08, 0x0e, 0x88, 0xc4, 0x8d, 0x04, 0x14, 0x84, 0x36, 0x50, + 0x54, 0x2e, 0xd6, 0x78, 0x77, 0xbc, 0x1e, 0x79, 0x77, 0xc6, 0xdd, 0x19, 0x3b, 0xf8, 0xc8, 0x99, + 0x0b, 0xe2, 0x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0x1c, 0x4b, 0xca, 0x59, 0x4f, 0x0c, 0x71, 0x49, + 0x7a, 0xa7, 0x84, 0x66, 0x43, 0xe9, 0x5f, 0x51, 0x5e, 0x87, 0xb7, 0x1f, 0x3f, 0xdd, 0x5d, 0xf9, + 0xe3, 0xe9, 0xee, 0x6b, 0xe6, 0x86, 0x22, 0x1d, 0x85, 0x94, 0x47, 0x05, 0x96, 0xc3, 0xf0, 0x3e, + 0xc9, 0x70, 0x32, 0xeb, 0x92, 0x24, 0xde, 0xac, 0x52, 0x9c, 0xa8, 0x0c, 0x5f, 0xe9, 0x04, 0xe8, + 0x0d, 0x78, 0x69, 0x32, 0xce, 0x39, 0x4e, 0x7b, 0x94, 0x49, 0x52, 0x4e, 0x71, 0xee, 0xd7, 0x35, + 0xf2, 0x96, 0x51, 0x7f, 0x64, 0xb5, 0xe8, 0x11, 0x34, 0x25, 0x97, 0x38, 0xef, 0x0d, 0x26, 0x2c, + 0x15, 0xfe, 0xfa, 0xde, 0x5a, 0xa7, 0x79, 0xb0, 0x15, 0x9a, 0x8a, 0xa1, 0xea, 0xb9, 0xe3, 0x26, + 0x3c, 0xe2, 0x94, 0x1d, 0xde, 0x55, 0x98, 0x7e, 0xfa, 0x73, 0xb7, 0x93, 0x51, 0x39, 0x9c, 0xf4, + 0xc3, 0x84, 0x17, 0x91, 0x25, 0xc0, 0x7c, 0xbd, 0x2d, 0xd2, 0x51, 0x24, 0x67, 0x63, 0x22, 0x74, + 0x80, 0xf8, 0xf1, 0xef, 0x5f, 0xee, 0x78, 0x31, 0xe8, 0x22, 0xc7, 0xaa, 0x06, 0xda, 0x75, 0x25, + 0x15, 0x43, 0xc4, 0xdf, 0xd0, 0xb8, 0x8c, 0xc3, 0x89, 0xd2, 0xa0, 0xbb, 0x50, 0x17, 0x12, 0xcb, + 0x89, 0xf0, 0x1b, 0x7b, 0x5e, 0xa7, 0x75, 0xb0, 0x13, 0xea, 0x49, 0xd1, 0xcc, 0x38, 0x30, 0x8a, + 0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x23, 0xb0, 0x35, 0x26, 0x7a, 0x4f, + 0x16, 0x87, 0x3b, 0xd1, 0x8c, 0xe8, 0xdd, 0x68, 0x1e, 0xbc, 0xb9, 0xac, 0x01, 0x4b, 0x87, 0x28, + 0xbe, 0x61, 0x73, 0x5d, 0xb6, 0x2e, 0xa1, 0x75, 0xe3, 0xb9, 0x69, 0xe5, 0xb0, 0xe3, 0x20, 0x5f, + 0xcc, 0xe9, 0x60, 0x37, 0x34, 0xec, 0xb7, 0x96, 0xc1, 0xfe, 0xaf, 0xb9, 0x8b, 0xb7, 0x6d, 0xca, + 0x25, 0x0e, 0x8a, 0xc4, 0x85, 0x07, 0x03, 0x34, 0x0b, 0x8d, 0xb1, 0x7b, 0x22, 0x0e, 0xbb, 0x8f, + 0xcf, 0x02, 0xef, 0xc9, 0x59, 0xe0, 0xfd, 0x75, 0x16, 0x78, 0xdf, 0x9f, 0x07, 0x2b, 0x4f, 0xce, + 0x83, 0x95, 0xdf, 0xcf, 0x83, 0x95, 0xaf, 0xef, 0x2c, 0xac, 0xfc, 0x27, 0x0f, 0x1f, 0xdc, 0xfb, + 0x8c, 0xc8, 0x53, 0x5e, 0x8e, 0xa2, 0x64, 0x88, 0x29, 0x8b, 0xbe, 0xb1, 0xff, 0x16, 0xf4, 0xea, + 0xf7, 0xeb, 0xfa, 0x57, 0xf8, 0x9d, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x11, 0x97, 0xca, 0xf6, + 0x48, 0x08, 0x00, 0x00, } func (m *BasicPool) Marshal() (dAtA []byte, err error) { @@ -643,13 +697,42 @@ func (m *FullStaker) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x4a } } - if m.TotalPoolStake != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TotalPoolStake)) + if len(m.ValidatorCommissionRewards) > 0 { + for iNdEx := len(m.ValidatorCommissionRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValidatorCommissionRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if m.ValidatorTotalPoolStake != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ValidatorTotalPoolStake)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x38 + } + if m.ValidatorUnbonding != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ValidatorUnbonding)) + i-- + dAtA[i] = 0x30 + } + if m.ValidatorSelfDelegation != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ValidatorSelfDelegation)) + i-- + dAtA[i] = 0x28 + } + if m.ValidatorDelegators != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ValidatorDelegators)) + i-- + dAtA[i] = 0x20 } if m.Validator != nil { { @@ -661,6 +744,13 @@ func (m *FullStaker) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + } + if len(m.Valaddress) > 0 { + i -= len(m.Valaddress) + copy(dAtA[i:], m.Valaddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Valaddress))) + i-- dAtA[i] = 0x12 } if len(m.Address) > 0 { @@ -922,12 +1012,31 @@ func (m *FullStaker) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + l = len(m.Valaddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } if m.Validator != nil { l = m.Validator.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.TotalPoolStake != 0 { - n += 1 + sovQuery(uint64(m.TotalPoolStake)) + if m.ValidatorDelegators != 0 { + n += 1 + sovQuery(uint64(m.ValidatorDelegators)) + } + if m.ValidatorSelfDelegation != 0 { + n += 1 + sovQuery(uint64(m.ValidatorSelfDelegation)) + } + if m.ValidatorUnbonding != 0 { + n += 1 + sovQuery(uint64(m.ValidatorUnbonding)) + } + if m.ValidatorTotalPoolStake != 0 { + n += 1 + sovQuery(uint64(m.ValidatorTotalPoolStake)) + } + if len(m.ValidatorCommissionRewards) > 0 { + for _, e := range m.ValidatorCommissionRewards { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } if len(m.Pools) > 0 { for _, e := range m.Pools { @@ -1365,6 +1474,38 @@ func (m *FullStaker) Unmarshal(dAtA []byte) error { m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Valaddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Valaddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) } @@ -1400,11 +1541,11 @@ func (m *FullStaker) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalPoolStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDelegators", wireType) } - m.TotalPoolStake = 0 + m.ValidatorDelegators = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1414,12 +1555,103 @@ func (m *FullStaker) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalPoolStake |= uint64(b&0x7F) << shift + m.ValidatorDelegators |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSelfDelegation", wireType) + } + m.ValidatorSelfDelegation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorSelfDelegation |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUnbonding", wireType) + } + m.ValidatorUnbonding = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorUnbonding |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorTotalPoolStake", wireType) + } + m.ValidatorTotalPoolStake = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorTotalPoolStake |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorCommissionRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorCommissionRewards = append(m.ValidatorCommissionRewards, types.Coin{}) + if err := m.ValidatorCommissionRewards[len(m.ValidatorCommissionRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pools", wireType) }