Skip to content

Commit

Permalink
chore: added additional query parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Jan 2, 2025
1 parent 6158cd8 commit c3de96e
Show file tree
Hide file tree
Showing 6 changed files with 580 additions and 97 deletions.
4 changes: 2 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -226,4 +226,4 @@ validators:
config:
consensus:
timeout_commit: "2s"
timeout_propose: "2s"
timeout_propose: "2s"
209 changes: 197 additions & 12 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
29 changes: 25 additions & 4 deletions proto/kyve/query/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion util/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package util

import (
"context"

"cosmossdk.io/core/address"
"cosmossdk.io/math"
distributionTypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
Expand Down Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit c3de96e

Please sign in to comment.