From f8d0076df2266d232a0b8112327cdc16d808f817 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 23 Dec 2024 14:04:59 +0100 Subject: [PATCH] chore: fix build --- docs/static/openapi.yml | 62 +++---- proto/kyve/query/v1beta1/bundles.proto | 6 +- proto/kyve/query/v1beta1/query.proto | 8 +- proto/kyve/stakers/v1beta1/events.proto | 6 +- proto/kyve/stakers/v1beta1/tx.proto | 4 +- x/bundles/keeper/logic_bundles.go | 32 ++-- .../logic_end_block_handle_upload_timeout.go | 6 +- .../keeper/msg_server_claim_uploader_role.go | 2 +- .../keeper/msg_server_skip_uploader_role.go | 2 +- .../msg_server_submit_bundle_proposal.go | 2 +- .../keeper/msg_server_vote_bundle_proposal.go | 2 +- x/bundles/types/expected_keepers.go | 12 +- x/delegation/keeper/msg_server_redelegate.go | 2 +- x/delegation/types/expected_keepers.go | 2 +- x/query/client/cli/query_can_validate.go | 8 +- x/query/keeper/grpc_query_can_validate.go | 6 +- x/query/keeper/grpc_query_stakers_by_pool.go | 6 +- x/query/keeper/helper.go | 20 +- x/query/types/bundles.pb.go | 175 +++++++++--------- x/query/types/bundles.pb.gw.go | 18 +- x/query/types/query.pb.go | 132 ++++++------- x/stakers/client/cli/tx_join_pool.go | 6 +- x/stakers/genesis.go | 6 +- x/stakers/keeper/exported_functions.go | 4 +- x/stakers/keeper/keeper.go | 3 +- x/stakers/keeper/logic_commission.go | 8 +- x/stakers/keeper/logic_stake_fraction.go | 8 +- x/stakers/keeper/msg_server_join_pool.go | 32 ++-- x/stakers/keeper/msg_server_leave_pool.go | 6 +- .../keeper/msg_server_update_commission.go | 2 +- .../msg_server_update_stake_fraction.go | 10 +- x/stakers/types/errors.go | 6 +- x/stakers/types/events.pb.go | 94 +++++----- x/stakers/types/message_join_pool.go | 4 +- x/stakers/types/tx.pb.go | 102 +++++----- 35 files changed, 402 insertions(+), 402 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 8b31768f..c967243a 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -858,22 +858,22 @@ paths: the staker will no longer participate in that pool - valaddress: + pool_address: type: string description: >- - Valaddress is the address which is authorized - to vote + pool address is the address which is + authorized to vote and submit bundles. If the server gets compromised - the staker can just change the valaddress. + the staker can just change the pool address . balance: type: string format: uint64 title: >- - balance is the valaddress account balance and - indicates + balance is the pool address account balance + and indicates whether or not the valaccount needs additional funds to @@ -2053,7 +2053,7 @@ paths: format: uint64 tags: - QueryBundles - /kyve/query/v1beta1/can_validate/{pool_id}/{valaddress}: + /kyve/query/v1beta1/can_validate/{pool_id}/{pool_address}: get: summary: CanValidate ... operationId: CanValidate @@ -2270,8 +2270,8 @@ paths: required: true type: string format: uint64 - - name: valaddress - description: valaddress ... + - name: pool_address + description: pool_address ... in: path required: true type: string @@ -4397,22 +4397,22 @@ paths: the staker will no longer participate in that pool - valaddress: + pool_address: type: string description: >- - Valaddress is the address which is authorized - to vote + pool address is the address which is + authorized to vote and submit bundles. If the server gets compromised - the staker can just change the valaddress. + the staker can just change the pool address . balance: type: string format: uint64 title: >- - balance is the valaddress account balance and - indicates + balance is the pool address account balance + and indicates whether or not the valaccount needs additional funds to @@ -6992,20 +6992,20 @@ paths: is_leaving indicates if a user has scheduled a a PoolLeave entry. After the leave-time is over the staker will no longer participate in that pool - valaddress: + pool_address: type: string description: >- - Valaddress is the address which is authorized to + pool address is the address which is authorized to vote and submit bundles. If the server gets compromised - the staker can just change the valaddress. + the staker can just change the pool address . balance: type: string format: uint64 title: >- - balance is the valaddress account balance and + balance is the pool address account balance and indicates whether or not the valaccount needs additional funds @@ -7654,20 +7654,20 @@ paths: is_leaving indicates if a user has scheduled a a PoolLeave entry. After the leave-time is over the staker will no longer participate in that pool - valaddress: + pool_address: type: string description: >- - Valaddress is the address which is authorized to + pool address is the address which is authorized to vote and submit bundles. If the server gets compromised - the staker can just change the valaddress. + the staker can just change the pool address . balance: type: string format: uint64 title: >- - balance is the valaddress account balance and + balance is the pool address account balance and indicates whether or not the valaccount needs additional @@ -8420,20 +8420,20 @@ paths: is_leaving indicates if a user has scheduled a a PoolLeave entry. After the leave-time is over the staker will no longer participate in that pool - valaddress: + pool_address: type: string description: >- - Valaddress is the address which is authorized to + pool address is the address which is authorized to vote and submit bundles. If the server gets compromised - the staker can just change the valaddress. + the staker can just change the pool address . balance: type: string format: uint64 title: >- - balance is the valaddress account balance and + balance is the pool address account balance and indicates whether or not the valaccount needs additional @@ -9095,20 +9095,20 @@ paths: is_leaving indicates if a user has scheduled a a PoolLeave entry. After the leave-time is over the staker will no longer participate in that pool - valaddress: + pool_address: type: string description: >- - Valaddress is the address which is authorized to + pool address is the address which is authorized to vote and submit bundles. If the server gets compromised - the staker can just change the valaddress. + the staker can just change the pool address . balance: type: string format: uint64 title: >- - balance is the valaddress account balance and + balance is the pool address account balance and indicates whether or not the valaccount needs additional diff --git a/proto/kyve/query/v1beta1/bundles.proto b/proto/kyve/query/v1beta1/bundles.proto index d9dd219a..45849410 100644 --- a/proto/kyve/query/v1beta1/bundles.proto +++ b/proto/kyve/query/v1beta1/bundles.proto @@ -27,7 +27,7 @@ service QueryBundles { // CanValidate ... rpc CanValidate(QueryCanValidateRequest) returns (QueryCanValidateResponse) { - option (google.api.http).get = "/kyve/query/v1beta1/can_validate/{pool_id}/{valaddress}"; + option (google.api.http).get = "/kyve/query/v1beta1/can_validate/{pool_id}/{pool_address}"; } // CanPropose ... @@ -189,8 +189,8 @@ message QueryCurrentVoteStatusResponse { message QueryCanValidateRequest { // pool_id defines the unique ID of the pool. uint64 pool_id = 1; - // valaddress ... - string valaddress = 2; + // pool_address ... + string pool_address = 2; } // QueryCanProposeResponse is the response type for the Query/CanPropose RPC method. diff --git a/proto/kyve/query/v1beta1/query.proto b/proto/kyve/query/v1beta1/query.proto index dc35d847..28ac0692 100644 --- a/proto/kyve/query/v1beta1/query.proto +++ b/proto/kyve/query/v1beta1/query.proto @@ -131,12 +131,12 @@ message PoolMembership { // the staker will no longer participate in that pool bool is_leaving = 3; - // Valaddress is the address which is authorized to vote + // pool address is the address which is authorized to vote // and submit bundles. If the server gets compromised - // the staker can just change the valaddress. - string valaddress = 4; + // the staker can just change the pool address . + string pool_address = 4; - // balance is the valaddress account balance and indicates + // balance is the pool address account balance and indicates // whether or not the valaccount needs additional funds to // pay for gas fees uint64 balance = 5; diff --git a/proto/kyve/stakers/v1beta1/events.proto b/proto/kyve/stakers/v1beta1/events.proto index 9abf0df3..9a04bc4d 100644 --- a/proto/kyve/stakers/v1beta1/events.proto +++ b/proto/kyve/stakers/v1beta1/events.proto @@ -63,10 +63,10 @@ message EventJoinPool { uint64 pool_id = 1; // staker is the address of the staker string staker = 2; - // valaddress is the address of the protocol node which + // pool_address is the address of the protocol node which // votes in favor of the staker - string valaddress = 3; - // amount is the amount of funds transferred to the valaddress + string pool_address = 3; + // amount is the amount of funds transferred to the pool address uint64 amount = 4; // commission ... string commission = 5 [ diff --git a/proto/kyve/stakers/v1beta1/tx.proto b/proto/kyve/stakers/v1beta1/tx.proto index d765a2e2..0eff77a0 100644 --- a/proto/kyve/stakers/v1beta1/tx.proto +++ b/proto/kyve/stakers/v1beta1/tx.proto @@ -67,8 +67,8 @@ message MsgJoinPool { string creator = 1; // pool_id ... uint64 pool_id = 2; - // valaddress ... - string valaddress = 3; + // pool_address ... + string pool_address = 3; // amount ... uint64 amount = 4; // commission ... diff --git a/x/bundles/keeper/logic_bundles.go b/x/bundles/keeper/logic_bundles.go index e2a18130..efe19348 100644 --- a/x/bundles/keeper/logic_bundles.go +++ b/x/bundles/keeper/logic_bundles.go @@ -59,7 +59,7 @@ func (k Keeper) AssertCanVote(ctx sdk.Context, poolId uint64, staker string, vot } // Check if sender is a staker in pool - if err := k.stakerKeeper.AssertValaccountAuthorized(ctx, poolId, staker, voter); err != nil { + if err := k.stakerKeeper.AssertPoolAccountAuthorized(ctx, staker, poolId, voter); err != nil { return err } @@ -99,7 +99,7 @@ func (k Keeper) AssertCanPropose(ctx sdk.Context, poolId uint64, staker string, } // Check if sender is a staker in pool - if err := k.stakerKeeper.AssertValaccountAuthorized(ctx, poolId, staker, proposer); err != nil { + if err := k.stakerKeeper.AssertPoolAccountAuthorized(ctx, staker, poolId, proposer); err != nil { return err } @@ -162,16 +162,16 @@ func (k Keeper) validateSubmitBundleArgs(ctx sdk.Context, bundleProposal *types. // slashDelegatorsAndRemoveStaker slashes a staker with a certain slashType and all including // delegators and removes him from the storage pool -func (k Keeper) slashDelegatorsAndRemoveStaker(ctx sdk.Context, poolId uint64, stakerAddress string, slashType stakersTypes.SlashType) { +func (k Keeper) slashDelegatorsAndRemoveStaker(ctx sdk.Context, stakerAddress string, poolId uint64, slashType stakersTypes.SlashType) { k.stakerKeeper.Slash(ctx, poolId, stakerAddress, slashType) k.stakerKeeper.LeavePool(ctx, stakerAddress, poolId) } -// resetPoints resets the points from a valaccount to zero -func (k Keeper) resetPoints(ctx sdk.Context, poolId uint64, stakerAddress string) { - previousPoints := k.stakerKeeper.ResetPoints(ctx, poolId, stakerAddress) +// resetPoints resets the points from a pool account to zero +func (k Keeper) resetPoints(ctx sdk.Context, stakerAddress string, poolId uint64) { + previousPoints := k.stakerKeeper.ResetPoints(ctx, stakerAddress, poolId) - // only reset points if valaccount has at least a point + // only reset points if pool account has at least a point if previousPoints > 0 { _ = ctx.EventManager().EmitTypedEvent(&types.EventPointsReset{ PoolId: poolId, @@ -180,11 +180,11 @@ func (k Keeper) resetPoints(ctx sdk.Context, poolId uint64, stakerAddress string } } -// addPoint increases the points of a valaccount with one and automatically +// addPoint increases the points of a pool account with one and automatically // slashes and removes the staker once he reaches max points -func (k Keeper) addPoint(ctx sdk.Context, poolId uint64, stakerAddress string) { +func (k Keeper) addPoint(ctx sdk.Context, stakerAddress string, poolId uint64) { // Add one point to staker in given pool - points := k.stakerKeeper.IncrementPoints(ctx, poolId, stakerAddress) + points := k.stakerKeeper.IncrementPoints(ctx, stakerAddress, poolId) _ = ctx.EventManager().EmitTypedEvent(&types.EventPointIncreased{ PoolId: poolId, @@ -194,8 +194,8 @@ func (k Keeper) addPoint(ctx sdk.Context, poolId uint64, stakerAddress string) { if points >= k.GetMaxPoints(ctx) { // slash all delegators with a timeout slash and remove staker from pool. - // points are reset due to the valaccount being deleted while leaving the pool - k.slashDelegatorsAndRemoveStaker(ctx, poolId, stakerAddress, stakersTypes.SLASH_TYPE_TIMEOUT) + // points are reset due to the pool account being deleted while leaving the pool + k.slashDelegatorsAndRemoveStaker(ctx, stakerAddress, poolId, stakersTypes.SLASH_TYPE_TIMEOUT) } } @@ -221,7 +221,7 @@ func (k Keeper) handleNonVoters(ctx sdk.Context, poolId uint64) { for _, staker := range k.stakerKeeper.GetAllStakerAddressesOfPool(ctx, poolId) { if !voters[staker] { - k.addPoint(ctx, poolId, staker) + k.addPoint(ctx, staker, poolId) } } } @@ -583,7 +583,7 @@ func (k Keeper) tallyBundleProposal(ctx sdk.Context, bundleProposal types.Bundle // slash stakers who voted incorrectly for _, voter := range bundleProposal.VotersInvalid { - k.slashDelegatorsAndRemoveStaker(ctx, poolId, voter, stakersTypes.SLASH_TYPE_VOTE) + k.slashDelegatorsAndRemoveStaker(ctx, voter, poolId, stakersTypes.SLASH_TYPE_VOTE) } return types.TallyResult{ @@ -602,9 +602,9 @@ func (k Keeper) tallyBundleProposal(ctx sdk.Context, bundleProposal types.Bundle // slash stakers who voted incorrectly - uploader receives upload slash for _, voter := range bundleProposal.VotersValid { if voter == bundleProposal.Uploader { - k.slashDelegatorsAndRemoveStaker(ctx, poolId, voter, stakersTypes.SLASH_TYPE_UPLOAD) + k.slashDelegatorsAndRemoveStaker(ctx, voter, poolId, stakersTypes.SLASH_TYPE_UPLOAD) } else { - k.slashDelegatorsAndRemoveStaker(ctx, poolId, voter, stakersTypes.SLASH_TYPE_VOTE) + k.slashDelegatorsAndRemoveStaker(ctx, voter, poolId, stakersTypes.SLASH_TYPE_VOTE) } } diff --git a/x/bundles/keeper/logic_end_block_handle_upload_timeout.go b/x/bundles/keeper/logic_end_block_handle_upload_timeout.go index 338b3e5b..0523994d 100644 --- a/x/bundles/keeper/logic_end_block_handle_upload_timeout.go +++ b/x/bundles/keeper/logic_end_block_handle_upload_timeout.go @@ -111,10 +111,10 @@ func (k Keeper) HandleUploadTimeout(goCtx context.Context) { k.SetBundleProposal(ctx, bundleProposal) } - // Now we increase the points of the valaccount + // Now we increase the points of the pool account // (if he is still active in the pool) - if _, active := k.stakerKeeper.GetValaccount(ctx, pool.Id, timedoutUploader); active { - k.addPoint(ctx, pool.Id, timedoutUploader) + if _, active := k.stakerKeeper.GetPoolAccount(ctx, timedoutUploader, pool.Id); active { + k.addPoint(ctx, timedoutUploader, pool.Id) } } } diff --git a/x/bundles/keeper/msg_server_claim_uploader_role.go b/x/bundles/keeper/msg_server_claim_uploader_role.go index f0cf3985..1aeccdc7 100644 --- a/x/bundles/keeper/msg_server_claim_uploader_role.go +++ b/x/bundles/keeper/msg_server_claim_uploader_role.go @@ -24,7 +24,7 @@ func (k msgServer) ClaimUploaderRole( return nil, poolErr } - if err := k.stakerKeeper.AssertValaccountAuthorized(ctx, msg.PoolId, msg.Staker, msg.Creator); err != nil { + if err := k.stakerKeeper.AssertPoolAccountAuthorized(ctx, msg.Staker, msg.PoolId, msg.Creator); err != nil { return nil, err } diff --git a/x/bundles/keeper/msg_server_skip_uploader_role.go b/x/bundles/keeper/msg_server_skip_uploader_role.go index 66da8df7..14df948f 100644 --- a/x/bundles/keeper/msg_server_skip_uploader_role.go +++ b/x/bundles/keeper/msg_server_skip_uploader_role.go @@ -18,7 +18,7 @@ func (k msgServer) SkipUploaderRole(goCtx context.Context, msg *types.MsgSkipUpl bundleProposal, _ := k.GetBundleProposal(ctx, msg.PoolId) // reset points of uploader as node has proven to be active - k.resetPoints(ctx, msg.PoolId, msg.Staker) + k.resetPoints(ctx, msg.Staker, msg.PoolId) // If previous bundle was dropped just skip uploader role // No previous round needs to be evaluated diff --git a/x/bundles/keeper/msg_server_submit_bundle_proposal.go b/x/bundles/keeper/msg_server_submit_bundle_proposal.go index b37ffd48..d9c183aa 100644 --- a/x/bundles/keeper/msg_server_submit_bundle_proposal.go +++ b/x/bundles/keeper/msg_server_submit_bundle_proposal.go @@ -23,7 +23,7 @@ func (k msgServer) SubmitBundleProposal(goCtx context.Context, msg *types.MsgSub } // Reset points of uploader as node has proven to be active. - k.resetPoints(ctx, msg.PoolId, msg.Staker) + k.resetPoints(ctx, msg.Staker, msg.PoolId) // If previous bundle was dropped just register the new bundle. // No previous round needs to be evaluated diff --git a/x/bundles/keeper/msg_server_vote_bundle_proposal.go b/x/bundles/keeper/msg_server_vote_bundle_proposal.go index f2978713..b020861f 100644 --- a/x/bundles/keeper/msg_server_vote_bundle_proposal.go +++ b/x/bundles/keeper/msg_server_vote_bundle_proposal.go @@ -46,7 +46,7 @@ func (k msgServer) VoteBundleProposal( k.SetBundleProposal(ctx, bundleProposal) // reset points as user has now proven to be active - k.resetPoints(ctx, msg.PoolId, msg.Staker) + k.resetPoints(ctx, msg.Staker, msg.PoolId) // Emit a vote event. _ = ctx.EventManager().EmitTypedEvent(&types.EventBundleVote{ diff --git a/x/bundles/types/expected_keepers.go b/x/bundles/types/expected_keepers.go index b6e24525..17b2e95d 100644 --- a/x/bundles/types/expected_keepers.go +++ b/x/bundles/types/expected_keepers.go @@ -29,16 +29,16 @@ type PoolKeeper interface { type StakerKeeper interface { GetAllStakerAddressesOfPool(ctx sdk.Context, poolId uint64) (stakers []string) - AssertValaccountAuthorized(ctx sdk.Context, poolId uint64, stakerAddress string, valaddress string) error + AssertPoolAccountAuthorized(ctx sdk.Context, stakerAddress string, poolId uint64, poolAddress string) error - GetValaccount(ctx sdk.Context, poolId uint64, stakerAddress string) (valaccount stakersTypes.PoolAccount, active bool) + GetPoolAccount(ctx sdk.Context, stakerAddress string, poolId uint64) (valaccount stakersTypes.PoolAccount, active bool) - LeavePool(ctx sdk.Context, staker string, poolId uint64) + LeavePool(ctx sdk.Context, stakerAddress string, poolId uint64) - IncrementPoints(ctx sdk.Context, poolId uint64, stakerAddress string) (newPoints uint64) - ResetPoints(ctx sdk.Context, poolId uint64, stakerAddress string) (previousPoints uint64) + IncrementPoints(ctx sdk.Context, stakerAddress string, poolId uint64) (newPoints uint64) + ResetPoints(ctx sdk.Context, stakerAddress string, poolId uint64) (previousPoints uint64) - GetValidator(ctx sdk.Context, staker string) (stakingtypes.Validator, bool) + GetValidator(ctx sdk.Context, stakerAddress string) (stakingtypes.Validator, bool) GetValidatorPoolCommission(ctx sdk.Context, staker string, poolId uint64) math.LegacyDec GetValidatorPoolStake(ctx sdk.Context, staker string, poolId uint64) uint64 GetTotalStakeOfPool(ctx sdk.Context, poolId uint64) (totalStake uint64) diff --git a/x/delegation/keeper/msg_server_redelegate.go b/x/delegation/keeper/msg_server_redelegate.go index f53d376a..6036344e 100644 --- a/x/delegation/keeper/msg_server_redelegate.go +++ b/x/delegation/keeper/msg_server_redelegate.go @@ -27,7 +27,7 @@ func (k msgServer) Redelegate(goCtx context.Context, msg *types.MsgRedelegate) ( return nil, sdkErrors.WithType(types.ErrStakerDoesNotExist, msg.ToStaker) } - if len(k.stakersKeeper.GetValaccountsFromStaker(ctx, msg.ToStaker)) == 0 { + if len(k.stakersKeeper.GetPoolAccountsFromStaker(ctx, msg.ToStaker)) == 0 { return nil, sdkErrors.WithType(types.ErrRedelegationToInactiveStaker, msg.ToStaker) } diff --git a/x/delegation/types/expected_keepers.go b/x/delegation/types/expected_keepers.go index f6ee7689..cd7986bd 100644 --- a/x/delegation/types/expected_keepers.go +++ b/x/delegation/types/expected_keepers.go @@ -35,7 +35,7 @@ type UpgradeKeeper interface { type StakersKeeper interface { DoesStakerExist(ctx sdk.Context, staker string) bool GetAllStakerAddressesOfPool(ctx sdk.Context, poolId uint64) (stakers []string) - GetValaccountsFromStaker(ctx sdk.Context, stakerAddress string) (val []*stakerstypes.PoolAccount) + GetPoolAccountsFromStaker(ctx sdk.Context, stakerAddress string) (val []*stakerstypes.PoolAccount) GetPoolCount(ctx sdk.Context, stakerAddress string) (poolCount uint64) GetActiveStakers(ctx sdk.Context) []string } diff --git a/x/query/client/cli/query_can_validate.go b/x/query/client/cli/query_can_validate.go index b2f42171..a7c1fda7 100644 --- a/x/query/client/cli/query_can_validate.go +++ b/x/query/client/cli/query_can_validate.go @@ -14,8 +14,8 @@ var _ = strconv.Itoa(0) func CmdCanValidate() *cobra.Command { cmd := &cobra.Command{ - Use: "can-validate [pool_id] [valaddress]", - Short: "Query if current valaddress can vote in pool", + Use: "can-validate [pool_id] [pool_address]", + Short: "Query if current pool address can vote in pool", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { reqId, err := cast.ToUint64E(args[0]) @@ -31,8 +31,8 @@ func CmdCanValidate() *cobra.Command { queryClient := types.NewQueryBundlesClient(clientCtx) params := &types.QueryCanValidateRequest{ - PoolId: reqId, - Valaddress: args[1], + PoolId: reqId, + PoolAddress: args[1], } res, err := queryClient.CanValidate(cmd.Context(), params) diff --git a/x/query/keeper/grpc_query_can_validate.go b/x/query/keeper/grpc_query_can_validate.go index 9617ea48..cb198289 100644 --- a/x/query/keeper/grpc_query_can_validate.go +++ b/x/query/keeper/grpc_query_can_validate.go @@ -26,9 +26,9 @@ func (k Keeper) CanValidate(c context.Context, req *types.QueryCanValidateReques var staker string // Check if valaddress has a valaccount in pool - for _, valaccount := range k.stakerKeeper.GetAllValaccountsOfPool(ctx, req.PoolId) { - if valaccount.Valaddress == req.Valaddress { - staker = valaccount.Staker + for _, poolAccount := range k.stakerKeeper.GetAllPoolAccountsOfPool(ctx, req.PoolId) { + if poolAccount.PoolAddress == req.PoolAddress { + staker = poolAccount.Staker break } } diff --git a/x/query/keeper/grpc_query_stakers_by_pool.go b/x/query/keeper/grpc_query_stakers_by_pool.go index d62aa750..b89b1af4 100644 --- a/x/query/keeper/grpc_query_stakers_by_pool.go +++ b/x/query/keeper/grpc_query_stakers_by_pool.go @@ -24,9 +24,9 @@ func (k Keeper) StakersByPool(c context.Context, req *types.QueryStakersByPoolRe stakers := make([]types.FullStaker, 0) - valaccounts := k.stakerKeeper.GetAllValaccountsOfPool(ctx, req.PoolId) - for _, valaccount := range valaccounts { - stakers = append(stakers, *k.GetFullStaker(ctx, valaccount.Staker)) + poolAccounts := k.stakerKeeper.GetAllPoolAccountsOfPool(ctx, req.PoolId) + for _, poolAccount := range poolAccounts { + stakers = append(stakers, *k.GetFullStaker(ctx, poolAccount.Staker)) } stakes := k.stakerKeeper.GetValidatorPoolStakes(ctx, req.PoolId) diff --git a/x/query/keeper/helper.go b/x/query/keeper/helper.go index 0105ff2f..e24f3ef6 100644 --- a/x/query/keeper/helper.go +++ b/x/query/keeper/helper.go @@ -13,13 +13,13 @@ func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.Full var poolMemberships []*types.PoolMembership totalPoolStake := uint64(0) - for _, valaccount := range k.stakerKeeper.GetValaccountsFromStaker(ctx, stakerAddress) { - pool, _ := k.poolKeeper.GetPool(ctx, valaccount.PoolId) + for _, poolAccount := range k.stakerKeeper.GetPoolAccountsFromStaker(ctx, stakerAddress) { + pool, _ := k.poolKeeper.GetPool(ctx, poolAccount.PoolId) - accountValaddress, _ := sdk.AccAddressFromBech32(valaccount.Valaddress) + accountValaddress, _ := sdk.AccAddressFromBech32(poolAccount.PoolAddress) balanceValaccount := k.bankKeeper.GetBalance(ctx, accountValaddress, globalTypes.Denom).Amount.Uint64() - commissionChange, found := k.stakerKeeper.GetCommissionChangeEntryByIndex2(ctx, stakerAddress, valaccount.PoolId) + commissionChange, found := k.stakerKeeper.GetCommissionChangeEntryByIndex2(ctx, stakerAddress, poolAccount.PoolId) var commissionChangeEntry *types.CommissionChangeEntry = nil if found { commissionChangeEntry = &types.CommissionChangeEntry{ @@ -28,7 +28,7 @@ func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.Full } } - stakeFractionChange, found := k.stakerKeeper.GetStakeFractionChangeEntryByIndex2(ctx, stakerAddress, valaccount.PoolId) + stakeFractionChange, found := k.stakerKeeper.GetStakeFractionChangeEntryByIndex2(ctx, stakerAddress, poolAccount.PoolId) var stakeFractionChangeEntry *types.StakeFractionChangeEntry = nil if found { stakeFractionChangeEntry = &types.StakeFractionChangeEntry{ @@ -53,13 +53,13 @@ func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.Full TotalStake: k.stakerKeeper.GetTotalStakeOfPool(ctx, pool.Id), Status: k.GetPoolStatus(ctx, &pool), }, - Points: valaccount.Points, - IsLeaving: valaccount.IsLeaving, - Valaddress: valaccount.Valaddress, + Points: poolAccount.Points, + IsLeaving: poolAccount.IsLeaving, + PoolAddress: poolAccount.PoolAddress, Balance: balanceValaccount, - Commission: valaccount.Commission, + Commission: poolAccount.Commission, PendingCommissionChange: commissionChangeEntry, - StakeFraction: valaccount.StakeFraction, + StakeFraction: poolAccount.StakeFraction, PendingStakeFractionChange: stakeFractionChangeEntry, PoolStake: poolStake, }, diff --git a/x/query/types/bundles.pb.go b/x/query/types/bundles.pb.go index 67a13817..5ee44df5 100644 --- a/x/query/types/bundles.pb.go +++ b/x/query/types/bundles.pb.go @@ -747,8 +747,8 @@ func (m *QueryCurrentVoteStatusResponse) GetTotal() uint64 { type QueryCanValidateRequest struct { // pool_id defines the unique ID of the pool. PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // valaddress ... - Valaddress string `protobuf:"bytes,2,opt,name=valaddress,proto3" json:"valaddress,omitempty"` + // pool_address ... + PoolAddress string `protobuf:"bytes,2,opt,name=pool_address,json=poolAddress,proto3" json:"pool_address,omitempty"` } func (m *QueryCanValidateRequest) Reset() { *m = QueryCanValidateRequest{} } @@ -791,9 +791,9 @@ func (m *QueryCanValidateRequest) GetPoolId() uint64 { return 0 } -func (m *QueryCanValidateRequest) GetValaddress() string { +func (m *QueryCanValidateRequest) GetPoolAddress() string { if m != nil { - return m.Valaddress + return m.PoolAddress } return "" } @@ -1130,83 +1130,82 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/bundles.proto", fileDescriptor_b49b126c38ac815c) } var fileDescriptor_b49b126c38ac815c = []byte{ - // 1201 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xba, 0x8e, 0x7f, 0x3c, 0x37, 0xf9, 0xb6, 0xd3, 0x24, 0xdd, 0xba, 0xa9, 0x93, 0xee, - 0x57, 0x90, 0x28, 0x45, 0xde, 0x26, 0x3d, 0x40, 0x4f, 0x88, 0xb4, 0x84, 0xba, 0x2d, 0x55, 0xd8, - 0x48, 0x91, 0xe0, 0x80, 0x35, 0xf6, 0x4e, 0xec, 0x55, 0xec, 0x9d, 0xed, 0xce, 0xd8, 0xad, 0x89, - 0x2c, 0x21, 0xc4, 0x89, 0x13, 0x12, 0x42, 0x88, 0x1b, 0x82, 0x13, 0xdc, 0x39, 0x70, 0xe3, 0xd8, - 0x63, 0x25, 0x2e, 0x88, 0x43, 0x85, 0x12, 0xfe, 0x10, 0x34, 0x3f, 0x76, 0xbd, 0x71, 0xec, 0x38, - 0x2d, 0x47, 0xb8, 0xf9, 0xbd, 0x79, 0xef, 0xcd, 0xe7, 0xbd, 0x7d, 0x9f, 0x8f, 0x77, 0x61, 0x79, - 0xbf, 0xd7, 0x25, 0xf6, 0xe3, 0x0e, 0x09, 0x7b, 0x76, 0x77, 0xbd, 0x46, 0x38, 0x5e, 0xb7, 0x6b, - 0x1d, 0xdf, 0x6d, 0x11, 0x56, 0x0e, 0x42, 0xca, 0x29, 0x42, 0x22, 0xa2, 0x2c, 0x23, 0xca, 0x3a, - 0xa2, 0xb8, 0x56, 0xa7, 0xac, 0x4d, 0x99, 0x5d, 0xc3, 0x6c, 0x38, 0x39, 0xc0, 0x0d, 0xcf, 0xc7, - 0xdc, 0xa3, 0xbe, 0xca, 0x2f, 0xce, 0x35, 0x68,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0xc6, 0xa5, 0xea, 0xad, 0x9a, 0x83, - 0x69, 0x29, 0x38, 0x3a, 0x53, 0x19, 0xc8, 0x84, 0xac, 0xe7, 0x2b, 0xbf, 0xda, 0xab, 0xc8, 0x14, - 0x27, 0xb8, 0xc6, 0x38, 0xf6, 0x7c, 0xb9, 0x59, 0x69, 0x27, 0x32, 0x45, 0x25, 0xa9, 0x3a, 0x72, - 0xa9, 0xd2, 0x8e, 0x32, 0x2c, 0x07, 0x2e, 0x2b, 0x04, 0xd8, 0xdf, 0x15, 0x05, 0x30, 0x9f, 0x4c, - 0x8d, 0x12, 0x40, 0x17, 0xb7, 0xb0, 0xeb, 0x8a, 0x69, 0x6a, 0xa1, 0x4d, 0x78, 0xac, 0x47, 0x60, - 0x9e, 0xac, 0xa9, 0xfb, 0x29, 0x42, 0x2e, 0xa0, 0x8c, 0x79, 0xb5, 0x16, 0x91, 0x55, 0x73, 0x4e, - 0x6c, 0xa3, 0x05, 0xc8, 0x84, 0x04, 0x33, 0xcd, 0xf7, 0xbc, 0xa3, 0x2d, 0xeb, 0x73, 0x03, 0x16, - 0xa2, 0x82, 0xdb, 0x21, 0x0d, 0x28, 0x9b, 0x8c, 0x71, 0x01, 0x32, 0xf2, 0x29, 0x85, 0x51, 0x2d, - 0x65, 0xc9, 0xfb, 0x55, 0x89, 0x50, 0x53, 0x2f, 0xb6, 0x87, 0xd8, 0x95, 0x1e, 0x62, 0x97, 0xf5, - 0xfe, 0x60, 0x54, 0x31, 0x8a, 0x7f, 0xd0, 0xd5, 0x01, 0x5c, 0x8a, 0xa7, 0x44, 0xf9, 0xab, 0x77, - 0x24, 0x36, 0x84, 0xf2, 0xb8, 0x1d, 0x65, 0x0c, 0x89, 0x4c, 0x7a, 0x48, 0x64, 0xac, 0xfb, 0x30, - 0x77, 0xfc, 0xf2, 0x57, 0x6f, 0x64, 0xe3, 0x87, 0x1c, 0x9c, 0x97, 0xc5, 0x22, 0xed, 0xfe, 0xce, - 0x80, 0xf9, 0x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x83, 0x81, 0x40, 0xf5, 0xd1, 0x4f, 0x06, - 0x64, 0x35, 0x81, 0xd1, 0xca, 0xa9, 0x63, 0x1b, 0xe8, 0x4b, 0x71, 0x75, 0x72, 0xa0, 0x86, 0xfc, - 0x50, 0x42, 0xde, 0x42, 0x77, 0xc7, 0xce, 0x96, 0xf2, 0xd1, 0x78, 0xa5, 0x04, 0x49, 0x47, 0xa4, - 0x40, 0xfd, 0xcd, 0xbb, 0xcf, 0x0e, 0x4b, 0xc6, 0xf3, 0xc3, 0x92, 0xf1, 0xe7, 0x61, 0xc9, 0xf8, - 0xf2, 0xa8, 0x34, 0xf5, 0xfc, 0xa8, 0x34, 0xf5, 0xfb, 0x51, 0x69, 0xea, 0xa3, 0xb5, 0x86, 0xc7, - 0x9b, 0x9d, 0x5a, 0xb9, 0x4e, 0xdb, 0xf6, 0x83, 0x0f, 0x77, 0xdf, 0x7d, 0x44, 0xf8, 0x13, 0x1a, - 0xee, 0xdb, 0xf5, 0x26, 0xf6, 0x7c, 0xfb, 0xa9, 0xbe, 0x98, 0xf7, 0x02, 0xc2, 0x6a, 0x19, 0xf9, - 0xe1, 0x78, 0xeb, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8, 0xab, 0x99, 0xc4, 0xd0, 0x0e, 0x00, - 0x00, + // 1199 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xba, 0x8e, 0x3f, 0x9e, 0x93, 0xd0, 0x4e, 0xd3, 0x76, 0xeb, 0xa6, 0x4e, 0xb2, 0x08, + 0x12, 0xa5, 0x68, 0xb7, 0x49, 0x2f, 0x54, 0x9c, 0x92, 0x96, 0x50, 0xb7, 0xa5, 0x0a, 0x1b, 0x11, + 0x09, 0x0e, 0x58, 0x63, 0xef, 0xc4, 0x5e, 0xc5, 0xde, 0xd9, 0xee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x39, 0xef, 0xe6, 0xb5, 0xa6, 0xec, 0xa1, 0x22, 0xe4, 0xda, 0x61, 0x93, 0x62, 0x8f, + 0x44, 0x66, 0x5a, 0x1a, 0x63, 0x59, 0x84, 0xee, 0x46, 0xb4, 0x55, 0xf1, 0x03, 0x8f, 0x3c, 0x35, + 0x27, 0x65, 0xca, 0xbc, 0xd0, 0x94, 0x85, 0x02, 0x5d, 0x85, 0x1c, 0xa7, 0xda, 0x98, 0x91, 0xc6, + 0x2c, 0xa7, 0xb1, 0x49, 0x46, 0xee, 0x91, 0xae, 0x59, 0x90, 0x59, 0xb3, 0x42, 0x7e, 0x40, 0xba, + 0xe8, 0x12, 0x64, 0x38, 0x95, 0x86, 0xac, 0x34, 0x4c, 0x72, 0x2a, 0xd4, 0x6f, 0xc0, 0x8c, 0x1a, + 0x74, 0x85, 0xb5, 0x5b, 0x2d, 0x1c, 0x75, 0xcd, 0x9c, 0x34, 0x4f, 0x2b, 0xed, 0xb6, 0x52, 0xa2, + 0x6b, 0x90, 0xf7, 0x30, 0xc7, 0x95, 0x06, 0x66, 0x0d, 0x33, 0xaf, 0xf0, 0x0a, 0xc5, 0x3d, 0xcc, + 0x1a, 0x68, 0x03, 0xa6, 0x76, 0x7b, 0x63, 0xaa, 0x60, 0x6e, 0xc2, 0x82, 0xb1, 0x5c, 0x58, 0x9b, + 0xb7, 0x4f, 0x3e, 0x32, 0x3b, 0x1e, 0xe7, 0x3a, 0x77, 0x0b, 0xbb, 0x7d, 0x01, 0xd9, 0x70, 0xb1, + 0x37, 0xae, 0x30, 0xa2, 0x1d, 0xdf, 0x23, 0x91, 0x98, 0xdb, 0x94, 0xec, 0xef, 0x82, 0x36, 0x6d, + 0x69, 0x4b, 0xd9, 0x13, 0xb8, 0x6b, 0xb4, 0x15, 0x46, 0x84, 0x31, 0x9f, 0x06, 0xc2, 0x75, 0x5a, + 0xba, 0x4e, 0x27, 0xb4, 0x65, 0x0f, 0xdd, 0x83, 0x19, 0xc6, 0xf1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0x46, + 0xbb, 0x6a, 0xd7, 0x68, 0xcb, 0x79, 0xf0, 0xd1, 0xce, 0xbb, 0x8f, 0x08, 0x7f, 0x42, 0xa3, 0x3d, + 0xa7, 0xd6, 0xc0, 0x7e, 0xe0, 0x3c, 0xd5, 0x85, 0x79, 0x37, 0x24, 0xac, 0x9a, 0x91, 0x5f, 0x8f, + 0xb7, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x2b, 0x1b, 0x05, 0xd5, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2029,10 +2028,10 @@ func (m *QueryCanValidateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if len(m.Valaddress) > 0 { - i -= len(m.Valaddress) - copy(dAtA[i:], m.Valaddress) - i = encodeVarintBundles(dAtA, i, uint64(len(m.Valaddress))) + if len(m.PoolAddress) > 0 { + i -= len(m.PoolAddress) + copy(dAtA[i:], m.PoolAddress) + i = encodeVarintBundles(dAtA, i, uint64(len(m.PoolAddress))) i-- dAtA[i] = 0x12 } @@ -2519,7 +2518,7 @@ func (m *QueryCanValidateRequest) Size() (n int) { if m.PoolId != 0 { n += 1 + sovBundles(uint64(m.PoolId)) } - l = len(m.Valaddress) + l = len(m.PoolAddress) if l > 0 { n += 1 + l + sovBundles(uint64(l)) } @@ -4313,7 +4312,7 @@ func (m *QueryCanValidateRequest) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valaddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4341,7 +4340,7 @@ func (m *QueryCanValidateRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Valaddress = string(dAtA[iNdEx:postIndex]) + m.PoolAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/query/types/bundles.pb.gw.go b/x/query/types/bundles.pb.gw.go index a9b34985..6b47b48e 100644 --- a/x/query/types/bundles.pb.gw.go +++ b/x/query/types/bundles.pb.gw.go @@ -257,15 +257,15 @@ func request_QueryBundles_CanValidate_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) } - val, ok = pathParams["valaddress"] + val, ok = pathParams["pool_address"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "valaddress") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_address") } - protoReq.Valaddress, err = runtime.String(val) + protoReq.PoolAddress, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "valaddress", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_address", err) } msg, err := client.CanValidate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -295,15 +295,15 @@ func local_request_QueryBundles_CanValidate_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) } - val, ok = pathParams["valaddress"] + val, ok = pathParams["pool_address"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "valaddress") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_address") } - protoReq.Valaddress, err = runtime.String(val) + protoReq.PoolAddress, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "valaddress", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_address", err) } msg, err := server.CanValidate(ctx, &protoReq) @@ -866,7 +866,7 @@ var ( pattern_QueryBundles_CurrentVoteStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"kyve", "query", "v1beta1", "current_vote_status", "pool_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_QueryBundles_CanValidate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"kyve", "query", "v1beta1", "can_validate", "pool_id", "valaddress"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_QueryBundles_CanValidate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"kyve", "query", "v1beta1", "can_validate", "pool_id", "pool_address"}, "", runtime.AssumeColonVerbOpt(true))) pattern_QueryBundles_CanPropose_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7}, []string{"kyve", "query", "v1beta1", "can_propose", "pool_id", "staker", "proposer", "from_index"}, "", runtime.AssumeColonVerbOpt(true))) diff --git a/x/query/types/query.pb.go b/x/query/types/query.pb.go index 40a905af..ade83b9b 100644 --- a/x/query/types/query.pb.go +++ b/x/query/types/query.pb.go @@ -336,11 +336,11 @@ type PoolMembership struct { // a PoolLeave entry. After the leave-time is over // the staker will no longer participate in that pool IsLeaving bool `protobuf:"varint,3,opt,name=is_leaving,json=isLeaving,proto3" json:"is_leaving,omitempty"` - // Valaddress is the address which is authorized to vote + // pool address is the address which is authorized to vote // and submit bundles. If the server gets compromised - // the staker can just change the valaddress. - Valaddress string `protobuf:"bytes,4,opt,name=valaddress,proto3" json:"valaddress,omitempty"` - // balance is the valaddress account balance and indicates + // the staker can just change the pool address . + PoolAddress string `protobuf:"bytes,4,opt,name=pool_address,json=poolAddress,proto3" json:"pool_address,omitempty"` + // balance is the pool address account balance and indicates // whether or not the valaccount needs additional funds to // pay for gas fees Balance uint64 `protobuf:"varint,5,opt,name=balance,proto3" json:"balance,omitempty"` @@ -423,9 +423,9 @@ func (m *PoolMembership) GetIsLeaving() bool { return false } -func (m *PoolMembership) GetValaddress() string { +func (m *PoolMembership) GetPoolAddress() string { if m != nil { - return m.Valaddress + return m.PoolAddress } return "" } @@ -469,59 +469,59 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/query.proto", fileDescriptor_6b41255feae93a15) } var fileDescriptor_6b41255feae93a15 = []byte{ - // 825 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x1b, 0x6f, 0x5a, 0x4f, 0xd8, 0x00, 0xa3, 0x65, 0xf1, 0x16, 0xea, 0x84, 0x2c, 0x12, - 0x61, 0x05, 0xb6, 0x5a, 0xb4, 0x12, 0x37, 0xa4, 0xa4, 0x5b, 0x09, 0x58, 0x10, 0x72, 0xa5, 0x45, - 0xcb, 0xc5, 0x9a, 0xd8, 0x53, 0x67, 0x14, 0x7b, 0xc6, 0xf5, 0x4c, 0x52, 0x72, 0xe4, 0xcc, 0x85, - 0x8f, 0x81, 0x10, 0x07, 0x3e, 0x00, 0x1f, 0xa0, 0x12, 0x97, 0x1e, 0x11, 0x87, 0x82, 0xda, 0x03, - 0x5f, 0x03, 0xcd, 0xbf, 0x34, 0x2d, 0x41, 0x2a, 0xbd, 0xb4, 0xf3, 0xde, 0xfb, 0xcd, 0x7b, 0xbf, - 0xf7, 0x7e, 0x6f, 0x62, 0x10, 0x4c, 0x17, 0x73, 0x1c, 0x1d, 0xcf, 0x70, 0xbd, 0x88, 0xe6, 0xbb, - 0x63, 0x2c, 0xd0, 0xae, 0xb6, 0xc2, 0xaa, 0x66, 0x82, 0x41, 0x28, 0xe3, 0xa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xa3, - 0x02, 0xd1, 0x14, 0xab, 0xc7, 0xeb, 0xc6, 0xd6, 0xbc, 0x21, 0x57, 0xeb, 0x6e, 0x72, 0x61, 0xf0, - 0xa8, 0xc2, 0x34, 0x23, 0x34, 0x4f, 0xae, 0xbc, 0x49, 0xaa, 0xe4, 0xf0, 0x37, 0x55, 0xf7, 0xef, - 0xaf, 0xeb, 0x7e, 0xed, 0x06, 0xc5, 0x6f, 0x9a, 0x5c, 0x37, 0xa3, 0x6b, 0x34, 0xdd, 0xba, 0xb3, - 0xa6, 0x0c, 0xec, 0x58, 0xca, 0xd7, 0x73, 0x5a, 0xda, 0x9e, 0xa2, 0xfd, 0xc1, 0x3a, 0xda, 0xff, - 0xb5, 0x74, 0xf1, 0xb6, 0x49, 0xb9, 0x06, 0x20, 0x15, 0x5c, 0x79, 0x8f, 0x40, 0xa9, 0xe0, 0x55, - 0xf6, 0x29, 0x0e, 0xf7, 0x4f, 0x2f, 0x02, 0xe7, 0xec, 0x22, 0x70, 0xfe, 0xba, 0x08, 0x9c, 0x1f, - 0x2e, 0x83, 0xc6, 0xd9, 0x65, 0xd0, 0xf8, 0xfd, 0x32, 0x68, 0x7c, 0xf3, 0x64, 0xe5, 0xb7, 0xec, - 0xf3, 0x97, 0x2f, 0x9e, 0x7d, 0x89, 0xc5, 0x09, 0xab, 0xa7, 0x51, 0x3a, 0x41, 0x84, 0x46, 0xdf, - 0x9a, 0x4f, 0x98, 0xfa, 0x4d, 0x1b, 0xb7, 0xd4, 0xa7, 0xe1, 0xa3, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x32, 0x03, 0xb7, 0x13, 0xdd, 0x06, 0x00, 0x00, + // 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, 0x27, 0xeb, 0x7d, 0x07, + 0x28, 0x36, 0x42, 0x54, 0x8b, 0x6b, 0xda, 0x30, 0xd1, 0xc1, 0x2f, 0x1d, 0x14, 0x1c, 0x10, 0xc9, + 0xf2, 0xaf, 0x85, 0xa8, 0x70, 0x1f, 0xad, 0xb3, 0x22, 0xf4, 0x76, 0xbd, 0xa1, 0x9f, 0xae, 0xb3, + 0x02, 0x63,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1a, 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, } func (m *BasicPool) Marshal() (dAtA []byte, err error) { @@ -823,10 +823,10 @@ func (m *PoolMembership) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - if len(m.Valaddress) > 0 { - i -= len(m.Valaddress) - copy(dAtA[i:], m.Valaddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Valaddress))) + if len(m.PoolAddress) > 0 { + i -= len(m.PoolAddress) + copy(dAtA[i:], m.PoolAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PoolAddress))) i-- dAtA[i] = 0x22 } @@ -982,7 +982,7 @@ func (m *PoolMembership) Size() (n int) { if m.IsLeaving { n += 2 } - l = len(m.Valaddress) + l = len(m.PoolAddress) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1786,7 +1786,7 @@ func (m *PoolMembership) Unmarshal(dAtA []byte) error { m.IsLeaving = bool(v != 0) case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valaddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1814,7 +1814,7 @@ func (m *PoolMembership) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Valaddress = string(dAtA[iNdEx:postIndex]) + m.PoolAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 0 { diff --git a/x/stakers/client/cli/tx_join_pool.go b/x/stakers/client/cli/tx_join_pool.go index 85bf1988..1c838a9c 100644 --- a/x/stakers/client/cli/tx_join_pool.go +++ b/x/stakers/client/cli/tx_join_pool.go @@ -12,7 +12,7 @@ import ( func CmdJoinPool() *cobra.Command { cmd := &cobra.Command{ - Use: "join-pool [pool_id] [valaddress] [amount] [commission] [stake_fraction]", + Use: "join-pool [pool_id] [pool_address] [amount] [commission] [stake_fraction]", Short: "Broadcast message join-pool", Args: cobra.ExactArgs(5), RunE: func(cmd *cobra.Command, args []string) (err error) { @@ -21,7 +21,7 @@ func CmdJoinPool() *cobra.Command { return err } - argValaddress := args[1] + argPoolAddress := args[1] argAmount, err := cast.ToUint64E(args[2]) if err != nil { @@ -46,7 +46,7 @@ func CmdJoinPool() *cobra.Command { msg := types.MsgJoinPool{ Creator: clientCtx.GetFromAddress().String(), PoolId: argPoolId, - Valaddress: argValaddress, + PoolAddress: argPoolAddress, Amount: argAmount, Commission: argCommission, StakeFraction: argStakeFraction, diff --git a/x/stakers/genesis.go b/x/stakers/genesis.go index ad2a5ee0..0645d60b 100644 --- a/x/stakers/genesis.go +++ b/x/stakers/genesis.go @@ -11,8 +11,8 @@ import ( func InitGenesis(ctx sdk.Context, k *keeper.Keeper, genState types.GenesisState) { k.SetParams(ctx, genState.Params) - for _, entry := range genState.ValaccountList { - k.SetValaccount(ctx, entry) + for _, entry := range genState.PoolAccountList { + k.SetPoolAccount(ctx, entry) k.AddOneToCount(ctx, entry.PoolId) k.AddActiveStaker(ctx, entry.Staker) } @@ -39,7 +39,7 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) - genesis.ValaccountList = k.GetAllValaccounts(ctx) + genesis.PoolAccountList = k.GetAllPoolAccounts(ctx) genesis.CommissionChangeEntries = k.GetAllCommissionChangeEntries(ctx) diff --git a/x/stakers/keeper/exported_functions.go b/x/stakers/keeper/exported_functions.go index 59986098..5f39be74 100644 --- a/x/stakers/keeper/exported_functions.go +++ b/x/stakers/keeper/exported_functions.go @@ -164,8 +164,8 @@ func (k Keeper) IsVotingPowerTooHigh(ctx sdk.Context, poolId uint64) bool { } // GetValidator returns the Cosmos-validator for a given kyve-address. -func (k Keeper) GetValidator(ctx sdk.Context, staker string) (stakingTypes.Validator, bool) { - valAddress, err := sdk.ValAddressFromBech32(util.MustValaddressFromOperatorAddress(staker)) +func (k Keeper) GetValidator(ctx sdk.Context, stakerAddress string) (stakingTypes.Validator, bool) { + valAddress, err := sdk.ValAddressFromBech32(util.MustValaddressFromOperatorAddress(stakerAddress)) if err != nil { return stakingTypes.Validator{}, false } diff --git a/x/stakers/keeper/keeper.go b/x/stakers/keeper/keeper.go index 3efca1a6..4ab1b816 100644 --- a/x/stakers/keeper/keeper.go +++ b/x/stakers/keeper/keeper.go @@ -86,7 +86,8 @@ func (k Keeper) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddre func (k Keeper) AfterValidatorBeginUnbonding(goCtx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { ctx := sdk.UnwrapSDKContext(goCtx) - for _, v := range k.GetValaccountsFromStaker(ctx, valAddr.String()) { + poolAccounts := k.GetPoolAccountsFromStaker(ctx, valAddr.String()) + for _, v := range poolAccounts { k.LeavePool(ctx, v.Staker, v.PoolId) } return nil diff --git a/x/stakers/keeper/logic_commission.go b/x/stakers/keeper/logic_commission.go index f0a6460c..ae6f7089 100644 --- a/x/stakers/keeper/logic_commission.go +++ b/x/stakers/keeper/logic_commission.go @@ -45,14 +45,14 @@ func (k Keeper) ProcessCommissionChangeQueue(ctx sdk.Context) { if queueEntry.CreationDate+int64(k.GetCommissionChangeTime(ctx)) <= ctx.BlockTime().Unix() { k.RemoveCommissionChangeEntry(ctx, &queueEntry) - valaccount, valaccountFound := k.GetValaccount(ctx, queueEntry.PoolId, queueEntry.Staker) - if !valaccountFound { + poolAccount, poolAccountFound := k.GetPoolAccount(ctx, queueEntry.Staker, queueEntry.PoolId) + if !poolAccountFound { // continue with the next entry return true } - valaccount.Commission = queueEntry.Commission - k.SetValaccount(ctx, valaccount) + poolAccount.Commission = queueEntry.Commission + k.SetPoolAccount(ctx, poolAccount) _ = ctx.EventManager().EmitTypedEvent(&types.EventUpdateCommission{ Staker: queueEntry.Staker, diff --git a/x/stakers/keeper/logic_stake_fraction.go b/x/stakers/keeper/logic_stake_fraction.go index 45cc9142..95ff41fc 100644 --- a/x/stakers/keeper/logic_stake_fraction.go +++ b/x/stakers/keeper/logic_stake_fraction.go @@ -45,14 +45,14 @@ func (k Keeper) ProcessStakeFractionChangeQueue(ctx sdk.Context) { if queueEntry.CreationDate+int64(k.GetStakeFractionChangeTime(ctx)) <= ctx.BlockTime().Unix() { k.RemoveStakeFractionEntry(ctx, &queueEntry) - valaccount, valaccountFound := k.GetValaccount(ctx, queueEntry.PoolId, queueEntry.Staker) - if !valaccountFound { + poolAccount, poolAccountFound := k.GetPoolAccount(ctx, queueEntry.Staker, queueEntry.PoolId) + if !poolAccountFound { // continue with the next entry return true } - valaccount.StakeFraction = queueEntry.StakeFraction - k.SetValaccount(ctx, valaccount) + poolAccount.StakeFraction = queueEntry.StakeFraction + k.SetPoolAccount(ctx, poolAccount) _ = ctx.EventManager().EmitTypedEvent(&types.EventUpdateStakeFraction{ Staker: queueEntry.Staker, diff --git a/x/stakers/keeper/msg_server_join_pool.go b/x/stakers/keeper/msg_server_join_pool.go index 0764430b..5870e836 100644 --- a/x/stakers/keeper/msg_server_join_pool.go +++ b/x/stakers/keeper/msg_server_join_pool.go @@ -13,7 +13,7 @@ import ( // JoinPool handles the SDK message of joining a pool. // For joining a pool the staker needs to exist and must not -// be in that pool (even with a different valaccount) +// be in that pool (even with a different pool account) // Second, there must be free slots available or the staker // must have more stake than the lowest staker in that pool. // After the staker joined the pool he is subject to slashing. @@ -44,12 +44,12 @@ func (k msgServer) JoinPool(goCtx context.Context, msg *types.MsgJoinPool) (*typ // Validators are not allowed to use their own address, to prevent // users from putting their validator private key on the protocol node server. - if msg.Creator == msg.Valaddress { - return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrValaddressSameAsStaker.Error()) + if msg.Creator == msg.PoolAddress { + return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrPoolAddressSameAsStaker.Error()) } // Validators are not allowed to join a pool twice. - if _, valaccountFound := k.GetValaccount(ctx, msg.PoolId, msg.Creator); valaccountFound { + if _, poolAccountFound := k.GetPoolAccount(ctx, msg.Creator, msg.PoolId); poolAccountFound { return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrAlreadyJoinedPool.Error()) } @@ -58,34 +58,34 @@ func (k msgServer) JoinPool(goCtx context.Context, msg *types.MsgJoinPool) (*typ return nil, errFreeSlot } - // Every valaddress can only be used for one pool. It is not allowed - // to use the same valaddress for multiple pools. (to avoid account sequence errors, + // Every pool address can only be used for one pool. It is not allowed + // to use the same pool address for multiple pools. (to avoid account sequence errors, // when two processes try so submit transactions simultaneously) - for _, valaccount := range k.GetValaccountsFromStaker(ctx, msg.Creator) { - if valaccount.Valaddress == msg.Valaddress { - return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ValaddressAlreadyUsed.Error()) + for _, poolAccount := range k.GetPoolAccountsFromStaker(ctx, msg.Creator) { + if poolAccount.PoolAddress == msg.PoolAddress { + return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.PoolAddressAlreadyUsed.Error()) } } - // It is not allowed to use the valaddress of somebody else. + // It is not allowed to use the pool address of somebody else. for _, poolStaker := range k.GetAllStakerAddressesOfPool(ctx, msg.PoolId) { - valaccount, _ := k.GetValaccount(ctx, msg.PoolId, poolStaker) + poolAccount, _ := k.GetPoolAccount(ctx, poolStaker, msg.PoolId) - if valaccount.Valaddress == msg.Valaddress { - return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ValaddressAlreadyUsed.Error()) + if poolAccount.PoolAddress == msg.PoolAddress { + return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.PoolAddressAlreadyUsed.Error()) } } - k.AddValaccountToPool(ctx, msg.PoolId, msg.Creator, msg.Valaddress, msg.Commission, msg.StakeFraction) + k.AddPoolAccountToPool(ctx, msg.Creator, msg.PoolId, msg.PoolAddress, msg.Commission, msg.StakeFraction) - if err := util.TransferFromAddressToAddress(k.bankKeeper, ctx, msg.Creator, msg.Valaddress, msg.Amount); err != nil { + if err := util.TransferFromAddressToAddress(k.bankKeeper, ctx, msg.Creator, msg.PoolAddress, msg.Amount); err != nil { return nil, err } _ = ctx.EventManager().EmitTypedEvent(&types.EventJoinPool{ PoolId: msg.PoolId, Staker: msg.Creator, - Valaddress: msg.Valaddress, + PoolAddress: msg.PoolAddress, Amount: msg.Amount, Commission: msg.Commission, StakeFraction: msg.StakeFraction, diff --git a/x/stakers/keeper/msg_server_leave_pool.go b/x/stakers/keeper/msg_server_leave_pool.go index 75627d3c..177cb162 100644 --- a/x/stakers/keeper/msg_server_leave_pool.go +++ b/x/stakers/keeper/msg_server_leave_pool.go @@ -16,13 +16,13 @@ import ( func (k msgServer) LeavePool(goCtx context.Context, msg *types.MsgLeavePool) (*types.MsgLeavePoolResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - valaccount, active := k.GetValaccount(ctx, msg.PoolId, msg.Creator) + poolAccount, active := k.GetPoolAccount(ctx, msg.Creator, msg.PoolId) if !active { return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrAlreadyLeftPool.Error()) } - valaccount.IsLeaving = true - k.SetValaccount(ctx, valaccount) + poolAccount.IsLeaving = true + k.SetPoolAccount(ctx, poolAccount) // Creates the queue entry to leave a pool. Does nothing further if err := k.orderLeavePool(ctx, msg.Creator, msg.PoolId); err != nil { diff --git a/x/stakers/keeper/msg_server_update_commission.go b/x/stakers/keeper/msg_server_update_commission.go index 7b84fd63..3601612f 100644 --- a/x/stakers/keeper/msg_server_update_commission.go +++ b/x/stakers/keeper/msg_server_update_commission.go @@ -18,7 +18,7 @@ func (k msgServer) UpdateCommission(goCtx context.Context, msg *types.MsgUpdateC ctx := sdk.UnwrapSDKContext(goCtx) // Check if creator is active in the pool - if _, active := k.GetValaccount(ctx, msg.PoolId, msg.Creator); !active { + if _, active := k.GetPoolAccount(ctx, msg.Creator, msg.PoolId); !active { return nil, errors.Wrap(errorsTypes.ErrUnauthorized, types.ErrNoStaker.Error()) } diff --git a/x/stakers/keeper/msg_server_update_stake_fraction.go b/x/stakers/keeper/msg_server_update_stake_fraction.go index 8c10db46..29e928a3 100644 --- a/x/stakers/keeper/msg_server_update_stake_fraction.go +++ b/x/stakers/keeper/msg_server_update_stake_fraction.go @@ -18,14 +18,14 @@ import ( func (k msgServer) UpdateStakeFraction(goCtx context.Context, msg *types.MsgUpdateStakeFraction) (*types.MsgUpdateStakeFractionResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - valaccount, active := k.GetValaccount(ctx, msg.PoolId, msg.Creator) + poolAccount, active := k.GetPoolAccount(ctx, msg.Creator, msg.PoolId) if !active { - return nil, errors.Wrap(errorsTypes.ErrUnauthorized, types.ErrNoValaccount.Error()) + return nil, errors.Wrap(errorsTypes.ErrUnauthorized, types.ErrNoPoolAccount.Error()) } // if the validator wants to decrease their stake fraction in a pool we have // to do that in the bonding time - if msg.StakeFraction.LT(valaccount.StakeFraction) { + if msg.StakeFraction.LT(poolAccount.StakeFraction) { // Insert commission change into queue k.orderNewStakeFractionChange(ctx, msg.Creator, msg.PoolId, msg.StakeFraction) return &types.MsgUpdateStakeFractionResponse{}, nil @@ -38,8 +38,8 @@ func (k msgServer) UpdateStakeFraction(goCtx context.Context, msg *types.MsgUpda k.RemoveStakeFractionEntry(ctx, &queueEntry) } - valaccount.StakeFraction = msg.StakeFraction - k.SetValaccount(ctx, valaccount) + poolAccount.StakeFraction = msg.StakeFraction + k.SetPoolAccount(ctx, poolAccount) _ = ctx.EventManager().EmitTypedEvent(&types.EventUpdateStakeFraction{ Staker: msg.Creator, diff --git a/x/stakers/types/errors.go b/x/stakers/types/errors.go index 28dbcc89..39fa0813 100644 --- a/x/stakers/types/errors.go +++ b/x/stakers/types/errors.go @@ -11,10 +11,10 @@ var ( ErrNoStaker = errors.Register(ModuleName, 1105, "sender is no staker") ErrAlreadyJoinedPool = errors.Register(ModuleName, 1106, "already joined pool") ErrAlreadyLeftPool = errors.Register(ModuleName, 1107, "already left pool") - ValaddressAlreadyUsed = errors.Register(ModuleName, 1108, "valaddress already used") + PoolAddressAlreadyUsed = errors.Register(ModuleName, 1108, "valaddress already used") ErrStringMaxLengthExceeded = errors.Register(ModuleName, 1109, "String length exceeded: %d vs %d") ErrStakerAlreadyCreated = errors.Register(ModuleName, 1110, "Staker already created") - ErrValaddressSameAsStaker = errors.Register(ModuleName, 1111, "Valaddress has same address as Valaddress") + ErrPoolAddressSameAsStaker = errors.Register(ModuleName, 1111, "Valaddress has same address as Valaddress") ErrCanNotJoinDisabledPool = errors.Register(ModuleName, 1112, "can not join disabled pool") ErrInvalidIdentityString = errors.Register(ModuleName, 1113, "invalid identity: %s") ErrNotEnoughRewards = errors.Register(ModuleName, 1114, "claim amount is larger than current rewards") @@ -22,5 +22,5 @@ var ( ErrPoolLeaveAlreadyInProgress = errors.Register(ModuleName, 1117, "Pool leave is already in progress") ErrPoolAccountUnauthorized = errors.Register(ModuleName, 1118, "valaccount unauthorized") ErrValidatorJailed = errors.Register(ModuleName, 1119, "validator jailed") - ErrNoValaccount = errors.Register(ModuleName, 1120, "sender has no valaccount") + ErrNoPoolAccount = errors.Register(ModuleName, 1120, "sender has no valaccount") ) diff --git a/x/stakers/types/events.pb.go b/x/stakers/types/events.pb.go index 393ad404..2b61f47f 100644 --- a/x/stakers/types/events.pb.go +++ b/x/stakers/types/events.pb.go @@ -268,10 +268,10 @@ type EventJoinPool struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // staker is the address of the staker Staker string `protobuf:"bytes,2,opt,name=staker,proto3" json:"staker,omitempty"` - // valaddress is the address of the protocol node which + // pool_address is the address of the protocol node which // votes in favor of the staker - Valaddress string `protobuf:"bytes,3,opt,name=valaddress,proto3" json:"valaddress,omitempty"` - // amount is the amount of funds transferred to the valaddress + PoolAddress string `protobuf:"bytes,3,opt,name=pool_address,json=poolAddress,proto3" json:"pool_address,omitempty"` + // amount is the amount of funds transferred to the pool address Amount uint64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` // commission ... Commission cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=commission,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"commission"` @@ -326,9 +326,9 @@ func (m *EventJoinPool) GetStaker() string { return "" } -func (m *EventJoinPool) GetValaddress() string { +func (m *EventJoinPool) GetPoolAddress() string { if m != nil { - return m.Valaddress + return m.PoolAddress } return "" } @@ -486,41 +486,41 @@ func init() { func init() { proto.RegisterFile("kyve/stakers/v1beta1/events.proto", fileDescriptor_7a1b3dc9634155a0) } var fileDescriptor_7a1b3dc9634155a0 = []byte{ - // 537 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0xb3, 0x69, 0x9a, 0x28, 0x83, 0x1a, 0x89, 0xa8, 0x80, 0x95, 0x22, 0xa7, 0x98, 0x4b, - 0x0f, 0xc8, 0x56, 0xcb, 0x1d, 0xa9, 0x09, 0xad, 0x44, 0xa9, 0xa0, 0x72, 0x01, 0x09, 0x2e, 0xd1, - 0xc6, 0xbb, 0x24, 0x56, 0x6c, 0x8f, 0xe5, 0xdd, 0x26, 0xe4, 0x11, 0x38, 0x20, 0x71, 0xe3, 0x41, - 0x78, 0x89, 0x1e, 0x7b, 0x44, 0x1c, 0x2a, 0x48, 0x5e, 0x04, 0x79, 0x6d, 0x37, 0x0e, 0x32, 0x12, - 0xf5, 0x6d, 0xc7, 0xfa, 0xe7, 0x9b, 0x7f, 0xff, 0x91, 0x17, 0x1e, 0x4d, 0xe6, 0x53, 0x6e, 0x09, - 0x49, 0x27, 0x3c, 0x12, 0xd6, 0x74, 0x7f, 0xc8, 0x25, 0xdd, 0xb7, 0xf8, 0x94, 0x07, 0x52, 0x98, - 0x61, 0x84, 0x12, 0xdb, 0xdb, 0xb1, 0xc4, 0x4c, 0x25, 0x66, 0x2a, 0xe9, 0x6c, 0x8f, 0x70, 0x84, - 0x4a, 0x60, 0xc5, 0xa7, 0x44, 0xdb, 0x29, 0xc6, 0x85, 0x34, 0xa2, 0x7e, 0x8a, 0xeb, 0x18, 0x85, - 0x92, 0x0c, 0xaf, 0x34, 0xc6, 0x77, 0x02, 0x77, 0x8f, 0x62, 0x0f, 0x6f, 0x43, 0x46, 0x25, 0x3f, - 0x53, 0xfd, 0xed, 0x43, 0x00, 0xf4, 0xd8, 0x20, 0xa1, 0x69, 0x64, 0x97, 0xec, 0xdd, 0x39, 0x78, - 0x68, 0x16, 0xb9, 0x33, 0x93, 0x8e, 0x5e, 0xed, 0xf2, 0xba, 0x5b, 0xb1, 0x9b, 0xe8, 0xb1, 0x15, - 0x22, 0xe0, 0xb3, 0x0c, 0x51, 0xfd, 0x7f, 0x44, 0xc0, 0x67, 0x29, 0x42, 0x83, 0x46, 0x48, 0xe7, - 0x1e, 0x52, 0xa6, 0x6d, 0xec, 0x92, 0xbd, 0xa6, 0x9d, 0x95, 0xc6, 0x17, 0x02, 0xf7, 0x72, 0xae, - 0xfb, 0xe8, 0xfb, 0xae, 0x10, 0x2e, 0x06, 0xed, 0xfb, 0x50, 0x4f, 0xf0, 0xca, 0x75, 0xd3, 0x4e, - 0xab, 0xf6, 0x03, 0x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0xdf, 0x3e, 0xcb, 0x55, 0x56, 0x1b, 0x6b, - 0x59, 0x3d, 0x03, 0x10, 0x31, 0x71, 0x20, 0xe7, 0x21, 0x57, 0x39, 0xb6, 0x0e, 0xba, 0xc5, 0xbf, - 0x9f, 0x9a, 0xfc, 0x66, 0x1e, 0x72, 0xbb, 0x29, 0xb2, 0x63, 0x41, 0x4c, 0x9b, 0x65, 0x63, 0xea, - 0x1d, 0x5f, 0x2e, 0x74, 0x72, 0xb5, 0xd0, 0xc9, 0xaf, 0x85, 0x4e, 0xbe, 0x2e, 0xf5, 0xca, 0xd5, - 0x52, 0xaf, 0xfc, 0x58, 0xea, 0x95, 0x0f, 0x4f, 0x46, 0xae, 0x1c, 0x5f, 0x0c, 0x4d, 0x07, 0x7d, - 0xeb, 0xe5, 0xfb, 0x77, 0x47, 0xaf, 0xb8, 0x9c, 0x61, 0x34, 0xb1, 0x9c, 0x31, 0x75, 0x03, 0xeb, - 0xd3, 0xcd, 0xdb, 0x15, 0x5f, 0x42, 0x0c, 0xeb, 0xea, 0xc9, 0x7a, 0xfa, 0x27, 0x00, 0x00, 0xff, - 0xff, 0x4e, 0xa8, 0x49, 0x66, 0x4a, 0x05, 0x00, 0x00, + // 542 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xc1, 0x6e, 0xd3, 0x4e, + 0x10, 0xc6, 0xb3, 0x69, 0x9a, 0x28, 0xd3, 0x7f, 0x23, 0xfd, 0xa3, 0x02, 0x56, 0x8a, 0x9c, 0xd6, + 0x5c, 0x7a, 0x40, 0xb6, 0x5a, 0xee, 0x48, 0x49, 0x68, 0x25, 0x4a, 0x05, 0x95, 0x0b, 0x48, 0x70, + 0x89, 0x36, 0xf6, 0x92, 0x58, 0xb1, 0x3d, 0x96, 0x77, 0x9b, 0x90, 0x77, 0x00, 0x89, 0x1b, 0x0f, + 0xc2, 0x4b, 0xf4, 0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f, 0xee, 0x1e, + 0xe7, 0x22, 0xab, 0x8d, 0x95, 0xac, 0x9e, 0x02, 0x70, 0x49, 0xec, 0x8a, 0x49, 0xc2, 0x54, 0x8e, + 0xb5, 0xa3, 0x66, 0xfe, 0x1f, 0xa8, 0x26, 0xbf, 0x9e, 0x24, 0xcc, 0xad, 0xf2, 0xf9, 0x67, 0x4e, + 0x4c, 0x9b, 0xeb, 0xc6, 0xd4, 0x3e, 0xb9, 0x9a, 0x9a, 0xe4, 0x7a, 0x6a, 0x92, 0x9f, 0x53, 0x93, + 0x7c, 0x99, 0x99, 0x85, 0xeb, 0x99, 0x59, 0xf8, 0x3e, 0x33, 0x0b, 0xef, 0x1f, 0xf7, 0x03, 0x31, + 0xb8, 0xec, 0xd9, 0x1e, 0x46, 0xce, 0x8b, 0x77, 0x6f, 0x8f, 0x5f, 0x32, 0x31, 0xc6, 0x74, 0xe8, + 0x78, 0x03, 0x1a, 0xc4, 0xce, 0xc7, 0xdb, 0xe7, 0x4b, 0x5e, 0x82, 0xf7, 0xca, 0xea, 0xd5, 0x7a, + 0xf2, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x35, 0x72, 0x47, 0x82, 0x4d, 0x05, 0x00, 0x00, } func (m *EventUpdateParams) Marshal() (dAtA []byte, err error) { @@ -745,10 +745,10 @@ func (m *EventJoinPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - if len(m.Valaddress) > 0 { - i -= len(m.Valaddress) - copy(dAtA[i:], m.Valaddress) - i = encodeVarintEvents(dAtA, i, uint64(len(m.Valaddress))) + if len(m.PoolAddress) > 0 { + i -= len(m.PoolAddress) + copy(dAtA[i:], m.PoolAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.PoolAddress))) i-- dAtA[i] = 0x1a } @@ -951,7 +951,7 @@ func (m *EventJoinPool) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.Valaddress) + l = len(m.PoolAddress) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } @@ -1625,7 +1625,7 @@ func (m *EventJoinPool) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valaddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1653,7 +1653,7 @@ func (m *EventJoinPool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Valaddress = string(dAtA[iNdEx:postIndex]) + m.PoolAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { diff --git a/x/stakers/types/message_join_pool.go b/x/stakers/types/message_join_pool.go index 54cee98d..45c4de63 100644 --- a/x/stakers/types/message_join_pool.go +++ b/x/stakers/types/message_join_pool.go @@ -40,8 +40,8 @@ func (msg *MsgJoinPool) ValidateBasic() error { return errors.Wrapf(errorsTypes.ErrInvalidAddress, "invalid creator address: %s", err) } - if _, err := sdk.AccAddressFromBech32(msg.Valaddress); err != nil { - return errors.Wrapf(errorsTypes.ErrInvalidAddress, "invalid validator address: %s", err) + if _, err := sdk.AccAddressFromBech32(msg.PoolAddress); err != nil { + return errors.Wrapf(errorsTypes.ErrInvalidAddress, "invalid pool address: %s", err) } if util.ValidateNumber(msg.Amount) != nil { diff --git a/x/stakers/types/tx.pb.go b/x/stakers/types/tx.pb.go index 8a4695c8..69993a86 100644 --- a/x/stakers/types/tx.pb.go +++ b/x/stakers/types/tx.pb.go @@ -225,8 +225,8 @@ type MsgJoinPool struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` // pool_id ... PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // valaddress ... - Valaddress string `protobuf:"bytes,3,opt,name=valaddress,proto3" json:"valaddress,omitempty"` + // pool_address ... + PoolAddress string `protobuf:"bytes,3,opt,name=pool_address,json=poolAddress,proto3" json:"pool_address,omitempty"` // amount ... Amount uint64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` // commission ... @@ -282,9 +282,9 @@ func (m *MsgJoinPool) GetPoolId() uint64 { return 0 } -func (m *MsgJoinPool) GetValaddress() string { +func (m *MsgJoinPool) GetPoolAddress() string { if m != nil { - return m.Valaddress + return m.PoolAddress } return "" } @@ -533,46 +533,46 @@ func init() { func init() { proto.RegisterFile("kyve/stakers/v1beta1/tx.proto", fileDescriptor_f52b730e69b9fb06) } var fileDescriptor_f52b730e69b9fb06 = []byte{ - // 622 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x8d, 0xfb, 0x91, 0x92, 0xa1, 0x14, 0xe4, 0x86, 0xd6, 0x75, 0x55, 0xb7, 0x04, 0x21, 0x95, - 0xaa, 0xb5, 0x15, 0x40, 0x1c, 0x7a, 0x23, 0x85, 0x4a, 0x94, 0x06, 0x2a, 0x57, 0x20, 0x3e, 0x0e, - 0xd1, 0xc6, 0x5e, 0x1c, 0x2b, 0xb1, 0xd7, 0xf2, 0x6e, 0x42, 0x7d, 0x43, 0xfc, 0x02, 0x4e, 0x70, - 0xe0, 0xcc, 0xbd, 0x07, 0x7e, 0x44, 0x8f, 0x15, 0x27, 0xc4, 0xa1, 0x42, 0xc9, 0xa1, 0x7f, 0x03, - 0x39, 0x1b, 0x6f, 0xd2, 0x90, 0x2a, 0x6d, 0xc4, 0x29, 0x99, 0x9d, 0x37, 0xf3, 0xde, 0xbe, 0x5d, - 0xcf, 0xc2, 0x52, 0x35, 0x6a, 0x60, 0x83, 0x32, 0x54, 0xc5, 0x21, 0x35, 0x1a, 0xf9, 0x32, 0x66, - 0x28, 0x6f, 0xb0, 0x03, 0x3d, 0x08, 0x09, 0x23, 0x72, 0x36, 0x4e, 0xeb, 0x9d, 0xb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 0x46, 0x34, 0x0f, 0xe0, 0xc6, - 0x3f, 0xb3, 0xe6, 0x7c, 0x6d, 0xfd, 0x50, 0x35, 0x7f, 0x61, 0xa8, 0x60, 0x8c, 0x60, 0x76, 0xd0, - 0x80, 0x58, 0x1f, 0xd2, 0xe9, 0x0c, 0x5a, 0x7d, 0x70, 0x19, 0xb4, 0xa0, 0xb6, 0x61, 0xfa, 0xcc, - 0xc5, 0xb9, 0x33, 0xa4, 0x0b, 0x87, 0xa9, 0x1b, 0x17, 0x82, 0x25, 0x2c, 0xea, 0xe4, 0xc7, 0xd3, - 0xc3, 0x35, 0xa9, 0xb0, 0x7d, 0xd4, 0xd4, 0xa4, 0xe3, 0xa6, 0x26, 0xfd, 0x69, 0x6a, 0xd2, 0xe7, - 0x96, 0x96, 0x3a, 0x6e, 0x69, 0xa9, 0x5f, 0x2d, 0x2d, 0xf5, 0x76, 0xdd, 0x71, 0x59, 0xa5, 0x5e, - 0xd6, 0x2d, 0xe2, 0x19, 0xcf, 0xde, 0xbc, 0x7a, 0xf2, 0x1c, 0xb3, 0x0f, 0x24, 0xac, 0x1a, 0x56, - 0x05, 0xb9, 0xbe, 0x71, 0x20, 0x1e, 0x1f, 0x16, 0x05, 0x98, 0x96, 0xd3, 0xed, 0x87, 0xe1, 0xfe, - 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x09, 0x6c, 0x2c, 0x99, 0x06, 0x00, 0x00, + // 624 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0xf2, 0xa3, 0xd8, 0x47, 0x45, 0xb3, 0x54, 0x58, 0x96, 0xb0, 0x40, 0x8d, 0x09, 0x12, + 0xd8, 0x4d, 0xd5, 0x78, 0xe0, 0x26, 0x28, 0x89, 0x48, 0x95, 0x2c, 0xd1, 0xf8, 0xe3, 0x40, 0x86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+ 0xaa, 0x61, 0x55, 0x90, 0xeb, 0x1b, 0x87, 0xe2, 0xfd, 0x61, 0x51, 0x80, 0xe9, 0x7e, 0xb6, 0xf5, + 0x36, 0xdc, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x48, 0xf2, 0xac, 0x26, 0x9c, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -993,10 +993,10 @@ func (m *MsgJoinPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - if len(m.Valaddress) > 0 { - i -= len(m.Valaddress) - copy(dAtA[i:], m.Valaddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.Valaddress))) + if len(m.PoolAddress) > 0 { + i -= len(m.PoolAddress) + copy(dAtA[i:], m.PoolAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.PoolAddress))) i-- dAtA[i] = 0x1a } @@ -1234,7 +1234,7 @@ func (m *MsgJoinPool) Size() (n int) { if m.PoolId != 0 { n += 1 + sovTx(uint64(m.PoolId)) } - l = len(m.Valaddress) + l = len(m.PoolAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -1766,7 +1766,7 @@ func (m *MsgJoinPool) Unmarshal(dAtA []byte) error { } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valaddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1794,7 +1794,7 @@ func (m *MsgJoinPool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Valaddress = string(dAtA[iNdEx:postIndex]) + m.PoolAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 {