From fd525920e10e11f83db5f1b8df2c8819a683e3eb Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 26 Apr 2024 17:56:04 +0200 Subject: [PATCH 01/28] chore: started implementation of funding with multiple coins --- docs/static/openapi.yml | 564 ++++++++++++++--- proto/kyve/funders/v1beta1/events.proto | 28 +- proto/kyve/funders/v1beta1/funders.proto | 65 +- proto/kyve/funders/v1beta1/params.proto | 14 +- proto/kyve/funders/v1beta1/tx.proto | 37 +- proto/kyve/query/v1beta1/funders.proto | 52 +- x/funders/keeper/logic_funders.go | 61 +- x/funders/keeper/msg_server_fund_pool.go | 39 +- x/funders/types/errors.go | 8 +- x/funders/types/events.pb.go | 239 ++++--- x/funders/types/funders.go | 23 +- x/funders/types/funders.pb.go | 755 ++++++++++++++++++++--- x/funders/types/params.pb.go | 125 ++-- x/funders/types/tx.pb.go | 245 +++++--- x/query/types/funders.pb.go | 458 +++++++++----- 15 files changed, 2099 insertions(+), 614 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 8b1374fa..be5c77a8 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -4536,14 +4536,47 @@ paths: description: funders_params ... type: object properties: - min_funding_amount: - type: string - format: uint64 - description: Minimum amount of tokens that can be funded. - min_funding_amount_per_bundle: - type: string - format: uint64 - description: Minimum amount of tokens that can be funded per bundle. + coin_whitelist: + type: array + items: + type: object + properties: + coin_denom: + type: string + title: >- + coin_denom is the denom of a coin which is allowed + to be funded, this value + + needs to be unique + min_funding_amount: + type: string + format: uint64 + title: >- + min_funding_amount is the minimum required amount of + this denom that needs + + to be funded + min_funding_amount_per_bundle: + type: string + format: uint64 + title: >- + min_funding_amount_per_bundle is the minimum + required amount of this denom + + that needs to be funded per bundle + coin_weight: + type: string + title: >- + coin_weight is a factor used to sort funders after + their funding amounts + title: >- + WhitelistCoinEntry is an object containing information + around a coin which + + is allowed to be funded in pools + title: >- + coin_whitelist is a list of coins that are allowed to fund + a pool min_funding_multiple: type: string format: uint64 @@ -4552,9 +4585,9 @@ paths: amount_per_bundle. In other words this param ensures, that a funder provides - at least funding for + at least - `min_funding_multiple` bundles. + funding for `min_funding_multiple` bundles. description: QueryParamsResponse ... default: description: An unexpected error response. @@ -5042,24 +5075,71 @@ paths: type: string format: uint64 title: pool_id is the id of the pool this funding is for - amount: - type: string - format: uint64 + amounts: + 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. title: >- - amount is the amount of funds in ukyve the funder - has left - amount_per_bundle: - type: string - format: uint64 + amounts is a list of coins the funder wants to fund + the pool with + amounts_per_bundle: + 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. title: >- - amount_per_bundle is the amount of funds in ukyve - the funder pays per bundle + amounts_per_bundle defines the amount of each coin + that are distributed + + per finalized bundle total_funded: - type: string - format: uint64 + 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. title: >- - total_funded is the total amount of funds in ukyve - the funder has funded + total_funded is the total amount of coins that the + funder has funded description: >- Funding is the object which holds info about the current funding @@ -5575,24 +5655,71 @@ paths: type: string format: uint64 title: pool_id is the id of the pool this funding is for - amount: - type: string - format: uint64 + amounts: + 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. title: >- - amount is the amount of funds in ukyve the funder - has left - amount_per_bundle: - type: string - format: uint64 + amounts is a list of coins the funder wants to + fund the pool with + amounts_per_bundle: + 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. title: >- - amount_per_bundle is the amount of funds in ukyve - the funder pays per bundle + amounts_per_bundle defines the amount of each coin + that are distributed + + per finalized bundle total_funded: - type: string - format: uint64 + 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. title: >- - total_funded is the total amount of funds in ukyve - the funder has funded + total_funded is the total amount of coins that the + funder has funded description: >- Funding is the object which holds info about the current funding @@ -7866,21 +7993,67 @@ paths: type: object properties: total_used_funds: - type: string - format: uint64 + 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. description: >- total_used_funds are the total funds that have been distributed by the funder. total_allocated_funds: - type: string - format: uint64 + 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. description: >- total_allocated_funds are the total funds that have - been allocated by the funder. They can either get - distributed or refunded. + been allocated by the funder. + + They can either get distributed or refunded. total_amount_per_bundle: - type: string - format: uint64 + 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. description: >- total_amount_per_bundle is the total amount per bundle of all fundings of the funder. @@ -7899,23 +8072,76 @@ paths: properties: funder_address: type: string - title: funder_address + title: funder_id is the id of the funder pool_id: type: string format: uint64 - description: pool_id ... - amount: - type: string - format: uint64 - description: amount ... - amount_per_bundle: - type: string - format: uint64 - description: amount_per_bundle ... + title: pool_id is the id of the pool this funding is for + amounts: + 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. + title: >- + amounts is a list of coins the funder wants to fund the + pool with + amounts_per_bundle: + 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. + title: >- + amounts_per_bundle defines the amount of each coin that + are distributed + + per finalized bundle total_funded: - type: string - format: uint64 - description: total_funded ... + 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. + title: >- + total_funded is the total amount of coins that the + funder has funded description: Funding ... description: fundings ... description: >- @@ -8192,21 +8418,67 @@ paths: type: object properties: total_used_funds: - type: string - format: uint64 + 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. description: >- total_used_funds are the total funds that have been distributed by the funder. total_allocated_funds: - type: string - format: uint64 + 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. description: >- total_allocated_funds are the total funds that have - been allocated by the funder. They can either get - distributed or refunded. + been allocated by the funder. + + They can either get distributed or refunded. total_amount_per_bundle: - type: string - format: uint64 + 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. description: >- total_amount_per_bundle is the total amount per bundle of all fundings of the funder. @@ -8514,23 +8786,76 @@ paths: properties: funder_address: type: string - title: funder_address + title: funder_id is the id of the funder pool_id: type: string format: uint64 - description: pool_id ... - amount: - type: string - format: uint64 - description: amount ... - amount_per_bundle: - type: string - format: uint64 - description: amount_per_bundle ... + title: pool_id is the id of the pool this funding is for + amounts: + 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. + title: >- + amounts is a list of coins the funder wants to fund the + pool with + amounts_per_bundle: + 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. + title: >- + amounts_per_bundle defines the amount of each coin that + are distributed + + per finalized bundle total_funded: - type: string - format: uint64 - description: total_funded ... + 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. + title: >- + total_funded is the total amount of coins that the + funder has funded description: Funding ... description: fundings ... description: >- @@ -8842,23 +9167,76 @@ paths: properties: funder_address: type: string - title: funder_address + title: funder_id is the id of the funder pool_id: type: string format: uint64 - description: pool_id ... - amount: - type: string - format: uint64 - description: amount ... - amount_per_bundle: - type: string - format: uint64 - description: amount_per_bundle ... + title: pool_id is the id of the pool this funding is for + amounts: + 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. + title: >- + amounts is a list of coins the funder wants to fund the + pool with + amounts_per_bundle: + 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. + title: >- + amounts_per_bundle defines the amount of each coin that + are distributed + + per finalized bundle total_funded: - type: string - format: uint64 - description: total_funded ... + 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. + title: >- + total_funded is the total amount of coins that the + funder has funded description: Funding ... description: fundings ... description: >- diff --git a/proto/kyve/funders/v1beta1/events.proto b/proto/kyve/funders/v1beta1/events.proto index a41f62d6..6a164caa 100644 --- a/proto/kyve/funders/v1beta1/events.proto +++ b/proto/kyve/funders/v1beta1/events.proto @@ -2,8 +2,10 @@ syntax = "proto3"; package kyve.funders.v1beta1; -import "gogoproto/gogo.proto"; import "kyve/funders/v1beta1/params.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; @@ -59,10 +61,18 @@ message EventFundPool { uint64 pool_id = 1; // address is the account address of the pool funder. string address = 2; - // amount is the amount in ukyve the funder has funded - uint64 amount = 3; - // amount_per_bundle is the amount in ukyve the funder has funded per bundle - uint64 amount_per_bundle = 4; + // amounts is a list of coins that the funder has funded + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // amounts_per_bundle is a list of amounts per coin per bundle + repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; } // EventDefundPool is an event emitted when a pool is defunded. @@ -72,8 +82,12 @@ message EventDefundPool { uint64 pool_id = 1; // address is the account address of the pool funder. string address = 2; - // amount is the amount in ukyve the funder has defunded - uint64 amount = 3; + // amounts is a list of coins that the funder wants to defund + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; } // EventPoolOutOfFunds is an event emitted when a pool has run out of funds diff --git a/proto/kyve/funders/v1beta1/funders.proto b/proto/kyve/funders/v1beta1/funders.proto index 13867c80..711cdf44 100644 --- a/proto/kyve/funders/v1beta1/funders.proto +++ b/proto/kyve/funders/v1beta1/funders.proto @@ -2,7 +2,9 @@ syntax = "proto3"; package kyve.funders.v1beta1; -//import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; @@ -22,6 +24,23 @@ message Funder { string description = 6; } +// TODO: do this because else we would have to check the following things: +// if amounts and amounts_per_bundle are given seperately as arrays we would have to check the following: +// - are those arrays of equal size +// - are there any coins which are not whitelisted in one of those arrays +// - is amounts_per_bundle a subset of amounts +message FundEntry { + // amount is amount of the coin which is funded + cosmos.base.v1beta1.Coin amount = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // amounts_per_bundle defines the amount of each coin that are distributed + // per finalized bundle + uint64 amount_per_bundle = 2; +} + // Funding is the object which holds info about the current funding // funder_address and pool_id (m2m) are unique together which means that // a funder can only fund each pool once and a pool can only be funded @@ -31,12 +50,25 @@ message Funding { string funder_address = 1; // pool_id is the id of the pool this funding is for uint64 pool_id = 2; - // amount is the amount of funds in ukyve the funder has left - uint64 amount = 3; - // amount_per_bundle is the amount of funds in ukyve the funder pays per bundle - uint64 amount_per_bundle = 4; - // total_funded is the total amount of funds in ukyve the funder has funded - uint64 total_funded = 5; + // amounts is a list of coins the funder wants to fund the pool with + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // amounts_per_bundle defines the amount of each coin that are distributed + // per finalized bundle + repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // total_funded is the total amount of coins that the funder has funded + repeated cosmos.base.v1beta1.Coin total_funded = 5 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; } // FundingState is the object which holds info about the funding state of a pool @@ -46,3 +78,22 @@ message FundingState { // active_funder_addresses is the list of all active fundings repeated string active_funder_addresses = 2; } + +// WhitelistCoinEntry is an object containing information around a coin which +// is allowed to be funded in pools +message WhitelistCoinEntry { + // coin_denom is the denom of a coin which is allowed to be funded, this value + // needs to be unique + string coin_denom = 1; + // min_funding_amount is the minimum required amount of this denom that needs + // to be funded + uint64 min_funding_amount = 2; + // min_funding_amount_per_bundle is the minimum required amount of this denom + // that needs to be funded per bundle + uint64 min_funding_amount_per_bundle = 3; + // coin_weight is a factor used to sort funders after their funding amounts + string coin_weight = 4 [ + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/kyve/funders/v1beta1/params.proto b/proto/kyve/funders/v1beta1/params.proto index df0acccc..f7f22bab 100644 --- a/proto/kyve/funders/v1beta1/params.proto +++ b/proto/kyve/funders/v1beta1/params.proto @@ -4,14 +4,14 @@ package kyve.funders.v1beta1; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; +import "kyve/funders/v1beta1/funders.proto"; + // Params defines the funders module parameters. message Params { - // Minimum amount of tokens that can be funded. - uint64 min_funding_amount = 1; - // Minimum amount of tokens that can be funded per bundle. - uint64 min_funding_amount_per_bundle = 2; + // coin_whitelist is a list of coins that are allowed to fund a pool + repeated WhitelistCoinEntry coin_whitelist = 1; // Minimum ratio between the funded amount and the amount_per_bundle. - // In other words this param ensures, that a funder provides at least funding for - // `min_funding_multiple` bundles. - uint64 min_funding_multiple = 3; + // In other words this param ensures, that a funder provides at least + // funding for `min_funding_multiple` bundles. + uint64 min_funding_multiple = 2; } diff --git a/proto/kyve/funders/v1beta1/tx.proto b/proto/kyve/funders/v1beta1/tx.proto index 4b776eff..bd12615e 100644 --- a/proto/kyve/funders/v1beta1/tx.proto +++ b/proto/kyve/funders/v1beta1/tx.proto @@ -4,6 +4,10 @@ package kyve.funders.v1beta1; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; +import "kyve/funders/v1beta1/funders.proto"; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; @@ -67,14 +71,23 @@ message MsgUpdateFunderResponse {} // MsgFundPool defines a SDK message for funding a pool. message MsgFundPool { option (cosmos.msg.v1.signer) = "creator"; - // creator ... + // creator is the funder of the pool string creator = 1; - // id ... + // pool_id is the identifier of the pool uint64 pool_id = 2; - // amount is the total amount available for distribution - uint64 amount = 3; - // amount_per_bundle defines the amount of tokens that are distributed per submitted bundle - uint64 amount_per_bundle = 4; + // amount is the amount of a coin the creator wants to fund + cosmos.base.v1beta1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" + ]; + // amount_per_bundle is the amount of the coin the creator wants to distribute + // per finalized bundle + cosmos.base.v1beta1.Coin amount_per_bundle = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" + ]; } // MsgFundPoolResponse defines the Msg/DefundPool response type. @@ -83,12 +96,16 @@ message MsgFundPoolResponse {} // MsgDefundPool defines a SDK message for defunding a pool. message MsgDefundPool { option (cosmos.msg.v1.signer) = "creator"; - // creator ... + // creator is the funder of the pool who wants to defund now string creator = 1; - // id ... + // pool_id is the identifier of the pool uint64 pool_id = 2; - // amount ... - uint64 amount = 3; + // amounts is a list of coins the creator wants to defund from the pool + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; } // MsgDefundPoolResponse defines the Msg/DefundPool response type. diff --git a/proto/kyve/query/v1beta1/funders.proto b/proto/kyve/query/v1beta1/funders.proto index 54bd18c3..8acfa480 100644 --- a/proto/kyve/query/v1beta1/funders.proto +++ b/proto/kyve/query/v1beta1/funders.proto @@ -5,6 +5,8 @@ package kyve.query.v1beta1; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "amino/amino.proto"; option go_package = "github.com/KYVENetwork/chain/x/query/types"; @@ -53,27 +55,53 @@ message Funder { // FundingStats ... message FundingStats { // total_used_funds are the total funds that have been distributed by the funder. - uint64 total_used_funds = 1; - // total_allocated_funds are the total funds that have been allocated by the funder. They can either get distributed or refunded. - uint64 total_allocated_funds = 2; + repeated cosmos.base.v1beta1.Coin total_used_funds = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // total_allocated_funds are the total funds that have been allocated by the funder. + // They can either get distributed or refunded. + repeated cosmos.base.v1beta1.Coin total_allocated_funds = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; // total_amount_per_bundle is the total amount per bundle of all fundings of the funder. - uint64 total_amount_per_bundle = 3; + repeated cosmos.base.v1beta1.Coin total_amount_per_bundle = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; // pools_funded are the ids of the pools that have been funded by the funder. repeated uint64 pools_funded = 4; } // Funding ... message Funding { - // funder_address + // funder_id is the id of the funder string funder_address = 1; - // pool_id ... + // pool_id is the id of the pool this funding is for uint64 pool_id = 2; - // amount ... - uint64 amount = 3; - // amount_per_bundle ... - uint64 amount_per_bundle = 4; - // total_funded ... - uint64 total_funded = 5; + // amounts is a list of coins the funder wants to fund the pool with + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // amounts_per_bundle defines the amount of each coin that are distributed + // per finalized bundle + repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // total_funded is the total amount of coins that the funder has funded + repeated cosmos.base.v1beta1.Coin total_funded = 5 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; } // FundingStatus ... diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index 25d3ea44..c5e615eb 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + globalTypes "github.com/KYVENetwork/chain/x/global/types" "cosmossdk.io/errors" @@ -82,39 +83,64 @@ func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout uint // GetLowestFunding returns the funding with the lowest amount // Precondition: len(fundings) > 0 -func (k Keeper) GetLowestFunding(fundings []types.Funding) (lowestFunding *types.Funding, err error) { +func (k Keeper) GetLowestFunding(ctx sdk.Context, fundings []types.Funding, whitelist []*types.WhitelistCoinEntry) (lowestFunding *types.Funding, err error) { if len(fundings) == 0 { return nil, fmt.Errorf("no active fundings") } + + lowestFundingIndex := 0 for i := range fundings { - if fundings[i].Amount < fundings[lowestFundingIndex].Amount { + if fundings[i].GetScore(params.CoinWhitelist) < fundings[lowestFundingIndex].GetScore(params.CoinWhitelist) { lowestFundingIndex = i } } return &fundings[lowestFundingIndex], nil } + + // ensureParamsCompatibility checks compatibility of the provided funding with the pool params. // i.e. +// - coin is in whitelist // - minimum funding per bundle // - minimum funding amount // - minimum funding multiple -func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding types.Funding) error { +func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, msg *types.MsgFundPool) error { params := k.GetParams(ctx) - if funding.AmountPerBundle < params.MinFundingAmountPerBundle { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrAmountPerBundleTooLow.Error(), params.MinFundingAmountPerBundle) + + var w *types.WhitelistCoinEntry + for _, entry := range params.CoinWhitelist { + if entry.CoinDenom == msg.Amount.Denom { + w = entry + break + } + } + + // throw error if coin is not in whitelist. we only check msg.amount here since we know from before + // that msg.amount and msg.amount_per_bundle is equal + if w == nil { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrCoinNotWhitelisted.Error(), msg.Amount.Denom) + } + + if msg.Amount.Amount.Uint64() < w.MinFundingAmount { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingAmount.Error(), w.MinFundingAmount, msg.Amount.Denom) } - if funding.Amount < params.MinFundingAmount { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingAmount.Error(), params.MinFundingAmount) + + if msg.AmountPerBundle.Amount.Uint64() < w.MinFundingAmountPerBundle { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinAmountPerBundle.Error(), w.MinFundingAmountPerBundle, msg.Amount.Denom) } - if funding.AmountPerBundle*params.MinFundingMultiple > funding.Amount { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingMultiple.Error(), funding.AmountPerBundle, params.MinFundingAmount, funding.Amount) + + if msg.AmountPerBundle.Amount.Uint64()*params.MinFundingMultiple > msg.Amount.Amount.Uint64() { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingMultiple.Error(), msg.AmountPerBundle, params.MinFundingMultiple, msg.Amount) } + return nil } +func (k Keeper) + // ensureFreeSlot makes sure that a funder can add funding to a given pool. // If this is not possible an appropriate error is returned. // A pool has a fixed amount of funding-slots. If there are still free slots @@ -131,7 +157,12 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi return nil } - lowestFunding, _ := k.GetLowestFunding(activeFundings) + params := k.GetParams(ctx) + + lowestFunding, err := k.GetLowestFunding(ctx, activeFundings, params.CoinWhitelist) + if err != nil { + return err + } if lowestFunding.FunderAddress == newFunding.FunderAddress { // Funder already has a funding slot @@ -139,16 +170,16 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi } // Check if lowest funding is lower than new funding based on amount (amount per bundle is ignored) - if newFunding.Amount < lowestFunding.Amount { - return errors.Wrapf(errorsTypes.ErrLogic, types.ErrFundsTooLow.Error(), lowestFunding.Amount) + if newFunding.GetScore(params.CoinWhitelist) < lowestFunding.GetScore(params.CoinWhitelist) { + return errors.Wrapf(errorsTypes.ErrLogic, types.ErrFundsTooLow.Error(), lowestFunding.GetScore(params.CoinWhitelist)) } // Defund lowest funder - if err := util.TransferFromModuleToAddress(k.bankKeeper, ctx, types.ModuleName, lowestFunding.FunderAddress, lowestFunding.Amount); err != nil { + recipient := sdk.MustAccAddressFromBech32(lowestFunding.FunderAddress) + if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, recipient, lowestFunding.Amounts); err != nil { return err } - subtracted := lowestFunding.SubtractAmount(lowestFunding.Amount) fundingState.SetInactive(lowestFunding) k.SetFunding(ctx, lowestFunding) @@ -156,7 +187,7 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi _ = ctx.EventManager().EmitTypedEvent(&types.EventDefundPool{ PoolId: fundingState.PoolId, Address: lowestFunding.FunderAddress, - Amount: subtracted, + Amounts: lowestFunding.Amounts, }) return nil diff --git a/x/funders/keeper/msg_server_fund_pool.go b/x/funders/keeper/msg_server_fund_pool.go index 8fd3cbcb..2f6794c9 100644 --- a/x/funders/keeper/msg_server_fund_pool.go +++ b/x/funders/keeper/msg_server_fund_pool.go @@ -34,28 +34,47 @@ func (k msgServer) FundPool(goCtx context.Context, msg *types.MsgFundPool) (*typ return nil, errors.Wrapf(errorsTypes.ErrNotFound, types.ErrFundingStateDoesNotExist.Error(), msg.PoolId) } + // TODO: + // iterate through msg.Amounts + // -> check if each coin has an amount per bundle + // -> if a single coin is not in the whitelist we fail + // -> check for each coin if the min funding amount is reached + // -> check for each coin if the min funding amount per bundle is reached + // -> check for each coin if the min funding multiple is reached + // calculate funders value score + // ensureFreeSlot + // emit event + + // Check if amount and amount_per_bundle have the same denom + if msg.Amount.Denom != msg.AmountPerBundle.Denom { + return nil, errors.Wrapf(errorsTypes.ErrNotFound, types.ErrDifferentDenom.Error(), msg.Amount.Denom, msg.AmountPerBundle.Denom) + } + // Check if funding already exists funding, found := k.GetFunding(ctx, msg.Creator, msg.PoolId) if found { - // If so, update funding amount - funding.AddAmount(msg.Amount) + // If so, update funding amounts + funding.Amounts.Add(msg.Amount) + // If the amount per bundle is set, update it - if msg.AmountPerBundle > 0 { - funding.AmountPerBundle = msg.AmountPerBundle + if msg.AmountPerBundle.IsPositive() { + if f, c := funding.AmountsPerBundle.Find(msg.AmountPerBundle.Denom); f { + c.Amount = msg.AmountPerBundle.Amount + } } } else { // If not, create new funding funding = types.Funding{ - FunderAddress: msg.Creator, - PoolId: msg.PoolId, - Amount: msg.Amount, - AmountPerBundle: msg.AmountPerBundle, - TotalFunded: 0, + FunderAddress: msg.Creator, + PoolId: msg.PoolId, + Amounts: sdk.NewCoins(msg.Amount), + AmountsPerBundle: sdk.NewCoins(msg.AmountPerBundle), + TotalFunded: sdk.Coins{}, } } // Check if updated (or new) funding is compatible with module params - if err := k.ensureParamsCompatibility(ctx, funding); err != nil { + if err := k.ensureParamsCompatibility(ctx, msg); err != nil { return nil, err } diff --git a/x/funders/types/errors.go b/x/funders/types/errors.go index d37bfe95..e50a4cac 100644 --- a/x/funders/types/errors.go +++ b/x/funders/types/errors.go @@ -9,10 +9,14 @@ var ( ErrFunderAlreadyExists = errors.Register(ModuleName, 1100, "funder with address %v already exists") ErrFunderDoesNotExist = errors.Register(ModuleName, 1101, "funder with address %v does not exist") ErrFundsTooLow = errors.Register(ModuleName, 1102, "minimum funding amount of %vkyve not reached") - ErrAmountPerBundleTooLow = errors.Register(ModuleName, 1103, "minimum amount per bundle of %vkyve not reached") - ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount of %vkyve not reached") + ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of %d %s not reached") + ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount %d %s not reached") ErrFundingDoesNotExist = errors.Register(ModuleName, 1105, "funding for pool %v and funder %v does not exist") ErrFundingIsUsedUp = errors.Register(ModuleName, 1106, "funding for pool %v and funder %v is used up") ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1107, "funding state for pool %v does not exist") ErrMinFundingMultiple = errors.Register(ModuleName, 1108, "per_bundle_amount (%dkyve) times min_funding_multiple (%d) is smaller than funded_amount (%vkyve)") + ErrInvalidAmountLength = errors.Register(ModuleName, 1109, "funding amounts has length %d while amounts_per_bundle has length %d") + ErrAmountsPerBundleNoSubset = errors.Register(ModuleName, 1110, "amounts_per_bundle is no subset of amounts") + ErrCoinNotWhitelisted = errors.Register(ModuleName, 1111, "coin of denom %s not in whitelist") + ErrDifferentDenom = errors.Register(ModuleName, 1111, "found denom %s in amount and denom %s in amount_per_bundle") ) diff --git a/x/funders/types/events.pb.go b/x/funders/types/events.pb.go index d88c886d..2fcc919e 100644 --- a/x/funders/types/events.pb.go +++ b/x/funders/types/events.pb.go @@ -5,6 +5,9 @@ package types import ( fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -279,10 +282,10 @@ type EventFundPool struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // address is the account address of the pool funder. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // amount is the amount in ukyve the funder has funded - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // amount_per_bundle is the amount in ukyve the funder has funded per bundle - AmountPerBundle uint64 `protobuf:"varint,4,opt,name=amount_per_bundle,json=amountPerBundle,proto3" json:"amount_per_bundle,omitempty"` + // amounts is a list of coins that the funder has funded + Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` + // amounts_per_bundle is a list of amounts per coin per bundle + AmountsPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amounts_per_bundle,json=amountsPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts_per_bundle"` } func (m *EventFundPool) Reset() { *m = EventFundPool{} } @@ -332,18 +335,18 @@ func (m *EventFundPool) GetAddress() string { return "" } -func (m *EventFundPool) GetAmount() uint64 { +func (m *EventFundPool) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Amount + return m.Amounts } - return 0 + return nil } -func (m *EventFundPool) GetAmountPerBundle() uint64 { +func (m *EventFundPool) GetAmountsPerBundle() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.AmountPerBundle + return m.AmountsPerBundle } - return 0 + return nil } // EventDefundPool is an event emitted when a pool is defunded. @@ -353,8 +356,8 @@ type EventDefundPool struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // address is the account address of the pool funder. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // amount is the amount in ukyve the funder has defunded - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // amounts is a list of coins that the funder wants to defund + Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` } func (m *EventDefundPool) Reset() { *m = EventDefundPool{} } @@ -404,11 +407,11 @@ func (m *EventDefundPool) GetAddress() string { return "" } -func (m *EventDefundPool) GetAmount() uint64 { +func (m *EventDefundPool) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Amount + return m.Amounts } - return 0 + return nil } // EventPoolOutOfFunds is an event emitted when a pool has run out of funds @@ -470,36 +473,41 @@ func init() { func init() { proto.RegisterFile("kyve/funders/v1beta1/events.proto", fileDescriptor_1cf957abd56bbcb0) } var fileDescriptor_1cf957abd56bbcb0 = []byte{ - // 460 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x93, 0x4f, 0x6b, 0xd4, 0x40, - 0x18, 0xc6, 0x37, 0x35, 0x6e, 0xdd, 0x29, 0x52, 0x1a, 0x8b, 0x86, 0x45, 0xe2, 0xba, 0xa7, 0x22, - 0x92, 0x50, 0xfd, 0x04, 0xae, 0xb6, 0x20, 0x82, 0x5d, 0x02, 0x0a, 0x8a, 0xb0, 0x4c, 0x32, 0xef, - 0x6e, 0x87, 0xcd, 0xce, 0x1b, 0x26, 0x93, 0x5d, 0xf3, 0x05, 0x3c, 0xfb, 0x5d, 0x3c, 0xf9, 0x0d, - 0x7a, 0xec, 0xd1, 0x93, 0xc8, 0xee, 0x17, 0x91, 0xf9, 0x93, 0xb6, 0x42, 0x05, 0x0f, 0x5e, 0x7a, - 0xcb, 0x33, 0xcf, 0x33, 0xcf, 0xfb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xff, 0xfe, 0x83, 0x31, 0xec, 0x07, 0x04, 0x00, 0x00, + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0x4f, 0x8b, 0xd3, 0x40, + 0x18, 0xc6, 0x9b, 0xb6, 0xb6, 0x76, 0x8a, 0xe8, 0xc6, 0x05, 0x63, 0x91, 0x6c, 0xed, 0xa9, 0x88, + 0x26, 0xec, 0x8a, 0x1f, 0xc0, 0xae, 0xbb, 0x20, 0x82, 0x5b, 0x02, 0x0a, 0x7a, 0x29, 0x93, 0xcc, + 0xb4, 0x3b, 0x36, 0x99, 0x37, 0x64, 0x26, 0xad, 0xbd, 0xf8, 0x19, 0xfc, 0x18, 0xe2, 0x41, 0x16, + 0x3c, 0xf9, 0x0d, 0xf6, 0xb8, 0x47, 0x4f, 0x2a, 0xed, 0xc1, 0xaf, 0x21, 0x33, 0x99, 0x74, 0x2b, + 0xac, 0xe0, 0x65, 0x0f, 0x7b, 0x69, 0xe7, 0x99, 0xf7, 0xcf, 0xf3, 0xcb, 0x9b, 0x97, 0xa0, 0xfb, + 0xd3, 0xc5, 0x8c, 0xfa, 0xe3, 0x9c, 0x13, 0x9a, 0x09, 0x7f, 0xb6, 0x1b, 0x52, 0x89, 0x77, 0x7d, + 0x3a, 0xa3, 0x5c, 0x0a, 0x2f, 0xcd, 0x40, 0x82, 0xbd, 0xad, 0x52, 0x3c, 0x93, 0xe2, 0x99, 0x94, + 0xce, 0xc5, 0x85, 0x29, 0xce, 0x70, 0x62, 0x0a, 0x3b, 0x6e, 0x04, 0x22, 0x01, 0xe1, 0x87, 0x58, + 0xd0, 0x75, 0x46, 0x04, 0x8c, 0x9b, 0xf8, 0xf6, 0x04, 0x26, 0xa0, 0x8f, 0xbe, 0x3a, 0x99, 0xdb, + 0x2d, 0x9c, 0x30, 0x0e, 0xbe, 0xfe, 0x2d, 0xae, 0x7a, 0x5f, 0x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x00, 0x00, } func (m *EventUpdateParams) Marshal() (dAtA []byte, err error) { @@ -702,15 +710,33 @@ func (m *EventFundPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.AmountPerBundle != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.AmountPerBundle)) - i-- - dAtA[i] = 0x20 + if len(m.AmountsPerBundle) > 0 { + for iNdEx := len(m.AmountsPerBundle) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AmountsPerBundle[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - if m.Amount != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 + if len(m.Amounts) > 0 { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } if len(m.Address) > 0 { i -= len(m.Address) @@ -747,10 +773,19 @@ func (m *EventDefundPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Amount != 0 { - i = encodeVarintEvents(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 + if len(m.Amounts) > 0 { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } if len(m.Address) > 0 { i -= len(m.Address) @@ -902,11 +937,17 @@ func (m *EventFundPool) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - if m.Amount != 0 { - n += 1 + sovEvents(uint64(m.Amount)) + if len(m.Amounts) > 0 { + for _, e := range m.Amounts { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } } - if m.AmountPerBundle != 0 { - n += 1 + sovEvents(uint64(m.AmountPerBundle)) + if len(m.AmountsPerBundle) > 0 { + for _, e := range m.AmountsPerBundle { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } } return n } @@ -924,8 +965,11 @@ func (m *EventDefundPool) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - if m.Amount != 0 { - n += 1 + sovEvents(uint64(m.Amount)) + if len(m.Amounts) > 0 { + for _, e := range m.Amounts { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } } return n } @@ -1661,10 +1705,10 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) } - m.Amount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents @@ -1674,16 +1718,31 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Amount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amounts = append(m.Amounts, types.Coin{}) + if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AmountsPerBundle", wireType) } - m.AmountPerBundle = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents @@ -1693,11 +1752,26 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AmountPerBundle |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AmountsPerBundle = append(m.AmountsPerBundle, types.Coin{}) + if err := m.AmountsPerBundle[len(m.AmountsPerBundle)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -1800,10 +1874,10 @@ func (m *EventDefundPool) Unmarshal(dAtA []byte) error { m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) } - m.Amount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents @@ -1813,11 +1887,26 @@ func (m *EventDefundPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Amount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amounts = append(m.Amounts, types.Coin{}) + if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/funders/types/funders.go b/x/funders/types/funders.go index 906e258c..420f567e 100644 --- a/x/funders/types/funders.go +++ b/x/funders/types/funders.go @@ -1,19 +1,22 @@ package types -func (f *Funding) AddAmount(amount uint64) { - f.Amount += amount -} +import sdk "github.com/cosmos/cosmos-sdk/types" + +func (f *Funding) GetScore(whitelist []*WhitelistCoinEntry) (score uint64) { + // create map for easier lookup + w := make(map[string]WhitelistCoinEntry) + for _, entry := range whitelist { + w[entry.CoinDenom] = *entry + } -func (f *Funding) SubtractAmount(amount uint64) (subtracted uint64) { - subtracted = amount - if f.Amount < amount { - subtracted = f.Amount + for _, coin := range f.Amounts { + score += uint64(w[coin.Denom].CoinWeight.MulInt64(coin.Amount.Int64()).TruncateInt64()) } - f.Amount -= subtracted - return subtracted + + return } -func (f *Funding) ChargeOneBundle() (amount uint64) { +func (f *Funding) ChargeOneBundle() (amounts sdk.Coins) { amount = f.SubtractAmount(f.AmountPerBundle) f.TotalFunded += amount return amount diff --git a/x/funders/types/funders.pb.go b/x/funders/types/funders.pb.go index 1748443e..40365f6a 100644 --- a/x/funders/types/funders.pb.go +++ b/x/funders/types/funders.pb.go @@ -4,7 +4,12 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -113,6 +118,66 @@ func (m *Funder) GetDescription() string { return "" } +// TODO: do this because else we would have to check the following things: +// if amounts and amounts_per_bundle are given seperately as arrays we would have to check the following: +// - are those arrays of equal size +// - are there any coins which are not whitelisted in one of those arrays +// - is amounts_per_bundle a subset of amounts +type FundEntry struct { + // amount is amount of the coin which is funded + Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + // amounts_per_bundle defines the amount of each coin that are distributed + // per finalized bundle + AmountPerBundle uint64 `protobuf:"varint,2,opt,name=amount_per_bundle,json=amountPerBundle,proto3" json:"amount_per_bundle,omitempty"` +} + +func (m *FundEntry) Reset() { *m = FundEntry{} } +func (m *FundEntry) String() string { return proto.CompactTextString(m) } +func (*FundEntry) ProtoMessage() {} +func (*FundEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_252d80f89b0fa299, []int{1} +} +func (m *FundEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FundEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FundEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FundEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FundEntry.Merge(m, src) +} +func (m *FundEntry) XXX_Size() int { + return m.Size() +} +func (m *FundEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FundEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FundEntry proto.InternalMessageInfo + +func (m *FundEntry) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +func (m *FundEntry) GetAmountPerBundle() uint64 { + if m != nil { + return m.AmountPerBundle + } + return 0 +} + // Funding is the object which holds info about the current funding // funder_address and pool_id (m2m) are unique together which means that // a funder can only fund each pool once and a pool can only be funded @@ -122,19 +187,20 @@ type Funding struct { FunderAddress string `protobuf:"bytes,1,opt,name=funder_address,json=funderAddress,proto3" json:"funder_address,omitempty"` // pool_id is the id of the pool this funding is for PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // amount is the amount of funds in ukyve the funder has left - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // amount_per_bundle is the amount of funds in ukyve the funder pays per bundle - AmountPerBundle uint64 `protobuf:"varint,4,opt,name=amount_per_bundle,json=amountPerBundle,proto3" json:"amount_per_bundle,omitempty"` - // total_funded is the total amount of funds in ukyve the funder has funded - TotalFunded uint64 `protobuf:"varint,5,opt,name=total_funded,json=totalFunded,proto3" json:"total_funded,omitempty"` + // amounts is a list of coins the funder wants to fund the pool with + Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` + // amounts_per_bundle defines the amount of each coin that are distributed + // per finalized bundle + AmountsPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amounts_per_bundle,json=amountsPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts_per_bundle"` + // total_funded is the total amount of coins that the funder has funded + TotalFunded github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=total_funded,json=totalFunded,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_funded"` } func (m *Funding) Reset() { *m = Funding{} } func (m *Funding) String() string { return proto.CompactTextString(m) } func (*Funding) ProtoMessage() {} func (*Funding) Descriptor() ([]byte, []int) { - return fileDescriptor_252d80f89b0fa299, []int{1} + return fileDescriptor_252d80f89b0fa299, []int{2} } func (m *Funding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -177,25 +243,25 @@ func (m *Funding) GetPoolId() uint64 { return 0 } -func (m *Funding) GetAmount() uint64 { +func (m *Funding) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Amount + return m.Amounts } - return 0 + return nil } -func (m *Funding) GetAmountPerBundle() uint64 { +func (m *Funding) GetAmountsPerBundle() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.AmountPerBundle + return m.AmountsPerBundle } - return 0 + return nil } -func (m *Funding) GetTotalFunded() uint64 { +func (m *Funding) GetTotalFunded() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TotalFunded } - return 0 + return nil } // FundingState is the object which holds info about the funding state of a pool @@ -210,7 +276,7 @@ func (m *FundingState) Reset() { *m = FundingState{} } func (m *FundingState) String() string { return proto.CompactTextString(m) } func (*FundingState) ProtoMessage() {} func (*FundingState) Descriptor() ([]byte, []int) { - return fileDescriptor_252d80f89b0fa299, []int{2} + return fileDescriptor_252d80f89b0fa299, []int{3} } func (m *FundingState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -253,10 +319,82 @@ func (m *FundingState) GetActiveFunderAddresses() []string { return nil } +// WhitelistCoinEntry is an object containing information around a coin which +// is allowed to be funded in pools +type WhitelistCoinEntry struct { + // coin_denom is the denom of a coin which is allowed to be funded, this value + // needs to be unique + CoinDenom string `protobuf:"bytes,1,opt,name=coin_denom,json=coinDenom,proto3" json:"coin_denom,omitempty"` + // min_funding_amount is the minimum required amount of this denom that needs + // to be funded + MinFundingAmount uint64 `protobuf:"varint,2,opt,name=min_funding_amount,json=minFundingAmount,proto3" json:"min_funding_amount,omitempty"` + // min_funding_amount_per_bundle is the minimum required amount of this denom + // that needs to be funded per bundle + MinFundingAmountPerBundle uint64 `protobuf:"varint,3,opt,name=min_funding_amount_per_bundle,json=minFundingAmountPerBundle,proto3" json:"min_funding_amount_per_bundle,omitempty"` + // coin_weight is a factor used to sort funders after their funding amounts + CoinWeight cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=coin_weight,json=coinWeight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"coin_weight"` +} + +func (m *WhitelistCoinEntry) Reset() { *m = WhitelistCoinEntry{} } +func (m *WhitelistCoinEntry) String() string { return proto.CompactTextString(m) } +func (*WhitelistCoinEntry) ProtoMessage() {} +func (*WhitelistCoinEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_252d80f89b0fa299, []int{4} +} +func (m *WhitelistCoinEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WhitelistCoinEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WhitelistCoinEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WhitelistCoinEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_WhitelistCoinEntry.Merge(m, src) +} +func (m *WhitelistCoinEntry) XXX_Size() int { + return m.Size() +} +func (m *WhitelistCoinEntry) XXX_DiscardUnknown() { + xxx_messageInfo_WhitelistCoinEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_WhitelistCoinEntry proto.InternalMessageInfo + +func (m *WhitelistCoinEntry) GetCoinDenom() string { + if m != nil { + return m.CoinDenom + } + return "" +} + +func (m *WhitelistCoinEntry) GetMinFundingAmount() uint64 { + if m != nil { + return m.MinFundingAmount + } + return 0 +} + +func (m *WhitelistCoinEntry) GetMinFundingAmountPerBundle() uint64 { + if m != nil { + return m.MinFundingAmountPerBundle + } + return 0 +} + func init() { proto.RegisterType((*Funder)(nil), "kyve.funders.v1beta1.Funder") + proto.RegisterType((*FundEntry)(nil), "kyve.funders.v1beta1.FundEntry") proto.RegisterType((*Funding)(nil), "kyve.funders.v1beta1.Funding") proto.RegisterType((*FundingState)(nil), "kyve.funders.v1beta1.FundingState") + proto.RegisterType((*WhitelistCoinEntry)(nil), "kyve.funders.v1beta1.WhitelistCoinEntry") } func init() { @@ -264,32 +402,47 @@ func init() { } var fileDescriptor_252d80f89b0fa299 = []byte{ - // 386 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0xd1, 0x8a, 0xd3, 0x40, - 0x14, 0x86, 0x3b, 0xbb, 0x31, 0x75, 0x67, 0x57, 0xc5, 0x41, 0xdd, 0xc1, 0x8b, 0x50, 0x03, 0xc2,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x98, 0x79, 0xa1, 0xa4, 0xc7, 0x8f, 0xf2, 0xb8, 0x95, 0x1f, - 0x24, 0x7b, 0x46, 0x63, 0xb1, 0x30, 0x8d, 0x46, 0xcf, 0x1e, 0xe5, 0x9d, 0x62, 0xaf, 0xe8, 0xe3, - 0xf0, 0x55, 0xd4, 0x60, 0x8b, 0xb2, 0xd1, 0x72, 0x1e, 0x3a, 0x44, 0xf9, 0xa3, 0x10, 0x7c, 0x06, - 0x3b, 0xf2, 0x36, 0x7b, 0x41, 0xaf, 0xd0, 0xa0, 0x98, 0x17, 0xfe, 0x9f, 0xd2, 0x17, 0x8a, 0xf2, - 0x4b, 0xef, 0xf9, 0x87, 0x95, 0x69, 0x41, 0xaf, 0x3a, 0xe2, 0x2f, 0x28, 0x10, 0x8e, 0x79, 0xc8, - 0x09, 0xcf, 0x5b, 0x7a, 0x2d, 0x2a, 0x54, 0x4b, 0x28, 0x4e, 0x6b, 0x81, 0xe3, 0x67, 0x83, 0xf3, - 0x9b, 0x8b, 0xfc, 0x69, 0x88, 0xc7, 0xc7, 0xf5, 0xc0, 0x8d, 0xc6, 0x7f, 0xb7, 0x09, 0xd9, 0x6c, - 0x13, 0xf2, 0x7f, 0x9b, 0x90, 0x5f, 0xbb, 0xa4, 0xb7, 0xd9, 0x25, 0xbd, 0x7f, 0xbb, 0xa4, 0xf7, - 0xfd, 0xf5, 0x44, 0xe1, 0xb4, 0x29, 0x87, 0x95, 0x59, 0x64, 0x1f, 0xbf, 0x7d, 0x7d, 0xff, 0x09, - 0x70, 0x65, 0xec, 0x2c, 0xab, 0xa6, 0x42, 0xe9, 0xec, 0xe7, 0xe1, 0x64, 0x70, 0x5d, 0x83, 0x2b, - 0x63, 0x7f, 0x29, 0x6f, 0xee, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x1c, 0xef, 0x4f, 0x4f, 0x02, - 0x00, 0x00, + // 633 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0x13, 0x3d, + 0x14, 0xcd, 0x34, 0x6d, 0xf2, 0xc5, 0xe9, 0x07, 0xad, 0x55, 0xd4, 0x69, 0x51, 0xa7, 0x51, 0x10, + 0x52, 0x55, 0x95, 0x19, 0x15, 0x04, 0x6b, 0x1a, 0xda, 0x4a, 0x08, 0x84, 0x50, 0x90, 0xa8, 0x60, + 0x33, 0x72, 0xc6, 0x97, 0x19, 0x93, 0x8c, 0x1d, 0x8d, 0x9d, 0x96, 0x6c, 0x78, 0x06, 0x5e, 0x81, + 0x1d, 0xea, 0x02, 0xf1, 0x18, 0x5d, 0x76, 0x89, 0x58, 0x14, 0xd4, 0x2e, 0x10, 0x6f, 0x81, 0xfc, + 0x93, 0x30, 0x85, 0x75, 0x37, 0x89, 0xef, 0x3d, 0x3e, 0xbe, 0xd7, 0xe7, 0xdc, 0x31, 0x6a, 0xf7, + 0xc7, 0x87, 0x10, 0xbd, 0x19, 0x71, 0x0a, 0x85, 0x8c, 0x0e, 0xb7, 0x7b, 0xa0, 0xc8, 0xf6, 0x24, + 0x0e, 0x87, 0x85, 0x50, 0x02, 0x2f, 0xe9, 0x3d, 0xe1, 0x24, 0xe7, 0xf6, 0xac, 0x06, 0x89, 0x90, + 0xb9, 0x90, 0x51, 0x8f, 0x48, 0x98, 0x12, 0x13, 0xc1, 0xb8, 0x65, 0xad, 0x2e, 0xa5, 0x22, 0x15, + 0x66, 0x19, 0xe9, 0x95, 0xcb, 0x2e, 0x92, 0x9c, 0x71, 0x11, 0x99, 0x5f, 0x9b, 0x6a, 0x7f, 0xf6, + 0x50, 0x6d, 0xdf, 0x1c, 0x8e, 0x7d, 0x54, 0x27, 0x94, 0x16, 0x20, 0xa5, 0xef, 0xb5, 0xbc, 0x8d, + 0x46, 0x77, 0x12, 0x6a, 0x24, 0x17, 0x9c, 0xf5, 0xa1, 0xf0, 0x67, 0x2c, 0xe2, 0x42, 0xb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0x49, 0xc6, 0xbb, 0x90, + 0x74, 0xcd, 0x35, 0x0e, 0x0c, 0xad, 0xb3, 0x7f, 0x72, 0x1e, 0x78, 0xa7, 0xe7, 0x81, 0xf7, 0xe3, + 0x3c, 0xf0, 0x3e, 0x5c, 0x04, 0x95, 0xd3, 0x8b, 0xa0, 0xf2, 0xf5, 0x22, 0xa8, 0xbc, 0xde, 0x2a, + 0x59, 0xf4, 0xe4, 0xd5, 0xcb, 0xbd, 0x67, 0xa0, 0x8e, 0x44, 0xd1, 0x8f, 0x92, 0x8c, 0x30, 0x1e, + 0xbd, 0x9b, 0xbe, 0x82, 0xc6, 0xac, 0x5e, 0xcd, 0xbc, 0x4e, 0xf7, 0x7e, 0x07, 0x00, 0x00, 0xff, + 0xff, 0x12, 0xe5, 0x08, 0x8e, 0x22, 0x05, 0x00, 0x00, } func (m *Funder) Marshal() (dAtA []byte, err error) { @@ -357,6 +510,44 @@ func (m *Funder) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *FundEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FundEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FundEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AmountPerBundle != 0 { + i = encodeVarintFunders(dAtA, i, uint64(m.AmountPerBundle)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *Funding) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -377,20 +568,47 @@ func (m *Funding) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TotalFunded != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.TotalFunded)) - i-- - dAtA[i] = 0x28 + if len(m.TotalFunded) > 0 { + for iNdEx := len(m.TotalFunded) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalFunded[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } } - if m.AmountPerBundle != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.AmountPerBundle)) - i-- - dAtA[i] = 0x20 + if len(m.AmountsPerBundle) > 0 { + for iNdEx := len(m.AmountsPerBundle) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AmountsPerBundle[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - if m.Amount != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 + if len(m.Amounts) > 0 { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } if m.PoolId != 0 { i = encodeVarintFunders(dAtA, i, uint64(m.PoolId)) @@ -444,6 +662,56 @@ func (m *FundingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *WhitelistCoinEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WhitelistCoinEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WhitelistCoinEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.CoinWeight.Size() + i -= size + if _, err := m.CoinWeight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.MinFundingAmountPerBundle != 0 { + i = encodeVarintFunders(dAtA, i, uint64(m.MinFundingAmountPerBundle)) + i-- + dAtA[i] = 0x18 + } + if m.MinFundingAmount != 0 { + i = encodeVarintFunders(dAtA, i, uint64(m.MinFundingAmount)) + i-- + dAtA[i] = 0x10 + } + if len(m.CoinDenom) > 0 { + i -= len(m.CoinDenom) + copy(dAtA[i:], m.CoinDenom) + i = encodeVarintFunders(dAtA, i, uint64(len(m.CoinDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintFunders(dAtA []byte, offset int, v uint64) int { offset -= sovFunders(v) base := offset @@ -488,6 +756,20 @@ func (m *Funder) Size() (n int) { return n } +func (m *FundEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovFunders(uint64(l)) + if m.AmountPerBundle != 0 { + n += 1 + sovFunders(uint64(m.AmountPerBundle)) + } + return n +} + func (m *Funding) Size() (n int) { if m == nil { return 0 @@ -501,14 +783,23 @@ func (m *Funding) Size() (n int) { if m.PoolId != 0 { n += 1 + sovFunders(uint64(m.PoolId)) } - if m.Amount != 0 { - n += 1 + sovFunders(uint64(m.Amount)) + if len(m.Amounts) > 0 { + for _, e := range m.Amounts { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } - if m.AmountPerBundle != 0 { - n += 1 + sovFunders(uint64(m.AmountPerBundle)) + if len(m.AmountsPerBundle) > 0 { + for _, e := range m.AmountsPerBundle { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } - if m.TotalFunded != 0 { - n += 1 + sovFunders(uint64(m.TotalFunded)) + if len(m.TotalFunded) > 0 { + for _, e := range m.TotalFunded { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } return n } @@ -531,6 +822,27 @@ func (m *FundingState) Size() (n int) { return n } +func (m *WhitelistCoinEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CoinDenom) + if l > 0 { + n += 1 + l + sovFunders(uint64(l)) + } + if m.MinFundingAmount != 0 { + n += 1 + sovFunders(uint64(m.MinFundingAmount)) + } + if m.MinFundingAmountPerBundle != 0 { + n += 1 + sovFunders(uint64(m.MinFundingAmountPerBundle)) + } + l = m.CoinWeight.Size() + n += 1 + l + sovFunders(uint64(l)) + return n +} + func sovFunders(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -779,6 +1091,108 @@ func (m *Funder) Unmarshal(dAtA []byte) error { } return nil } +func (m *FundEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FundEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FundEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) + } + m.AmountPerBundle = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AmountPerBundle |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFunders(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFunders + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Funding) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -860,10 +1274,10 @@ func (m *Funding) Unmarshal(dAtA []byte) error { } } case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) } - m.Amount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -873,16 +1287,31 @@ func (m *Funding) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Amount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amounts = append(m.Amounts, types.Coin{}) + if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AmountsPerBundle", wireType) } - m.AmountPerBundle = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -892,16 +1321,31 @@ func (m *Funding) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AmountPerBundle |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AmountsPerBundle = append(m.AmountsPerBundle, types.Coin{}) + if err := m.AmountsPerBundle[len(m.AmountsPerBundle)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 5: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalFunded", wireType) } - m.TotalFunded = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -911,11 +1355,26 @@ func (m *Funding) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalFunded |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalFunded = append(m.TotalFunded, types.Coin{}) + if err := m.TotalFunded[len(m.TotalFunded)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFunders(dAtA[iNdEx:]) @@ -1038,6 +1497,160 @@ func (m *FundingState) Unmarshal(dAtA []byte) error { } return nil } +func (m *WhitelistCoinEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WhitelistCoinEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WhitelistCoinEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + 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 ErrInvalidLengthFunders + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoinDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinFundingAmount", wireType) + } + m.MinFundingAmount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinFundingAmount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinFundingAmountPerBundle", wireType) + } + m.MinFundingAmountPerBundle = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinFundingAmountPerBundle |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinWeight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + 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 ErrInvalidLengthFunders + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CoinWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFunders(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFunders + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipFunders(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/funders/types/params.pb.go b/x/funders/types/params.pb.go index adf8da11..8c3684e6 100644 --- a/x/funders/types/params.pb.go +++ b/x/funders/types/params.pb.go @@ -24,14 +24,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the funders module parameters. type Params struct { - // Minimum amount of tokens that can be funded. - MinFundingAmount uint64 `protobuf:"varint,1,opt,name=min_funding_amount,json=minFundingAmount,proto3" json:"min_funding_amount,omitempty"` - // Minimum amount of tokens that can be funded per bundle. - MinFundingAmountPerBundle uint64 `protobuf:"varint,2,opt,name=min_funding_amount_per_bundle,json=minFundingAmountPerBundle,proto3" json:"min_funding_amount_per_bundle,omitempty"` + // coin_whitelist is a list of coins that are allowed to fund a pool + CoinWhitelist []*WhitelistCoinEntry `protobuf:"bytes,1,rep,name=coin_whitelist,json=coinWhitelist,proto3" json:"coin_whitelist,omitempty"` // Minimum ratio between the funded amount and the amount_per_bundle. - // In other words this param ensures, that a funder provides at least funding for - // `min_funding_multiple` bundles. - MinFundingMultiple uint64 `protobuf:"varint,3,opt,name=min_funding_multiple,json=minFundingMultiple,proto3" json:"min_funding_multiple,omitempty"` + // In other words this param ensures, that a funder provides at least + // funding for `min_funding_multiple` bundles. + MinFundingMultiple uint64 `protobuf:"varint,2,opt,name=min_funding_multiple,json=minFundingMultiple,proto3" json:"min_funding_multiple,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -67,18 +65,11 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo -func (m *Params) GetMinFundingAmount() uint64 { +func (m *Params) GetCoinWhitelist() []*WhitelistCoinEntry { if m != nil { - return m.MinFundingAmount + return m.CoinWhitelist } - return 0 -} - -func (m *Params) GetMinFundingAmountPerBundle() uint64 { - if m != nil { - return m.MinFundingAmountPerBundle - } - return 0 + return nil } func (m *Params) GetMinFundingMultiple() uint64 { @@ -95,23 +86,23 @@ func init() { func init() { proto.RegisterFile("kyve/funders/v1beta1/params.proto", fileDescriptor_906a9a55094dc984) } var fileDescriptor_906a9a55094dc984 = []byte{ - // 241 bytes of a gzipped FileDescriptorProto + // 244 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcc, 0xae, 0x2c, 0x4b, 0xd5, 0x4f, 0x2b, 0xcd, 0x4b, 0x49, 0x2d, 0x2a, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x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 0xe0, 0x21, 0x53, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, - 0x0e, 0x11, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x66, 0xb6, 0xfa, 0xe0, 0x36, 0x01, 0x00, - 0x00, + 0x29, 0xd1, 0x83, 0x2a, 0xd1, 0x83, 0x2a, 0x91, 0x52, 0xc2, 0xaa, 0x11, 0xa6, 0x0a, 0xac, 0x53, + 0xa9, 0x9b, 0x91, 0x8b, 0x2d, 0x00, 0x6c, 0x94, 0x90, 0x3f, 0x17, 0x5f, 0x72, 0x7e, 0x66, 0x5e, + 0x7c, 0x79, 0x46, 0x66, 0x49, 0x6a, 0x4e, 0x66, 0x71, 0x89, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, + 0x91, 0x86, 0x1e, 0x36, 0xd3, 0xf5, 0xc2, 0x61, 0xca, 0x9c, 0xf3, 0x33, 0xf3, 0x5c, 0xf3, 0x4a, + 0x8a, 0x2a, 0x83, 0x78, 0x41, 0xfa, 0xe1, 0xe2, 0x42, 0x06, 0x5c, 0x22, 0xb9, 0x99, 0x79, 0xf1, + 0x20, 0x8d, 0x99, 0x79, 0xe9, 0xf1, 0xb9, 0xa5, 0x39, 0x25, 0x99, 0x05, 0x39, 0xa9, 0x12, 0x4c, + 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x42, 0xb9, 0x99, 0x79, 0x6e, 0x10, 0x29, 0x5f, 0xa8, 0x8c, 0x93, + 0xdb, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, + 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa4, 0x67, 0x96, 0x64, + 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x7b, 0x47, 0x86, 0xb9, 0xfa, 0xa5, 0x96, 0x94, 0xe7, + 0x17, 0x65, 0xeb, 0x27, 0x67, 0x24, 0x66, 0xe6, 0xe9, 0x57, 0xc0, 0x7d, 0x59, 0x52, 0x59, 0x90, + 0x5a, 0x9c, 0xc4, 0x06, 0xf6, 0x9c, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x56, 0x38, 0xef, 0xb1, + 0x3b, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -137,17 +128,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.MinFundingMultiple != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MinFundingMultiple)) i-- - dAtA[i] = 0x18 - } - if m.MinFundingAmountPerBundle != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MinFundingAmountPerBundle)) - i-- dAtA[i] = 0x10 } - if m.MinFundingAmount != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MinFundingAmount)) - i-- - dAtA[i] = 0x8 + if len(m.CoinWhitelist) > 0 { + for iNdEx := len(m.CoinWhitelist) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CoinWhitelist[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } @@ -169,11 +164,11 @@ func (m *Params) Size() (n int) { } var l int _ = l - if m.MinFundingAmount != 0 { - n += 1 + sovParams(uint64(m.MinFundingAmount)) - } - if m.MinFundingAmountPerBundle != 0 { - n += 1 + sovParams(uint64(m.MinFundingAmountPerBundle)) + if len(m.CoinWhitelist) > 0 { + for _, e := range m.CoinWhitelist { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } } if m.MinFundingMultiple != 0 { n += 1 + sovParams(uint64(m.MinFundingMultiple)) @@ -217,10 +212,10 @@ func (m *Params) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinFundingAmount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinWhitelist", wireType) } - m.MinFundingAmount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams @@ -230,31 +225,27 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MinFundingAmount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinFundingAmountPerBundle", wireType) + if msglen < 0 { + return ErrInvalidLengthParams } - m.MinFundingAmountPerBundle = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinFundingAmountPerBundle |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams } - case 3: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoinWhitelist = append(m.CoinWhitelist, &WhitelistCoinEntry{}) + if err := m.CoinWhitelist[len(m.CoinWhitelist)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinFundingMultiple", wireType) } diff --git a/x/funders/types/tx.pb.go b/x/funders/types/tx.pb.go index 1c38a028..9b42dd51 100644 --- a/x/funders/types/tx.pb.go +++ b/x/funders/types/tx.pb.go @@ -7,7 +7,11 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -287,14 +291,15 @@ var xxx_messageInfo_MsgUpdateFunderResponse proto.InternalMessageInfo // MsgFundPool defines a SDK message for funding a pool. type MsgFundPool struct { - // creator ... + // creator is the funder of the pool Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // id ... + // pool_id is the identifier of the pool PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // amount is the total amount available for distribution - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // amount_per_bundle defines the amount of tokens that are distributed per submitted bundle - AmountPerBundle uint64 `protobuf:"varint,4,opt,name=amount_per_bundle,json=amountPerBundle,proto3" json:"amount_per_bundle,omitempty"` + // amount is the amount of a coin the creator wants to fund + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"` + // amount_per_bundle is the amount of the coin the creator wants to distribute + // per finalized bundle + AmountPerBundle types.Coin `protobuf:"bytes,4,opt,name=amount_per_bundle,json=amountPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount_per_bundle"` } func (m *MsgFundPool) Reset() { *m = MsgFundPool{} } @@ -344,18 +349,18 @@ func (m *MsgFundPool) GetPoolId() uint64 { return 0 } -func (m *MsgFundPool) GetAmount() uint64 { +func (m *MsgFundPool) GetAmount() types.Coin { if m != nil { return m.Amount } - return 0 + return types.Coin{} } -func (m *MsgFundPool) GetAmountPerBundle() uint64 { +func (m *MsgFundPool) GetAmountPerBundle() types.Coin { if m != nil { return m.AmountPerBundle } - return 0 + return types.Coin{} } // MsgFundPoolResponse defines the Msg/DefundPool response type. @@ -397,12 +402,12 @@ var xxx_messageInfo_MsgFundPoolResponse proto.InternalMessageInfo // MsgDefundPool defines a SDK message for defunding a pool. type MsgDefundPool struct { - // creator ... + // creator is the funder of the pool who wants to defund now Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // id ... + // pool_id is the identifier of the pool PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // amount ... - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // amounts is a list of coins the creator wants to defund from the pool + Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` } func (m *MsgDefundPool) Reset() { *m = MsgDefundPool{} } @@ -452,11 +457,11 @@ func (m *MsgDefundPool) GetPoolId() uint64 { return 0 } -func (m *MsgDefundPool) GetAmount() uint64 { +func (m *MsgDefundPool) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Amount + return m.Amounts } - return 0 + return nil } // MsgDefundPoolResponse defines the Msg/DefundPool response type. @@ -604,44 +609,51 @@ func init() { func init() { proto.RegisterFile("kyve/funders/v1beta1/tx.proto", fileDescriptor_5145d80c2db97f3d) } var fileDescriptor_5145d80c2db97f3d = []byte{ - // 588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0x41, 0x6f, 0xd3, 0x30, - 0x18, 0x5d, 0x68, 0xd7, 0x6d, 0xde, 0x60, 0x22, 0x6c, 0x34, 0x8b, 0x44, 0x34, 0x86, 0x90, 0xa0, - 0xb0, 0x44, 0x05, 0x89, 0xc3, 0x6e, 0x14, 0x98, 0x84, 0x50, 0x51, 0x15, 0x04, 0x02, 0x0e, 0x54, - 0x69, 0xec, 0xa5, 0x51, 0x1b, 0x3b, 0x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, 0x69, 0x6f, - 0xed, 0xd3, 0xe9, 0x71, 0x25, 0x75, 0xb6, 0xb3, 0x05, 0xca, 0x53, 0x31, 0x5c, 0xc4, 0x62, 0x82, - 0x19, 0x4a, 0x23, 0xbe, 0x8e, 0xe1, 0xff, 0x10, 0x31, 0x1f, 0x23, 0x8b, 0xf8, 0x45, 0x03, 0xab, - 0x75, 0x16, 0x88, 0xd5, 0x06, 0x21, 0xdd, 0x73, 0xe2, 0x95, 0xc1, 0x52, 0x4c, 0x48, 0xb7, 0x19, - 0x42, 0x19, 0xaf, 0xe8, 0x96, 0x04, 0x7c, 0x0e, 0xf5, 0xeb, 0xa0, 0xe4, 0x45, 0xa4, 0x87, 0xb9, - 0xcc, 0x56, 0x74, 0x13, 0xa4, 0x57, 0xc0, 0x55, 0xf5, 0xad, 0x19, 0x23, 0xda, 0x6c, 0xf5, 0x30, - 0xec, 0xaa, 0x8c, 0x45, 0x77, 0x5d, 0x11, 0x0d, 0x44, 0x6b, 0x72, 0x79, 0xca, 0xef, 0x26, 0xb8, - 0x96, 0xf3, 0x94, 0x79, 0x6d, 0x83, 0xcb, 0x75, 0x16, 0x3c, 0x45, 0x07, 0xff, 0xde, 0xec, 0x94, - 0x81, 0x32, 0xd8, 0x9c, 0xa8, 0x94, 0x59, 0x60, 0xb9, 0x86, 0x68, 0x78, 0xd4, 0x8b, 0x98, 0xfe, - 0x08, 0xac, 0x78, 0x3d, 0xde, 0x26, 0x54, 0xbc, 0xae, 0xb4, 0x51, 0x33, 0x7e, 0x7c, 0xdd, 0xdd, - 0x48, 0x86, 0xe5, 0x31, 0x84, 0x14, 0x31, 0xf6, 0x8a, 0xd3, 0x10, 0x07, 0xee, 0x58, 0x2a, 0xcc, - 0xc7, 0xde, 0xa0, 0x4b, 0x3c, 0x98, 0xb6, 0x4b, 0x02, 0xf7, 0xae, 0x08, 0x2f, 0x63, 0xe5, 0xc4, - 0xf3, 0xa9, 0xa2, 0xa9, 0x9f, 0x07, 0xbf, 0x0b, 0xa0, 0x50, 0x67, 0x81, 0x0e, 0xc1, 0xda, 0xc4, - 0x20, 0xde, 0xb6, 0xcf, 0x9a, 0x73, 0x7b, 0xaa, 0xd1, 0xcd, 0xdd, 0x0b, 0xc9, 0xd2, 0x6a, 0xa2, - 0xca, 0xc4, 0x2c, 0xcc, 0xae, 0x92, 0x97, 0x9d, 0x53, 0xe5, 0xac, 0x96, 0xd4, 0xdf, 0x82, 0xe5, - 0xac, 0x1d, 0x6f, 0xce, 0xdc, 0x9a, 0x4a, 0xcc, 0xbb, 0x73, 0x25, 0xd9, 0xc9, 0x1f, 0x00, 0xc8, - 0x75, 0xcf, 0xad, 0x99, 0x1b, 0xc7, 0x22, 0xf3, 0xde, 0x05, 0x44, 0x7f, 0xdf, 0x4f, 0xd2, 0x1a, - 0xf3, 0xee, 0x47, 0xc9, 0xe6, 0xde, 0xcf, 0xe4, 0x9b, 0x9b, 0x8b, 0x1f, 0x4f, 0x8f, 0x2b, 0x5a, - 0x6d, 0xff, 0xfb, 0xd0, 0xd2, 0x4e, 0x86, 0x96, 0xf6, 0x6b, 0x68, 0x69, 0x9f, 0x47, 0xd6, 0xc2, - 0xc9, 0xc8, 0x5a, 0xf8, 0x39, 0xb2, 0x16, 0xde, 0xdf, 0x0f, 0x42, 0xde, 0xee, 0xb5, 0x6c, 0x9f, - 0x44, 0xce, 0x8b, 0x77, 0x6f, 0x9e, 0xbd, 0x44, 0xfc, 0x90, 0xd0, 0x8e, 0xe3, 0xb7, 0xbd, 0x10, - 0x3b, 0x47, 0xd9, 0x9f, 0x03, 0x1f, 0xc4, 0x88, 0xb5, 0x4a, 0xf2, 0xe7, 0xfc, 0xe1, 0x9f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xde, 0xdc, 0x70, 0xa2, 0x39, 0x06, 0x00, 0x00, + // 697 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0x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18, 0xab, 0xb2, 0x68, 0x85, 0x42, 0x9f, 0xc3, 0x55, 0x09, 0x99, 0x16, 0x18, 0x0c, + 0x44, 0x4c, 0xa8, 0x65, 0xcc, 0x18, 0x73, 0xc3, 0xb5, 0x34, 0x14, 0x48, 0x4c, 0x30, 0x6a, 0x42, + 0x6a, 0xf5, 0x29, 0x44, 0x87, 0xa6, 0x0d, 0x86, 0x50, 0x08, 0x31, 0x47, 0xbc, 0x63, 0x15, 0x25, + 0x94, 0xc5, 0x22, 0x6b, 0x0b, 0x36, 0x18, 0xe2, 0xd0, 0xea, 0x57, 0x59, 0x3a, 0x94, 0x4a, 0x04, + 0x73, 0x3f, 0xe0, 0xd6, 0x80, 0x56, 0x52, 0xa1, 0x39, 0x03, 0x46, 0x42, 0xc8, 0x02, 0x8a, 0x12, + 0x8e, 0x08, 0xb6, 0x4a, 0x12, 0xcd, 0x1f, 0x2d, 0x8f, 0xbe, 0x3d, 0xda, 0x99, 0x4f, 0x2b, 0x9b, + 0x9d, 0x02, 0xe5, 0x1e, 0x1b, 0x35, 0xc8, 0x12, 0x82, 0x19, 0x4c, 0x2d, 0x3e, 0x49, 0xc2, 0xbf, + 0xc1, 0x62, 0xde, 0x46, 0x66, 0x71, 0xb7, 0x0f, 0x8c, 0x54, 0x59, 0x24, 0x4e, 0xd7, 0x08, 0x69, + 0x9d, 0x61, 0xaf, 0x0c, 0x06, 0x13, 0x42, 0x5a, 0x75, 0x14, 0x4a, 0x7b, 0xfd, 0xb5, 0x92, 0x08, + 0x1f, 0x84, 0x66, 0x04, 0x4a, 0x7e, 0x4c, 0xda, 0x98, 0x4b, 0x6f, 0x23, 0x4b, 0x53, 0xae, 0x1e, + 0x4a, 0x31, 0x86, 0xe9, 0x3c, 0xbb, 0x2b, 0x04, 0xe1, 0xca, 0xad, 0xbd, 0xaf, 0xd3, 0x85, 0x0f, + 0xdf, 0xa6, 0xaf, 0x46, 0x88, 0x6f, 0xb4, 0x1b, 0x6e, 0x40, 0x62, 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6, + 0xc2, 0x85, 0x68, 0xa9, 0x9a, 0x50, 0xe9, 0x7a, 0x05, 0x9c, 0xae, 0x92, 0xa7, 0x9d, 0xa1, 0x72, + 0xd2, 0x26, 0x9a, 0xcf, 0xc0, 0x50, 0xb6, 0x85, 0x97, 0x4e, 0x4d, 0x4d, 0x29, 0xf6, 0xb5, 0x73, + 0x29, 0xd9, 0x93, 0x5f, 0x02, 0x90, 0x9b, 0xc8, 0xcb, 0xa7, 0x26, 0x1e, 0x93, 0xec, 0xeb, 0x17, + 0x20, 0xfd, 0xda, 0x1f, 0x3d, 0x1a, 0xe7, 0xf5, 0x47, 0xd1, 0xce, 0xed, 0x4f, 0xf7, 0x7f, 0x6e, + 0x0f, 0xbc, 0x11, 0xa3, 0x5b, 0x59, 0xdd, 0x3b, 0x70, 0x8c, 0xfd, 0x03, 0xc7, 0xf8, 0x7e, 0xe0, + 0x18, 0xef, 0x0e, 0x9d, 0xc2, 0xfe, 0xa1, 0x53, 0xf8, 0x72, 0xe8, 0x14, 0x5e, 0xdc, 0xc8, 0xed, + 0xc0, 0xc3, 0xe7, 0x4f, 0xef, 0x3f, 0x82, 0x7c, 0x8b, 0xd0, 0xa6, 0x17, 0x6c, 0xf8, 0x08, 0x7b, + 0xdb, 0xd9, 0xe7, 0x4c, 0x6e, 0x43, 0xa3, 0x24, 0xbf, 0x62, 0x37, 0x7f, 0x06, 0x00, 0x00, 0xff, + 0xff, 0xfc, 0x74, 0x92, 0x3d, 0x9d, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1076,16 +1088,26 @@ func (m *MsgFundPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.AmountPerBundle != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.AmountPerBundle)) - i-- - dAtA[i] = 0x20 + { + size, err := m.AmountPerBundle.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - if m.Amount != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 + i-- + dAtA[i] = 0x22 + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.PoolId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) i-- @@ -1144,10 +1166,19 @@ func (m *MsgDefundPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Amount != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 + if len(m.Amounts) > 0 { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } if m.PoolId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) @@ -1355,12 +1386,10 @@ func (m *MsgFundPool) Size() (n int) { if m.PoolId != 0 { n += 1 + sovTx(uint64(m.PoolId)) } - if m.Amount != 0 { - n += 1 + sovTx(uint64(m.Amount)) - } - if m.AmountPerBundle != 0 { - n += 1 + sovTx(uint64(m.AmountPerBundle)) - } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.AmountPerBundle.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -1386,8 +1415,11 @@ func (m *MsgDefundPool) Size() (n int) { if m.PoolId != 0 { n += 1 + sovTx(uint64(m.PoolId)) } - if m.Amount != 0 { - n += 1 + sovTx(uint64(m.Amount)) + if len(m.Amounts) > 0 { + for _, e := range m.Amounts { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } } return n } @@ -2098,10 +2130,10 @@ func (m *MsgFundPool) Unmarshal(dAtA []byte) error { } } case 3: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - m.Amount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2111,16 +2143,30 @@ func (m *MsgFundPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Amount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) } - m.AmountPerBundle = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2130,11 +2176,25 @@ func (m *MsgFundPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AmountPerBundle |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AmountPerBundle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2287,10 +2347,10 @@ func (m *MsgDefundPool) Unmarshal(dAtA []byte) error { } } case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) } - m.Amount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2300,11 +2360,26 @@ func (m *MsgDefundPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Amount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amounts = append(m.Amounts, types.Coin{}) + if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/query/types/funders.pb.go b/x/query/types/funders.pb.go index 8b8da549..43a30231 100644 --- a/x/query/types/funders.pb.go +++ b/x/query/types/funders.pb.go @@ -6,7 +6,10 @@ package types import ( context "context" fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -165,11 +168,12 @@ func (m *Funder) GetStats() *FundingStats { // FundingStats ... type FundingStats struct { // total_used_funds are the total funds that have been distributed by the funder. - TotalUsedFunds uint64 `protobuf:"varint,1,opt,name=total_used_funds,json=totalUsedFunds,proto3" json:"total_used_funds,omitempty"` - // total_allocated_funds are the total funds that have been allocated by the funder. They can either get distributed or refunded. - TotalAllocatedFunds uint64 `protobuf:"varint,2,opt,name=total_allocated_funds,json=totalAllocatedFunds,proto3" json:"total_allocated_funds,omitempty"` + TotalUsedFunds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=total_used_funds,json=totalUsedFunds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_used_funds"` + // total_allocated_funds are the total funds that have been allocated by the funder. + // They can either get distributed or refunded. + TotalAllocatedFunds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=total_allocated_funds,json=totalAllocatedFunds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_allocated_funds"` // total_amount_per_bundle is the total amount per bundle of all fundings of the funder. - TotalAmountPerBundle uint64 `protobuf:"varint,3,opt,name=total_amount_per_bundle,json=totalAmountPerBundle,proto3" json:"total_amount_per_bundle,omitempty"` + TotalAmountPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=total_amount_per_bundle,json=totalAmountPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_amount_per_bundle"` // pools_funded are the ids of the pools that have been funded by the funder. PoolsFunded []uint64 `protobuf:"varint,4,rep,packed,name=pools_funded,json=poolsFunded,proto3" json:"pools_funded,omitempty"` } @@ -207,25 +211,25 @@ func (m *FundingStats) XXX_DiscardUnknown() { var xxx_messageInfo_FundingStats proto.InternalMessageInfo -func (m *FundingStats) GetTotalUsedFunds() uint64 { +func (m *FundingStats) GetTotalUsedFunds() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TotalUsedFunds } - return 0 + return nil } -func (m *FundingStats) GetTotalAllocatedFunds() uint64 { +func (m *FundingStats) GetTotalAllocatedFunds() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TotalAllocatedFunds } - return 0 + return nil } -func (m *FundingStats) GetTotalAmountPerBundle() uint64 { +func (m *FundingStats) GetTotalAmountPerBundle() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TotalAmountPerBundle } - return 0 + return nil } func (m *FundingStats) GetPoolsFunded() []uint64 { @@ -237,16 +241,17 @@ func (m *FundingStats) GetPoolsFunded() []uint64 { // Funding ... type Funding struct { - // funder_address + // funder_id is the id of the funder FunderAddress string `protobuf:"bytes,1,opt,name=funder_address,json=funderAddress,proto3" json:"funder_address,omitempty"` - // pool_id ... + // pool_id is the id of the pool this funding is for PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // amount ... - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // amount_per_bundle ... - AmountPerBundle uint64 `protobuf:"varint,4,opt,name=amount_per_bundle,json=amountPerBundle,proto3" json:"amount_per_bundle,omitempty"` - // total_funded ... - TotalFunded uint64 `protobuf:"varint,5,opt,name=total_funded,json=totalFunded,proto3" json:"total_funded,omitempty"` + // amounts is a list of coins the funder wants to fund the pool with + Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` + // amounts_per_bundle defines the amount of each coin that are distributed + // per finalized bundle + AmountsPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amounts_per_bundle,json=amountsPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts_per_bundle"` + // total_funded is the total amount of coins that the funder has funded + TotalFunded github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=total_funded,json=totalFunded,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_funded"` } func (m *Funding) Reset() { *m = Funding{} } @@ -296,25 +301,25 @@ func (m *Funding) GetPoolId() uint64 { return 0 } -func (m *Funding) GetAmount() uint64 { +func (m *Funding) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Amount + return m.Amounts } - return 0 + return nil } -func (m *Funding) GetAmountPerBundle() uint64 { +func (m *Funding) GetAmountsPerBundle() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.AmountPerBundle + return m.AmountsPerBundle } - return 0 + return nil } -func (m *Funding) GetTotalFunded() uint64 { +func (m *Funding) GetTotalFunded() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TotalFunded } - return 0 + return nil } // QueryFundersRequest is the request type for the Query/Funders RPC method. @@ -793,67 +798,72 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/funders.proto", fileDescriptor_a182f068d9f0dba9) } var fileDescriptor_a182f068d9f0dba9 = []byte{ - // 952 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0x3d, 0xce, 0xc6, 0x2e, 0xcf, 0x69, 0x08, 0xd3, 0x94, 0x2c, 0x9b, 0xd6, 0xb8, 0x06, - 0x12, 0x2b, 0x42, 0xbb, 0x89, 0x11, 0x15, 0x20, 0x71, 0x48, 0x9a, 0xa4, 0xb2, 0x90, 0xac, 0xb0, - 0x49, 0x2a, 0xc1, 0x65, 0xb5, 0xf6, 0x4e, 0x9d, 0x55, 0xec, 0x9d, 0xed, 0xce, 0x6c, 0x8b, 0x55, - 0xf5, 0x00, 0x17, 0x7a, 0x44, 0xe2, 0xc8, 0x11, 0x21, 0xc4, 0x0d, 0x6e, 0x48, 0xdc, 0x51, 0x8f, - 0x95, 0xb8, 0x70, 0x42, 0x28, 0x41, 0xfc, 0x15, 0x1c, 0xd0, 0xfc, 0xb0, 0x6b, 0x3b, 0x76, 0x5c, - 0xd4, 0x1c, 0xb8, 0xed, 0xbc, 0xf7, 0xbe, 0x7e, 0x9f, 0xf7, 0x63, 0xd6, 0x0b, 0xa5, 0xe3, 0xee, - 0x7d, 0xe2, 0xdc, 0x4b, 0x49, 0xd2, 0x75, 0xee, 0x6f, 0x34, 0x08, 0xf7, 0x37, 0x9c, 0xbb, 0x69, - 0x14, 0x90, 0x84, 0xd9, 0x71, 0x42, 0x39, 0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x76, 0x1d, 0xdb, - 0xd3, 0x68, 0xc5, 0x45, 0x76, 0x1e, 0xea, 0xdb, 0xfd, 0x68, 0x6b, 0xfb, 0xc9, 0x49, 0x11, 0x3d, - 0x3d, 0x29, 0xa2, 0x3f, 0x4f, 0x8a, 0xe8, 0xab, 0xd3, 0x62, 0xe6, 0xe9, 0x69, 0x31, 0xf3, 0xfb, - 0x69, 0x31, 0xf3, 0xe9, 0x5a, 0x2b, 0xe4, 0x47, 0x69, 0xc3, 0x6e, 0xd2, 0x8e, 0xf3, 0xd1, 0x27, - 0x77, 0x76, 0xea, 0x84, 0x3f, 0xa0, 0xc9, 0xb1, 0xd3, 0x3c, 0xf2, 0xc3, 0xc8, 0xf9, 0x4c, 0xa7, - 0xe0, 0xdd, 0x98, 0xb0, 0x46, 0x4e, 0x7e, 0x75, 0xbe, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x7e, 0x45, 0x8a, 0xda, 0x0d, 0x0b, 0x00, 0x00, + // 1035 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xd8, 0x8e, 0x5d, 0xc6, 0x69, 0x64, 0xa6, 0x29, 0xd9, 0x6e, 0x5a, 0xd7, 0x35, 0x90, + 0x58, 0x11, 0xec, 0x26, 0x46, 0x54, 0x80, 0xc4, 0x21, 0xce, 0x8f, 0xca, 0x42, 0xb2, 0xc2, 0x26, + 0xa9, 0x04, 0x97, 0xd5, 0xda, 0x3b, 0x75, 0x96, 0xd8, 0x3b, 0xee, 0xce, 0x6c, 0x8b, 0xa9, 0x8a, + 0x04, 0x42, 0xa2, 0x47, 0x24, 0x8e, 0x1c, 0x11, 0x02, 0x7a, 0x82, 0x1b, 0x12, 0x12, 0xe7, 0x1e, + 0x2b, 0x71, 0xe1, 0x04, 0x28, 0x41, 0xf0, 0x4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5d, 0xdf, 0xaa, 0x63, 0x76, 0x9b, 0x04, 0x87, 0x66, 0xf3, 0xc0, 0xf1, + 0x7c, 0xf3, 0x43, 0x05, 0x21, 0x5e, 0x08, 0x8d, 0x8c, 0xf8, 0x9f, 0xf1, 0xda, 0x7f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x89, 0x1d, 0x7d, 0xbf, 0x32, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1167,20 +1177,47 @@ func (m *FundingStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.TotalAmountPerBundle != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.TotalAmountPerBundle)) - i-- - dAtA[i] = 0x18 + if len(m.TotalAmountPerBundle) > 0 { + for iNdEx := len(m.TotalAmountPerBundle) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalAmountPerBundle[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - if m.TotalAllocatedFunds != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.TotalAllocatedFunds)) - i-- - dAtA[i] = 0x10 + if len(m.TotalAllocatedFunds) > 0 { + for iNdEx := len(m.TotalAllocatedFunds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalAllocatedFunds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - if m.TotalUsedFunds != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.TotalUsedFunds)) - i-- - dAtA[i] = 0x8 + if len(m.TotalUsedFunds) > 0 { + for iNdEx := len(m.TotalUsedFunds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalUsedFunds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } @@ -1205,20 +1242,47 @@ func (m *Funding) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TotalFunded != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.TotalFunded)) - i-- - dAtA[i] = 0x28 + if len(m.TotalFunded) > 0 { + for iNdEx := len(m.TotalFunded) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalFunded[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } } - if m.AmountPerBundle != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.AmountPerBundle)) - i-- - dAtA[i] = 0x20 + if len(m.AmountsPerBundle) > 0 { + for iNdEx := len(m.AmountsPerBundle) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AmountsPerBundle[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - if m.Amount != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x18 + if len(m.Amounts) > 0 { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintFunders(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } if m.PoolId != 0 { i = encodeVarintFunders(dAtA, i, uint64(m.PoolId)) @@ -1654,14 +1718,23 @@ func (m *FundingStats) Size() (n int) { } var l int _ = l - if m.TotalUsedFunds != 0 { - n += 1 + sovFunders(uint64(m.TotalUsedFunds)) + if len(m.TotalUsedFunds) > 0 { + for _, e := range m.TotalUsedFunds { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } - if m.TotalAllocatedFunds != 0 { - n += 1 + sovFunders(uint64(m.TotalAllocatedFunds)) + if len(m.TotalAllocatedFunds) > 0 { + for _, e := range m.TotalAllocatedFunds { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } - if m.TotalAmountPerBundle != 0 { - n += 1 + sovFunders(uint64(m.TotalAmountPerBundle)) + if len(m.TotalAmountPerBundle) > 0 { + for _, e := range m.TotalAmountPerBundle { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } if len(m.PoolsFunded) > 0 { l = 0 @@ -1686,14 +1759,23 @@ func (m *Funding) Size() (n int) { if m.PoolId != 0 { n += 1 + sovFunders(uint64(m.PoolId)) } - if m.Amount != 0 { - n += 1 + sovFunders(uint64(m.Amount)) + if len(m.Amounts) > 0 { + for _, e := range m.Amounts { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } - if m.AmountPerBundle != 0 { - n += 1 + sovFunders(uint64(m.AmountPerBundle)) + if len(m.AmountsPerBundle) > 0 { + for _, e := range m.AmountsPerBundle { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } - if m.TotalFunded != 0 { - n += 1 + sovFunders(uint64(m.TotalFunded)) + if len(m.TotalFunded) > 0 { + for _, e := range m.TotalFunded { + l = e.Size() + n += 1 + l + sovFunders(uint64(l)) + } } return n } @@ -2160,10 +2242,10 @@ func (m *FundingStats) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalUsedFunds", wireType) } - m.TotalUsedFunds = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -2173,16 +2255,31 @@ func (m *FundingStats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalUsedFunds |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalUsedFunds = append(m.TotalUsedFunds, types.Coin{}) + if err := m.TotalUsedFunds[len(m.TotalUsedFunds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalAllocatedFunds", wireType) } - m.TotalAllocatedFunds = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -2192,16 +2289,31 @@ func (m *FundingStats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalAllocatedFunds |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalAllocatedFunds = append(m.TotalAllocatedFunds, types.Coin{}) + if err := m.TotalAllocatedFunds[len(m.TotalAllocatedFunds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 3: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalAmountPerBundle", wireType) } - m.TotalAmountPerBundle = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -2211,11 +2323,26 @@ func (m *FundingStats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalAmountPerBundle |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalAmountPerBundle = append(m.TotalAmountPerBundle, types.Coin{}) + if err := m.TotalAmountPerBundle[len(m.TotalAmountPerBundle)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: if wireType == 0 { var v uint64 @@ -2394,10 +2521,10 @@ func (m *Funding) Unmarshal(dAtA []byte) error { } } case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) } - m.Amount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -2407,16 +2534,31 @@ func (m *Funding) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Amount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amounts = append(m.Amounts, types.Coin{}) + if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AmountsPerBundle", wireType) } - m.AmountPerBundle = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -2426,16 +2568,31 @@ func (m *Funding) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AmountPerBundle |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AmountsPerBundle = append(m.AmountsPerBundle, types.Coin{}) + if err := m.AmountsPerBundle[len(m.AmountsPerBundle)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 5: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalFunded", wireType) } - m.TotalFunded = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFunders @@ -2445,11 +2602,26 @@ func (m *Funding) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalFunded |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthFunders + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthFunders + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalFunded = append(m.TotalFunded, types.Coin{}) + if err := m.TotalFunded[len(m.TotalFunded)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFunders(dAtA[iNdEx:]) From 75d80f0411119520effe8646180dee763c04bee2 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 29 Apr 2024 09:40:01 +0200 Subject: [PATCH 02/28] chore: further implemented sdk.Coins --- proto/kyve/funders/v1beta1/events.proto | 12 +- x/funders/keeper/logic_funders.go | 47 +++--- x/funders/keeper/msg_server_defund_pool.go | 11 +- x/funders/keeper/msg_server_fund_pool.go | 4 +- x/funders/types/events.pb.go | 157 +++++++++------------ x/funders/types/funders.go | 9 +- 6 files changed, 108 insertions(+), 132 deletions(-) diff --git a/proto/kyve/funders/v1beta1/events.proto b/proto/kyve/funders/v1beta1/events.proto index 6a164caa..80e3c461 100644 --- a/proto/kyve/funders/v1beta1/events.proto +++ b/proto/kyve/funders/v1beta1/events.proto @@ -61,17 +61,17 @@ message EventFundPool { uint64 pool_id = 1; // address is the account address of the pool funder. string address = 2; - // amounts is a list of coins that the funder has funded - repeated cosmos.base.v1beta1.Coin amounts = 3 [ + // amount is the amount the funder has funded + cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" ]; - // amounts_per_bundle is a list of amounts per coin per bundle - repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ + // amount_per_bundle is the amount the funder pays for each finalized bundle + cosmos.base.v1beta1.Coin amount_per_bundle = 4 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" ]; } diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index c5e615eb..6da4a79c 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -1,12 +1,9 @@ package keeper import ( - "fmt" - globalTypes "github.com/KYVENetwork/chain/x/global/types" - "cosmossdk.io/errors" + "fmt" - "github.com/KYVENetwork/chain/util" "github.com/KYVENetwork/chain/x/funders/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -21,16 +18,16 @@ func (k Keeper) CreateFundingState(ctx sdk.Context, poolId uint64) { k.SetFundingState(ctx, &fundingState) } -func (k Keeper) GetTotalActiveFunding(ctx sdk.Context, poolId uint64) (amount uint64) { +func (k Keeper) GetTotalActiveFunding(ctx sdk.Context, poolId uint64) (amounts sdk.Coins) { state, found := k.GetFundingState(ctx, poolId) if !found { - return 0 + return sdk.NewCoins() } for _, address := range state.ActiveFunderAddresses { funding, _ := k.GetFunding(ctx, address, poolId) - amount += funding.Amount + amounts.Add(funding.Amounts...) } - return amount + return } // ChargeFundersOfPool charges all funders of a pool with their amount_per_bundle @@ -38,23 +35,23 @@ func (k Keeper) GetTotalActiveFunding(ctx sdk.Context, poolId uint64) (amount ui // the max amount is charged and the funder is removed from the active funders list. // The amount is transferred from the funders to the pool module account where it can be paid out. // If there are no more active funders, an event is emitted. -func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout uint64, err error) { +func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payouts sdk.Coins, err error) { // Get funding state for pool fundingState, found := k.GetFundingState(ctx, poolId) if !found { - return 0, errors.Wrapf(errorsTypes.ErrNotFound, types.ErrFundingStateDoesNotExist.Error(), poolId) + return sdk.NewCoins(), errors.Wrapf(errorsTypes.ErrNotFound, types.ErrFundingStateDoesNotExist.Error(), poolId) } // If there are no active fundings we immediately return activeFundings := k.GetActiveFundings(ctx, fundingState) if len(activeFundings) == 0 { - return 0, nil + return sdk.NewCoins(), nil } // This is the amount every funding will be charged for _, funding := range activeFundings { - payout += funding.ChargeOneBundle() - if funding.Amount == 0 { + payouts.Add(funding.ChargeOneBundle()...) + if funding.Amounts.IsZero() { fundingState.SetInactive(&funding) } k.SetFunding(ctx, &funding) @@ -71,36 +68,31 @@ func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout uint } // Move funds to pool module account - if payout > 0 { - err = util.TransferFromModuleToModule(k.bankKeeper, ctx, types.ModuleName, pooltypes.ModuleName, payout) - if err != nil { - return 0, err + if !payouts.IsZero() { + if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, pooltypes.ModuleName, payouts); err != nil { + return sdk.NewCoins(), err } } - return payout, nil + return } // GetLowestFunding returns the funding with the lowest amount // Precondition: len(fundings) > 0 -func (k Keeper) GetLowestFunding(ctx sdk.Context, fundings []types.Funding, whitelist []*types.WhitelistCoinEntry) (lowestFunding *types.Funding, err error) { +func (k Keeper) GetLowestFunding(fundings []types.Funding, whitelist []*types.WhitelistCoinEntry) (lowestFunding *types.Funding, err error) { if len(fundings) == 0 { return nil, fmt.Errorf("no active fundings") } - - lowestFundingIndex := 0 for i := range fundings { - if fundings[i].GetScore(params.CoinWhitelist) < fundings[lowestFundingIndex].GetScore(params.CoinWhitelist) { + if fundings[i].GetScore(whitelist) < fundings[lowestFundingIndex].GetScore(whitelist) { lowestFundingIndex = i } } return &fundings[lowestFundingIndex], nil } - - // ensureParamsCompatibility checks compatibility of the provided funding with the pool params. // i.e. // - coin is in whitelist @@ -139,8 +131,6 @@ func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, msg *types.MsgFundPoo return nil } -func (k Keeper) - // ensureFreeSlot makes sure that a funder can add funding to a given pool. // If this is not possible an appropriate error is returned. // A pool has a fixed amount of funding-slots. If there are still free slots @@ -159,7 +149,7 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi params := k.GetParams(ctx) - lowestFunding, err := k.GetLowestFunding(ctx, activeFundings, params.CoinWhitelist) + lowestFunding, err := k.GetLowestFunding(activeFundings, params.CoinWhitelist) if err != nil { return err } @@ -180,6 +170,7 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi return err } + lowestFunding.Amounts.Sub(lowestFunding.Amounts...) fundingState.SetInactive(lowestFunding) k.SetFunding(ctx, lowestFunding) @@ -187,7 +178,7 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi _ = ctx.EventManager().EmitTypedEvent(&types.EventDefundPool{ PoolId: fundingState.PoolId, Address: lowestFunding.FunderAddress, - Amounts: lowestFunding.Amounts, + Amounts: lowestFunding.Amounts, }) return nil diff --git a/x/funders/keeper/msg_server_defund_pool.go b/x/funders/keeper/msg_server_defund_pool.go index 1ad2c10c..75c1b9b5 100644 --- a/x/funders/keeper/msg_server_defund_pool.go +++ b/x/funders/keeper/msg_server_defund_pool.go @@ -24,7 +24,7 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( return nil, errors.Wrapf(errorsTypes.ErrNotFound, types.ErrFundingDoesNotExist.Error(), msg.PoolId, msg.Creator) } - if funding.Amount == 0 { + if !msg.Amounts.IsAllLTE(funding.Amounts) { return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrFundingIsUsedUp.Error(), msg.PoolId, msg.Creator) } @@ -35,8 +35,8 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( } // Subtract amount from funding - amount := funding.SubtractAmount(msg.Amount) - if funding.Amount == 0 { + funding.Amounts.Sub(msg.Amounts...) + if funding.Amounts.IsZero() { fundingState.SetInactive(&funding) } else { // If funding is not fully revoked, check if updated funding is still compatible with params. @@ -46,7 +46,8 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( } // Transfer tokens from this module to sender. - if err := util.TransferFromModuleToAddress(k.bankKeeper, ctx, types.ModuleName, msg.Creator, amount); err != nil { + recipient := sdk.MustAccAddressFromBech32(msg.Creator) + if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, recipient, msg.Amounts); err != nil { return nil, err } @@ -58,7 +59,7 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( _ = ctx.EventManager().EmitTypedEvent(&types.EventDefundPool{ PoolId: msg.PoolId, Address: msg.Creator, - Amount: amount, + Amounts: msg.Amounts, }) return &types.MsgDefundPoolResponse{}, nil diff --git a/x/funders/keeper/msg_server_fund_pool.go b/x/funders/keeper/msg_server_fund_pool.go index 2f6794c9..4f9a3b56 100644 --- a/x/funders/keeper/msg_server_fund_pool.go +++ b/x/funders/keeper/msg_server_fund_pool.go @@ -4,7 +4,6 @@ import ( "context" "cosmossdk.io/errors" - "github.com/KYVENetwork/chain/util" "github.com/KYVENetwork/chain/x/funders/types" sdk "github.com/cosmos/cosmos-sdk/types" errorsTypes "github.com/cosmos/cosmos-sdk/types/errors" @@ -86,7 +85,8 @@ func (k msgServer) FundPool(goCtx context.Context, msg *types.MsgFundPool) (*typ } // All checks passed, transfer funds from funder to module - if err := util.TransferFromAddressToModule(k.bankKeeper, ctx, msg.Creator, types.ModuleName, msg.Amount); err != nil { + sender := sdk.MustAccAddressFromBech32(msg.Creator) + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, sdk.NewCoins(msg.Amount)); err != nil { return nil, err } diff --git a/x/funders/types/events.pb.go b/x/funders/types/events.pb.go index 2fcc919e..77e92425 100644 --- a/x/funders/types/events.pb.go +++ b/x/funders/types/events.pb.go @@ -282,10 +282,10 @@ type EventFundPool struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // address is the account address of the pool funder. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // amounts is a list of coins that the funder has funded - Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` - // amounts_per_bundle is a list of amounts per coin per bundle - AmountsPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amounts_per_bundle,json=amountsPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts_per_bundle"` + // amount is the amount the funder has funded + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"` + // amount_per_bundle is the amount the funder pays for each finalized bundle + AmountPerBundle types.Coin `protobuf:"bytes,4,opt,name=amount_per_bundle,json=amountPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount_per_bundle"` } func (m *EventFundPool) Reset() { *m = EventFundPool{} } @@ -335,18 +335,18 @@ func (m *EventFundPool) GetAddress() string { return "" } -func (m *EventFundPool) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *EventFundPool) GetAmount() types.Coin { if m != nil { - return m.Amounts + return m.Amount } - return nil + return types.Coin{} } -func (m *EventFundPool) GetAmountsPerBundle() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *EventFundPool) GetAmountPerBundle() types.Coin { if m != nil { - return m.AmountsPerBundle + return m.AmountPerBundle } - return nil + return types.Coin{} } // EventDefundPool is an event emitted when a pool is defunded. @@ -473,41 +473,42 @@ func init() { func init() { proto.RegisterFile("kyve/funders/v1beta1/events.proto", fileDescriptor_1cf957abd56bbcb0) } var fileDescriptor_1cf957abd56bbcb0 = []byte{ - // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0x4f, 0x8b, 0xd3, 0x40, - 0x18, 0xc6, 0x9b, 0xb6, 0xb6, 0x76, 0x8a, 0xe8, 0xc6, 0x05, 0x63, 0x91, 0x6c, 0xed, 0xa9, 0x88, - 0x26, 0xec, 0x8a, 0x1f, 0xc0, 0xae, 0xbb, 0x20, 0x82, 0x5b, 0x02, 0x0a, 0x7a, 0x29, 0x93, 0xcc, - 0xb4, 0x3b, 0x36, 0x99, 0x37, 0x64, 0x26, 0xad, 0xbd, 0xf8, 0x19, 0xfc, 0x18, 0xe2, 0x41, 0x16, - 0x3c, 0xf9, 0x0d, 0xf6, 0xb8, 0x47, 0x4f, 0x2a, 0xed, 0xc1, 0xaf, 0x21, 0x33, 0x99, 0x74, 0x2b, - 0xac, 0xe0, 0x65, 0x0f, 0x7b, 0x69, 0xe7, 0x99, 0xf7, 0xcf, 0xf3, 0xcb, 0x9b, 0x97, 0xa0, 0xfb, - 0xd3, 0xc5, 0x8c, 0xfa, 0xe3, 0x9c, 0x13, 0x9a, 0x09, 0x7f, 0xb6, 0x1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0x78, 0xba, 0x74, 0xad, 0xb3, 0xa5, - 0x6b, 0xfd, 0x5a, 0xba, 0xd6, 0xc7, 0x95, 0x5b, 0x39, 0x5b, 0xb9, 0x95, 0xef, 0x2b, 0xb7, 0xf2, - 0xf6, 0xe1, 0x06, 0xc1, 0x8b, 0x37, 0xaf, 0x0f, 0x5e, 0x52, 0x39, 0x87, 0x6c, 0xea, 0x47, 0xc7, - 0x98, 0x71, 0xff, 0xfd, 0xfa, 0x0b, 0xa7, 0x59, 0xc2, 0x86, 0xfe, 0x20, 0x3d, 0xfe, 0x13, 0x00, - 0x00, 0xff, 0xff, 0xde, 0x6c, 0x83, 0xdc, 0x37, 0x05, 0x00, 0x00, + // 558 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0xdf, 0x6a, 0x13, 0x4f, + 0x14, 0xc7, 0xb3, 0x6d, 0x7f, 0xe9, 0x2f, 0x13, 0xa4, 0x64, 0x2d, 0xb8, 0x06, 0xd9, 0xc6, 0xdc, + 0x18, 0x44, 0x77, 0x69, 0xd5, 0x07, 0x30, 0xb5, 0x05, 0x11, 0x6c, 0x58, 0x50, 0xd0, 0x9b, 0x30, + 0xbb, 0x33, 0x49, 0xc7, 0xec, 0xce, 0x59, 0x76, 0x26, 0x89, 0xc1, 0x97, 0xf0, 0x31, 0x8a, 0x57, + 0x05, 0xaf, 0x7c, 0x83, 0x5e, 0xf6, 0xd2, 0x2b, 0x95, 0xe4, 0xc2, 0xd7, 0x90, 0xf9, 0xb3, 0x69, + 0x84, 0x2a, 0x05, 0xf1, 0xc2, 0x9b, 0x64, 0xce, 0x9c, 0x73, 0xbe, 0xdf, 0xcf, 0x9e, 0x3d, 0x2c, + 0xba, 0x3d, 0x9a, 0x4d, 0x68, 0x38, 0x18, 0x73, 0x42, 0x0b, 0x11, 0x4e, 0x76, 0x63, 0x2a, 0xf1, + 0x6e, 0x48, 0x27,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0xac, 0x47, 0x63, 0x79, 0x34, 0x50, 0x6f, 0x59, 0xfc, 0x92, 0xba, 0x7b, 0x78, 0x36, 0xf7, + 0x9d, 0xf3, 0xb9, 0xef, 0x7c, 0x9b, 0xfb, 0xce, 0xfb, 0x85, 0x5f, 0x39, 0x5f, 0xf8, 0x95, 0xcf, + 0x0b, 0xbf, 0xf2, 0xfa, 0xde, 0x0a, 0xc1, 0xb3, 0x57, 0x2f, 0x0f, 0x9e, 0x53, 0x39, 0x85, 0x62, + 0x14, 0x26, 0xc7, 0x98, 0xf1, 0xf0, 0xed, 0xf2, 0xdb, 0xa6, 0x59, 0xe2, 0xaa, 0xfe, 0x14, 0x3d, + 0xf8, 0x11, 0x00, 0x00, 0xff, 0xff, 0xca, 0x0c, 0x77, 0x6c, 0x31, 0x05, 0x00, 0x00, } func (m *EventUpdateParams) Marshal() (dAtA []byte, err error) { @@ -710,34 +711,26 @@ func (m *EventFundPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.AmountsPerBundle) > 0 { - for iNdEx := len(m.AmountsPerBundle) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AmountsPerBundle[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 + { + size, err := m.AmountPerBundle.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) } - if len(m.Amounts) > 0 { - for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a + i-- + dAtA[i] = 0x22 + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) @@ -937,18 +930,10 @@ func (m *EventFundPool) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - if len(m.Amounts) > 0 { - for _, e := range m.Amounts { - l = e.Size() - n += 1 + l + sovEvents(uint64(l)) - } - } - if len(m.AmountsPerBundle) > 0 { - for _, e := range m.AmountsPerBundle { - l = e.Size() - n += 1 + l + sovEvents(uint64(l)) - } - } + l = m.Amount.Size() + n += 1 + l + sovEvents(uint64(l)) + l = m.AmountPerBundle.Size() + n += 1 + l + sovEvents(uint64(l)) return n } @@ -1706,7 +1691,7 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1733,14 +1718,13 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amounts = append(m.Amounts, types.Coin{}) - if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountsPerBundle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1767,8 +1751,7 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AmountsPerBundle = append(m.AmountsPerBundle, types.Coin{}) - if err := m.AmountsPerBundle[len(m.AmountsPerBundle)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.AmountPerBundle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/funders/types/funders.go b/x/funders/types/funders.go index 420f567e..1a03a59a 100644 --- a/x/funders/types/funders.go +++ b/x/funders/types/funders.go @@ -17,13 +17,14 @@ func (f *Funding) GetScore(whitelist []*WhitelistCoinEntry) (score uint64) { } func (f *Funding) ChargeOneBundle() (amounts sdk.Coins) { - amount = f.SubtractAmount(f.AmountPerBundle) - f.TotalFunded += amount - return amount + funded := f.Amounts.Sub(f.AmountsPerBundle...) + amounts.Add(funded...) + f.TotalFunded.Add(funded...) + return } func (f *Funding) IsActive() (isActive bool) { - return f.Amount > 0 + return !f.Amounts.IsZero() } func (f *Funding) IsInactive() (isInactive bool) { From bd272c92353889f3307fb70b747617bd5a535fd9 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 29 Apr 2024 10:15:00 +0200 Subject: [PATCH 03/28] chore: finished logic with funding a single coin --- x/funders/keeper/logic_funders.go | 46 ++++++++++++++---------- x/funders/keeper/msg_server_fund_pool.go | 4 +-- x/funders/types/errors.go | 12 +++---- x/funders/types/funders.go | 11 +++--- 4 files changed, 41 insertions(+), 32 deletions(-) diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index 6da4a79c..98741af9 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -2,6 +2,7 @@ package keeper import ( "cosmossdk.io/errors" + "cosmossdk.io/math" "fmt" "github.com/KYVENetwork/chain/x/funders/types" @@ -25,7 +26,7 @@ func (k Keeper) GetTotalActiveFunding(ctx sdk.Context, poolId uint64) (amounts s } for _, address := range state.ActiveFunderAddresses { funding, _ := k.GetFunding(ctx, address, poolId) - amounts.Add(funding.Amounts...) + amounts = amounts.Add(funding.Amounts...) } return } @@ -50,7 +51,7 @@ func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payouts sdk // This is the amount every funding will be charged for _, funding := range activeFundings { - payouts.Add(funding.ChargeOneBundle()...) + payouts = payouts.Add(funding.ChargeOneBundle()...) if funding.Amounts.IsZero() { fundingState.SetInactive(&funding) } @@ -99,33 +100,40 @@ func (k Keeper) GetLowestFunding(fundings []types.Funding, whitelist []*types.Wh // - minimum funding per bundle // - minimum funding amount // - minimum funding multiple -func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, msg *types.MsgFundPool) error { +func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding types.Funding) error { params := k.GetParams(ctx) - var w *types.WhitelistCoinEntry + minFundingAmounts := sdk.NewCoins() + minFundingAmountsPerBundle := sdk.NewCoins() + for _, entry := range params.CoinWhitelist { - if entry.CoinDenom == msg.Amount.Denom { - w = entry - break - } + minFundingAmounts = minFundingAmounts.Add(sdk.NewInt64Coin(entry.CoinDenom, int64(entry.MinFundingAmount))) + minFundingAmountsPerBundle = minFundingAmountsPerBundle.Add(sdk.NewInt64Coin(entry.CoinDenom, int64(entry.MinFundingAmountPerBundle))) + } + + // throw error if a coin in amounts is not in the whitelist + if !funding.Amounts.DenomsSubsetOf(minFundingAmounts) { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrCoinNotWhitelisted.Error()) } - // throw error if coin is not in whitelist. we only check msg.amount here since we know from before - // that msg.amount and msg.amount_per_bundle is equal - if w == nil { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrCoinNotWhitelisted.Error(), msg.Amount.Denom) + // throw error if a coin in amounts per bundle is not in the whitelist + if !funding.AmountsPerBundle.DenomsSubsetOf(minFundingAmountsPerBundle) { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrCoinNotWhitelisted.Error()) } - if msg.Amount.Amount.Uint64() < w.MinFundingAmount { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingAmount.Error(), w.MinFundingAmount, msg.Amount.Denom) + // throw error if a coin is less than the minimum funding amount + if minFundingAmounts.IsAnyGT(funding.Amounts) { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingAmount.Error()) } - if msg.AmountPerBundle.Amount.Uint64() < w.MinFundingAmountPerBundle { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinAmountPerBundle.Error(), w.MinFundingAmountPerBundle, msg.Amount.Denom) + // throw error if a coin is less than the minimum funding amount per bundle + if minFundingAmountsPerBundle.IsAnyGT(funding.AmountsPerBundle) { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinAmountPerBundle.Error()) } - if msg.AmountPerBundle.Amount.Uint64()*params.MinFundingMultiple > msg.Amount.Amount.Uint64() { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingMultiple.Error(), msg.AmountPerBundle, params.MinFundingMultiple, msg.Amount) + // throw error if a coin can not fulfill the funding multiple threshold + if funding.AmountsPerBundle.MulInt(math.NewInt(int64(params.MinFundingMultiple))).IsAnyGT(funding.Amounts) { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingMultiple.Error()) } return nil @@ -170,7 +178,7 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi return err } - lowestFunding.Amounts.Sub(lowestFunding.Amounts...) + lowestFunding.Amounts = lowestFunding.Amounts.Sub(lowestFunding.Amounts...) fundingState.SetInactive(lowestFunding) k.SetFunding(ctx, lowestFunding) diff --git a/x/funders/keeper/msg_server_fund_pool.go b/x/funders/keeper/msg_server_fund_pool.go index 4f9a3b56..bca522b6 100644 --- a/x/funders/keeper/msg_server_fund_pool.go +++ b/x/funders/keeper/msg_server_fund_pool.go @@ -53,7 +53,7 @@ func (k msgServer) FundPool(goCtx context.Context, msg *types.MsgFundPool) (*typ funding, found := k.GetFunding(ctx, msg.Creator, msg.PoolId) if found { // If so, update funding amounts - funding.Amounts.Add(msg.Amount) + funding.Amounts = funding.Amounts.Add(msg.Amount) // If the amount per bundle is set, update it if msg.AmountPerBundle.IsPositive() { @@ -73,7 +73,7 @@ func (k msgServer) FundPool(goCtx context.Context, msg *types.MsgFundPool) (*typ } // Check if updated (or new) funding is compatible with module params - if err := k.ensureParamsCompatibility(ctx, msg); err != nil { + if err := k.ensureParamsCompatibility(ctx, funding); err != nil { return nil, err } diff --git a/x/funders/types/errors.go b/x/funders/types/errors.go index e50a4cac..9823b0e1 100644 --- a/x/funders/types/errors.go +++ b/x/funders/types/errors.go @@ -9,14 +9,12 @@ var ( ErrFunderAlreadyExists = errors.Register(ModuleName, 1100, "funder with address %v already exists") ErrFunderDoesNotExist = errors.Register(ModuleName, 1101, "funder with address %v does not exist") ErrFundsTooLow = errors.Register(ModuleName, 1102, "minimum funding amount of %vkyve not reached") - ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of %d %s not reached") - ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount %d %s not reached") + ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of coin not reached") + ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount of coin not reached") ErrFundingDoesNotExist = errors.Register(ModuleName, 1105, "funding for pool %v and funder %v does not exist") ErrFundingIsUsedUp = errors.Register(ModuleName, 1106, "funding for pool %v and funder %v is used up") ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1107, "funding state for pool %v does not exist") - ErrMinFundingMultiple = errors.Register(ModuleName, 1108, "per_bundle_amount (%dkyve) times min_funding_multiple (%d) is smaller than funded_amount (%vkyve)") - ErrInvalidAmountLength = errors.Register(ModuleName, 1109, "funding amounts has length %d while amounts_per_bundle has length %d") - ErrAmountsPerBundleNoSubset = errors.Register(ModuleName, 1110, "amounts_per_bundle is no subset of amounts") - ErrCoinNotWhitelisted = errors.Register(ModuleName, 1111, "coin of denom %s not in whitelist") - ErrDifferentDenom = errors.Register(ModuleName, 1111, "found denom %s in amount and denom %s in amount_per_bundle") + ErrMinFundingMultiple = errors.Register(ModuleName, 1108, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") + ErrCoinNotWhitelisted = errors.Register(ModuleName, 1109, "coin not in whitelist") + ErrDifferentDenom = errors.Register(ModuleName, 1110, "found denom %s in amount and denom %s in amount_per_bundle") ) diff --git a/x/funders/types/funders.go b/x/funders/types/funders.go index 1a03a59a..b8d6f1a9 100644 --- a/x/funders/types/funders.go +++ b/x/funders/types/funders.go @@ -16,10 +16,13 @@ func (f *Funding) GetScore(whitelist []*WhitelistCoinEntry) (score uint64) { return } -func (f *Funding) ChargeOneBundle() (amounts sdk.Coins) { - funded := f.Amounts.Sub(f.AmountsPerBundle...) - amounts.Add(funded...) - f.TotalFunded.Add(funded...) +func (f *Funding) ChargeOneBundle() (payouts sdk.Coins) { + amounts := f.Amounts + f.Amounts = f.Amounts.Sub(f.AmountsPerBundle...) + // we add the diff here in case amount per bundle is greater than amount + diff := amounts.Sub(f.Amounts...) + payouts.Add(diff...) + f.TotalFunded.Add(diff...) return } From 8941a06e568f969d936d086fbd8bab27923f1b1e Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 29 Apr 2024 10:53:47 +0200 Subject: [PATCH 04/28] chore: finished multiple coins implementation for x/funders --- proto/kyve/funders/v1beta1/events.proto | 12 +- proto/kyve/funders/v1beta1/tx.proto | 12 +- x/funders/client/cli/tx_defund_pool.go | 6 +- x/funders/client/cli/tx_fund_pool.go | 13 +- x/funders/keeper/msg_server_defund_pool.go | 1 + x/funders/keeper/msg_server_fund_pool.go | 43 ++--- x/funders/types/errors.go | 2 +- x/funders/types/events.pb.go | 157 +++++++++--------- x/funders/types/message_defund_pool.go | 2 +- x/funders/types/message_fund_pool.go | 4 +- x/funders/types/params.go | 37 +++-- x/funders/types/tx.pb.go | 175 +++++++++++---------- 12 files changed, 247 insertions(+), 217 deletions(-) diff --git a/proto/kyve/funders/v1beta1/events.proto b/proto/kyve/funders/v1beta1/events.proto index 80e3c461..35391f0a 100644 --- a/proto/kyve/funders/v1beta1/events.proto +++ b/proto/kyve/funders/v1beta1/events.proto @@ -61,17 +61,17 @@ message EventFundPool { uint64 pool_id = 1; // address is the account address of the pool funder. string address = 2; - // amount is the amount the funder has funded - cosmos.base.v1beta1.Coin amount = 3 [ + // amounts is a list of coins the funder has funded + repeated cosmos.base.v1beta1.Coin amounts = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; - // amount_per_bundle is the amount the funder pays for each finalized bundle - cosmos.base.v1beta1.Coin amount_per_bundle = 4 [ + // amounts_per_bundle is a list of coins the funder wants to distribute per finalized bundle + repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/proto/kyve/funders/v1beta1/tx.proto b/proto/kyve/funders/v1beta1/tx.proto index bd12615e..5509ab43 100644 --- a/proto/kyve/funders/v1beta1/tx.proto +++ b/proto/kyve/funders/v1beta1/tx.proto @@ -75,18 +75,18 @@ message MsgFundPool { string creator = 1; // pool_id is the identifier of the pool uint64 pool_id = 2; - // amount is the amount of a coin the creator wants to fund - cosmos.base.v1beta1.Coin amount = 3 [ + // amounts is a list of coins the creator wants to fund + repeated cosmos.base.v1beta1.Coin amounts = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; - // amount_per_bundle is the amount of the coin the creator wants to distribute + // amounts_per_bundle is a list of coins the creator wants to distribute // per finalized bundle - cosmos.base.v1beta1.Coin amount_per_bundle = 4 [ + repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/x/funders/client/cli/tx_defund_pool.go b/x/funders/client/cli/tx_defund_pool.go index 3c41183f..f205e013 100644 --- a/x/funders/client/cli/tx_defund_pool.go +++ b/x/funders/client/cli/tx_defund_pool.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cast" "github.com/spf13/cobra" ) @@ -19,7 +20,8 @@ func CmdDefundPool() *cobra.Command { if err != nil { return err } - argAmount, err := cast.ToUint64E(args[1]) + + argAmounts, err := sdk.ParseCoinsNormalized(args[1]) if err != nil { return err } @@ -32,7 +34,7 @@ func CmdDefundPool() *cobra.Command { msg := &types.MsgDefundPool{ Creator: clientCtx.GetFromAddress().String(), PoolId: argId, - Amount: argAmount, + Amounts: argAmounts, } if err := msg.ValidateBasic(); err != nil { return err diff --git a/x/funders/client/cli/tx_fund_pool.go b/x/funders/client/cli/tx_fund_pool.go index bdfce2dd..cdd84d94 100644 --- a/x/funders/client/cli/tx_fund_pool.go +++ b/x/funders/client/cli/tx_fund_pool.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cast" "github.com/spf13/cobra" ) @@ -19,11 +20,11 @@ func CmdFundPool() *cobra.Command { if err != nil { return err } - argAmount, err := cast.ToUint64E(args[1]) + argAmounts, err := sdk.ParseCoinsNormalized(args[1]) if err != nil { return err } - argAmountPerBundle, err := cast.ToUint64E(args[2]) + argAmountsPerBundle, err := sdk.ParseCoinsNormalized(args[2]) if err != nil { return err } @@ -34,10 +35,10 @@ func CmdFundPool() *cobra.Command { } msg := &types.MsgFundPool{ - Creator: clientCtx.GetFromAddress().String(), - PoolId: argId, - Amount: argAmount, - AmountPerBundle: argAmountPerBundle, + Creator: clientCtx.GetFromAddress().String(), + PoolId: argId, + Amounts: argAmounts, + AmountsPerBundle: argAmountsPerBundle, } if err := msg.ValidateBasic(); err != nil { return err diff --git a/x/funders/keeper/msg_server_defund_pool.go b/x/funders/keeper/msg_server_defund_pool.go index 75c1b9b5..0f2f2590 100644 --- a/x/funders/keeper/msg_server_defund_pool.go +++ b/x/funders/keeper/msg_server_defund_pool.go @@ -24,6 +24,7 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( return nil, errors.Wrapf(errorsTypes.ErrNotFound, types.ErrFundingDoesNotExist.Error(), msg.PoolId, msg.Creator) } + // Verify if funder has enough coins to defund if !msg.Amounts.IsAllLTE(funding.Amounts) { return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrFundingIsUsedUp.Error(), msg.PoolId, msg.Creator) } diff --git a/x/funders/keeper/msg_server_fund_pool.go b/x/funders/keeper/msg_server_fund_pool.go index bca522b6..df6da368 100644 --- a/x/funders/keeper/msg_server_fund_pool.go +++ b/x/funders/keeper/msg_server_fund_pool.go @@ -33,42 +33,29 @@ func (k msgServer) FundPool(goCtx context.Context, msg *types.MsgFundPool) (*typ return nil, errors.Wrapf(errorsTypes.ErrNotFound, types.ErrFundingStateDoesNotExist.Error(), msg.PoolId) } - // TODO: - // iterate through msg.Amounts - // -> check if each coin has an amount per bundle - // -> if a single coin is not in the whitelist we fail - // -> check for each coin if the min funding amount is reached - // -> check for each coin if the min funding amount per bundle is reached - // -> check for each coin if the min funding multiple is reached - // calculate funders value score - // ensureFreeSlot - // emit event - - // Check if amount and amount_per_bundle have the same denom - if msg.Amount.Denom != msg.AmountPerBundle.Denom { - return nil, errors.Wrapf(errorsTypes.ErrNotFound, types.ErrDifferentDenom.Error(), msg.Amount.Denom, msg.AmountPerBundle.Denom) - } + amountsPerBundle := msg.AmountsPerBundle // Check if funding already exists funding, found := k.GetFunding(ctx, msg.Creator, msg.PoolId) if found { // If so, update funding amounts - funding.Amounts = funding.Amounts.Add(msg.Amount) + funding.Amounts = funding.Amounts.Add(msg.Amounts...) - // If the amount per bundle is set, update it - if msg.AmountPerBundle.IsPositive() { - if f, c := funding.AmountsPerBundle.Find(msg.AmountPerBundle.Denom); f { - c.Amount = msg.AmountPerBundle.Amount + // Replace all coins in funding.AmountsPerBundle with the values of msg.AmountsPerBundle + for _, coin := range funding.AmountsPerBundle { + if f, _ := amountsPerBundle.Find(coin.Denom); !f { + amountsPerBundle = amountsPerBundle.Add(coin) } } + funding.AmountsPerBundle = amountsPerBundle } else { // If not, create new funding funding = types.Funding{ FunderAddress: msg.Creator, PoolId: msg.PoolId, - Amounts: sdk.NewCoins(msg.Amount), - AmountsPerBundle: sdk.NewCoins(msg.AmountPerBundle), - TotalFunded: sdk.Coins{}, + Amounts: msg.Amounts, + AmountsPerBundle: amountsPerBundle, + TotalFunded: sdk.NewCoins(), } } @@ -86,7 +73,7 @@ func (k msgServer) FundPool(goCtx context.Context, msg *types.MsgFundPool) (*typ // All checks passed, transfer funds from funder to module sender := sdk.MustAccAddressFromBech32(msg.Creator) - if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, sdk.NewCoins(msg.Amount)); err != nil { + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, msg.Amounts); err != nil { return nil, err } @@ -99,10 +86,10 @@ func (k msgServer) FundPool(goCtx context.Context, msg *types.MsgFundPool) (*typ // Emit a fund event. _ = ctx.EventManager().EmitTypedEvent(&types.EventFundPool{ - PoolId: msg.PoolId, - Address: msg.Creator, - Amount: msg.Amount, - AmountPerBundle: msg.AmountPerBundle, + PoolId: msg.PoolId, + Address: msg.Creator, + Amounts: msg.Amounts, + AmountsPerBundle: msg.AmountsPerBundle, }) return &types.MsgFundPoolResponse{}, nil diff --git a/x/funders/types/errors.go b/x/funders/types/errors.go index 9823b0e1..4fc590c1 100644 --- a/x/funders/types/errors.go +++ b/x/funders/types/errors.go @@ -16,5 +16,5 @@ var ( ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1107, "funding state for pool %v does not exist") ErrMinFundingMultiple = errors.Register(ModuleName, 1108, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") ErrCoinNotWhitelisted = errors.Register(ModuleName, 1109, "coin not in whitelist") - ErrDifferentDenom = errors.Register(ModuleName, 1110, "found denom %s in amount and denom %s in amount_per_bundle") + ErrCoinsNegative = errors.Register(ModuleName, 1110, "all coins must be greater than zero") ) diff --git a/x/funders/types/events.pb.go b/x/funders/types/events.pb.go index 77e92425..b4b2f949 100644 --- a/x/funders/types/events.pb.go +++ b/x/funders/types/events.pb.go @@ -282,10 +282,10 @@ type EventFundPool struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // address is the account address of the pool funder. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // amount is the amount the funder has funded - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"` - // amount_per_bundle is the amount the funder pays for each finalized bundle - AmountPerBundle types.Coin `protobuf:"bytes,4,opt,name=amount_per_bundle,json=amountPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount_per_bundle"` + // amounts is a list of coins the funder has funded + Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` + // amounts_per_bundle is a list of coins the funder wants to distribute per finalized bundle + AmountsPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amounts_per_bundle,json=amountsPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts_per_bundle"` } func (m *EventFundPool) Reset() { *m = EventFundPool{} } @@ -335,18 +335,18 @@ func (m *EventFundPool) GetAddress() string { return "" } -func (m *EventFundPool) GetAmount() types.Coin { +func (m *EventFundPool) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Amount + return m.Amounts } - return types.Coin{} + return nil } -func (m *EventFundPool) GetAmountPerBundle() types.Coin { +func (m *EventFundPool) GetAmountsPerBundle() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.AmountPerBundle + return m.AmountsPerBundle } - return types.Coin{} + return nil } // EventDefundPool is an event emitted when a pool is defunded. @@ -473,42 +473,41 @@ func init() { func init() { proto.RegisterFile("kyve/funders/v1beta1/events.proto", fileDescriptor_1cf957abd56bbcb0) } var fileDescriptor_1cf957abd56bbcb0 = []byte{ - // 558 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0xdf, 0x6a, 0x13, 0x4f, - 0x14, 0xc7, 0xb3, 0x6d, 0x7f, 0xe9, 0x2f, 0x13, 0xa4, 0x64, 0x2d, 0xb8, 0x06, 0xd9, 0xc6, 0xdc, - 0x18, 0x44, 0x77, 0x69, 0xd5, 0x07, 0x30, 0xb5, 0x05, 0x11, 0x6c, 0x58, 0x50, 0xd0, 0x9b, 0x30, - 0xbb, 0x33, 0x49, 0xc7, 0xec, 0xce, 0x59, 0x76, 0x26, 0x89, 0xc1, 0x97, 0xf0, 0x31, 0x8a, 0x57, - 0x05, 0xaf, 0x7c, 0x83, 0x5e, 0xf6, 0xd2, 0x2b, 0x95, 0xe4, 0xc2, 0xd7, 0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a7, 0x7d, 0xea, 0xa0, 0x2d, 0x3d, - 0xaa, 0x27, 0x74, 0xf0, 0x07, 0xc3, 0x7a, 0x83, 0x36, 0x8d, 0xb2, 0xf0, 0xd6, 0x5b, 0xeb, 0xbf, - 0x27, 0x7f, 0x64, 0xc9, 0x3b, 0x57, 0x24, 0x17, 0x06, 0xbd, 0x34, 0x68, 0x07, 0xe8, 0xba, 0x26, - 0x56, 0xac, 0x47, 0x63, 0x79, 0x34, 0x50, 0x6f, 0x59, 0xfc, 0x92, 0xba, 0x7b, 0x78, 0x36, 0xf7, - 0x9d, 0xf3, 0xb9, 0xef, 0x7c, 0x9b, 0xfb, 0xce, 0xfb, 0x85, 0x5f, 0x39, 0x5f, 0xf8, 0x95, 0xcf, - 0x0b, 0xbf, 0xf2, 0xfa, 0xde, 0x0a, 0xc1, 0xb3, 0x57, 0x2f, 0x0f, 0x9e, 0x53, 0x39, 0x85, 0x62, - 0x14, 0x26, 0xc7, 0x98, 0xf1, 0xf0, 0xed, 0xf2, 0xdb, 0xa6, 0x59, 0xe2, 0xaa, 0xfe, 0x14, 0x3d, - 0xf8, 0x11, 0x00, 0x00, 0xff, 0xff, 0xca, 0x0c, 0x77, 0x6c, 0x31, 0x05, 0x00, 0x00, + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0x4f, 0x8b, 0xd3, 0x40, + 0x18, 0xc6, 0x9b, 0xb6, 0xb6, 0x76, 0x8a, 0xe8, 0xc6, 0x05, 0x63, 0x91, 0x6c, 0xed, 0xa9, 0x88, + 0x26, 0xec, 0x8a, 0x1f, 0xc0, 0xae, 0xbb, 0x20, 0x82, 0x5b, 0x02, 0x0a, 0x7a, 0x29, 0x93, 0xcc, + 0xb4, 0x3b, 0x36, 0x99, 0x37, 0x64, 0x26, 0xad, 0xbd, 0xf8, 0x19, 0xfc, 0x18, 0xe2, 0x41, 0x16, + 0x3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61, 0xce, 0x49, + 0xac, 0x26, 0x72, 0x39, 0xb6, 0xb7, 0x8c, 0xd7, 0x90, 0x66, 0x03, 0xed, 0xd4, 0x3b, 0xb1, 0xd0, + 0x4d, 0x3d, 0xb0, 0x67, 0x74, 0x7c, 0x35, 0x46, 0xd6, 0xf3, 0xd0, 0x6d, 0x4d, 0xac, 0x58, 0x8f, + 0x72, 0x79, 0x34, 0x56, 0xef, 0x5a, 0xfc, 0x93, 0x7a, 0x70, 0x78, 0xba, 0x74, 0xad, 0xb3, 0xa5, + 0x6b, 0xfd, 0x5a, 0xba, 0xd6, 0xc7, 0x95, 0x5b, 0x39, 0x5b, 0xb9, 0x95, 0xef, 0x2b, 0xb7, 0xf2, + 0xf6, 0xe1, 0x06, 0xc1, 0x8b, 0x37, 0xaf, 0x0f, 0x5e, 0x52, 0x39, 0x87, 0x6c, 0xea, 0x47, 0xc7, + 0x98, 0x71, 0xff, 0xfd, 0xfa, 0x0b, 0xa7, 0x59, 0xc2, 0x86, 0xfe, 0x20, 0x3d, 0xfe, 0x13, 0x00, + 0x00, 0xff, 0xff, 0xde, 0x6c, 0x83, 0xdc, 0x37, 0x05, 0x00, 0x00, } func (m *EventUpdateParams) Marshal() (dAtA []byte, err error) { @@ -711,26 +710,34 @@ func (m *EventFundPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.AmountPerBundle.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.AmountsPerBundle) > 0 { + for iNdEx := len(m.AmountsPerBundle) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AmountsPerBundle[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x22 - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Amounts) > 0 { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - i -= size - i = encodeVarintEvents(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x1a if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) @@ -930,10 +937,18 @@ func (m *EventFundPool) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = m.Amount.Size() - n += 1 + l + sovEvents(uint64(l)) - l = m.AmountPerBundle.Size() - n += 1 + l + sovEvents(uint64(l)) + if len(m.Amounts) > 0 { + for _, e := range m.Amounts { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } + if len(m.AmountsPerBundle) > 0 { + for _, e := range m.AmountsPerBundle { + l = e.Size() + n += 1 + l + sovEvents(uint64(l)) + } + } return n } @@ -1691,7 +1706,7 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1718,13 +1733,14 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Amounts = append(m.Amounts, types.Coin{}) + if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AmountsPerBundle", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1751,7 +1767,8 @@ func (m *EventFundPool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.AmountPerBundle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.AmountsPerBundle = append(m.AmountsPerBundle, types.Coin{}) + if err := m.AmountsPerBundle[len(m.AmountsPerBundle)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/funders/types/message_defund_pool.go b/x/funders/types/message_defund_pool.go index 3a97b787..292eb181 100644 --- a/x/funders/types/message_defund_pool.go +++ b/x/funders/types/message_defund_pool.go @@ -40,7 +40,7 @@ func (msg *MsgDefundPool) ValidateBasic() error { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid pool id") } - if util.ValidatePositiveNumber(msg.Amount) != nil { + if !msg.Amounts.IsAllPositive() { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount") } diff --git a/x/funders/types/message_fund_pool.go b/x/funders/types/message_fund_pool.go index a01692c2..4ab6307e 100644 --- a/x/funders/types/message_fund_pool.go +++ b/x/funders/types/message_fund_pool.go @@ -40,11 +40,11 @@ func (msg *MsgFundPool) ValidateBasic() error { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid pool id") } - if util.ValidateNumber(msg.Amount) != nil { + if !msg.Amounts.IsAllPositive() { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount") } - if util.ValidateNumber(msg.AmountPerBundle) != nil { + if !msg.AmountsPerBundle.IsAllPositive() { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount per bundle") } diff --git a/x/funders/types/params.go b/x/funders/types/params.go index c87c8599..4965bcdf 100644 --- a/x/funders/types/params.go +++ b/x/funders/types/params.go @@ -1,48 +1,53 @@ package types import ( + "errors" "github.com/KYVENetwork/chain/util" ) const ( - // DefaultMinFundingAmount 1000 Kyve - DefaultMinFundingAmount = uint64(1_000_000_000) - // DefaultMinFundingAmountPerBundle 0.1 Kyve - DefaultMinFundingAmountPerBundle = uint64(100_000) // DefaultMinFundingMultiple 20 DefaultMinFundingMultiple = uint64(20) ) // NewParams creates a new Params instance -func NewParams(minFundingAmount uint64, minFundingAmountPerBundle uint64, minFundingMultiple uint64) Params { +func NewParams(coinWhitelist []*WhitelistCoinEntry, minFundingMultiple uint64) Params { return Params{ - MinFundingAmount: minFundingAmount, - MinFundingAmountPerBundle: minFundingAmountPerBundle, - MinFundingMultiple: minFundingMultiple, + CoinWhitelist: coinWhitelist, + MinFundingMultiple: minFundingMultiple, } } // DefaultParams returns a default set of parameters func DefaultParams() Params { return NewParams( - DefaultMinFundingAmount, - DefaultMinFundingAmountPerBundle, + make([]*WhitelistCoinEntry, 0), DefaultMinFundingMultiple, ) } // Validate validates the set of params func (p *Params) Validate() error { - if err := util.ValidateNumber(p.MinFundingAmount); err != nil { + if err := util.ValidateNumber(p.MinFundingMultiple); err != nil { return err } - if err := util.ValidateNumber(p.MinFundingAmountPerBundle); err != nil { - return err - } + for _, entry := range p.CoinWhitelist { + if entry.CoinDenom == "" { + return errors.New("coin denom is empty") + } - if err := util.ValidateNumber(p.MinFundingAmountPerBundle); err != nil { - return err + if err := util.ValidateNumber(entry.MinFundingAmount); err != nil { + return err + } + + if err := util.ValidateNumber(entry.MinFundingAmountPerBundle); err != nil { + return err + } + + if err := util.ValidateDecimal(entry.CoinWeight); err != nil { + return err + } } return nil diff --git a/x/funders/types/tx.pb.go b/x/funders/types/tx.pb.go index 9b42dd51..2c136918 100644 --- a/x/funders/types/tx.pb.go +++ b/x/funders/types/tx.pb.go @@ -295,11 +295,11 @@ type MsgFundPool struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` // pool_id is the identifier of the pool PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // amount is the amount of a coin the creator wants to fund - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"` - // amount_per_bundle is the amount of the coin the creator wants to distribute + // amounts is a list of coins the creator wants to fund + Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` + // amounts_per_bundle is a list of coins the creator wants to distribute // per finalized bundle - AmountPerBundle types.Coin `protobuf:"bytes,4,opt,name=amount_per_bundle,json=amountPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount_per_bundle"` + AmountsPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amounts_per_bundle,json=amountsPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts_per_bundle"` } func (m *MsgFundPool) Reset() { *m = MsgFundPool{} } @@ -349,18 +349,18 @@ func (m *MsgFundPool) GetPoolId() uint64 { return 0 } -func (m *MsgFundPool) GetAmount() types.Coin { +func (m *MsgFundPool) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Amount + return m.Amounts } - return types.Coin{} + return nil } -func (m *MsgFundPool) GetAmountPerBundle() types.Coin { +func (m *MsgFundPool) GetAmountsPerBundle() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.AmountPerBundle + return m.AmountsPerBundle } - return types.Coin{} + return nil } // MsgFundPoolResponse defines the Msg/DefundPool response type. @@ -609,51 +609,50 @@ func init() { func init() { proto.RegisterFile("kyve/funders/v1beta1/tx.proto", fileDescriptor_5145d80c2db97f3d) } var fileDescriptor_5145d80c2db97f3d = []byte{ - // 697 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0x4d, 0x4f, 0xd4, 0x5c, - 0x14, 0x9e, 0x32, 0x30, 0xc0, 0x85, 0xf7, 0x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, 0x92, 0xa7, 0x9d, 0xa1, 0x72, - 0xd2, 0x26, 0x9a, 0xcf, 0xc0, 0x50, 0xb6, 0x85, 0x97, 0x4e, 0x4d, 0x4d, 0x29, 0xf6, 0xb5, 0x73, - 0x29, 0xd9, 0x93, 0x5f, 0x02, 0x90, 0x9b, 0xc8, 0xcb, 0xa7, 0x26, 0x1e, 0x93, 0xec, 0xeb, 0x17, - 0x20, 0xfd, 0xda, 0x1f, 0x3d, 0x1a, 0xe7, 0xf5, 0x47, 0xd1, 0xce, 0xed, 0x4f, 0xf7, 0x7f, 0x6e, - 0x0f, 0xbc, 0x11, 0xa3, 0x5b, 0x59, 0xdd, 0x3b, 0x70, 0x8c, 0xfd, 0x03, 0xc7, 0xf8, 0x7e, 0xe0, - 0x18, 0xef, 0x0e, 0x9d, 0xc2, 0xfe, 0xa1, 0x53, 0xf8, 0x72, 0xe8, 0x14, 0x5e, 0xdc, 0xc8, 0xed, - 0xc0, 0xc3, 0xe7, 0x4f, 0xef, 0x3f, 0x82, 0x7c, 0x8b, 0xd0, 0xa6, 0x17, 0x6c, 0xf8, 0x08, 0x7b, - 0xdb, 0xd9, 0xe7, 0x4c, 0x6e, 0x43, 0xa3, 0x24, 0xbf, 0x62, 0x37, 0x7f, 0x06, 0x00, 0x00, 0xff, - 0xff, 0xfc, 0x74, 0x92, 0x3d, 0x9d, 0x07, 0x00, 0x00, + // 678 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0x4f, 0x4f, 0xd4, 0x4e, + 0x18, 0xde, 0xb2, 0xfc, 0x1d, 0xf8, 0xfd, 0xd4, 0x0a, 0xd9, 0xd2, 0xc4, 0x82, 0x18, 0x13, 0x44, + 0x69, 0x03, 0x46, 0x0f, 0xdc, 0x5c, 0x94, 0xc4, 0x98, 0x35, 0x64, 0x8d, 0x46, 0x3d, 0xb8, 0x69, + 0x3b, 0x43, 0x19, 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0xb5, 0x3f, 0xdd, 0xbf, 0xb9, 0x3d, 0xf0, 0x5a, + 0x8e, 0x6e, 0x75, 0x65, 0x67, 0xcf, 0x31, 0x76, 0xf7, 0x1c, 0xe3, 0xc7, 0x9e, 0x63, 0xbc, 0xdd, + 0x77, 0x4a, 0xbb, 0xfb, 0x4e, 0xe9, 0xeb, 0xbe, 0x53, 0x7a, 0x7e, 0xa3, 0xb0, 0x03, 0x0f, 0x9e, + 0x3d, 0xb9, 0xf7, 0x10, 0x89, 0x4d, 0xca, 0x9a, 0x5e, 0xb8, 0xee, 0x63, 0xe2, 0x6d, 0xe5, 0x1f, + 0x35, 0xb5, 0x0d, 0xc1, 0xa0, 0xfa, 0x96, 0xdd, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x33, + 0x81, 0x9d, 0xa3, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1088,26 +1087,34 @@ func (m *MsgFundPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.AmountPerBundle.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.AmountsPerBundle) > 0 { + for iNdEx := len(m.AmountsPerBundle) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AmountsPerBundle[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x22 - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Amounts) > 0 { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x1a if m.PoolId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) i-- @@ -1386,10 +1393,18 @@ func (m *MsgFundPool) Size() (n int) { if m.PoolId != 0 { n += 1 + sovTx(uint64(m.PoolId)) } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.AmountPerBundle.Size() - n += 1 + l + sovTx(uint64(l)) + if len(m.Amounts) > 0 { + for _, e := range m.Amounts { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.AmountsPerBundle) > 0 { + for _, e := range m.AmountsPerBundle { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } return n } @@ -2131,7 +2146,7 @@ func (m *MsgFundPool) Unmarshal(dAtA []byte) error { } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2158,13 +2173,14 @@ func (m *MsgFundPool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Amounts = append(m.Amounts, types.Coin{}) + if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AmountsPerBundle", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2191,7 +2207,8 @@ func (m *MsgFundPool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.AmountPerBundle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.AmountsPerBundle = append(m.AmountsPerBundle, types.Coin{}) + if err := m.AmountsPerBundle[len(m.AmountsPerBundle)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From e8d44e06f6e40bb4d66cc1be50a91f2dfd051bd0 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 29 Apr 2024 11:16:41 +0200 Subject: [PATCH 05/28] chore: implemented multiple coin funding --- docs/static/openapi.yml | 178 ++++++++++++++--- proto/kyve/query/v1beta1/account.proto | 20 +- proto/kyve/query/v1beta1/query.proto | 8 +- x/query/keeper/grpc_account_assets.go | 2 +- x/query/keeper/grpc_account_funded.go | 4 +- x/query/keeper/grpc_query_funders.go | 29 ++- x/query/keeper/grpc_query_fundings.go | 10 +- x/query/keeper/helper.go | 2 +- x/query/types/account.pb.go | 253 +++++++++++++++---------- x/query/types/query.pb.go | 170 ++++++++++------- 10 files changed, 460 insertions(+), 216 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index be5c77a8..4875a729 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -246,7 +246,7 @@ paths: protocol_self_delegation_unbonding: type: string format: uint64 - title: protocol_staking_unbonding + description: protocol_staking_unbonding ... protocol_delegation: type: string format: uint64 @@ -254,14 +254,28 @@ paths: protocol_delegation_unbonding: type: string format: uint64 - title: protocol_delegation_unbonding + description: protocol_delegation_unbonding ... protocol_rewards: type: string format: uint64 description: protocol_rewards ... protocol_funding: - type: string - format: uint64 + 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. description: protocol_funding ... description: >- QueryAccountAssetsResponse is the response type for the @@ -645,8 +659,23 @@ paths: upload_interval is the interval bundles get created total_funds: - type: string - format: uint64 + 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. title: >- total_funds of the pool. If the pool runs @@ -1011,10 +1040,25 @@ paths: items: type: object properties: - amount: - type: string - format: uint64 - description: amount ... + amounts: + 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. + description: amounts ... pool: description: pool ... type: object @@ -1045,8 +1089,23 @@ paths: format: uint64 title: upload_interval is the interval bundles get created total_funds: - type: string - format: uint64 + 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. title: |- total_funds of the pool. If the pool runs out of funds no more bundles will be produced @@ -3888,8 +3947,23 @@ paths: upload_interval is the interval bundles get created total_funds: - type: string - format: uint64 + 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. title: >- total_funds of the pool. If the pool runs @@ -6178,8 +6252,23 @@ paths: upload_interval is the interval bundles get created total_funds: - type: string - format: uint64 + 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. title: |- total_funds of the pool. If the pool runs out of funds no more bundles will be produced @@ -6605,8 +6694,23 @@ paths: upload_interval is the interval bundles get created total_funds: - type: string - format: uint64 + 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. title: |- total_funds of the pool. If the pool runs out of funds no more bundles will be produced @@ -7143,8 +7247,23 @@ paths: upload_interval is the interval bundles get created total_funds: - type: string - format: uint64 + 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. title: >- total_funds of the pool. If the pool runs @@ -7614,8 +7733,23 @@ paths: upload_interval is the interval bundles get created total_funds: - type: string - format: uint64 + 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. title: |- total_funds of the pool. If the pool runs out of funds no more bundles will be produced diff --git a/proto/kyve/query/v1beta1/account.proto b/proto/kyve/query/v1beta1/account.proto index cb0dd48a..acf941c3 100644 --- a/proto/kyve/query/v1beta1/account.proto +++ b/proto/kyve/query/v1beta1/account.proto @@ -5,6 +5,8 @@ package kyve.query.v1beta1; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "amino/amino.proto"; import "kyve/query/v1beta1/query.proto"; option go_package = "github.com/KYVENetwork/chain/x/query/types"; @@ -48,16 +50,20 @@ message QueryAccountAssetsResponse { uint64 balance = 1; // protocol_staking ... uint64 protocol_self_delegation = 2; - // protocol_staking_unbonding + // protocol_staking_unbonding ... uint64 protocol_self_delegation_unbonding = 3; // protocol_delegation ... uint64 protocol_delegation = 4; - // protocol_delegation_unbonding + // protocol_delegation_unbonding ... uint64 protocol_delegation_unbonding = 5; // protocol_rewards ... uint64 protocol_rewards = 6; // protocol_funding ... - uint64 protocol_funding = 7; + repeated cosmos.base.v1beta1.Coin protocol_funding = 7 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; } // ======================================= @@ -112,8 +118,12 @@ message QueryAccountFundedListResponse { // Funded ... message Funded { - // amount ... - uint64 amount = 1; + // amounts ... + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; // pool ... BasicPool pool = 2; } diff --git a/proto/kyve/query/v1beta1/query.proto b/proto/kyve/query/v1beta1/query.proto index 1502ff68..e2168400 100644 --- a/proto/kyve/query/v1beta1/query.proto +++ b/proto/kyve/query/v1beta1/query.proto @@ -3,6 +3,8 @@ syntax = "proto3"; package kyve.query.v1beta1; import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "amino/amino.proto"; import "kyve/pool/v1beta1/pool.proto"; option go_package = "github.com/KYVENetwork/chain/x/query/types"; @@ -46,7 +48,11 @@ message BasicPool { // total_funds of the pool. If the pool runs // out of funds no more bundles will be produced - uint64 total_funds = 7; + repeated cosmos.base.v1beta1.Coin total_funds = 7 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; // total_delegation of the pool uint64 total_delegation = 8; diff --git a/x/query/keeper/grpc_account_assets.go b/x/query/keeper/grpc_account_assets.go index edf0b86c..3d5cfc1a 100644 --- a/x/query/keeper/grpc_account_assets.go +++ b/x/query/keeper/grpc_account_assets.go @@ -77,7 +77,7 @@ func (k Keeper) AccountAssets(goCtx context.Context, req *types.QueryAccountAsse // Iterate all fundings of the user to get total funding amount for _, funding := range k.fundersKeeper.GetFundingsOfFunder(ctx, req.Address) { - response.ProtocolFunding += funding.Amount + response.ProtocolFunding = response.ProtocolFunding.Add(funding.Amounts...) } return &response, nil diff --git a/x/query/keeper/grpc_account_funded.go b/x/query/keeper/grpc_account_funded.go index de0dc6e9..6c562cf5 100644 --- a/x/query/keeper/grpc_account_funded.go +++ b/x/query/keeper/grpc_account_funded.go @@ -20,13 +20,13 @@ func (k Keeper) AccountFundedList(goCtx context.Context, req *types.QueryAccount fundings := k.fundersKeeper.GetFundingsOfFunder(ctx, req.Address) for _, funding := range fundings { - if funding.Amount > 0 { + if !funding.Amounts.IsZero() { pool, found := k.poolKeeper.GetPool(ctx, funding.PoolId) if !found { return nil, status.Error(codes.Internal, "pool not found") } funded = append(funded, types.Funded{ - Amount: funding.Amount, + Amounts: funding.Amounts, Pool: &types.BasicPool{ Id: funding.PoolId, Name: pool.Name, diff --git a/x/query/keeper/grpc_query_funders.go b/x/query/keeper/grpc_query_funders.go index 167660a2..6ee8f172 100644 --- a/x/query/keeper/grpc_query_funders.go +++ b/x/query/keeper/grpc_query_funders.go @@ -62,10 +62,10 @@ func (k Keeper) filterFundingsOnStatus(fundings []fundersTypes.Funding, fundingS filtered := make([]fundersTypes.Funding, 0) for _, funding := range fundings { - if fundingStatus == types.FUNDING_STATUS_ACTIVE && funding.Amount > 0 { + if fundingStatus == types.FUNDING_STATUS_ACTIVE && funding.Amounts.IsAllPositive() { filtered = append(filtered, funding) } - if fundingStatus == types.FUNDING_STATUS_INACTIVE && funding.Amount == 0 { + if fundingStatus == types.FUNDING_STATUS_INACTIVE && funding.Amounts.IsZero() { filtered = append(filtered, funding) } } @@ -73,21 +73,23 @@ func (k Keeper) filterFundingsOnStatus(fundings []fundersTypes.Funding, fundingS } func (k Keeper) parseFunder(funder *fundersTypes.Funder, fundings []fundersTypes.Funding) types.Funder { - totalUsedFunds := uint64(0) - totalAllocatedFunds := uint64(0) - totalAmountPerBundle := uint64(0) - poolsFunded := make([]uint64, 0) + stats := types.FundingStats{ + TotalUsedFunds: sdk.NewCoins(), + TotalAllocatedFunds: sdk.NewCoins(), + TotalAmountPerBundle: sdk.NewCoins(), + PoolsFunded: make([]uint64, 0), + } for _, funding := range fundings { // Only count active fundings for totalAmountPerBundle if funding.IsActive() { - totalAmountPerBundle += funding.AmountPerBundle + stats.TotalAmountPerBundle = stats.TotalAmountPerBundle.Add(funding.AmountsPerBundle...) } - totalUsedFunds += funding.TotalFunded - totalAllocatedFunds += funding.Amount + stats.TotalUsedFunds = stats.TotalUsedFunds.Add(funding.TotalFunded...) + stats.TotalAllocatedFunds = stats.TotalAllocatedFunds.Add(funding.Amounts...) - poolsFunded = append(poolsFunded, funding.PoolId) + stats.PoolsFunded = append(stats.PoolsFunded, funding.PoolId) } return types.Funder{ @@ -97,11 +99,6 @@ func (k Keeper) parseFunder(funder *fundersTypes.Funder, fundings []fundersTypes Website: funder.Website, Contact: funder.Contact, Description: funder.Description, - Stats: &types.FundingStats{ - TotalUsedFunds: totalUsedFunds, - TotalAllocatedFunds: totalAllocatedFunds, - TotalAmountPerBundle: totalAmountPerBundle, - PoolsFunded: poolsFunded, - }, + Stats: &stats, } } diff --git a/x/query/keeper/grpc_query_fundings.go b/x/query/keeper/grpc_query_fundings.go index 71d13468..53d4927e 100644 --- a/x/query/keeper/grpc_query_fundings.go +++ b/x/query/keeper/grpc_query_fundings.go @@ -46,11 +46,11 @@ func (k Keeper) parseFundings(fundings []fundersTypes.Funding) []types.Funding { fundingsData := make([]types.Funding, 0) for _, funding := range fundings { fundingsData = append(fundingsData, types.Funding{ - FunderAddress: funding.FunderAddress, - PoolId: funding.PoolId, - Amount: funding.Amount, - AmountPerBundle: funding.AmountPerBundle, - TotalFunded: funding.TotalFunded, + FunderAddress: funding.FunderAddress, + PoolId: funding.PoolId, + Amounts: funding.Amounts, + AmountsPerBundle: funding.AmountsPerBundle, + TotalFunded: funding.TotalFunded, }) } return fundingsData diff --git a/x/query/keeper/helper.go b/x/query/keeper/helper.go index 8847f21e..5df2be2b 100644 --- a/x/query/keeper/helper.go +++ b/x/query/keeper/helper.go @@ -96,7 +96,7 @@ func (k Keeper) GetPoolStatus(ctx sdk.Context, pool *pooltypes.Pool) pooltypes.P poolStatus = pooltypes.POOL_STATUS_NOT_ENOUGH_DELEGATION } else if highestDelegation*2 > totalDelegation { poolStatus = pooltypes.POOL_STATUS_VOTING_POWER_TOO_HIGH - } else if k.fundersKeeper.GetTotalActiveFunding(ctx, pool.Id) == 0 { + } else if k.fundersKeeper.GetTotalActiveFunding(ctx, pool.Id).IsZero() { poolStatus = pooltypes.POOL_STATUS_NO_FUNDS } diff --git a/x/query/types/account.pb.go b/x/query/types/account.pb.go index 89fcd5d2..fc71e3dc 100644 --- a/x/query/types/account.pb.go +++ b/x/query/types/account.pb.go @@ -6,7 +6,10 @@ package types import ( context "context" fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -82,16 +85,16 @@ type QueryAccountAssetsResponse struct { Balance uint64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"` // protocol_staking ... ProtocolSelfDelegation uint64 `protobuf:"varint,2,opt,name=protocol_self_delegation,json=protocolSelfDelegation,proto3" json:"protocol_self_delegation,omitempty"` - // protocol_staking_unbonding + // protocol_staking_unbonding ... ProtocolSelfDelegationUnbonding uint64 `protobuf:"varint,3,opt,name=protocol_self_delegation_unbonding,json=protocolSelfDelegationUnbonding,proto3" json:"protocol_self_delegation_unbonding,omitempty"` // protocol_delegation ... ProtocolDelegation uint64 `protobuf:"varint,4,opt,name=protocol_delegation,json=protocolDelegation,proto3" json:"protocol_delegation,omitempty"` - // protocol_delegation_unbonding + // protocol_delegation_unbonding ... ProtocolDelegationUnbonding uint64 `protobuf:"varint,5,opt,name=protocol_delegation_unbonding,json=protocolDelegationUnbonding,proto3" json:"protocol_delegation_unbonding,omitempty"` // protocol_rewards ... ProtocolRewards uint64 `protobuf:"varint,6,opt,name=protocol_rewards,json=protocolRewards,proto3" json:"protocol_rewards,omitempty"` // protocol_funding ... - ProtocolFunding uint64 `protobuf:"varint,7,opt,name=protocol_funding,json=protocolFunding,proto3" json:"protocol_funding,omitempty"` + ProtocolFunding github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=protocol_funding,json=protocolFunding,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"protocol_funding"` } func (m *QueryAccountAssetsResponse) Reset() { *m = QueryAccountAssetsResponse{} } @@ -169,11 +172,11 @@ func (m *QueryAccountAssetsResponse) GetProtocolRewards() uint64 { return 0 } -func (m *QueryAccountAssetsResponse) GetProtocolFunding() uint64 { +func (m *QueryAccountAssetsResponse) GetProtocolFunding() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.ProtocolFunding } - return 0 + return nil } // QueryAccountFundedListRequest ... @@ -448,8 +451,8 @@ func (m *QueryAccountFundedListResponse) GetFunded() []Funded { // Funded ... type Funded struct { - // amount ... - Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // amounts ... + Amounts github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amounts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts"` // pool ... Pool *BasicPool `protobuf:"bytes,2,opt,name=pool,proto3" json:"pool,omitempty"` } @@ -487,11 +490,11 @@ func (m *Funded) XXX_DiscardUnknown() { var xxx_messageInfo_Funded proto.InternalMessageInfo -func (m *Funded) GetAmount() uint64 { +func (m *Funded) GetAmounts() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Amount + return m.Amounts } - return 0 + return nil } func (m *Funded) GetPool() *BasicPool { @@ -674,63 +677,69 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/account.proto", fileDescriptor_51ca316755261aec) } var fileDescriptor_51ca316755261aec = []byte{ - // 896 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x26, 0xc1, 0x15, 0x2f, 0x2d, 0xa5, 0x13, 0x54, 0x99, 0x0d, 0x5e, 0x47, 0x8b, 0xc0, - 0xa1, 0x82, 0x5d, 0xd9, 0x09, 0xa8, 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0x73, 0x05, - 0x98, 0xad, 0xcb, 0x40, 0x94, 0x82, 0x3b, 0x42, 0xc1, 0x2e, 0x6a, 0x2e, 0x52, 0x20, 0x87, 0xdd, - 0x4f, 0x62, 0xc6, 0x35, 0xde, 0x4f, 0x0c, 0xd8, 0x2c, 0x19, 0x32, 0xb4, 0xbb, 0x8c, 0x46, 0xc9, - 0x40, 0x9b, 0x7b, 0x97, 0x03, 0x29, 0xf6, 0xef, 0x0b, 0xf6, 0x7b, 0xa8, 0xb5, 0x88, 0xbd, 0x3e, - 0x97, 0x13, 0xfa, 0xed, 0x83, 0xa7, 0xe7, 0x96, 0xf1, 0xec, 0xdc, 0x32, 0xfe, 0x3e, 0xb7, 0x8c, - 0x9f, 0x2e, 0xac, 0x95, 0x67, 0x17, 0xd6, 0xca, 0x1f, 0x17, 0xd6, 0xca, 0xa3, 0x5b, 0x51, 0xcc, - 0x8f, 0x87, 0x5d, 0x27, 0xa0, 0x7d, 0xf7, 0xfe, 0xc3, 0x2f, 0x0f, 0x3f, 0x25, 0xfc, 0x8c, 0x66, - 0x27, 0x6e, 0x70, 0x8c, 0xe3, 0xd4, 0xfd, 0x4a, 0x6d, 0xc3, 0x47, 0x03, 0xc2, 0xba, 0x15, 0xf1, - 0x10, 0xef, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x5b, 0x16, 0x72, 0xf8, 0x09, 0x00, 0x00, + // 978 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0x26, 0xf9, 0x3a, 0xfa, 0xbe, 0xb4, 0x94, 0x4c, 0x50, 0xe5, 0x3a, 0x64, 0x1d, 0x2d, + 0x82, 0x84, 0x88, 0xee, 0xca, 0x4e, 0x8a, 0x5a, 0x02, 0x87, 0x3a, 0x3f, 0x38, 0x14, 0x50, 0xd9, + 0x00,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0xc9, 0xd7, 0x7d, 0xeb, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x45, 0x49, 0x9d, 0xde, 0xd2, 0x0a, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -979,10 +988,19 @@ func (m *QueryAccountAssetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - if m.ProtocolFunding != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.ProtocolFunding)) - i-- - dAtA[i] = 0x38 + if len(m.ProtocolFunding) > 0 { + for iNdEx := len(m.ProtocolFunding) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ProtocolFunding[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAccount(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } } if m.ProtocolRewards != 0 { i = encodeVarintAccount(dAtA, i, uint64(m.ProtocolRewards)) @@ -1240,6 +1258,20 @@ func (m *Funded) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Amounts) > 0 { + for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAccount(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } if m.Pool != nil { { size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) @@ -1252,11 +1284,6 @@ func (m *Funded) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.Amount != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } @@ -1413,8 +1440,11 @@ func (m *QueryAccountAssetsResponse) Size() (n int) { if m.ProtocolRewards != 0 { n += 1 + sovAccount(uint64(m.ProtocolRewards)) } - if m.ProtocolFunding != 0 { - n += 1 + sovAccount(uint64(m.ProtocolFunding)) + if len(m.ProtocolFunding) > 0 { + for _, e := range m.ProtocolFunding { + l = e.Size() + n += 1 + l + sovAccount(uint64(l)) + } } return n } @@ -1508,13 +1538,16 @@ func (m *Funded) Size() (n int) { } var l int _ = l - if m.Amount != 0 { - n += 1 + sovAccount(uint64(m.Amount)) - } if m.Pool != nil { l = m.Pool.Size() n += 1 + l + sovAccount(uint64(l)) } + if len(m.Amounts) > 0 { + for _, e := range m.Amounts { + l = e.Size() + n += 1 + l + sovAccount(uint64(l)) + } + } return n } @@ -1796,10 +1829,10 @@ func (m *QueryAccountAssetsResponse) Unmarshal(dAtA []byte) error { } } case 7: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtocolFunding", wireType) } - m.ProtocolFunding = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccount @@ -1809,11 +1842,26 @@ func (m *QueryAccountAssetsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ProtocolFunding |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthAccount + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProtocolFunding = append(m.ProtocolFunding, types.Coin{}) + if err := m.ProtocolFunding[len(m.ProtocolFunding)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAccount(dAtA[iNdEx:]) @@ -2392,11 +2440,11 @@ func (m *Funded) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Funded: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } - m.Amount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccount @@ -2406,14 +2454,31 @@ func (m *Funded) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Amount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + if msglen < 0 { + return ErrInvalidLengthAccount + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pool == nil { + m.Pool = &BasicPool{} + } + if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2440,10 +2505,8 @@ func (m *Funded) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pool == nil { - m.Pool = &BasicPool{} - } - if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Amounts = append(m.Amounts, types.Coin{}) + if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/query/types/query.pb.go b/x/query/types/query.pb.go index f586b685..05d5b58c 100644 --- a/x/query/types/query.pb.go +++ b/x/query/types/query.pb.go @@ -6,7 +6,10 @@ package types import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - types "github.com/KYVENetwork/chain/x/pool/types" + types1 "github.com/KYVENetwork/chain/x/pool/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -43,12 +46,12 @@ type BasicPool struct { UploadInterval uint64 `protobuf:"varint,6,opt,name=upload_interval,json=uploadInterval,proto3" json:"upload_interval,omitempty"` // total_funds of the pool. If the pool runs // out of funds no more bundles will be produced - TotalFunds uint64 `protobuf:"varint,7,opt,name=total_funds,json=totalFunds,proto3" json:"total_funds,omitempty"` + TotalFunds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=total_funds,json=totalFunds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_funds"` // total_delegation of the pool TotalDelegation uint64 `protobuf:"varint,8,opt,name=total_delegation,json=totalDelegation,proto3" json:"total_delegation,omitempty"` // status of the pool if pool is able // to produce bundles, etc. - Status types.PoolStatus `protobuf:"varint,9,opt,name=status,proto3,enum=kyve.pool.v1beta1.PoolStatus" json:"status,omitempty"` + Status types1.PoolStatus `protobuf:"varint,9,opt,name=status,proto3,enum=kyve.pool.v1beta1.PoolStatus" json:"status,omitempty"` } func (m *BasicPool) Reset() { *m = BasicPool{} } @@ -126,11 +129,11 @@ func (m *BasicPool) GetUploadInterval() uint64 { return 0 } -func (m *BasicPool) GetTotalFunds() uint64 { +func (m *BasicPool) GetTotalFunds() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TotalFunds } - return 0 + return nil } func (m *BasicPool) GetTotalDelegation() uint64 { @@ -140,11 +143,11 @@ func (m *BasicPool) GetTotalDelegation() uint64 { return 0 } -func (m *BasicPool) GetStatus() types.PoolStatus { +func (m *BasicPool) GetStatus() types1.PoolStatus { if m != nil { return m.Status } - return types.POOL_STATUS_UNSPECIFIED + return types1.POOL_STATUS_UNSPECIFIED } // FullStaker aggregates information from the staker and its delegators @@ -520,57 +523,61 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/query.proto", fileDescriptor_6b41255feae93a15) } var fileDescriptor_6b41255feae93a15 = []byte{ - // 791 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x4e, 0x1a, 0xbf, 0x80, 0x03, 0xa3, 0xd2, 0x6e, 0x03, 0xdd, 0x44, 0xee, 0xa1, - 0x29, 0x12, 0x6b, 0x25, 0x80, 0x84, 0x38, 0x70, 0x88, 0xd3, 0x4a, 0x88, 0x16, 0xa1, 0xa9, 0x00, - 0xc1, 0x65, 0x35, 0xde, 0x7d, 0x59, 0x8f, 0xbc, 0x3b, 0x63, 0x66, 0x66, 0x1d, 0x7c, 0x83, 0x7f, - 0xc0, 0x8f, 0xe1, 0xce, 0xb5, 0xc7, 0x1e, 0x81, 0x43, 0x85, 0x92, 0x3f, 0x82, 0x66, 0x66, 0x77, - 0x6b, 0x07, 0x73, 0xeb, 0x6d, 0xdf, 0xf7, 0x7d, 0x33, 0x6f, 0xe7, 0xfb, 0xde, 0x0c, 0x44, 0xb3, - 0xe5, 0x02, 0x47, 0x3f, 0x55, 0xa8, 0x96, 0xa3, 0xc5, 0xc9, 0x04, 0x0d, 0x3b, 0xf1, 0x55, 0x3c, - 0x57, 0xd2, 0x48, 0x42, 0x2c, 0x1f, 0x7b, 0xa4, 0xe6, 0x0f, 0x6e, 0xe7, 0x32, 0x97, 0x8e, 0x1e, - 0xd9, 0x2f, 0xaf, 0x3c, 0xf8, 0xc0, 0xed, 0x34, 0x97, 0xb2, 0x68, 0x37, 0xb2, 0x85, 0x67, 0x87, - 0x7f, 0x74, 0xa0, 0x7f, 0xc6, 0x34, 0x4f, 0xbf, 0x91, 0xb2, 0x20, 0x03, 0xe8, 0xf0, 0x2c, 0x0c, - 0x8e, 0x82, 0xe3, 0x1e, 0xed, 0xf0, 0x8c, 0x10, 0xe8, 0x09, 0x56, 0x62, 0xd8, 0x39, 0x0a, 0x8e, - 0xfb, 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8a, 0x82, 0xdf, 0xae, 0xa3, 0xad, 0x97, 0xd7, 0xd1, 0xd6, 0x9f, 0xd7, - 0xd1, 0xd6, 0x8f, 0x1f, 0xe6, 0xdc, 0x4c, 0xab, 0x49, 0x9c, 0xca, 0x72, 0xf4, 0xd5, 0x0f, 0xdf, - 0x3d, 0xfe, 0x1a, 0xcd, 0xa5, 0x54, 0xb3, 0x51, 0x3a, 0x65, 0x5c, 0x8c, 0x7e, 0xae, 0xdf, 0x7d, - 0xb3, 0x9c, 0xa3, 0x9e, 0xec, 0xb8, 0x87, 0xfa, 0xe3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x4a, - 0x04, 0xdd, 0x00, 0x12, 0x06, 0x00, 0x00, + // 864 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x8f, 0xb3, 0x9b, 0x3f, 0xfb, 0x02, 0x1b, 0x3a, 0x2a, 0xad, 0x13, 0xa8, 0x13, 0x6d, 0x0f, + 0xdd, 0x56, 0xaa, 0xad, 0x04, 0x2a, 0x21, 0x0e, 0x1c, 0xb2, 0x69, 0x25, 0x44, 0x8b, 0xd0, 0x54, + 0x80, 0xe0, 0x62, 0xcd, 0xda, 0x2f, 0xde, 0xd1, 0xda, 0x33, 0x5b, 0xcf, 0x78, 0xc3, 0xde, 0xe0, + 0x1b, 0xc0, 0xb7, 0x40, 0x9c, 0x38, 0xf0, 0x21, 0x7a, 0xec, 0x11, 0x38, 0x14, 0x94, 0x1c, 0xf8, + 0x1a, 0x68, 0x66, 0x6c, 0x77, 0x13, 0xf6, 0xc8, 0x25, 0xf1, 0xfb, 0xfd, 0xde, 0xcc, 0x9b, 0xf9, + 0xfd, 0xde, 0x9b, 0x85, 0x60, 0xba, 0x98, 0x63, 0xf4, 0xa2, 0xc2, 0x72, 0x11, 0xcd, 0x8f, 0xc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, 0x88, 0xbe, 0xab, 0x7f, 0x7c, 0xec, 0xc3, 0x36, 0xde, 0xb4, 0x4f, + 0xff, 0x07, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x7f, 0x71, 0xd0, 0x97, 0x06, 0x00, 0x00, } func (m *BasicPool) Marshal() (dAtA []byte, err error) { @@ -603,10 +610,19 @@ func (m *BasicPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x40 } - if m.TotalFunds != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TotalFunds)) - i-- - dAtA[i] = 0x38 + if len(m.TotalFunds) > 0 { + for iNdEx := len(m.TotalFunds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalFunds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } } if m.UploadInterval != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.UploadInterval)) @@ -946,8 +962,11 @@ func (m *BasicPool) Size() (n int) { if m.UploadInterval != 0 { n += 1 + sovQuery(uint64(m.UploadInterval)) } - if m.TotalFunds != 0 { - n += 1 + sovQuery(uint64(m.TotalFunds)) + if len(m.TotalFunds) > 0 { + for _, e := range m.TotalFunds { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } if m.TotalDelegation != 0 { n += 1 + sovQuery(uint64(m.TotalDelegation)) @@ -1260,10 +1279,10 @@ func (m *BasicPool) Unmarshal(dAtA []byte) error { } } case 7: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalFunds", wireType) } - m.TotalFunds = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1273,11 +1292,26 @@ func (m *BasicPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalFunds |= uint64(b&0x7F) << shift + 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.TotalFunds = append(m.TotalFunds, types.Coin{}) + if err := m.TotalFunds[len(m.TotalFunds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TotalDelegation", wireType) @@ -1311,7 +1345,7 @@ func (m *BasicPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= types.PoolStatus(b&0x7F) << shift + m.Status |= types1.PoolStatus(b&0x7F) << shift if b < 0x80 { break } From a5dc9dcae94434df43f5888968ab60cc21eb57ff Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 29 Apr 2024 12:07:40 +0200 Subject: [PATCH 06/28] test: started first multiple coin unit tests --- testutil/integration/integration.go | 39 +++++++++++- x/funders/keeper/logic_funders_test.go | 86 ++++++++++++++++++++------ 2 files changed, 102 insertions(+), 23 deletions(-) diff --git a/testutil/integration/integration.go b/testutil/integration/integration.go index 66064847..84053981 100644 --- a/testutil/integration/integration.go +++ b/testutil/integration/integration.go @@ -58,11 +58,38 @@ var ( ) const ( - KYVE = uint64(1_000_000_000) - TKYVE = uint64(1) + KYVE = uint64(1_000_000_000) + T_KYVE = int64(KYVE) ) var KYVE_DENOM = globalTypes.Denom +var A_DENOM = "acoin" +var B_DENOM = "bcoin" +var C_DENOM = "ccoin" + +func ACoin(amount int64) sdk.Coin { + return sdk.NewInt64Coin(A_DENOM, amount) +} + +func ACoins(amount int64) sdk.Coins { + return sdk.NewCoins(ACoin(amount)) +} + +func BCoin(amount int64) sdk.Coin { + return sdk.NewInt64Coin(B_DENOM, amount) +} + +func BCoins(amount int64) sdk.Coins { + return sdk.NewCoins(ACoin(amount)) +} + +func CCoin(amount int64) sdk.Coin { + return sdk.NewInt64Coin(C_DENOM, amount) +} + +func CCoins(amount int64) sdk.Coins { + return sdk.NewCoins(ACoin(amount)) +} func NewCleanChain() *KeeperTestSuite { s := KeeperTestSuite{} @@ -131,7 +158,13 @@ func (suite *KeeperTestSuite) initDummyAccounts() { } func (suite *KeeperTestSuite) Mint(address string, amount uint64) error { - coins := sdk.NewCoins(sdk.NewInt64Coin(KYVE_DENOM, int64(amount))) + // mint coins ukyve, A, B, C + coins := sdk.NewCoins( + sdk.NewInt64Coin(KYVE_DENOM, int64(amount)), + sdk.NewInt64Coin(A_DENOM, int64(amount)), + sdk.NewInt64Coin(B_DENOM, int64(amount)), + sdk.NewInt64Coin(C_DENOM, int64(amount)), + ) err := suite.app.BankKeeper.MintCoins(suite.ctx, mintTypes.ModuleName, coins) if err != nil { return err diff --git a/x/funders/keeper/logic_funders_test.go b/x/funders/keeper/logic_funders_test.go index adbd7d48..0c63aeac 100644 --- a/x/funders/keeper/logic_funders_test.go +++ b/x/funders/keeper/logic_funders_test.go @@ -5,6 +5,7 @@ import ( funderstypes "github.com/KYVENetwork/chain/x/funders/types" globaltypes "github.com/KYVENetwork/chain/x/global/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" + sdk "github.com/cosmos/cosmos-sdk/types" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -13,12 +14,14 @@ import ( TEST CASES - logic_funders.go -* Charge funders once +* Charge funders once with one coin +* TODO: Charge funders once with multiple coins * Charge funders until one funder runs out of funds * Charge funders until all funders run out of funds * Charge funder with less funds than amount_per_bundle * Charge without fundings -* Check if the lowest funding is returned correctly +* Check if the lowest funding is returned correctly with one coin +* Check if the lowest funding is returned correctly with multiple coins */ @@ -66,16 +69,16 @@ var _ = Describe("logic_funders.go", Ordered, func() { // fund pool s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.A_DENOM, 100*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.A_DENOM, 1*i.T_KYVE)), }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 50 * i.KYVE, - AmountPerBundle: 10 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.A_DENOM, 50*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.A_DENOM, 10*i.T_KYVE)), }) fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, globaltypes.Denom).Amount.Uint64() @@ -86,33 +89,76 @@ var _ = Describe("logic_funders.go", Ordered, func() { s.PerformValidityChecks() }) - It("Charge funders once", func() { + It("Charge funders once with one coin", func() { // ACT payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) // ASSERT - Expect(payout).To(Equal(11 * i.KYVE)) + Expect(payout.String()).To(Equal(i.ACoins(11 * i.T_KYVE).String())) fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) - Expect(fundingAlice.Amount).To(Equal(99 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(1 * i.KYVE)) + Expect(fundingAlice.Amounts.String()).To(Equal(i.ACoins(99 * i.T_KYVE).String())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(foundBob).To(BeTrue()) - Expect(fundingBob.Amount).To(Equal(40 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(10 * i.KYVE)) + Expect(fundingBob.Amounts.String()).To(Equal(i.ACoins(40 * i.T_KYVE).String())) + Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) Expect(fundingState.ActiveFunderAddresses[1]).To(Equal(i.BOB)) - fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, globaltypes.Denom).Amount.Uint64() - poolBalance := s.App().BankKeeper.GetBalance(s.Ctx(), poolModuleAcc, globaltypes.Denom).Amount.Uint64() - Expect(fundersBalance).To(Equal(139 * i.KYVE)) - Expect(poolBalance).To(Equal(11 * i.KYVE)) + fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, i.A_DENOM).Amount.Uint64() + poolBalance := s.App().BankKeeper.GetBalance(s.Ctx(), poolModuleAcc, i.A_DENOM).Amount.Uint64() + Expect(fundersBalance).To(Equal(139 * i.T_KYVE)) + Expect(poolBalance).To(Equal(11 * i.T_KYVE)) + }) + + It("Charge funders once with multiple coins", func() { + // ARRANGE + s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.B_DENOM, 1000*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.B_DENOM, 20*i.T_KYVE)), + }) + s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ + Creator: i.BOB, + PoolId: 0, + Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.C_DENOM, 100*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.C_DENOM, 2*i.T_KYVE)), + }) + + // ACT + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + Expect(err).NotTo(HaveOccurred()) + + // ASSERT + Expect(payout.String()).To(Equal(sdk.NewCoins(i.ACoin(11), i.BCoin(20), i.CCoin(2)).String())) + + fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) + Expect(foundAlice).To(BeTrue()) + Expect(fundingAlice.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(99*i.T_KYVE), i.BCoin(980*i.T_KYVE)).String())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(sdk.NewCoins(i.ACoin(40*i.T_KYVE), i.CCoin(98*i.T_KYVE)).String())) + + fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) + Expect(foundBob).To(BeTrue()) + Expect(fundingBob.Amounts.String()).To(Equal(i.ACoins(40 * i.T_KYVE).String())) + Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) + + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) + Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) + Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) + Expect(fundingState.ActiveFunderAddresses[1]).To(Equal(i.BOB)) + + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + Expect(fundersBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(139), i.BCoin(980), i.CCoin(98)).String())) + Expect(poolBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(11), i.BCoin(20), i.CCoin(2)).String())) }) It("Charge funders until one funder runs out of funds", func() { From 89b071a0cd51893f3e137b6f593bf1ecf90a765b Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 29 Apr 2024 14:47:01 +0200 Subject: [PATCH 07/28] test: refactored fund_pool_test for coins --- testutil/integration/checks.go | 21 +- testutil/integration/helpers.go | 9 + x/funders/keeper/logic_funders_test.go | 153 +++++---- x/funders/keeper/msg_server_fund_pool_test.go | 317 ++++++++++-------- 4 files changed, 276 insertions(+), 224 deletions(-) diff --git a/testutil/integration/checks.go b/testutil/integration/checks.go index b487b346..d9498814 100644 --- a/testutil/integration/checks.go +++ b/testutil/integration/checks.go @@ -2,6 +2,7 @@ package integration import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "time" "cosmossdk.io/store" @@ -452,7 +453,7 @@ func (suite *KeeperTestSuite) VerifyFundersModuleIntegrity() { Expect(found).To(BeTrue()) // check if funding is active - if funding.Amount > 0 { + if !funding.Amounts.IsZero() { key := string(funderstypes.FundingKeyByFunder(funding.FunderAddress, funding.PoolId)) allActiveFundings[key] = true } @@ -485,28 +486,28 @@ func (suite *KeeperTestSuite) VerifyFundersModuleIntegrity() { } func (suite *KeeperTestSuite) VerifyFundersModuleAssetsIntegrity() { - expectedBalance := uint64(0) + expectedBalance := sdk.NewCoins() for _, funding := range suite.App().FundersKeeper.GetAllFundings(suite.Ctx()) { - expectedBalance += funding.Amount + expectedBalance = expectedBalance.Add(funding.Amounts...) } - expectedFundingStateTotalAmount := uint64(0) + expectedFundingStateTotalAmount := sdk.NewCoins() for _, fundingState := range suite.App().FundersKeeper.GetAllFundingStates(suite.Ctx()) { activeFundings := suite.App().FundersKeeper.GetActiveFundings(suite.Ctx(), fundingState) - totalAmount := uint64(0) + totalAmount := sdk.NewCoins() for _, activeFunding := range activeFundings { - totalAmount += activeFunding.Amount + totalAmount = totalAmount.Add(activeFunding.Amounts...) } totalActiveFunding := suite.App().FundersKeeper.GetTotalActiveFunding(suite.ctx, fundingState.PoolId) Expect(totalAmount).To(Equal(totalActiveFunding)) - expectedFundingStateTotalAmount += totalAmount + expectedFundingStateTotalAmount = expectedFundingStateTotalAmount.Add(totalAmount...) } // total amount of fundings should be equal to the amount of the funders module account moduleAcc := suite.App().AccountKeeper.GetModuleAccount(suite.Ctx(), funderstypes.ModuleName).GetAddress() - actualBalance := suite.App().BankKeeper.GetBalance(suite.Ctx(), moduleAcc, globalTypes.Denom).Amount.Uint64() - Expect(actualBalance).To(Equal(expectedBalance)) - Expect(actualBalance).To(Equal(expectedFundingStateTotalAmount)) + actualBalance := suite.App().BankKeeper.GetAllBalances(suite.Ctx(), moduleAcc) + Expect(actualBalance.String()).To(Equal(expectedBalance.String())) + Expect(actualBalance.String()).To(Equal(expectedFundingStateTotalAmount.String())) } // ======================== diff --git a/testutil/integration/helpers.go b/testutil/integration/helpers.go index 418bc540..3f59e890 100644 --- a/testutil/integration/helpers.go +++ b/testutil/integration/helpers.go @@ -16,6 +16,15 @@ func (suite *KeeperTestSuite) GetBalanceFromAddress(address string) uint64 { return uint64(balance.Amount.Int64()) } +func (suite *KeeperTestSuite) GetBalancesFromAddress(address string) sdk.Coins { + accAddress, err := sdk.AccAddressFromBech32(address) + if err != nil { + return sdk.NewCoins() + } + + return suite.App().BankKeeper.GetAllBalances(suite.Ctx(), accAddress) +} + func (suite *KeeperTestSuite) GetBalanceFromPool(poolId uint64) uint64 { pool, found := suite.App().PoolKeeper.GetPool(suite.Ctx(), poolId) if !found { diff --git a/x/funders/keeper/logic_funders_test.go b/x/funders/keeper/logic_funders_test.go index 0c63aeac..308394cb 100644 --- a/x/funders/keeper/logic_funders_test.go +++ b/x/funders/keeper/logic_funders_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" funderstypes "github.com/KYVENetwork/chain/x/funders/types" globaltypes "github.com/KYVENetwork/chain/x/global/types" @@ -71,14 +72,14 @@ var _ = Describe("logic_funders.go", Ordered, func() { s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ Creator: i.ALICE, PoolId: 0, - Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.A_DENOM, 100*i.T_KYVE)), - AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.A_DENOM, 1*i.T_KYVE)), + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ Creator: i.BOB, PoolId: 0, - Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.A_DENOM, 50*i.T_KYVE)), - AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.A_DENOM, 10*i.T_KYVE)), + Amounts: i.ACoins(50 * i.T_KYVE), + AmountsPerBundle: i.ACoins(10 * i.T_KYVE), }) fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, globaltypes.Denom).Amount.Uint64() @@ -123,14 +124,14 @@ var _ = Describe("logic_funders.go", Ordered, func() { s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ Creator: i.ALICE, PoolId: 0, - Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.B_DENOM, 1000*i.T_KYVE)), - AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.B_DENOM, 20*i.T_KYVE)), + Amounts: i.ACoins(1000 * i.T_KYVE), + AmountsPerBundle: i.ACoins(20 * i.T_KYVE), }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ Creator: i.BOB, PoolId: 0, - Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.C_DENOM, 100*i.T_KYVE)), - AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.C_DENOM, 2*i.T_KYVE)), + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(2 * i.T_KYVE), }) // ACT @@ -176,24 +177,24 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) - Expect(fundingAlice.Amount).To(Equal(95 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(5 * i.KYVE)) + Expect(fundingAlice.Amounts.String()).To(Equal(i.ACoins(95 * i.T_KYVE).String())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(i.ACoins(5 * i.T_KYVE).String())) fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(foundBob).To(BeTrue()) - Expect(fundingBob.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(50 * i.KYVE)) + Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) + Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) - fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, globaltypes.Denom).Amount.Uint64() - poolBalance := s.App().BankKeeper.GetBalance(s.Ctx(), poolModuleAcc, globaltypes.Denom).Amount.Uint64() - Expect(fundersBalance).To(Equal(95 * i.KYVE)) - Expect(poolBalance).To(Equal(55 * i.KYVE)) + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + Expect(fundersBalance.String()).To(Equal(i.ACoins(95 * i.T_KYVE).String())) + Expect(poolBalance.String()).To(Equal(i.ACoins(55 * i.T_KYVE).String())) }) It("Charge funders until all funders run out of funds", func() { // ARRANGE funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) - funding.AmountPerBundle = 10 * i.KYVE + funding.AmountsPerBundle = i.ACoins(10 * i.T_KYVE) s.App().FundersKeeper.SetFunding(s.Ctx(), &funding) // ACT / ASSERT @@ -203,7 +204,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) - Expect(payout).To(Equal(20 * i.KYVE)) + Expect(payout.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) } fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) @@ -211,13 +212,13 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) - Expect(fundingAlice.Amount).To(Equal(50 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(50 * i.KYVE)) + Expect(fundingAlice.Amounts.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(foundBob).To(BeTrue()) - Expect(fundingBob.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(50 * i.KYVE)) + Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) + Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) for range [5]struct{}{} { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) @@ -225,44 +226,44 @@ var _ = Describe("logic_funders.go", Ordered, func() { payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) - Expect(payout).To(Equal(10 * i.KYVE)) + Expect(payout.String()).To(Equal(i.ACoins(10 * i.T_KYVE))) } fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) fundingAlice, foundAlice = s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) - Expect(fundingAlice.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(100 * i.KYVE)) + Expect(fundingAlice.Amounts.IsZero()).To(Equal(BeTrue())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) fundingBob, foundBob = s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(foundBob).To(BeTrue()) - Expect(fundingBob.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(50 * i.KYVE)) + Expect(fundingBob.Amounts.IsZero()).To(Equal(BeTrue())) + Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) - Expect(payout).To(Equal(0 * i.KYVE)) + Expect(payout.IsZero()).To(Equal(BeTrue())) fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) - fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, globaltypes.Denom).Amount.Uint64() - poolBalance := s.App().BankKeeper.GetBalance(s.Ctx(), poolModuleAcc, globaltypes.Denom).Amount.Uint64() - Expect(fundersBalance).To(Equal(0 * i.KYVE)) - Expect(poolBalance).To(Equal(150 * i.KYVE)) + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + Expect(fundersBalance.IsZero()).To(Equal(BeTrue())) + Expect(poolBalance.String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) }) It("Charge funder with less funds than amount_per_bundle", func() { // ARRANGE funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) - funding.AmountPerBundle = 105 * i.KYVE + funding.AmountsPerBundle = i.ACoins(105 * i.T_KYVE) s.App().FundersKeeper.SetFunding(s.Ctx(), &funding) // ACT payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) - Expect(payout).To(Equal(110 * i.KYVE)) + Expect(payout.String()).To(Equal(i.ACoins(110 * i.T_KYVE).String())) // ASSERT fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) @@ -271,18 +272,18 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) - Expect(fundingAlice.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(100 * i.KYVE)) + Expect(fundingAlice.Amounts.IsZero()).To(Equal(BeTrue())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(foundBob).To(BeTrue()) - Expect(fundingBob.Amount).To(Equal(40 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(10 * i.KYVE)) + Expect(fundingBob.Amounts.String()).To(Equal(i.ACoins(40 * i.T_KYVE).String())) + Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) - fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, globaltypes.Denom).Amount.Uint64() - poolBalance := s.App().BankKeeper.GetBalance(s.Ctx(), poolModuleAcc, globaltypes.Denom).Amount.Uint64() - Expect(fundersBalance).To(Equal(40 * i.KYVE)) - Expect(poolBalance).To(Equal(110 * i.KYVE)) + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + Expect(fundersBalance.String()).To(Equal(i.ACoins(40 * i.T_KYVE).String())) + Expect(poolBalance.String()).To(Equal(i.ACoins(110 * i.T_KYVE).String())) }) It("Charge without fundings", func() { @@ -290,63 +291,79 @@ var _ = Describe("logic_funders.go", Ordered, func() { s.RunTxFundersSuccess(&funderstypes.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 100 * i.KYVE, + Amounts: i.ACoins(100 * i.T_KYVE), }) s.RunTxFundersSuccess(&funderstypes.MsgDefundPool{ Creator: i.BOB, PoolId: 0, - Amount: 50 * i.KYVE, + Amounts: i.ACoins(50 * i.T_KYVE), }) // ACT payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) // ASSERT + Expect(err).NotTo(HaveOccurred()) + Expect(payout.IsZero()).To(Equal(BeTrue())) + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) - Expect(fundingAlice.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(fundingAlice.Amounts.IsZero()).To(BeTrue()) + Expect(fundingAlice.TotalFunded.IsZero()).To(BeTrue()) fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(foundBob).To(BeTrue()) - Expect(fundingBob.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) + Expect(fundingBob.TotalFunded.IsZero()).To(BeTrue()) - Expect(err).NotTo(HaveOccurred()) - Expect(payout).To(Equal(0 * i.KYVE)) - fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, globaltypes.Denom).Amount.Uint64() - poolBalance := s.App().BankKeeper.GetBalance(s.Ctx(), poolModuleAcc, globaltypes.Denom).Amount.Uint64() - Expect(fundersBalance).To(Equal(0 * i.KYVE)) - Expect(poolBalance).To(Equal(0 * i.KYVE)) + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + Expect(fundersBalance.IsZero()).To(BeTrue()) + Expect(poolBalance.IsZero()).To(BeTrue()) }) It("Check if the lowest funding is returned correctly", func() { + whitelist := []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + CoinWeight: math.LegacyNewDec(3), + }, + } + fundings := []funderstypes.Funding{ { - FunderAddress: i.DUMMY[0], - PoolId: 0, - Amount: 1000 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + FunderAddress: i.DUMMY[0], + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(1000*i.T_KYVE), i.BCoin(500*i.T_KYVE), i.CCoin(100)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE), i.CCoin(1)), }, { - FunderAddress: i.DUMMY[1], - PoolId: 0, - Amount: 900 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + FunderAddress: i.DUMMY[1], + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(1100*i.T_KYVE), i.BCoin(600*i.T_KYVE), i.CCoin(5)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE), i.CCoin(1)), }, { - FunderAddress: i.DUMMY[2], - PoolId: 0, - Amount: 1100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + FunderAddress: i.DUMMY[2], + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(500*i.T_KYVE), i.CCoin(700)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.CCoin(1)), }, } - getLowestFunding, err := s.App().FundersKeeper.GetLowestFunding(fundings) + getLowestFunding, err := s.App().FundersKeeper.GetLowestFunding(fundings, whitelist) Expect(err).NotTo(HaveOccurred()) - Expect(getLowestFunding.Amount).To(Equal(900 * i.KYVE)) + Expect(getLowestFunding.FunderAddress).To(Equal(i.DUMMY[1])) }) }) diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index a6a251b8..86d8f2bc 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -1,9 +1,11 @@ package keeper_test import ( + "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" funderstypes "github.com/KYVENetwork/chain/x/funders/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" + sdk "github.com/cosmos/cosmos-sdk/types" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -12,14 +14,14 @@ import ( TEST CASES - msg_server_fund_pool.go -* Fund a pool with 100 $KYVE -* Fund additional 50 $KYVE to an existing funding with 100 $KYVE -* Try to fund more $KYVE than available in balance -* Fund with a new funder less $KYVE than the existing one -* Fund with a new funder more $KYVE than the existing one +* Fund a pool with 100 coins +* Fund additional 50 coins to an existing funding with 100 coins +* Try to fund more coins than available in balance +* Fund with a new funder less coins than the existing one +* Fund with a new funder more coins than the existing one * Try to fund with a non-existent funder -* Try to fund less $KYVE than the lowest funder with full funding slots -* Fund more $KYVE than the lowest funder with full funding slots +* Try to fund less coins than the lowest funder with full funding slots +* Fund more coins than the lowest funder with full funding slots * Refund a funding as the lowest funder * Try to fund a non-existent pool * Try to fund below the minimum amount @@ -31,7 +33,27 @@ TEST CASES - msg_server_fund_pool.go var _ = Describe("msg_server_fund_pool.go", Ordered, func() { s := i.NewCleanChain() - initialBalance := s.GetBalanceFromAddress(i.ALICE) + initialBalance := s.GetBalancesFromAddress(i.ALICE) + whitelist := []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } BeforeEach(func() { // init new clean chain @@ -57,6 +79,9 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { } s.RunTxPoolSuccess(msg) + // set whitelist + s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) + // create funder s.RunTxFundersSuccess(&funderstypes.MsgCreateFunder{ Creator: i.ALICE, @@ -72,26 +97,26 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { s.PerformValidityChecks() }) - It("Fund a pool with 100 $KYVE", func() { + It("Fund a pool with 100 coins", func() { // ACT s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ASSERT - balanceAfter := s.GetBalanceFromAddress(i.ALICE) + balanceAfter := s.GetBalancesFromAddress(i.ALICE) - Expect(initialBalance - balanceAfter).To(Equal(100 * i.KYVE)) + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(funding.FunderAddress).To(Equal(i.ALICE)) Expect(funding.PoolId).To(Equal(uint64(0))) - Expect(funding.Amount).To(Equal(100 * i.KYVE)) - Expect(funding.AmountPerBundle).To(Equal(1 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(funding.Amounts).To(Equal(i.ACoins(100 * i.T_KYVE).String())) + Expect(funding.AmountsPerBundle).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.PoolId).To(Equal(uint64(0))) @@ -99,33 +124,34 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) }) - It("Fund additional 50 $KYVE to an existing funding with 100 $KYVE", func() { + It("Fund additional 50 coins to an existing funding with 100 coins", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ACT s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 50 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(50 * i.T_KYVE), + AmountsPerBundle: sdk.NewCoins(), }) // ASSERT - balanceAfter := s.GetBalanceFromAddress(i.ALICE) + balanceAfter := s.GetBalancesFromAddress(i.ALICE) - Expect(initialBalance - balanceAfter).To(Equal(150 * i.KYVE)) + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(funding.FunderAddress).To(Equal(i.ALICE)) Expect(funding.PoolId).To(Equal(uint64(0))) - Expect(funding.Amount).To(Equal(150 * i.KYVE)) - Expect(funding.AmountPerBundle).To(Equal(1 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(funding.Amounts).To(Equal(i.ACoins(150 * i.T_KYVE).String())) + Expect(funding.AmountsPerBundle).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.PoolId).To(Equal(uint64(0))) @@ -133,25 +159,25 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) - lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) }) - It("Try to fund more $KYVE than available in balance", func() { + It("Try to fund more coins than available in balance", func() { // ACT - currentBalance := s.GetBalanceFromAddress(i.ALICE) + currentBalance := s.GetBalancesFromAddress(i.ALICE) s.RunTxFundersError(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: currentBalance + 1, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: currentBalance.Add(i.ACoin(1)), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ASSERT - balanceAfter := s.GetBalanceFromAddress(i.ALICE) - Expect(initialBalance - balanceAfter).To(BeZero()) + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) _, found := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(found).To(BeFalse()) @@ -161,74 +187,74 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(0)) }) - It("Fund with a new funder less $KYVE than the existing one", func() { + It("Fund with a new funder less coins than the existing one", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ACT s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 50 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.ACoins(50 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ASSERT - balanceAfter := s.GetBalanceFromAddress(i.BOB) - Expect(initialBalance - balanceAfter).To(Equal(50 * i.KYVE)) + balanceAfter := s.GetBalancesFromAddress(i.BOB) + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) - Expect(funding.Amount).To(Equal(50 * i.KYVE)) - Expect(funding.AmountPerBundle).To(Equal(1 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(funding.Amounts.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(Equal(BeTrue())) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.PoolId).To(Equal(uint64(0))) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(2)) activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) - lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.BOB)) }) - It("Fund with a new funder more $KYVE than the existing one", func() { + It("Fund with a new funder more coins than the existing one", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ACT s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 200 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.ACoins(200 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ASSERT - balanceAfter := s.GetBalanceFromAddress(i.BOB) - Expect(initialBalance - balanceAfter).To(Equal(200 * i.KYVE)) + balanceAfter := s.GetBalancesFromAddress(i.BOB) + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(200 * i.T_KYVE).String())) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) - Expect(funding.Amount).To(Equal(200 * i.KYVE)) - Expect(funding.AmountPerBundle).To(Equal(1 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(funding.Amounts.String()).To(Equal(i.ACoins(200 * i.T_KYVE).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.PoolId).To(Equal(uint64(0))) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(2)) activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) - lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) }) @@ -236,20 +262,20 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { It("Try to fund with a non-existent funder", func() { // ASSERT s.RunTxFundersError(&funderstypes.MsgFundPool{ - Creator: i.CHARLIE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.CHARLIE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) }) - It("Try to fund less $KYVE than the lowest funder with full funding slots", func() { + It("Try to fund less coins than the lowest funder with full funding slots", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) for a := 0; a < funderstypes.MaxFunders-1; a++ { @@ -259,25 +285,25 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // fill remaining funding slots s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.DUMMY[a], - PoolId: 0, - Amount: 1000 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.DUMMY[a], + PoolId: 0, + Amounts: i.ACoins(1000 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) } fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(funderstypes.MaxFunders)) - balanceAfter := s.GetBalanceFromAddress(i.ALICE) - Expect(initialBalance - balanceAfter).To(Equal(100 * i.KYVE)) + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceAfter...)).To(Equal(i.ACoins(100 * i.T_KYVE))) // ACT s.RunTxFundersError(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 50 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.ACoins(50 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ASSERT @@ -286,19 +312,19 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) Expect(activeFundings).To(HaveLen(50)) - lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) }) - It("Fund more $KYVE than the lowest funder with full funding slots", func() { + It("Fund more coins than the lowest funder with full funding slots", func() { // ARRANGE - initialBalanceBob := s.GetBalanceFromAddress(i.BOB) + initialBalanceBob := s.GetBalancesFromAddress(i.BOB) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) for a := 0; a < funderstypes.MaxFunders-1; a++ { @@ -308,48 +334,48 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // fill remaining funding slots s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.DUMMY[a], - PoolId: 0, - Amount: 1000 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.DUMMY[a], + PoolId: 0, + Amounts: i.ACoins(1000 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) } - balanceAfter := s.GetBalanceFromAddress(i.ALICE) - Expect(initialBalance - balanceAfter).To(Equal(100 * i.KYVE)) + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) // ACT s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 200 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.ACoins(200 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) - x := s.GetBalanceFromAddress(i.BOB) - Expect(initialBalanceBob - x).To(Equal(200 * i.KYVE)) + x := s.GetBalancesFromAddress(i.BOB) + Expect(initialBalanceBob.Sub(x...).String()).To(Equal(i.ACoins(200 * i.T_KYVE).String())) // ASSERT fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(funderstypes.MaxFunders)) activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) Expect(activeFundings).To(HaveLen(50)) - lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.BOB)) - balanceEnd := s.GetBalanceFromAddress(i.ALICE) - Expect(initialBalance - balanceEnd).To(BeZero()) + balanceEnd := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceEnd...).IsZero()).To(BeTrue()) - balanceAfterBob := s.GetBalanceFromAddress(i.BOB) - Expect(initialBalanceBob - balanceAfterBob).To(Equal(200 * i.KYVE)) + balanceAfterBob := s.GetBalancesFromAddress(i.BOB) + Expect(initialBalanceBob.Sub(balanceAfterBob...).String()).To(Equal(i.ACoins(200 * i.T_KYVE))) }) It("Refund a funding as the lowest funder", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) for a := 0; a < funderstypes.MaxFunders-1; a++ { @@ -359,74 +385,73 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // fill remaining funding slots s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.DUMMY[a], - PoolId: 0, - Amount: 1000 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.DUMMY[a], + PoolId: 0, + Amounts: i.ACoins(1000 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) } fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) Expect(activeFundings).To(HaveLen(50)) - lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) // ACT s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 50 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(50 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) // ASSERT fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(funderstypes.MaxFunders)) - balanceEnd := s.GetBalanceFromAddress(i.ALICE) - Expect(initialBalance - balanceEnd).To(Equal(150 * i.KYVE)) + balanceEnd := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceEnd...).String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) }) It("Try to fund a non-existent pool", func() { // ASSERT s.RunTxFundersError(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 1, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 1, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) }) It("Try to fund below the minimum amount", func() { // ASSERT s.RunTxFundersError(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 1, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(1 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) }) It("Try to fund below the minimum amount per bundle", func() { // ASSERT s.RunTxFundersError(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1), }) }) It("Try to fund without fulfilling min_funding_multiple", func() { // ASSERT - _, err := s.RunTx(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 2 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + s.RunTxFundersError(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(50 * i.T_KYVE), }) - Expect(err.Error()).To(Equal("per_bundle_amount (1000000000kyve) times min_funding_multiple (1000000000) is smaller than funded_amount (2000000000kyve): invalid request")) }) }) From d108389ffbb37897d3c9eba949a622144771b822 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 29 Apr 2024 15:45:51 +0200 Subject: [PATCH 08/28] test: finished tests so they compile --- x/funders/keeper/debug_container.dot | 686 ++++++++++++++++++ x/funders/keeper/debug_container.log | 659 +++++++++++++++++ x/funders/keeper/keeper_test.go | 2 +- .../keeper/msg_server_defund_pool_test.go | 106 +-- .../keeper/msg_server_update_params_test.go | 120 +-- x/funders/types/params.go | 17 +- 6 files changed, 1452 insertions(+), 138 deletions(-) create mode 100644 x/funders/keeper/debug_container.dot create mode 100644 x/funders/keeper/debug_container.log diff --git a/x/funders/keeper/debug_container.dot b/x/funders/keeper/debug_container.dot new file mode 100644 index 00000000..755c4c51 --- /dev/null +++ b/x/funders/keeper/debug_container.dot @@ -0,0 +1,686 @@ +digraph "" { + subgraph "cluster_auth" { + graph [fontsize="12.0", label="Module: auth", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_authz" { + graph [fontsize="12.0", label="Module: authz", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_bank" { + graph [fontsize="12.0", label="Module: bank", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_bundles" { + graph [fontsize="12.0", label="Module: bundles", penwidth="0.5", style="rounded"]; + "github.com/KYVENetwork/chain/x/bundles.ProvideModule"[color="red", fontcolor="red", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_consensus" { + graph [fontsize="12.0", label="Module: consensus", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_crisis" { + graph [fontsize="12.0", label="Module: crisis", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_delegation" { + graph [fontsize="12.0", label="Module: delegation", penwidth="0.5", style="rounded"]; + "github.com/KYVENetwork/chain/x/delegation.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_distribution" { + graph [fontsize="12.0", label="Module: distribution", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_evidence" { + graph [fontsize="12.0", label="Module: evidence", penwidth="0.5", style="rounded"]; + "cosmossdk.io/x/evidence.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_feegrant" { + graph [fontsize="12.0", label="Module: feegrant", penwidth="0.5", style="rounded"]; + "cosmossdk.io/x/feegrant/module.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_funders" { + graph [fontsize="12.0", label="Module: funders", penwidth="0.5", style="rounded"]; + "github.com/KYVENetwork/chain/x/funders.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_genutil" { + graph [fontsize="12.0", label="Module: genutil", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_global" { + graph [fontsize="12.0", label="Module: global", penwidth="0.5", style="rounded"]; + "github.com/KYVENetwork/chain/x/global.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_gov" { + graph [fontsize="12.0", label="Module: gov", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_group" { + graph [fontsize="12.0", label="Module: group", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_mint" { + graph [fontsize="12.0", label="Module: mint", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_params" { + graph [fontsize="12.0", label="Module: params", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_pool" { + graph [fontsize="12.0", label="Module: pool", penwidth="0.5", style="rounded"]; + "github.com/KYVENetwork/chain/x/pool.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_query" { + graph [fontsize="12.0", label="Module: query", penwidth="0.5", style="rounded"]; + "github.com/KYVENetwork/chain/x/query.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_runtime" { + graph [fontsize="12.0", label="Module: runtime", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideApp"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideBasicManager"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideEventService"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideGenesisTxHandler"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideHeaderInfoService"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + } + + subgraph "cluster_slashing" { + graph [fontsize="12.0", label="Module: slashing", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_stakers" { + graph [fontsize="12.0", label="Module: stakers", penwidth="0.5", style="rounded"]; + "github.com/KYVENetwork/chain/x/stakers.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_staking" { + graph [fontsize="12.0", label="Module: staking", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_team" { + graph [fontsize="12.0", label="Module: team", penwidth="0.5", style="rounded"]; + "github.com/KYVENetwork/chain/x/team.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_tx" { + graph [fontsize="12.0", label="Module: tx", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_upgrade" { + graph [fontsize="12.0", label="Module: upgrade", penwidth="0.5", style="rounded"]; + "cosmossdk.io/x/upgrade.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + } + + subgraph "cluster_vesting" { + graph [fontsize="12.0", label="Module: vesting", penwidth="0.5", style="rounded"]; + "github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; + } + + "*cosmossdk.io/api/cosmos/app/runtime/v1alpha1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/app/v1alpha1.Config"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*cosmossdk.io/api/cosmos/auth/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/authz/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*cosmossdk.io/api/cosmos/bank/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/consensus/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/crisis/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/distribution/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/evidence/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*cosmossdk.io/api/cosmos/feegrant/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*cosmossdk.io/api/cosmos/genutil/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*cosmossdk.io/api/cosmos/gov/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/group/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/mint/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/params/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*cosmossdk.io/api/cosmos/slashing/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/staking/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/tx/config/v1.Config"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/upgrade/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/api/cosmos/vesting/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*cosmossdk.io/store/types.KVStoreKey"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/store/types.MemoryStoreKey"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*cosmossdk.io/store/types.TransientStoreKey"[color="black", fontcolor="black", penwidth="1.5"]; + "*cosmossdk.io/x/upgrade/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/KYVENetwork/chain/api/kyve/bundles/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/KYVENetwork/chain/api/kyve/delegation/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/KYVENetwork/chain/api/kyve/funders/module.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*github.com/KYVENetwork/chain/api/kyve/global/module.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*github.com/KYVENetwork/chain/api/kyve/pool/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/KYVENetwork/chain/api/kyve/query/module.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*github.com/KYVENetwork/chain/api/kyve/stakers/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/KYVENetwork/chain/api/kyve/team/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/cosmos/cosmos-sdk/x/crisis/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "[]cosmossdk.io/x/tx/signing.CustomGetSigner"[color="black", comment="many-per-container", fontcolor="black", penwidth="1.5"]; + "[]github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1.HandlerRoute"[color="lightgrey", comment="many-per-container", fontcolor="dimgrey", penwidth="0.5"]; + "[]runtime.BaseAppOption"[color="lightgrey", comment="many-per-container", fontcolor="dimgrey", penwidth="0.5"]; + "cosmossdk.io/core/address.Codec"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/core/appconfig.Compose"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "cosmossdk.io/core/comet.BlockInfoService"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/core/event.Service"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/core/genesis.TxHandler"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "cosmossdk.io/core/header.Service"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "cosmossdk.io/core/store.KVStoreService"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/core/store.MemoryStoreService"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/core/store.TransientStoreService"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "cosmossdk.io/depinject.ModuleKey"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/depinject.OwnModuleKey"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/log.Logger"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/log.nopLogger"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "cosmossdk.io/x/evidence/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/x/evidence/types.SlashingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/x/evidence/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/x/feegrant.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/x/feegrant.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/x/feegrant/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "cosmossdk.io/x/tx/signing.ProtoFileResolver"[color="black", fontcolor="black", penwidth="1.5"]; + "func() *keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "func() []signing.SignModeHandler"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "func() address.Codec"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "func() runtime.ConsensusAddressCodec"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "func() runtime.ValidatorAddressCodec"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "func() types.AccountI"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "func(string) keeper.ScopedKeeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/KYVENetwork/chain/app.AppConfig"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; + "github.com/KYVENetwork/chain/app.EmptyAppOptions"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/KYVENetwork/chain/app.New"[color="red", fontcolor="red", penwidth="1.5", shape="hexagon"]; + "github.com/KYVENetwork/chain/util.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/util.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/util.DistributionKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/util.UpgradeKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/bundles/keeper.Keeper"[color="red", fontcolor="red", penwidth="0.5"]; + "github.com/KYVENetwork/chain/x/bundles/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/bundles/types.DelegationKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/bundles/types.FundersKeeper"[color="red", fontcolor="red", penwidth="0.5"]; + "github.com/KYVENetwork/chain/x/bundles/types.PoolKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/bundles/types.StakerKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/bundles/types.TeamKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/delegation/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/KYVENetwork/chain/x/delegation/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/delegation/types.DelegationKVStoreService"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/KYVENetwork/chain/x/funders/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/KYVENetwork/chain/x/global/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/KYVENetwork/chain/x/pool/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/pool/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/KYVENetwork/chain/x/query/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/KYVENetwork/chain/x/team/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/KYVENetwork/chain/x/team/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/baseapp.MessageRouter"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/client.TxConfig"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/codec.Codec"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/runtime.ConsensusAddressCodec"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/server/types.AppOptions"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/auth/ante.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/auth/ante.FeegrantKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/auth/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/auth/tx.ConfigOptions"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/x/auth/tx/config.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/auth/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/auth/vesting/types.BankKeeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/x/authz.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/authz.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/authz/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/bank/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/bank/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/consensus/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/crisis/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/crisis/types.SupplyKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/distribution/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/distribution/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/distribution/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/distribution/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/gov/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/gov/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/gov/types.DistributionKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/gov/types.ParamSubspace"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/gov/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/group.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/group.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/group/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/mint/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/mint/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/mint/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/mint/types.ProtocolStakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/mint/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/params/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/params/types.Subspace"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "github.com/cosmos/cosmos-sdk/x/slashing/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/slashing/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/slashing/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/slashing/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/slashing/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/staking/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/staking/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "github.com/cosmos/cosmos-sdk/x/staking/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; + "google.golang.org/protobuf/reflect/protodesc.Resolver"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "google.golang.org/protobuf/reflect/protoregistry.MessageTypeResolver"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "map[string]cosmossdk.io/core/appmodule.AppModule"[color="lightgrey", comment="one-per-module", fontcolor="dimgrey", penwidth="0.5"]; + "map[string]github.com/cosmos/cosmos-sdk/types/module.AppModuleBasic"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "map[string]github.com/cosmos/cosmos-sdk/x/params/types.KeyTable"[color="black", comment="one-per-module", fontcolor="black", penwidth="1.5"]; + "map[string]github.com/cosmos/cosmos-sdk/x/staking/types.StakingHooksWrapper"[color="lightgrey", comment="one-per-module", fontcolor="dimgrey", penwidth="0.5"]; + "types.InflationCalculationFn"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "types.RandomGenesisAccountsFn"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/app/v1alpha1.Config"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/app/runtime/v1alpha1.Module"; + "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideApp"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "github.com/cosmos/cosmos-sdk/codec.Codec"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "google.golang.org/protobuf/reflect/protodesc.Resolver"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "google.golang.org/protobuf/reflect/protoregistry.MessageTypeResolver"; + "cosmossdk.io/core/address.Codec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry"; + "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry"; + "[]cosmossdk.io/x/tx/signing.CustomGetSigner" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry"; + "*cosmossdk.io/api/cosmos/app/runtime/v1alpha1.Module" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey"; + "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey" -> "*cosmossdk.io/store/types.KVStoreKey"; + "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey" -> "*cosmossdk.io/store/types.TransientStoreKey"; + "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey" -> "*cosmossdk.io/store/types.MemoryStoreKey"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideGenesisTxHandler"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideGenesisTxHandler" -> "cosmossdk.io/core/genesis.TxHandler"; + "*cosmossdk.io/api/cosmos/app/runtime/v1alpha1.Module" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService"; + "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService" -> "cosmossdk.io/core/store.KVStoreService"; + "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService" -> "cosmossdk.io/core/store.MemoryStoreService"; + "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService" -> "cosmossdk.io/core/store.TransientStoreService"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideEventService" -> "cosmossdk.io/core/event.Service"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideHeaderInfoService"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideHeaderInfoService" -> "cosmossdk.io/core/header.Service"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService" -> "cosmossdk.io/core/comet.BlockInfoService"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideBasicManager"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideBasicManager" -> "map[string]github.com/cosmos/cosmos-sdk/types/module.AppModuleBasic"; + "*cosmossdk.io/api/cosmos/auth/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; + "*cosmossdk.io/api/cosmos/staking/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; + "func() address.Codec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; + "func() runtime.ValidatorAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; + "func() runtime.ConsensusAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec" -> "cosmossdk.io/core/address.Codec"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec"; + "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ConsensusAddressCodec"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/auth/module/v1.Module"; + "*cosmossdk.io/api/cosmos/auth/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; + "cosmossdk.io/core/address.Codec" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; + "types.RandomGenesisAccountsFn" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; + "func() types.AccountI" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/exported.Subspace" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper"; + "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/vesting/module/v1.Module"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/vesting/types.BankKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/bank/module/v1.Module"; + "*cosmossdk.io/api/cosmos/bank/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/exported.Subspace" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper"; + "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/staking/module/v1.Module"; + "*cosmossdk.io/api/cosmos/staking/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; + "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; + "github.com/cosmos/cosmos-sdk/runtime.ConsensusAddressCodec" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/staking/exported.Subspace" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule" -> "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/slashing/module/v1.Module"; + "*cosmossdk.io/api/cosmos/slashing/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/slashing/exported.Subspace" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/slashing/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule" -> "map[string]github.com/cosmos/cosmos-sdk/x/staking/types.StakingHooksWrapper"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/params/module/v1.Module"; + "*cosmossdk.io/store/types.KVStoreKey" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"; + "*cosmossdk.io/store/types.TransientStoreKey" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/params.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/params/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/params.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "github.com/cosmos/cosmos-sdk/x/params.ProvideModule" -> "[]github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1.HandlerRoute"; + "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace"; + "github.com/cosmos/cosmos-sdk/x/params/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace"; + "map[string]github.com/cosmos/cosmos-sdk/x/params/types.KeyTable" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace"; + "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace" -> "github.com/cosmos/cosmos-sdk/x/params/types.Subspace"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/tx/config/v1.Config"; + "*cosmossdk.io/api/cosmos/tx/config/v1.Config" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "cosmossdk.io/core/address.Codec" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "cosmossdk.io/x/tx/signing.ProtoFileResolver" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/ante.FeegrantKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "func() []signing.SignModeHandler" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "[]cosmossdk.io/x/tx/signing.CustomGetSigner" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule" -> "github.com/cosmos/cosmos-sdk/client.TxConfig"; + "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/auth/tx.ConfigOptions"; + "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule" -> "[]runtime.BaseAppOption"; + "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry" -> "cosmossdk.io/x/tx/signing.ProtoFileResolver"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/genutil/module/v1.Module"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"; + "cosmossdk.io/core/genesis.TxHandler" -> "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"; + "github.com/cosmos/cosmos-sdk/client.TxConfig" -> "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/authz/module/v1.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/authz/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/upgrade/module/v1.Module"; + "*cosmossdk.io/api/cosmos/upgrade/module/v1.Module" -> "cosmossdk.io/x/upgrade.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "cosmossdk.io/x/upgrade.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "cosmossdk.io/x/upgrade.ProvideModule"; + "cosmossdk.io/core/address.Codec" -> "cosmossdk.io/x/upgrade.ProvideModule"; + "github.com/cosmos/cosmos-sdk/server/types.AppOptions" -> "cosmossdk.io/x/upgrade.ProvideModule"; + "cosmossdk.io/x/upgrade.ProvideModule" -> "*cosmossdk.io/x/upgrade/keeper.Keeper"; + "cosmossdk.io/x/upgrade.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/x/upgrade.ProvideModule" -> "[]runtime.BaseAppOption"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/distribution/module/v1.Module"; + "*cosmossdk.io/api/cosmos/distribution/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/params/types.Subspace" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule" -> "map[string]github.com/cosmos/cosmos-sdk/x/staking/types.StakingHooksWrapper"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/evidence/module/v1.Module"; + "cosmossdk.io/core/store.KVStoreService" -> "cosmossdk.io/x/evidence.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "cosmossdk.io/x/evidence.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "cosmossdk.io/x/evidence.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/slashing/keeper.Keeper" -> "cosmossdk.io/x/evidence.ProvideModule"; + "cosmossdk.io/core/address.Codec" -> "cosmossdk.io/x/evidence.ProvideModule"; + "cosmossdk.io/core/comet.BlockInfoService" -> "cosmossdk.io/x/evidence.ProvideModule"; + "cosmossdk.io/x/evidence.ProvideModule" -> "cosmossdk.io/x/evidence/keeper.Keeper"; + "cosmossdk.io/x/evidence.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/mint/module/v1.Module"; + "cosmossdk.io/depinject.OwnModuleKey" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "*cosmossdk.io/api/cosmos/mint/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "types.InflationCalculationFn" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/params/types.Subspace" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/mint/types.ProtocolStakingKeeper" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/group/module/v1.Module"; + "*cosmossdk.io/api/cosmos/group/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; + "*cosmossdk.io/store/types.KVStoreKey" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/group/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/feegrant/module/v1.Module"; + "cosmossdk.io/core/store.KVStoreService" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; + "cosmossdk.io/x/feegrant/module.ProvideModule" -> "cosmossdk.io/x/feegrant/keeper.Keeper"; + "cosmossdk.io/x/feegrant/module.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/gov/module/v1.Module"; + "*cosmossdk.io/api/cosmos/gov/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "cosmossdk.io/depinject.OwnModuleKey" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/params/types.Subspace" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule" -> "*github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule" -> "[]github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1.HandlerRoute"; + "github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable" -> "map[string]github.com/cosmos/cosmos-sdk/x/params/types.KeyTable"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/crisis/module/v1.Module"; + "*cosmossdk.io/api/cosmos/crisis/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; + "github.com/cosmos/cosmos-sdk/server/types.AppOptions" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; + "cosmossdk.io/core/address.Codec" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/params/types.Subspace" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule" -> "*github.com/cosmos/cosmos-sdk/x/crisis/keeper.Keeper"; + "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/consensus/module/v1.Module"; + "*cosmossdk.io/api/cosmos/consensus/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"; + "cosmossdk.io/core/event.Service" -> "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/consensus/keeper.Keeper"; + "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule" -> "[]runtime.BaseAppOption"; + "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/bundles/module.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "*github.com/KYVENetwork/chain/api/kyve/bundles/module.Module" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/KYVENetwork/chain/x/bundles/types.PoolKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/KYVENetwork/chain/x/bundles/types.TeamKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/KYVENetwork/chain/x/bundles/types.StakerKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/KYVENetwork/chain/x/bundles/types.DelegationKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/KYVENetwork/chain/x/bundles/types.FundersKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; + "github.com/KYVENetwork/chain/x/bundles.ProvideModule" -> "github.com/KYVENetwork/chain/x/bundles/keeper.Keeper"; + "github.com/KYVENetwork/chain/x/bundles.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/delegation/module.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "*github.com/KYVENetwork/chain/api/kyve/delegation/module.Module" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; + "github.com/KYVENetwork/chain/x/delegation.ProvideModule" -> "github.com/KYVENetwork/chain/x/delegation/keeper.Keeper"; + "github.com/KYVENetwork/chain/x/delegation.ProvideModule" -> "github.com/KYVENetwork/chain/x/delegation/types.DelegationKVStoreService"; + "github.com/KYVENetwork/chain/x/delegation.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/global/module.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; + "*github.com/KYVENetwork/chain/api/kyve/global/module.Module" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; + "github.com/KYVENetwork/chain/x/global.ProvideModule" -> "github.com/KYVENetwork/chain/x/global/keeper.Keeper"; + "github.com/KYVENetwork/chain/x/global.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/pool/module.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "*github.com/KYVENetwork/chain/api/kyve/pool/module.Module" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; + "github.com/KYVENetwork/chain/x/pool.ProvideModule" -> "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper"; + "github.com/KYVENetwork/chain/x/pool.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/query/module.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "*github.com/KYVENetwork/chain/api/kyve/query/module.Module" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/KYVENetwork/chain/x/delegation/types.DelegationKVStoreService" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/KYVENetwork/chain/x/team/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/KYVENetwork/chain/x/delegation/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/KYVENetwork/chain/x/bundles/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "*github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/KYVENetwork/chain/x/global/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/KYVENetwork/chain/x/funders/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; + "github.com/KYVENetwork/chain/x/query.ProvideModule" -> "github.com/KYVENetwork/chain/x/query/keeper.Keeper"; + "github.com/KYVENetwork/chain/x/query.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/stakers/module.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "*github.com/KYVENetwork/chain/api/kyve/stakers/module.Module" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; + "github.com/KYVENetwork/chain/x/stakers.ProvideModule" -> "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper"; + "github.com/KYVENetwork/chain/x/stakers.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/team/module.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; + "*github.com/KYVENetwork/chain/api/kyve/team/module.Module" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; + "github.com/KYVENetwork/chain/x/team.ProvideModule" -> "github.com/KYVENetwork/chain/x/team/keeper.Keeper"; + "github.com/KYVENetwork/chain/x/team.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/funders/module.Module"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "*github.com/KYVENetwork/chain/api/kyve/funders/module.Module" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; + "github.com/KYVENetwork/chain/x/funders.ProvideModule" -> "github.com/KYVENetwork/chain/x/funders/keeper.Keeper"; + "github.com/KYVENetwork/chain/x/funders.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; + "github.com/KYVENetwork/chain/app.AppConfig" -> "map[string]github.com/cosmos/cosmos-sdk/types/module.AppModuleBasic"; + "github.com/KYVENetwork/chain/app.New" -> "github.com/KYVENetwork/chain/app.EmptyAppOptions"; + "github.com/KYVENetwork/chain/app.New" -> "func() *keeper.Keeper"; + "github.com/KYVENetwork/chain/app.New" -> "func(string) keeper.ScopedKeeper"; + "github.com/KYVENetwork/chain/app.New" -> "cosmossdk.io/log.nopLogger"; + "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/app.New"; + "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/client.TxConfig" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/app.New"; + "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/consensus/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/slashing/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "*github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "*github.com/cosmos/cosmos-sdk/x/crisis/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/params/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/authz/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "cosmossdk.io/x/evidence/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "cosmossdk.io/x/feegrant/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/cosmos/cosmos-sdk/x/group/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/KYVENetwork/chain/x/bundles/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/KYVENetwork/chain/x/delegation/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/KYVENetwork/chain/x/global/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/KYVENetwork/chain/x/query/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/KYVENetwork/chain/x/team/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; + "github.com/KYVENetwork/chain/x/funders/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; +} + diff --git a/x/funders/keeper/debug_container.log b/x/funders/keeper/debug_container.log new file mode 100644 index 00000000..da7e7647 --- /dev/null +++ b/x/funders/keeper/debug_container.log @@ -0,0 +1,659 @@ +Initializing logger +Registering providers + Registering github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) + Registering resolver for simple type codec.Codec + Registering resolver for simple type *codec.LegacyAmino + Registering resolver for simple type *runtime.AppBuilder + Registering resolver for simple type *baseapp.MsgServiceRouter + Registering resolver for one-per-module type appmodule.AppModule + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering resolver for simple type protodesc.Resolver + Registering resolver for simple type protoregistry.MessageTypeResolver + Registering resolver for many-per-container type signing.CustomGetSigner + Registering github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) + Registering resolver for simple type types.InterfaceRegistry + Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) + Registering resolver for module-scoped type *types.KVStoreKey + Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:213) + Registering resolver for module-scoped type *types.TransientStoreKey + Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:219) + Registering resolver for module-scoped type *types.MemoryStoreKey + Registering github.com/cosmos/cosmos-sdk/runtime.ProvideGenesisTxHandler (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:226) + Registering resolver for simple type genesis.TxHandler + Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Registering resolver for module-scoped type store.KVStoreService + Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Registering resolver for module-scoped type store.MemoryStoreService + Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:239) + Registering resolver for module-scoped type store.TransientStoreService + Registering github.com/cosmos/cosmos-sdk/runtime.ProvideEventService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:244) + Registering resolver for simple type event.Service + Registering github.com/cosmos/cosmos-sdk/runtime.ProvideHeaderInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:253) + Registering resolver for simple type header.Service + Registering github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:249) + Registering resolver for simple type comet.BlockInfoService + Registering github.com/cosmos/cosmos-sdk/runtime.ProvideBasicManager (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:257) + Registering resolver for simple type module.BasicManager + Registering github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) + Registering resolver for simple type address.Codec + Registering resolver for simple type runtime.ValidatorAddressCodec + Registering resolver for simple type runtime.ConsensusAddressCodec + Registering github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) + Registering resolver for simple type keeper.AccountKeeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/vesting/module.go:140) + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Registering github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) + Registering resolver for simple type keeper.BaseKeeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper + Registering github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) + Registering resolver for simple type *keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper + Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper + Registering github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering resolver for one-per-module type types.StakingHooksWrapper + Found resolver for types.StakingHooksWrapper: *depinject.onePerModuleResolver + Registering github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering resolver for many-per-container type v1beta1.HandlerRoute + Found resolver for v1beta1.HandlerRoute: *depinject.groupResolver + Registering resolver for one-per-module type types.KeyTable + Registering module-scoped provider: github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Registering resolver for module-scoped type types.Subspace + Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type tx.BankKeeper + Implicitly registering resolver keeper.AccountKeeper for interface type ante.AccountKeeper + Registering github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) + Registering resolver for simple type client.TxConfig + Registering resolver for simple type tx.ConfigOptions + Registering resolver for many-per-container type runtime.BaseAppOption + Found resolver for runtime.BaseAppOption: *depinject.groupResolver + Registering github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:67) + Registering resolver for simple type signing.ProtoFileResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper + Registering github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/genutil/module.go:138) + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type authz.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type authz.BankKeeper + Implicitly registering resolver *baseapp.MsgServiceRouter for interface type baseapp.MessageRouter + Registering github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/authz/module/module.go:178) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) + Registering resolver for simple type *keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Found resolver for runtime.BaseAppOption: *depinject.groupResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper + Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper + Implicitly registering resolver types.Subspace for interface type exported.Subspace + Registering github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Found resolver for types.StakingHooksWrapper: *depinject.onePerModuleResolver + Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper + Implicitly registering resolver keeper.Keeper for interface type types.SlashingKeeper + Registering cosmossdk.io/x/evidence.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/evidence@v0.1.0/module.go:210) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver types.Subspace for interface type exported.Subspace + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper + Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper + Registering github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type group.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type group.BankKeeper + Registering github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/group/module/module.go:208) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type feegrant.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type feegrant.BankKeeper + Registering cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper + Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper + Implicitly registering resolver keeper.Keeper for interface type types.DistributionKeeper + Implicitly registering resolver types.Subspace for interface type types.ParamSubspace + Registering github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering resolver for simple type *keeper.Keeper + Found resolver for v1beta1.HandlerRoute: *depinject.groupResolver + Registering github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Found resolver for types.KeyTable: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.BaseKeeper for interface type types.SupplyKeeper + Implicitly registering resolver types.Subspace for interface type exported.Subspace + Registering github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering resolver for simple type *keeper.Keeper + Registering github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/consensus/module.go:117) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Found resolver for runtime.BaseAppOption: *depinject.groupResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type util.BankKeeper + Implicitly registering resolver keeper.Keeper for interface type util.DistributionKeeper + Implicitly registering resolver *keeper.Keeper for interface type util.UpgradeKeeper + Registering github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Registering github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) + Registering resolver for simple type keeper.Keeper + Registering resolver for simple type types.DelegationKVStoreService + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.BaseKeeper for interface type keeper.Keeper + Registering github.com/KYVENetwork/chain/x/global.ProvideModule (/Users/troykessler/work/kyve/chain/x/global/module.go:206) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper + Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper + Registering github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) + Registering resolver for simple type *keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering github.com/KYVENetwork/chain/x/query.ProvideModule (/Users/troykessler/work/kyve/chain/x/query/module.go:208) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.AccountKeeper for interface type util.AccountKeeper + Registering github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) + Registering resolver for simple type *keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper + Registering github.com/KYVENetwork/chain/x/team.ProvideModule (/Users/troykessler/work/kyve/chain/x/team/module.go:202) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver + Registering github.com/KYVENetwork/chain/x/funders.ProvideModule (/Users/troykessler/work/kyve/chain/x/funders/module.go:194) + Registering resolver for simple type keeper.Keeper + Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver +Registering outputs + Registering github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) +Building container +Resolving dependencies for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) + Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/cosmos/cosmos-sdk/runtime.ProvideApp + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) + Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec + Providing zero value for optional dependency func() address.Codec + Providing zero value for optional dependency func() runtime.ValidatorAddressCodec + Providing zero value for optional dependency func() runtime.ConsensusAddressCodec + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) + Providing runtime.ValidatorAddressCodec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry + Providing many-per-container type slice []signing.CustomGetSigner to github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry from: + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/app.New + Providing *codec.LegacyAmino from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/app.New + Providing client.TxConfig from github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) + Supplying *configv1.Config from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Providing runtime.ValidatorAddressCodec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Providing signing.ProtoFileResolver from github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:67) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:67) + Calling github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:67) + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey bank + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Implicitly registering resolver log.nopLogger for interface type log.Logger + Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey auth + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule + Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule + Providing zero value for optional dependency types.RandomGenesisAccountsFn + Providing zero value for optional dependency func() types.AccountI + Implicitly registering resolver types.Subspace for interface type exported.Subspace + Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing ModuleKey auth + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) + Providing *types.KVStoreKey from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) to github.com/cosmos/cosmos-sdk/x/params.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey + Providing ModuleKey params + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) + Providing *types.TransientStoreKey from github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:213) to github.com/cosmos/cosmos-sdk/x/params.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:213) + Providing ModuleKey params + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:213) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/params.ProvideModule + Providing *codec.LegacyAmino from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/params.ProvideModule + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) + Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: + gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Calling github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) + Implicitly registering resolver types.Subspace for interface type exported.Subspace + Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing ModuleKey bank + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace + Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: + gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Calling github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Implicitly registering resolver keeper.Keeper for interface type ante.FeegrantKeeper + Providing keeper.Keeper from cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule + Resolving dependencies for cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to cosmossdk.io/x/feegrant/module.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey feegrant + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to cosmossdk.io/x/feegrant/module.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to cosmossdk.io/x/feegrant/module.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to cosmossdk.io/x/feegrant/module.ProvideModule + Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to cosmossdk.io/x/feegrant/module.ProvideModule + Calling cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) + Providing zero value for optional dependency func() []signing.SignModeHandler + Providing many-per-container type slice []signing.CustomGetSigner to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule from: + Calling github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) + Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/KYVENetwork/chain/app.New + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/app.New + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/app.New + Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule + Providing runtime.ValidatorAddressCodec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule + Providing runtime.ConsensusAddressCodec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey staking + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Implicitly registering resolver types.Subspace for interface type exported.Subspace + Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing ModuleKey staking + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace + Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: + gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Calling github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey distribution + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule + Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule + Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing ModuleKey distribution + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace + Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: + gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Calling github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/consensus/module.go:117) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/consensus/module.go:117) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey consensus + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing event.Service from github.com/cosmos/cosmos-sdk/runtime.ProvideEventService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:244) to github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideEventService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:244) + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideEventService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:244) + Calling github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/consensus/module.go:117) + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey slashing + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Providing *codec.LegacyAmino from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Implicitly registering resolver types.Subspace for interface type exported.Subspace + Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing ModuleKey slashing + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace + Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: + gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Calling github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) + Providing OwnModuleKey mint + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey mint + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule + Providing zero value for optional dependency types.InflationCalculationFn + Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing ModuleKey mint + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace + Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: + gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule + Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule + Implicitly registering resolver *keeper.Keeper for interface type types.ProtocolStakingKeeper + Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule + Resolving dependencies for github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey stakers + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing store.MemoryStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Providing ModuleKey stakers + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Resolving dependencies for cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to cosmossdk.io/x/upgrade.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to cosmossdk.io/x/upgrade.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey upgrade + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to cosmossdk.io/x/upgrade.ProvideModule + Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to cosmossdk.io/x/upgrade.ProvideModule + Implicitly registering resolver app.EmptyAppOptions for interface type types.AppOptions + Supplying app.EmptyAppOptions from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to cosmossdk.io/x/upgrade.ProvideModule + Calling cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) + Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) to github.com/KYVENetwork/chain/x/stakers.ProvideModule + Resolving dependencies for github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey pool + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing store.MemoryStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Providing ModuleKey pool + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/pool.ProvideModule + Calling github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) + Calling github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) + Calling github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) + Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey gov + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing OwnModuleKey gov + Providing *baseapp.MsgServiceRouter from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing ModuleKey gov + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace + Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: + gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Calling github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) + Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey crisis + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule + Supplying app.EmptyAppOptions from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule + Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule + Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Providing ModuleKey crisis + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace + Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: + gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) + Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + Calling github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) + Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/app.New + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/KYVENetwork/chain/app.New + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/authz/module/module.go:178) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/authz/module/module.go:178) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule + Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule + Providing *baseapp.MsgServiceRouter from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey authz + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Calling github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/authz/module/module.go:178) + Providing keeper.Keeper from cosmossdk.io/x/evidence.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/evidence@v0.1.0/module.go:210) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for cosmossdk.io/x/evidence.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/evidence@v0.1.0/module.go:210) + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to cosmossdk.io/x/evidence.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey evidence + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to cosmossdk.io/x/evidence.ProvideModule + Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to cosmossdk.io/x/evidence.ProvideModule + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) to cosmossdk.io/x/evidence.ProvideModule + Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to cosmossdk.io/x/evidence.ProvideModule + Providing comet.BlockInfoService from github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:249) to cosmossdk.io/x/evidence.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:249) + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:249) + Calling cosmossdk.io/x/evidence.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/evidence@v0.1.0/module.go:210) + Providing keeper.Keeper from cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) to github.com/KYVENetwork/chain/app.New + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/group/module/module.go:208) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/group/module/module.go:208) + Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule + Providing *types.KVStoreKey from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey + Providing ModuleKey group + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule + Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule + Providing *baseapp.MsgServiceRouter from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule + Calling github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/group/module/module.go:208) + Providing keeper.Keeper from github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) to github.com/KYVENetwork/chain/app.New + Resolving dependencies for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey bundles + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing store.MemoryStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Providing ModuleKey bundles + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Implicitly registering resolver *keeper.Keeper for interface type types.PoolKeeper + Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Implicitly registering resolver keeper.Keeper for interface type types.TeamKeeper + Providing keeper.Keeper from github.com/KYVENetwork/chain/x/team.ProvideModule (/Users/troykessler/work/kyve/chain/x/team/module.go:202) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Resolving dependencies for github.com/KYVENetwork/chain/x/team.ProvideModule (/Users/troykessler/work/kyve/chain/x/team/module.go:202) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/team.ProvideModule + Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/team.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/team.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey team + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/team.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/team.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/team.ProvideModule + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) to github.com/KYVENetwork/chain/x/team.ProvideModule + Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/team.ProvideModule + Calling github.com/KYVENetwork/chain/x/team.ProvideModule (/Users/troykessler/work/kyve/chain/x/team/module.go:202) + Implicitly registering resolver *keeper.Keeper for interface type types.StakerKeeper + Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Implicitly registering resolver keeper.Keeper for interface type types.DelegationKeeper + Providing keeper.Keeper from github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) to github.com/KYVENetwork/chain/x/bundles.ProvideModule + Resolving dependencies for github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) + Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Providing ModuleKey delegation + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) + Providing store.MemoryStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Providing ModuleKey delegation + Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService + Calling github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) + Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) to github.com/KYVENetwork/chain/x/delegation.ProvideModule + Calling github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) + Error: can't resolve type github.com/KYVENetwork/chain/x/bundles/types/types.FundersKeeper for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232): + while resolving: + types.FundersKeeper for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) + store.KVStoreService for github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) + types.DelegationKeeper for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) + types.TeamKeeper for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) + store.MemoryStoreService for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) + store.KVStoreService for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) + keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + store.KVStoreService for github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) + *keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + depinject.OwnModuleKey for github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) + store.KVStoreService for github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) + *keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + util.UpgradeKeeper for github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) + store.MemoryStoreService for github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) + store.KVStoreService for github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) + types.ProtocolStakingKeeper for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) + exported.Subspace for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) + types.InflationCalculationFn for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) + store.KVStoreService for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) + depinject.OwnModuleKey for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) + keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + store.KVStoreService for github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) + keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + store.KVStoreService for github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) + keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + store.KVStoreService for github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) + *keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + ante.FeegrantKeeper for github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) + depinject.ModuleKey for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) + exported.Subspace for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) + func() types.AccountI for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) + types.RandomGenesisAccountsFn for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) + store.KVStoreService for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) + types.AccountKeeper for github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) + store.KVStoreService for github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) + types.BankKeeper for github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) + client.TxConfig for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + address.Codec for github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) + types.InterfaceRegistry for github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) + *runtime.AppBuilder for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) + Saved graph of container to /Users/troykessler/work/kyve/chain/x/funders/keeper/debug_container.dot diff --git a/x/funders/keeper/keeper_test.go b/x/funders/keeper/keeper_test.go index 6dee1b57..6d2ee851 100644 --- a/x/funders/keeper/keeper_test.go +++ b/x/funders/keeper/keeper_test.go @@ -10,7 +10,7 @@ import ( . "github.com/onsi/gomega" ) -func TestTeamKeeper(t *testing.T) { +func TestFundersKeeper(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, fmt.Sprintf("x/%s Keeper Test Suite", types.ModuleName)) } diff --git a/x/funders/keeper/msg_server_defund_pool_test.go b/x/funders/keeper/msg_server_defund_pool_test.go index 4d738442..192a9fb9 100644 --- a/x/funders/keeper/msg_server_defund_pool_test.go +++ b/x/funders/keeper/msg_server_defund_pool_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" "github.com/KYVENetwork/chain/x/funders/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" @@ -12,10 +13,10 @@ import ( TEST CASES - msg_server_defund_pool.go -* Defund 50 KYVE from a funder who has previously funded 100 KYVE +* Defund 50 coins from a funder who has previously funded 100 coins * Defund more than actually funded -* Defund full funding amount from a funder who has previously funded 100 KYVE -* Defund as highest funder 75 KYVE in order to be the lowest funder afterward +* Defund full funding amount from a funder who has previously funded 100 coins +* Defund as highest funder 75 coins in order to be the lowest funder afterward * Try to defund nonexistent fundings * Try to defund a funding twice * Try to defund below minimum funding params (but not full defund) @@ -25,7 +26,27 @@ TEST CASES - msg_server_defund_pool.go var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s := i.NewCleanChain() - initialBalance := s.GetBalanceFromAddress(i.ALICE) + initialBalance := s.GetBalancesFromAddress(i.ALICE) + whitelist := []*types.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } BeforeEach(func() { // init new clean chain @@ -51,6 +72,9 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { } s.RunTxPoolSuccess(msg) + // set whitelist + s.App().FundersKeeper.SetParams(s.Ctx(), types.NewParams(whitelist, 20)) + // create funder s.RunTxFundersSuccess(&types.MsgCreateFunder{ Creator: i.ALICE, @@ -59,10 +83,10 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { // fund pool s.RunTxFundersSuccess(&types.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) }) @@ -70,23 +94,23 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s.PerformValidityChecks() }) - It("Defund 50 KYVE from a funder who has previously funded 100 KYVE", func() { + It("Defund 50 coins from a funder who has previously funded 100 coins", func() { // ACT s.RunTxFundersSuccess(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 50 * i.KYVE, + Amounts: i.ACoins(50 * i.T_KYVE), }) // ASSERT - balanceAfter := s.GetBalanceFromAddress(i.ALICE) + balanceAfter := s.GetBalancesFromAddress(i.ALICE) - Expect(initialBalance - balanceAfter).To(Equal(50 * i.KYVE)) + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) - Expect(funding.Amount).To(Equal(50 * i.KYVE)) - Expect(funding.AmountPerBundle).To(Equal(1 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(funding.Amounts.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(1)) @@ -98,59 +122,59 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s.RunTxFundersSuccess(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 101 * i.KYVE, + Amounts: i.ACoins(101 * i.T_KYVE), }) // ASSERT - balanceAfter := s.GetBalanceFromAddress(i.ALICE) - Expect(initialBalance - balanceAfter).To(BeZero()) + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) - Expect(funding.Amount).To(Equal(0 * i.KYVE)) - Expect(funding.AmountPerBundle).To(Equal(1 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(funding.Amounts.IsZero()).To(BeTrue()) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(0)) }) - It("Defund full funding amount from a funder who has previously funded 100 KYVE", func() { + It("Defund full funding amount from a funder who has previously funded 100 coins", func() { // ACT s.RunTxFundersSuccess(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 100 * i.KYVE, + Amounts: i.ACoins(100 * i.T_KYVE), }) // ASSERT - balanceAfter := s.GetBalanceFromAddress(i.ALICE) - Expect(initialBalance - balanceAfter).To(BeZero()) + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) - Expect(funding.Amount).To(Equal(0 * i.KYVE)) - Expect(funding.AmountPerBundle).To(Equal(1 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(0 * i.KYVE)) + Expect(funding.Amounts.IsZero()).To(BeTrue()) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(0)) }) - It("Defund as highest funder 75 KYVE in order to be the lowest funder afterwards", func() { + It("Defund as highest funder 75 coins in order to be the lowest funder afterwards", func() { // ARRANGE s.RunTxFundersSuccess(&types.MsgCreateFunder{ Creator: i.BOB, Moniker: "moniker", }) s.RunTxFundersSuccess(&types.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 50 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.ACoins(50 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) - lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.BOB)) @@ -158,13 +182,13 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s.RunTxFundersSuccess(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 75 * i.KYVE, + Amounts: i.ACoins(75 * i.T_KYVE), }) // ASSERT fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) activeFundings = s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) - lowestFunding, err = s.App().FundersKeeper.GetLowestFunding(activeFundings) + lowestFunding, err = s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) }) @@ -174,13 +198,13 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s.RunTxFundersError(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 1, - Amount: 1 * i.KYVE, + Amounts: i.ACoins(1 * i.T_KYVE), }) s.RunTxFundersError(&types.MsgDefundPool{ Creator: i.BOB, PoolId: 0, - Amount: 1 * i.KYVE, + Amounts: i.ACoins(1 * i.T_KYVE), }) }) @@ -189,14 +213,14 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s.RunTxFundersSuccess(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 100 * i.KYVE, + Amounts: i.ACoins(100 * i.T_KYVE), }) // ASSERT s.RunTxFundersError(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 100 * i.KYVE, + Amounts: i.ACoins(100 * i.T_KYVE), }) }) @@ -205,7 +229,7 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { _, err := s.RunTx(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 100*i.KYVE - types.DefaultMinFundingAmount/2, + Amounts: i.ACoins(95 * i.T_KYVE), }) // ASSERT diff --git a/x/funders/keeper/msg_server_update_params_test.go b/x/funders/keeper/msg_server_update_params_test.go index d147989a..85cd3e1c 100644 --- a/x/funders/keeper/msg_server_update_params_test.go +++ b/x/funders/keeper/msg_server_update_params_test.go @@ -27,11 +27,8 @@ TEST CASES - msg_server_update_params.go * Update no param * Update with invalid formatted payload -* Update min-funding-amount -* Update min-funding-amount with invalid value - -* Update min-funding-amount-per-bundle -* Update min-funding-amount-per-bundle with invalid value +* Update existing coin whitelist entry +* Update existing coin whitelist entry with invalid value * Update min-funding-multiple * Update min-funding-multiple with invalid value @@ -70,8 +67,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { // ASSERT params := s.App().FundersKeeper.GetParams(s.Ctx()) - Expect(params.MinFundingAmount).To(Equal(types.DefaultMinFundingAmount)) - Expect(params.MinFundingAmountPerBundle).To(Equal(types.DefaultMinFundingAmountPerBundle)) + Expect(params.CoinWhitelist).To(BeEmpty()) Expect(params.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) @@ -110,8 +106,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { It("Update every param at once", func() { // ARRANGE payload := `{ - "min_funding_amount": 2000000000, - "min_funding_amount_per_bundle": 500000, + "coin_whitelist": [{"coin_denom":"acoin","min_funding_amount":20000000000,"min_funding_amount_per_bundle":2000000000,"coin_weight":"5"}], "min_funding_multiple": 25 }` @@ -141,8 +136,12 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).NotTo(HaveOccurred()) Expect(voteErr).NotTo(HaveOccurred()) - Expect(updatedParams.MinFundingAmount).To(Equal(uint64(2_000_000_000))) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(uint64(500_000))) + Expect(updatedParams.CoinWhitelist).To(HaveLen(1)) + Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("acoin")) + Expect(updatedParams.CoinWhitelist[0].MinFundingAmount).To(Equal(uint64(20000000000))) + Expect(updatedParams.CoinWhitelist[0].MinFundingAmountPerBundle).To(Equal(uint64(2000000000))) + Expect(updatedParams.CoinWhitelist[0].CoinWeight.String()).To(Equal("5")) + Expect(updatedParams.MinFundingMultiple).To(Equal(uint64(25))) }) @@ -176,15 +175,14 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).NotTo(HaveOccurred()) Expect(voteErr).NotTo(HaveOccurred()) - Expect(updatedParams.MinFundingAmount).To(Equal(types.DefaultMinFundingAmount)) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(types.DefaultMinFundingAmountPerBundle)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) It("Update with invalid formatted payload", func() { // ARRANGE payload := `{ - "min_funding_amount": abc, + "min_funding_amount_multiple": abc, }` msg := &types.MsgUpdateParams{ @@ -207,15 +205,14 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).To(HaveOccurred()) - Expect(updatedParams.MinFundingAmount).To(Equal(types.DefaultMinFundingAmount)) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(types.DefaultMinFundingAmountPerBundle)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) - It("Update min-funding-amount", func() { + It("Update existing coin whitelist entry", func() { // ARRANGE payload := `{ - "min_funding_amount": 100000000 + "coin_whitelist": [{"coin_denom":"acoin","min_funding_amount":20000000000,"min_funding_amount_per_bundle":200000,"coin_weight":"5"}] }` msg := &types.MsgUpdateParams{ @@ -244,83 +241,19 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).NotTo(HaveOccurred()) Expect(voteErr).NotTo(HaveOccurred()) - Expect(updatedParams.MinFundingAmount).To(Equal(uint64(100_000_000))) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(types.DefaultMinFundingAmountPerBundle)) - Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) - }) - - It("Update min-funding-amount with invalid value", func() { - // ARRANGE - payload := `{ - "min_funding_amount": "invalid" - }` - - msg := &types.MsgUpdateParams{ - Authority: gov, - Payload: payload, - } - - proposal, _ := govV1Types.NewMsgSubmitProposal( - []sdk.Msg{msg}, minDeposit, i.DUMMY[0], "", "title", "summary", false, - ) - - // ACT - _, submitErr := s.RunTx(proposal) - - s.CommitAfter(*votingPeriod) - s.Commit() - - // ASSERT - updatedParams := s.App().FundersKeeper.GetParams(s.Ctx()) - - Expect(submitErr).To(HaveOccurred()) - - Expect(updatedParams.MinFundingAmount).To(Equal(types.DefaultMinFundingAmount)) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(types.DefaultMinFundingAmountPerBundle)) - Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) - }) - - It("min-funding-amount-per-bundle", func() { - // ARRANGE - payload := `{ - "min_funding_amount_per_bundle": 300000 - }` - - msg := &types.MsgUpdateParams{ - Authority: gov, - Payload: payload, - } - - proposal, _ := govV1Types.NewMsgSubmitProposal( - []sdk.Msg{msg}, minDeposit, i.DUMMY[0], "", "title", "summary", false, - ) - - vote := govV1Types.NewMsgVote( - voter, 1, govV1Types.VoteOption_VOTE_OPTION_YES, "", - ) - - // ACT - _, submitErr := s.RunTx(proposal) - _, voteErr := s.RunTx(vote) - - s.CommitAfter(*votingPeriod) - s.Commit() - - // ASSERT - updatedParams := s.App().FundersKeeper.GetParams(s.Ctx()) - - Expect(submitErr).NotTo(HaveOccurred()) - Expect(voteErr).NotTo(HaveOccurred()) + Expect(updatedParams.CoinWhitelist).To(HaveLen(1)) + Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("acoin")) + Expect(updatedParams.CoinWhitelist[0].MinFundingAmount).To(Equal(uint64(20000000000))) + Expect(updatedParams.CoinWhitelist[0].MinFundingAmountPerBundle).To(Equal(uint64(200000))) + Expect(updatedParams.CoinWhitelist[0].CoinWeight.String()).To(Equal("5")) - Expect(updatedParams.MinFundingAmount).To(Equal(types.DefaultMinFundingAmount)) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(uint64(300000))) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) - It("Update min-funding-amount-per-bundle", func() { + It("Update existing coin whitelist entry with invalid value", func() { // ARRANGE payload := `{ - "min_funding_amount_per_bundle": "invalid" + "coin_whitelist": [{"coin_denom":"acoin","min_funding_amount":invalid,"min_funding_amount_per_bundle":100000,"coin_weight":"1"}] }` msg := &types.MsgUpdateParams{ @@ -343,8 +276,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).To(HaveOccurred()) - Expect(updatedParams.MinFundingAmount).To(Equal(types.DefaultMinFundingAmount)) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(types.DefaultMinFundingAmountPerBundle)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) @@ -380,8 +312,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).NotTo(HaveOccurred()) Expect(voteErr).NotTo(HaveOccurred()) - Expect(updatedParams.MinFundingAmount).To(Equal(types.DefaultMinFundingAmount)) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(types.DefaultMinFundingAmountPerBundle)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(uint64(9))) }) @@ -411,8 +342,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).To(HaveOccurred()) - Expect(updatedParams.MinFundingAmount).To(Equal(types.DefaultMinFundingAmount)) - Expect(updatedParams.MinFundingAmountPerBundle).To(Equal(types.DefaultMinFundingAmountPerBundle)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) }) diff --git a/x/funders/types/params.go b/x/funders/types/params.go index 4965bcdf..90f9cc2a 100644 --- a/x/funders/types/params.go +++ b/x/funders/types/params.go @@ -1,15 +1,30 @@ package types import ( + "cosmossdk.io/math" "errors" "github.com/KYVENetwork/chain/util" + globalTypes "github.com/KYVENetwork/chain/x/global/types" ) const ( + // DefaultMinFundingMultiple 20 DefaultMinFundingMultiple = uint64(20) ) +var ( + // DefaultCoinWhitelist ukyve + DefaultCoinWhitelist = []*WhitelistCoinEntry{ + { + CoinDenom: globalTypes.Denom, + MinFundingAmount: uint64(1_000_000_000), // 1,000 $KYVE + MinFundingAmountPerBundle: uint64(100_000), // 0.1 $KYVE + CoinWeight: math.LegacyNewDec(1), + }, + } +) + // NewParams creates a new Params instance func NewParams(coinWhitelist []*WhitelistCoinEntry, minFundingMultiple uint64) Params { return Params{ @@ -21,7 +36,7 @@ func NewParams(coinWhitelist []*WhitelistCoinEntry, minFundingMultiple uint64) P // DefaultParams returns a default set of parameters func DefaultParams() Params { return NewParams( - make([]*WhitelistCoinEntry, 0), + DefaultCoinWhitelist, DefaultMinFundingMultiple, ) } From 69f6d67dae228fda5db8cae711204d3d5e3ccea7 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 29 Apr 2024 16:59:17 +0200 Subject: [PATCH 09/28] test: repaired existing funding tests --- testutil/integration/checks.go | 2 +- testutil/integration/integration.go | 4 +- .../msg_server_submit_bundle_proposal.go | 12 +- x/bundles/types/expected_keepers.go | 2 +- x/delegation/keeper/keeper_suite_test.go | 11 +- x/funders/keeper/debug_container.dot | 686 ------------------ x/funders/keeper/debug_container.log | 659 ----------------- x/funders/keeper/logic_funders_test.go | 81 ++- x/funders/keeper/msg_server_defund_pool.go | 18 +- .../keeper/msg_server_defund_pool_test.go | 7 +- x/funders/keeper/msg_server_fund_pool_test.go | 12 +- .../keeper/msg_server_update_params_test.go | 6 +- x/funders/types/errors.go | 10 +- x/funders/types/funders.go | 9 +- x/funders/types/message_fund_pool.go | 2 +- 15 files changed, 100 insertions(+), 1421 deletions(-) delete mode 100644 x/funders/keeper/debug_container.dot delete mode 100644 x/funders/keeper/debug_container.log diff --git a/testutil/integration/checks.go b/testutil/integration/checks.go index d9498814..d3090b39 100644 --- a/testutil/integration/checks.go +++ b/testutil/integration/checks.go @@ -499,7 +499,7 @@ func (suite *KeeperTestSuite) VerifyFundersModuleAssetsIntegrity() { totalAmount = totalAmount.Add(activeFunding.Amounts...) } totalActiveFunding := suite.App().FundersKeeper.GetTotalActiveFunding(suite.ctx, fundingState.PoolId) - Expect(totalAmount).To(Equal(totalActiveFunding)) + Expect(totalAmount.String()).To(Equal(totalActiveFunding.String())) expectedFundingStateTotalAmount = expectedFundingStateTotalAmount.Add(totalAmount...) } diff --git a/testutil/integration/integration.go b/testutil/integration/integration.go index 84053981..f824e4b7 100644 --- a/testutil/integration/integration.go +++ b/testutil/integration/integration.go @@ -80,7 +80,7 @@ func BCoin(amount int64) sdk.Coin { } func BCoins(amount int64) sdk.Coins { - return sdk.NewCoins(ACoin(amount)) + return sdk.NewCoins(BCoin(amount)) } func CCoin(amount int64) sdk.Coin { @@ -88,7 +88,7 @@ func CCoin(amount int64) sdk.Coin { } func CCoins(amount int64) sdk.Coins { - return sdk.NewCoins(ACoin(amount)) + return sdk.NewCoins(CCoin(amount)) } func NewCleanChain() *KeeperTestSuite { diff --git a/x/bundles/keeper/msg_server_submit_bundle_proposal.go b/x/bundles/keeper/msg_server_submit_bundle_proposal.go index 2185b45e..6f5e5f0b 100644 --- a/x/bundles/keeper/msg_server_submit_bundle_proposal.go +++ b/x/bundles/keeper/msg_server_submit_bundle_proposal.go @@ -2,6 +2,8 @@ package keeper import ( "context" + "errors" + globalTypes "github.com/KYVENetwork/chain/x/global/types" "github.com/KYVENetwork/chain/util" "github.com/KYVENetwork/chain/x/bundles/types" @@ -67,7 +69,11 @@ func (k msgServer) SubmitBundleProposal(goCtx context.Context, msg *types.MsgSub pool, _ := k.poolKeeper.GetPool(ctx, msg.PoolId) // charge the funders of the pool - fundersPayout, err := k.fundersKeeper.ChargeFundersOfPool(ctx, msg.PoolId) + fundersPayouts, err := k.fundersKeeper.ChargeFundersOfPool(ctx, msg.PoolId) + found, fundersPayout := fundersPayouts.Find(globalTypes.Denom) + if !found { + return nil, errors.New("could not find denom ukyve in payouts") + } if err != nil { return &types.MsgSubmitBundleProposalResponse{}, err } @@ -79,7 +85,7 @@ func (k msgServer) SubmitBundleProposal(goCtx context.Context, msg *types.MsgSub } // calculate payouts to the different stakeholders like treasury, uploader and delegators - bundleReward := k.calculatePayouts(ctx, msg.PoolId, fundersPayout+inflationPayout) + bundleReward := k.calculatePayouts(ctx, msg.PoolId, fundersPayout.Amount.Uint64()+inflationPayout) // payout rewards to treasury if err := util.TransferFromModuleToTreasury(k.accountKeeper, k.distrkeeper, ctx, poolTypes.ModuleName, bundleReward.Treasury); err != nil { @@ -106,7 +112,7 @@ func (k msgServer) SubmitBundleProposal(goCtx context.Context, msg *types.MsgSub // Get next uploader from stakers who voted `valid` nextUploader := k.chooseNextUploaderFromList(ctx, msg.PoolId, bundleProposal.VotersValid) - k.finalizeCurrentBundleProposal(ctx, pool.Id, voteDistribution, fundersPayout, inflationPayout, bundleReward, nextUploader) + k.finalizeCurrentBundleProposal(ctx, pool.Id, voteDistribution, fundersPayout.Amount.Uint64(), inflationPayout, bundleReward, nextUploader) // Register the provided bundle as a new proposal for the next round k.registerBundleProposalFromUploader(ctx, msg, nextUploader) diff --git a/x/bundles/types/expected_keepers.go b/x/bundles/types/expected_keepers.go index a8a02f5e..5a1e3648 100644 --- a/x/bundles/types/expected_keepers.go +++ b/x/bundles/types/expected_keepers.go @@ -48,7 +48,7 @@ type DelegationKeeper interface { } type FundersKeeper interface { - ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout uint64, err error) + ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout sdk.Coins, err error) } type TeamKeeper interface { diff --git a/x/delegation/keeper/keeper_suite_test.go b/x/delegation/keeper/keeper_suite_test.go index 392e2468..53209734 100644 --- a/x/delegation/keeper/keeper_suite_test.go +++ b/x/delegation/keeper/keeper_suite_test.go @@ -2,6 +2,7 @@ package keeper_test import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "testing" funderstypes "github.com/KYVENetwork/chain/x/funders/types" @@ -26,7 +27,7 @@ func PayoutRewards(s *i.KeeperTestSuite, staker string, amount uint64) { // divide amount by number of active fundings so that total payout is equal to amount activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) for _, funding := range activeFundings { - funding.AmountPerBundle = amount / uint64(len(activeFundings)) + funding.AmountsPerBundle = sdk.NewCoins(sdk.NewInt64Coin(i.KYVE_DENOM, int64(amount/uint64(len(activeFundings))))) s.App().FundersKeeper.SetFunding(s.Ctx(), &funding) } @@ -65,10 +66,10 @@ func CreateFundedPool(s *i.KeeperTestSuite) { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.KYVE_DENOM, 100*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.KYVE_DENOM, 1*i.T_KYVE)), }) s.CommitAfterSeconds(7) diff --git a/x/funders/keeper/debug_container.dot b/x/funders/keeper/debug_container.dot deleted file mode 100644 index 755c4c51..00000000 --- a/x/funders/keeper/debug_container.dot +++ /dev/null @@ -1,686 +0,0 @@ -digraph "" { - subgraph "cluster_auth" { - graph [fontsize="12.0", label="Module: auth", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_authz" { - graph [fontsize="12.0", label="Module: authz", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_bank" { - graph [fontsize="12.0", label="Module: bank", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_bundles" { - graph [fontsize="12.0", label="Module: bundles", penwidth="0.5", style="rounded"]; - "github.com/KYVENetwork/chain/x/bundles.ProvideModule"[color="red", fontcolor="red", penwidth="0.5", shape="box"]; - } - - subgraph "cluster_consensus" { - graph [fontsize="12.0", label="Module: consensus", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_crisis" { - graph [fontsize="12.0", label="Module: crisis", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_delegation" { - graph [fontsize="12.0", label="Module: delegation", penwidth="0.5", style="rounded"]; - "github.com/KYVENetwork/chain/x/delegation.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_distribution" { - graph [fontsize="12.0", label="Module: distribution", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_evidence" { - graph [fontsize="12.0", label="Module: evidence", penwidth="0.5", style="rounded"]; - "cosmossdk.io/x/evidence.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_feegrant" { - graph [fontsize="12.0", label="Module: feegrant", penwidth="0.5", style="rounded"]; - "cosmossdk.io/x/feegrant/module.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_funders" { - graph [fontsize="12.0", label="Module: funders", penwidth="0.5", style="rounded"]; - "github.com/KYVENetwork/chain/x/funders.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - } - - subgraph "cluster_genutil" { - graph [fontsize="12.0", label="Module: genutil", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - } - - subgraph "cluster_global" { - graph [fontsize="12.0", label="Module: global", penwidth="0.5", style="rounded"]; - "github.com/KYVENetwork/chain/x/global.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - } - - subgraph "cluster_gov" { - graph [fontsize="12.0", label="Module: gov", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_group" { - graph [fontsize="12.0", label="Module: group", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_mint" { - graph [fontsize="12.0", label="Module: mint", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_params" { - graph [fontsize="12.0", label="Module: params", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_pool" { - graph [fontsize="12.0", label="Module: pool", penwidth="0.5", style="rounded"]; - "github.com/KYVENetwork/chain/x/pool.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_query" { - graph [fontsize="12.0", label="Module: query", penwidth="0.5", style="rounded"]; - "github.com/KYVENetwork/chain/x/query.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - } - - subgraph "cluster_runtime" { - graph [fontsize="12.0", label="Module: runtime", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideApp"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideBasicManager"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideEventService"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideGenesisTxHandler"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideHeaderInfoService"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - } - - subgraph "cluster_slashing" { - graph [fontsize="12.0", label="Module: slashing", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_stakers" { - graph [fontsize="12.0", label="Module: stakers", penwidth="0.5", style="rounded"]; - "github.com/KYVENetwork/chain/x/stakers.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_staking" { - graph [fontsize="12.0", label="Module: staking", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_team" { - graph [fontsize="12.0", label="Module: team", penwidth="0.5", style="rounded"]; - "github.com/KYVENetwork/chain/x/team.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_tx" { - graph [fontsize="12.0", label="Module: tx", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_upgrade" { - graph [fontsize="12.0", label="Module: upgrade", penwidth="0.5", style="rounded"]; - "cosmossdk.io/x/upgrade.ProvideModule"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - } - - subgraph "cluster_vesting" { - graph [fontsize="12.0", label="Module: vesting", penwidth="0.5", style="rounded"]; - "github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5", shape="box"]; - } - - "*cosmossdk.io/api/cosmos/app/runtime/v1alpha1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/app/v1alpha1.Config"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*cosmossdk.io/api/cosmos/auth/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/authz/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*cosmossdk.io/api/cosmos/bank/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/consensus/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/crisis/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/distribution/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/evidence/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*cosmossdk.io/api/cosmos/feegrant/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*cosmossdk.io/api/cosmos/genutil/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*cosmossdk.io/api/cosmos/gov/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/group/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/mint/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/params/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*cosmossdk.io/api/cosmos/slashing/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/staking/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/tx/config/v1.Config"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/upgrade/module/v1.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/api/cosmos/vesting/module/v1.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*cosmossdk.io/store/types.KVStoreKey"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/store/types.MemoryStoreKey"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*cosmossdk.io/store/types.TransientStoreKey"[color="black", fontcolor="black", penwidth="1.5"]; - "*cosmossdk.io/x/upgrade/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/KYVENetwork/chain/api/kyve/bundles/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/KYVENetwork/chain/api/kyve/delegation/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/KYVENetwork/chain/api/kyve/funders/module.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*github.com/KYVENetwork/chain/api/kyve/global/module.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*github.com/KYVENetwork/chain/api/kyve/pool/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/KYVENetwork/chain/api/kyve/query/module.Module"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*github.com/KYVENetwork/chain/api/kyve/stakers/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/KYVENetwork/chain/api/kyve/team/module.Module"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/cosmos/cosmos-sdk/x/crisis/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "[]cosmossdk.io/x/tx/signing.CustomGetSigner"[color="black", comment="many-per-container", fontcolor="black", penwidth="1.5"]; - "[]github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1.HandlerRoute"[color="lightgrey", comment="many-per-container", fontcolor="dimgrey", penwidth="0.5"]; - "[]runtime.BaseAppOption"[color="lightgrey", comment="many-per-container", fontcolor="dimgrey", penwidth="0.5"]; - "cosmossdk.io/core/address.Codec"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/core/appconfig.Compose"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "cosmossdk.io/core/comet.BlockInfoService"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/core/event.Service"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/core/genesis.TxHandler"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "cosmossdk.io/core/header.Service"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "cosmossdk.io/core/store.KVStoreService"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/core/store.MemoryStoreService"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/core/store.TransientStoreService"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "cosmossdk.io/depinject.ModuleKey"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/depinject.OwnModuleKey"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/log.Logger"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/log.nopLogger"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "cosmossdk.io/x/evidence/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/x/evidence/types.SlashingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/x/evidence/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/x/feegrant.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/x/feegrant.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/x/feegrant/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "cosmossdk.io/x/tx/signing.ProtoFileResolver"[color="black", fontcolor="black", penwidth="1.5"]; - "func() *keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "func() []signing.SignModeHandler"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "func() address.Codec"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "func() runtime.ConsensusAddressCodec"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "func() runtime.ValidatorAddressCodec"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "func() types.AccountI"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "func(string) keeper.ScopedKeeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/KYVENetwork/chain/app.AppConfig"[color="black", fontcolor="black", penwidth="1.5", shape="box"]; - "github.com/KYVENetwork/chain/app.EmptyAppOptions"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/KYVENetwork/chain/app.New"[color="red", fontcolor="red", penwidth="1.5", shape="hexagon"]; - "github.com/KYVENetwork/chain/util.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/util.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/util.DistributionKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/util.UpgradeKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/bundles/keeper.Keeper"[color="red", fontcolor="red", penwidth="0.5"]; - "github.com/KYVENetwork/chain/x/bundles/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/bundles/types.DelegationKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/bundles/types.FundersKeeper"[color="red", fontcolor="red", penwidth="0.5"]; - "github.com/KYVENetwork/chain/x/bundles/types.PoolKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/bundles/types.StakerKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/bundles/types.TeamKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/delegation/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/KYVENetwork/chain/x/delegation/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/delegation/types.DelegationKVStoreService"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/KYVENetwork/chain/x/funders/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/KYVENetwork/chain/x/global/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/KYVENetwork/chain/x/pool/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/pool/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/KYVENetwork/chain/x/query/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/KYVENetwork/chain/x/team/keeper.Keeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/KYVENetwork/chain/x/team/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/baseapp.MessageRouter"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/client.TxConfig"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/codec.Codec"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/runtime.ConsensusAddressCodec"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/server/types.AppOptions"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/auth/ante.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/auth/ante.FeegrantKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/auth/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/auth/tx.ConfigOptions"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/cosmos/cosmos-sdk/x/auth/tx/config.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/auth/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/auth/vesting/types.BankKeeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/cosmos/cosmos-sdk/x/authz.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/authz.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/authz/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/bank/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/bank/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/consensus/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/crisis/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/crisis/types.SupplyKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/distribution/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/distribution/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/distribution/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/distribution/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/gov/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/gov/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/gov/types.DistributionKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/gov/types.ParamSubspace"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/gov/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/group.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/group.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/group/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/mint/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/mint/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/mint/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/mint/types.ProtocolStakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/mint/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/params/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/params/types.Subspace"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "github.com/cosmos/cosmos-sdk/x/slashing/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/slashing/keeper.Keeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/slashing/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/slashing/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/slashing/types.StakingKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/staking/exported.Subspace"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/staking/types.AccountKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "github.com/cosmos/cosmos-sdk/x/staking/types.BankKeeper"[color="black", fontcolor="black", penwidth="1.5"]; - "google.golang.org/protobuf/reflect/protodesc.Resolver"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "google.golang.org/protobuf/reflect/protoregistry.MessageTypeResolver"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "map[string]cosmossdk.io/core/appmodule.AppModule"[color="lightgrey", comment="one-per-module", fontcolor="dimgrey", penwidth="0.5"]; - "map[string]github.com/cosmos/cosmos-sdk/types/module.AppModuleBasic"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "map[string]github.com/cosmos/cosmos-sdk/x/params/types.KeyTable"[color="black", comment="one-per-module", fontcolor="black", penwidth="1.5"]; - "map[string]github.com/cosmos/cosmos-sdk/x/staking/types.StakingHooksWrapper"[color="lightgrey", comment="one-per-module", fontcolor="dimgrey", penwidth="0.5"]; - "types.InflationCalculationFn"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "types.RandomGenesisAccountsFn"[color="lightgrey", fontcolor="dimgrey", penwidth="0.5"]; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/app/v1alpha1.Config"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/app/runtime/v1alpha1.Module"; - "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideApp"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "github.com/cosmos/cosmos-sdk/codec.Codec"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "google.golang.org/protobuf/reflect/protodesc.Resolver"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideApp" -> "google.golang.org/protobuf/reflect/protoregistry.MessageTypeResolver"; - "cosmossdk.io/core/address.Codec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry"; - "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry"; - "[]cosmossdk.io/x/tx/signing.CustomGetSigner" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry"; - "*cosmossdk.io/api/cosmos/app/runtime/v1alpha1.Module" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey"; - "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey" -> "*cosmossdk.io/store/types.KVStoreKey"; - "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey" -> "*cosmossdk.io/store/types.TransientStoreKey"; - "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey" -> "*cosmossdk.io/store/types.MemoryStoreKey"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideGenesisTxHandler"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideGenesisTxHandler" -> "cosmossdk.io/core/genesis.TxHandler"; - "*cosmossdk.io/api/cosmos/app/runtime/v1alpha1.Module" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService"; - "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService" -> "cosmossdk.io/core/store.KVStoreService"; - "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService" -> "cosmossdk.io/core/store.MemoryStoreService"; - "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService" -> "cosmossdk.io/core/store.TransientStoreService"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideEventService" -> "cosmossdk.io/core/event.Service"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideHeaderInfoService"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideHeaderInfoService" -> "cosmossdk.io/core/header.Service"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService" -> "cosmossdk.io/core/comet.BlockInfoService"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideBasicManager"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideBasicManager" -> "map[string]github.com/cosmos/cosmos-sdk/types/module.AppModuleBasic"; - "*cosmossdk.io/api/cosmos/auth/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; - "*cosmossdk.io/api/cosmos/staking/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; - "func() address.Codec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; - "func() runtime.ValidatorAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; - "func() runtime.ConsensusAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec" -> "cosmossdk.io/core/address.Codec"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec"; - "github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec" -> "github.com/cosmos/cosmos-sdk/runtime.ConsensusAddressCodec"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/auth/module/v1.Module"; - "*cosmossdk.io/api/cosmos/auth/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; - "cosmossdk.io/core/address.Codec" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; - "types.RandomGenesisAccountsFn" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; - "func() types.AccountI" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/exported.Subspace" -> "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper"; - "github.com/cosmos/cosmos-sdk/x/auth.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/vesting/module/v1.Module"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/vesting/types.BankKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/bank/module/v1.Module"; - "*cosmossdk.io/api/cosmos/bank/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/exported.Subspace" -> "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper"; - "github.com/cosmos/cosmos-sdk/x/bank.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/staking/module/v1.Module"; - "*cosmossdk.io/api/cosmos/staking/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; - "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; - "github.com/cosmos/cosmos-sdk/runtime.ConsensusAddressCodec" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/staking/exported.Subspace" -> "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule" -> "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/staking.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/slashing/module/v1.Module"; - "*cosmossdk.io/api/cosmos/slashing/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/slashing/exported.Subspace" -> "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/slashing/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule" -> "map[string]github.com/cosmos/cosmos-sdk/x/staking/types.StakingHooksWrapper"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/params/module/v1.Module"; - "*cosmossdk.io/store/types.KVStoreKey" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"; - "*cosmossdk.io/store/types.TransientStoreKey" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/params.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/params/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/params.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "github.com/cosmos/cosmos-sdk/x/params.ProvideModule" -> "[]github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1.HandlerRoute"; - "cosmossdk.io/depinject.ModuleKey" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace"; - "github.com/cosmos/cosmos-sdk/x/params/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace"; - "map[string]github.com/cosmos/cosmos-sdk/x/params/types.KeyTable" -> "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace"; - "github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace" -> "github.com/cosmos/cosmos-sdk/x/params/types.Subspace"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/tx/config/v1.Config"; - "*cosmossdk.io/api/cosmos/tx/config/v1.Config" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "cosmossdk.io/core/address.Codec" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "github.com/cosmos/cosmos-sdk/runtime.ValidatorAddressCodec" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "cosmossdk.io/x/tx/signing.ProtoFileResolver" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/ante.FeegrantKeeper" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "func() []signing.SignModeHandler" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "[]cosmossdk.io/x/tx/signing.CustomGetSigner" -> "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule" -> "github.com/cosmos/cosmos-sdk/client.TxConfig"; - "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/auth/tx.ConfigOptions"; - "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule" -> "[]runtime.BaseAppOption"; - "github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry" -> "cosmossdk.io/x/tx/signing.ProtoFileResolver"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/genutil/module/v1.Module"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"; - "cosmossdk.io/core/genesis.TxHandler" -> "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"; - "github.com/cosmos/cosmos-sdk/client.TxConfig" -> "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/authz/module/v1.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/authz/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/upgrade/module/v1.Module"; - "*cosmossdk.io/api/cosmos/upgrade/module/v1.Module" -> "cosmossdk.io/x/upgrade.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "cosmossdk.io/x/upgrade.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "cosmossdk.io/x/upgrade.ProvideModule"; - "cosmossdk.io/core/address.Codec" -> "cosmossdk.io/x/upgrade.ProvideModule"; - "github.com/cosmos/cosmos-sdk/server/types.AppOptions" -> "cosmossdk.io/x/upgrade.ProvideModule"; - "cosmossdk.io/x/upgrade.ProvideModule" -> "*cosmossdk.io/x/upgrade/keeper.Keeper"; - "cosmossdk.io/x/upgrade.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/x/upgrade.ProvideModule" -> "[]runtime.BaseAppOption"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/distribution/module/v1.Module"; - "*cosmossdk.io/api/cosmos/distribution/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/params/types.Subspace" -> "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule" -> "map[string]github.com/cosmos/cosmos-sdk/x/staking/types.StakingHooksWrapper"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/evidence/module/v1.Module"; - "cosmossdk.io/core/store.KVStoreService" -> "cosmossdk.io/x/evidence.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "cosmossdk.io/x/evidence.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "cosmossdk.io/x/evidence.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/slashing/keeper.Keeper" -> "cosmossdk.io/x/evidence.ProvideModule"; - "cosmossdk.io/core/address.Codec" -> "cosmossdk.io/x/evidence.ProvideModule"; - "cosmossdk.io/core/comet.BlockInfoService" -> "cosmossdk.io/x/evidence.ProvideModule"; - "cosmossdk.io/x/evidence.ProvideModule" -> "cosmossdk.io/x/evidence/keeper.Keeper"; - "cosmossdk.io/x/evidence.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/mint/module/v1.Module"; - "cosmossdk.io/depinject.OwnModuleKey" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "*cosmossdk.io/api/cosmos/mint/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "types.InflationCalculationFn" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/params/types.Subspace" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/mint/types.ProtocolStakingKeeper" -> "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/mint.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/group/module/v1.Module"; - "*cosmossdk.io/api/cosmos/group/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; - "*cosmossdk.io/store/types.KVStoreKey" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter" -> "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/group/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/feegrant/module/v1.Module"; - "cosmossdk.io/core/store.KVStoreService" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "cosmossdk.io/x/feegrant/module.ProvideModule"; - "cosmossdk.io/x/feegrant/module.ProvideModule" -> "cosmossdk.io/x/feegrant/keeper.Keeper"; - "cosmossdk.io/x/feegrant/module.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/gov/module/v1.Module"; - "*cosmossdk.io/api/cosmos/gov/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "cosmossdk.io/depinject.OwnModuleKey" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/baseapp.MsgServiceRouter" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/params/types.Subspace" -> "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule" -> "*github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/gov.ProvideModule" -> "[]github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1.HandlerRoute"; - "github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable" -> "map[string]github.com/cosmos/cosmos-sdk/x/params/types.KeyTable"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/crisis/module/v1.Module"; - "*cosmossdk.io/api/cosmos/crisis/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; - "github.com/cosmos/cosmos-sdk/server/types.AppOptions" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; - "cosmossdk.io/core/address.Codec" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/params/types.Subspace" -> "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule" -> "*github.com/cosmos/cosmos-sdk/x/crisis/keeper.Keeper"; - "cosmossdk.io/core/appconfig.Compose" -> "*cosmossdk.io/api/cosmos/consensus/module/v1.Module"; - "*cosmossdk.io/api/cosmos/consensus/module/v1.Module" -> "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"; - "cosmossdk.io/core/event.Service" -> "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule" -> "github.com/cosmos/cosmos-sdk/x/consensus/keeper.Keeper"; - "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule" -> "[]runtime.BaseAppOption"; - "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/bundles/module.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "*github.com/KYVENetwork/chain/api/kyve/bundles/module.Module" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/KYVENetwork/chain/x/bundles/types.PoolKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/KYVENetwork/chain/x/bundles/types.TeamKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/KYVENetwork/chain/x/bundles/types.StakerKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/KYVENetwork/chain/x/bundles/types.DelegationKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/KYVENetwork/chain/x/bundles/types.FundersKeeper" -> "github.com/KYVENetwork/chain/x/bundles.ProvideModule"; - "github.com/KYVENetwork/chain/x/bundles.ProvideModule" -> "github.com/KYVENetwork/chain/x/bundles/keeper.Keeper"; - "github.com/KYVENetwork/chain/x/bundles.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/delegation/module.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "*github.com/KYVENetwork/chain/api/kyve/delegation/module.Module" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/delegation.ProvideModule"; - "github.com/KYVENetwork/chain/x/delegation.ProvideModule" -> "github.com/KYVENetwork/chain/x/delegation/keeper.Keeper"; - "github.com/KYVENetwork/chain/x/delegation.ProvideModule" -> "github.com/KYVENetwork/chain/x/delegation/types.DelegationKVStoreService"; - "github.com/KYVENetwork/chain/x/delegation.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/global/module.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; - "*github.com/KYVENetwork/chain/api/kyve/global/module.Module" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/global.ProvideModule"; - "github.com/KYVENetwork/chain/x/global.ProvideModule" -> "github.com/KYVENetwork/chain/x/global/keeper.Keeper"; - "github.com/KYVENetwork/chain/x/global.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/pool/module.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "*github.com/KYVENetwork/chain/api/kyve/pool/module.Module" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/pool.ProvideModule"; - "github.com/KYVENetwork/chain/x/pool.ProvideModule" -> "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper"; - "github.com/KYVENetwork/chain/x/pool.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/query/module.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "*github.com/KYVENetwork/chain/api/kyve/query/module.Module" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/KYVENetwork/chain/x/delegation/types.DelegationKVStoreService" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/KYVENetwork/chain/x/team/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/KYVENetwork/chain/x/delegation/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/KYVENetwork/chain/x/bundles/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "*github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/KYVENetwork/chain/x/global/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/KYVENetwork/chain/x/funders/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/query.ProvideModule"; - "github.com/KYVENetwork/chain/x/query.ProvideModule" -> "github.com/KYVENetwork/chain/x/query/keeper.Keeper"; - "github.com/KYVENetwork/chain/x/query.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/stakers/module.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "*github.com/KYVENetwork/chain/api/kyve/stakers/module.Module" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/stakers.ProvideModule"; - "github.com/KYVENetwork/chain/x/stakers.ProvideModule" -> "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper"; - "github.com/KYVENetwork/chain/x/stakers.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/team/module.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; - "*github.com/KYVENetwork/chain/api/kyve/team/module.Module" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/team.ProvideModule"; - "github.com/KYVENetwork/chain/x/team.ProvideModule" -> "github.com/KYVENetwork/chain/x/team/keeper.Keeper"; - "github.com/KYVENetwork/chain/x/team.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "cosmossdk.io/core/appconfig.Compose" -> "*github.com/KYVENetwork/chain/api/kyve/funders/module.Module"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "*github.com/KYVENetwork/chain/api/kyve/funders/module.Module" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "cosmossdk.io/core/store.KVStoreService" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "cosmossdk.io/core/store.MemoryStoreService" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "cosmossdk.io/log.Logger" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/x/funders.ProvideModule"; - "github.com/KYVENetwork/chain/x/funders.ProvideModule" -> "github.com/KYVENetwork/chain/x/funders/keeper.Keeper"; - "github.com/KYVENetwork/chain/x/funders.ProvideModule" -> "map[string]cosmossdk.io/core/appmodule.AppModule"; - "github.com/KYVENetwork/chain/app.AppConfig" -> "map[string]github.com/cosmos/cosmos-sdk/types/module.AppModuleBasic"; - "github.com/KYVENetwork/chain/app.New" -> "github.com/KYVENetwork/chain/app.EmptyAppOptions"; - "github.com/KYVENetwork/chain/app.New" -> "func() *keeper.Keeper"; - "github.com/KYVENetwork/chain/app.New" -> "func(string) keeper.ScopedKeeper"; - "github.com/KYVENetwork/chain/app.New" -> "cosmossdk.io/log.nopLogger"; - "*github.com/cosmos/cosmos-sdk/runtime.AppBuilder" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/codec.Codec" -> "github.com/KYVENetwork/chain/app.New"; - "*github.com/cosmos/cosmos-sdk/codec.LegacyAmino" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/client.TxConfig" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/codec/types.InterfaceRegistry" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/auth/keeper.AccountKeeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper" -> "github.com/KYVENetwork/chain/app.New"; - "*github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/distribution/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/consensus/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/slashing/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/mint/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "*github.com/cosmos/cosmos-sdk/x/gov/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "*github.com/cosmos/cosmos-sdk/x/crisis/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "*cosmossdk.io/x/upgrade/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/params/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/authz/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "cosmossdk.io/x/evidence/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "cosmossdk.io/x/feegrant/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/cosmos/cosmos-sdk/x/group/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/KYVENetwork/chain/x/bundles/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/KYVENetwork/chain/x/delegation/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/KYVENetwork/chain/x/global/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "*github.com/KYVENetwork/chain/x/pool/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/KYVENetwork/chain/x/query/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "*github.com/KYVENetwork/chain/x/stakers/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/KYVENetwork/chain/x/team/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; - "github.com/KYVENetwork/chain/x/funders/keeper.Keeper" -> "github.com/KYVENetwork/chain/app.New"; -} - diff --git a/x/funders/keeper/debug_container.log b/x/funders/keeper/debug_container.log deleted file mode 100644 index da7e7647..00000000 --- a/x/funders/keeper/debug_container.log +++ /dev/null @@ -1,659 +0,0 @@ -Initializing logger -Registering providers - Registering github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) - Registering resolver for simple type codec.Codec - Registering resolver for simple type *codec.LegacyAmino - Registering resolver for simple type *runtime.AppBuilder - Registering resolver for simple type *baseapp.MsgServiceRouter - Registering resolver for one-per-module type appmodule.AppModule - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering resolver for simple type protodesc.Resolver - Registering resolver for simple type protoregistry.MessageTypeResolver - Registering resolver for many-per-container type signing.CustomGetSigner - Registering github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) - Registering resolver for simple type types.InterfaceRegistry - Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) - Registering resolver for module-scoped type *types.KVStoreKey - Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:213) - Registering resolver for module-scoped type *types.TransientStoreKey - Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:219) - Registering resolver for module-scoped type *types.MemoryStoreKey - Registering github.com/cosmos/cosmos-sdk/runtime.ProvideGenesisTxHandler (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:226) - Registering resolver for simple type genesis.TxHandler - Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Registering resolver for module-scoped type store.KVStoreService - Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Registering resolver for module-scoped type store.MemoryStoreService - Registering module-scoped provider: github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:239) - Registering resolver for module-scoped type store.TransientStoreService - Registering github.com/cosmos/cosmos-sdk/runtime.ProvideEventService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:244) - Registering resolver for simple type event.Service - Registering github.com/cosmos/cosmos-sdk/runtime.ProvideHeaderInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:253) - Registering resolver for simple type header.Service - Registering github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:249) - Registering resolver for simple type comet.BlockInfoService - Registering github.com/cosmos/cosmos-sdk/runtime.ProvideBasicManager (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:257) - Registering resolver for simple type module.BasicManager - Registering github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) - Registering resolver for simple type address.Codec - Registering resolver for simple type runtime.ValidatorAddressCodec - Registering resolver for simple type runtime.ConsensusAddressCodec - Registering github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) - Registering resolver for simple type keeper.AccountKeeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering github.com/cosmos/cosmos-sdk/x/auth/vesting.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/vesting/module.go:140) - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Registering github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) - Registering resolver for simple type keeper.BaseKeeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper - Registering github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) - Registering resolver for simple type *keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper - Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper - Registering github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering resolver for one-per-module type types.StakingHooksWrapper - Found resolver for types.StakingHooksWrapper: *depinject.onePerModuleResolver - Registering github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering resolver for many-per-container type v1beta1.HandlerRoute - Found resolver for v1beta1.HandlerRoute: *depinject.groupResolver - Registering resolver for one-per-module type types.KeyTable - Registering module-scoped provider: github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Registering resolver for module-scoped type types.Subspace - Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type tx.BankKeeper - Implicitly registering resolver keeper.AccountKeeper for interface type ante.AccountKeeper - Registering github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) - Registering resolver for simple type client.TxConfig - Registering resolver for simple type tx.ConfigOptions - Registering resolver for many-per-container type runtime.BaseAppOption - Found resolver for runtime.BaseAppOption: *depinject.groupResolver - Registering github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:67) - Registering resolver for simple type signing.ProtoFileResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper - Registering github.com/cosmos/cosmos-sdk/x/genutil.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/genutil/module.go:138) - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type authz.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type authz.BankKeeper - Implicitly registering resolver *baseapp.MsgServiceRouter for interface type baseapp.MessageRouter - Registering github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/authz/module/module.go:178) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) - Registering resolver for simple type *keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Found resolver for runtime.BaseAppOption: *depinject.groupResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper - Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper - Implicitly registering resolver types.Subspace for interface type exported.Subspace - Registering github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Found resolver for types.StakingHooksWrapper: *depinject.onePerModuleResolver - Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper - Implicitly registering resolver keeper.Keeper for interface type types.SlashingKeeper - Registering cosmossdk.io/x/evidence.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/evidence@v0.1.0/module.go:210) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver types.Subspace for interface type exported.Subspace - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper - Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper - Registering github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type group.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type group.BankKeeper - Registering github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/group/module/module.go:208) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type feegrant.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type feegrant.BankKeeper - Registering cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper - Implicitly registering resolver *keeper.Keeper for interface type types.StakingKeeper - Implicitly registering resolver keeper.Keeper for interface type types.DistributionKeeper - Implicitly registering resolver types.Subspace for interface type types.ParamSubspace - Registering github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering resolver for simple type *keeper.Keeper - Found resolver for v1beta1.HandlerRoute: *depinject.groupResolver - Registering github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Found resolver for types.KeyTable: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.BaseKeeper for interface type types.SupplyKeeper - Implicitly registering resolver types.Subspace for interface type exported.Subspace - Registering github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering resolver for simple type *keeper.Keeper - Registering github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/consensus/module.go:117) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Found resolver for runtime.BaseAppOption: *depinject.groupResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type util.BankKeeper - Implicitly registering resolver keeper.Keeper for interface type util.DistributionKeeper - Implicitly registering resolver *keeper.Keeper for interface type util.UpgradeKeeper - Registering github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Registering github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) - Registering resolver for simple type keeper.Keeper - Registering resolver for simple type types.DelegationKVStoreService - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.BaseKeeper for interface type keeper.Keeper - Registering github.com/KYVENetwork/chain/x/global.ProvideModule (/Users/troykessler/work/kyve/chain/x/global/module.go:206) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type types.AccountKeeper - Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper - Registering github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) - Registering resolver for simple type *keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering github.com/KYVENetwork/chain/x/query.ProvideModule (/Users/troykessler/work/kyve/chain/x/query/module.go:208) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.AccountKeeper for interface type util.AccountKeeper - Registering github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) - Registering resolver for simple type *keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Implicitly registering resolver keeper.BaseKeeper for interface type types.BankKeeper - Registering github.com/KYVENetwork/chain/x/team.ProvideModule (/Users/troykessler/work/kyve/chain/x/team/module.go:202) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver - Registering github.com/KYVENetwork/chain/x/funders.ProvideModule (/Users/troykessler/work/kyve/chain/x/funders/module.go:194) - Registering resolver for simple type keeper.Keeper - Found resolver for appmodule.AppModule: *depinject.onePerModuleResolver -Registering outputs - Registering github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) -Building container -Resolving dependencies for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) - Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/cosmos/cosmos-sdk/runtime.ProvideApp - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) - Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec - Providing zero value for optional dependency func() address.Codec - Providing zero value for optional dependency func() runtime.ValidatorAddressCodec - Providing zero value for optional dependency func() runtime.ConsensusAddressCodec - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) - Providing runtime.ValidatorAddressCodec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry - Providing many-per-container type slice []signing.CustomGetSigner to github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry from: - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/app.New - Providing *codec.LegacyAmino from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/app.New - Providing client.TxConfig from github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) - Supplying *configv1.Config from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Providing runtime.ValidatorAddressCodec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Providing signing.ProtoFileResolver from github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:67) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:67) - Calling github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideProtoRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:67) - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey bank - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Implicitly registering resolver log.nopLogger for interface type log.Logger - Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey auth - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule - Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule - Providing zero value for optional dependency types.RandomGenesisAccountsFn - Providing zero value for optional dependency func() types.AccountI - Implicitly registering resolver types.Subspace for interface type exported.Subspace - Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/auth.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing ModuleKey auth - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) - Providing *types.KVStoreKey from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) to github.com/cosmos/cosmos-sdk/x/params.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey - Providing ModuleKey params - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) - Providing *types.TransientStoreKey from github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:213) to github.com/cosmos/cosmos-sdk/x/params.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:213) - Providing ModuleKey params - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideTransientStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:213) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/params.ProvideModule - Providing *codec.LegacyAmino from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/params.ProvideModule - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) - Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: - gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Calling github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) - Implicitly registering resolver types.Subspace for interface type exported.Subspace - Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/bank.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing ModuleKey bank - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace - Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: - gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Calling github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Implicitly registering resolver keeper.Keeper for interface type ante.FeegrantKeeper - Providing keeper.Keeper from cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule - Resolving dependencies for cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to cosmossdk.io/x/feegrant/module.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey feegrant - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to cosmossdk.io/x/feegrant/module.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to cosmossdk.io/x/feegrant/module.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to cosmossdk.io/x/feegrant/module.ProvideModule - Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to cosmossdk.io/x/feegrant/module.ProvideModule - Calling cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) - Providing zero value for optional dependency func() []signing.SignModeHandler - Providing many-per-container type slice []signing.CustomGetSigner to github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule from: - Calling github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) - Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/KYVENetwork/chain/app.New - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/app.New - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/app.New - Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule - Providing runtime.ValidatorAddressCodec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule - Providing runtime.ConsensusAddressCodec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey staking - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Implicitly registering resolver types.Subspace for interface type exported.Subspace - Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/staking.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing ModuleKey staking - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace - Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: - gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Calling github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey distribution - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule - Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule - Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing ModuleKey distribution - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace - Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: - gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Calling github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/consensus/module.go:117) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/consensus/module.go:117) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey consensus - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing event.Service from github.com/cosmos/cosmos-sdk/runtime.ProvideEventService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:244) to github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideEventService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:244) - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideEventService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:244) - Calling github.com/cosmos/cosmos-sdk/x/consensus.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/consensus/module.go:117) - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey slashing - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Providing *codec.LegacyAmino from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Implicitly registering resolver types.Subspace for interface type exported.Subspace - Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing ModuleKey slashing - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace - Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: - gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Calling github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) - Providing OwnModuleKey mint - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey mint - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule - Providing zero value for optional dependency types.InflationCalculationFn - Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing ModuleKey mint - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace - Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: - gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule - Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule - Implicitly registering resolver *keeper.Keeper for interface type types.ProtocolStakingKeeper - Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) to github.com/cosmos/cosmos-sdk/x/mint.ProvideModule - Resolving dependencies for github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey stakers - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing store.MemoryStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Providing ModuleKey stakers - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Resolving dependencies for cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to cosmossdk.io/x/upgrade.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to cosmossdk.io/x/upgrade.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey upgrade - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to cosmossdk.io/x/upgrade.ProvideModule - Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to cosmossdk.io/x/upgrade.ProvideModule - Implicitly registering resolver app.EmptyAppOptions for interface type types.AppOptions - Supplying app.EmptyAppOptions from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to cosmossdk.io/x/upgrade.ProvideModule - Calling cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) - Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) to github.com/KYVENetwork/chain/x/stakers.ProvideModule - Resolving dependencies for github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey pool - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing store.MemoryStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Providing ModuleKey pool - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/pool.ProvideModule - Calling github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) - Calling github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) - Calling github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) - Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey gov - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing OwnModuleKey gov - Providing *baseapp.MsgServiceRouter from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/gov.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing ModuleKey gov - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace - Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: - gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Calling github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) - Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey crisis - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule - Supplying app.EmptyAppOptions from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule - Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule - Providing types.Subspace from github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) to github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Providing ModuleKey crisis - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace - Providing one-per-module type map map[string]types.KeyTable to github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace from: - gov: github.com/cosmos/cosmos-sdk/x/gov.ProvideKeyTable (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:218) - Calling github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - Calling github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) - Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/app.New - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/params.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:129) to github.com/KYVENetwork/chain/app.New - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/authz/module/module.go:178) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/authz/module/module.go:178) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule - Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule - Providing *baseapp.MsgServiceRouter from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey authz - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Calling github.com/cosmos/cosmos-sdk/x/authz/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/authz/module/module.go:178) - Providing keeper.Keeper from cosmossdk.io/x/evidence.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/evidence@v0.1.0/module.go:210) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for cosmossdk.io/x/evidence.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/evidence@v0.1.0/module.go:210) - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to cosmossdk.io/x/evidence.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey evidence - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to cosmossdk.io/x/evidence.ProvideModule - Providing *keeper.Keeper from github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) to cosmossdk.io/x/evidence.ProvideModule - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) to cosmossdk.io/x/evidence.ProvideModule - Providing address.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideAddressCodec (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:281) to cosmossdk.io/x/evidence.ProvideModule - Providing comet.BlockInfoService from github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:249) to cosmossdk.io/x/evidence.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:249) - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideCometInfoService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:249) - Calling cosmossdk.io/x/evidence.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/evidence@v0.1.0/module.go:210) - Providing keeper.Keeper from cosmossdk.io/x/feegrant/module.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/feegrant@v0.1.0/module/module.go:184) to github.com/KYVENetwork/chain/app.New - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/group/module/module.go:208) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/group/module/module.go:208) - Supplying *modulev1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule - Providing *types.KVStoreKey from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey - Providing ModuleKey group - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreKey (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:198) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule - Providing types.InterfaceRegistry from github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule - Providing *baseapp.MsgServiceRouter from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule - Calling github.com/cosmos/cosmos-sdk/x/group/module.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/group/module/module.go:208) - Providing keeper.Keeper from github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) to github.com/KYVENetwork/chain/app.New - Resolving dependencies for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey bundles - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing store.MemoryStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Providing ModuleKey bundles - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Implicitly registering resolver *keeper.Keeper for interface type types.PoolKeeper - Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Implicitly registering resolver keeper.Keeper for interface type types.TeamKeeper - Providing keeper.Keeper from github.com/KYVENetwork/chain/x/team.ProvideModule (/Users/troykessler/work/kyve/chain/x/team/module.go:202) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Resolving dependencies for github.com/KYVENetwork/chain/x/team.ProvideModule (/Users/troykessler/work/kyve/chain/x/team/module.go:202) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/team.ProvideModule - Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/team.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/team.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey team - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/team.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/team.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/team.ProvideModule - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) to github.com/KYVENetwork/chain/x/team.ProvideModule - Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/team.ProvideModule - Calling github.com/KYVENetwork/chain/x/team.ProvideModule (/Users/troykessler/work/kyve/chain/x/team/module.go:202) - Implicitly registering resolver *keeper.Keeper for interface type types.StakerKeeper - Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Implicitly registering resolver keeper.Keeper for interface type types.DelegationKeeper - Providing keeper.Keeper from github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) to github.com/KYVENetwork/chain/x/bundles.ProvideModule - Resolving dependencies for github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) - Providing codec.Codec from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Supplying *module.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Providing store.KVStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Supplying *runtimev1alpha1.Module from cosmossdk.io/core/appconfig.Compose (/Users/troykessler/go/pkg/mod/cosmossdk.io/core@v0.11.0/appconfig/config.go:95) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Providing ModuleKey delegation - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideKVStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:229) - Providing store.MemoryStoreService from github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Resolving dependencies for github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Providing ModuleKey delegation - Providing *runtime.AppBuilder from github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) to github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService - Calling github.com/cosmos/cosmos-sdk/runtime.ProvideMemoryStoreService (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:234) - Supplying log.nopLogger from github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:222) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Providing keeper.AccountKeeper from github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Providing keeper.BaseKeeper from github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Providing keeper.Keeper from github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Providing *keeper.Keeper from cosmossdk.io/x/upgrade.ProvideModule (/Users/troykessler/go/pkg/mod/cosmossdk.io/x/upgrade@v0.1.1/module.go:194) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/pool.ProvideModule (/Users/troykessler/work/kyve/chain/x/pool/module.go:205) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Providing *keeper.Keeper from github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) to github.com/KYVENetwork/chain/x/delegation.ProvideModule - Calling github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) - Error: can't resolve type github.com/KYVENetwork/chain/x/bundles/types/types.FundersKeeper for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232): - while resolving: - types.FundersKeeper for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) - store.KVStoreService for github.com/KYVENetwork/chain/x/delegation.ProvideModule (/Users/troykessler/work/kyve/chain/x/delegation/module.go:213) - types.DelegationKeeper for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) - types.TeamKeeper for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) - store.MemoryStoreService for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) - store.KVStoreService for github.com/KYVENetwork/chain/x/bundles.ProvideModule (/Users/troykessler/work/kyve/chain/x/bundles/module.go:232) - keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - store.KVStoreService for github.com/cosmos/cosmos-sdk/x/crisis.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/crisis/module.go:201) - *keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - depinject.OwnModuleKey for github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) - store.KVStoreService for github.com/cosmos/cosmos-sdk/x/gov.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/gov/module.go:189) - *keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - util.UpgradeKeeper for github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) - store.MemoryStoreService for github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) - store.KVStoreService for github.com/KYVENetwork/chain/x/stakers.ProvideModule (/Users/troykessler/work/kyve/chain/x/stakers/module.go:208) - types.ProtocolStakingKeeper for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) - exported.Subspace for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) - types.InflationCalculationFn for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) - store.KVStoreService for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) - depinject.OwnModuleKey for github.com/cosmos/cosmos-sdk/x/mint.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/mint/module.go:222) - keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - store.KVStoreService for github.com/cosmos/cosmos-sdk/x/slashing.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/slashing/module.go:230) - keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - store.KVStoreService for github.com/cosmos/cosmos-sdk/x/distribution.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/distribution/module.go:232) - keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - store.KVStoreService for github.com/cosmos/cosmos-sdk/x/staking.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/staking/module.go:221) - *keeper.Keeper for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - ante.FeegrantKeeper for github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) - depinject.ModuleKey for github.com/cosmos/cosmos-sdk/x/params.ProvideSubspace (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/params/module.go:146) - exported.Subspace for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) - func() types.AccountI for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) - types.RandomGenesisAccountsFn for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) - store.KVStoreService for github.com/cosmos/cosmos-sdk/x/auth.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/module.go:209) - types.AccountKeeper for github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) - store.KVStoreService for github.com/cosmos/cosmos-sdk/x/bank.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/bank/module.go:227) - types.BankKeeper for github.com/cosmos/cosmos-sdk/x/auth/tx/config.ProvideModule (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/x/auth/tx/config/config.go:70) - client.TxConfig for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - address.Codec for github.com/cosmos/cosmos-sdk/runtime.ProvideInterfaceRegistry (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:161) - types.InterfaceRegistry for github.com/cosmos/cosmos-sdk/runtime.ProvideApp (/Users/troykessler/go/pkg/mod/github.com/!k!y!v!e!network/cosmos-sdk@v0.50.5-kyve-rc2/runtime/module.go:84) - *runtime.AppBuilder for github.com/KYVENetwork/chain/app.New (/Users/troykessler/work/kyve/chain/app/app.go:276) - Saved graph of container to /Users/troykessler/work/kyve/chain/x/funders/keeper/debug_container.dot diff --git a/x/funders/keeper/logic_funders_test.go b/x/funders/keeper/logic_funders_test.go index 308394cb..84ee05cf 100644 --- a/x/funders/keeper/logic_funders_test.go +++ b/x/funders/keeper/logic_funders_test.go @@ -4,7 +4,6 @@ import ( "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" funderstypes "github.com/KYVENetwork/chain/x/funders/types" - globaltypes "github.com/KYVENetwork/chain/x/global/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" sdk "github.com/cosmos/cosmos-sdk/types" . "github.com/onsi/ginkgo/v2" @@ -31,6 +30,27 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundersModuleAcc := s.App().AccountKeeper.GetModuleAccount(s.Ctx(), funderstypes.ModuleName).GetAddress() poolModuleAcc := s.App().AccountKeeper.GetModuleAccount(s.Ctx(), pooltypes.ModuleName).GetAddress() + whitelist := []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } + BeforeEach(func() { s = i.NewCleanChain() @@ -54,6 +74,9 @@ var _ = Describe("logic_funders.go", Ordered, func() { } s.RunTxPoolSuccess(msg) + // set whitelist + s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) + params := s.App().FundersKeeper.GetParams(s.Ctx()) params.MinFundingMultiple = 5 s.App().FundersKeeper.SetParams(s.Ctx(), params) @@ -82,8 +105,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { AmountsPerBundle: i.ACoins(10 * i.T_KYVE), }) - fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, globaltypes.Denom).Amount.Uint64() - Expect(fundersBalance).To(Equal(150 * i.KYVE)) + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + Expect(fundersBalance.String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) }) AfterEach(func() { @@ -113,10 +136,10 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) Expect(fundingState.ActiveFunderAddresses[1]).To(Equal(i.BOB)) - fundersBalance := s.App().BankKeeper.GetBalance(s.Ctx(), fundersModuleAcc, i.A_DENOM).Amount.Uint64() - poolBalance := s.App().BankKeeper.GetBalance(s.Ctx(), poolModuleAcc, i.A_DENOM).Amount.Uint64() - Expect(fundersBalance).To(Equal(139 * i.T_KYVE)) - Expect(poolBalance).To(Equal(11 * i.T_KYVE)) + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + Expect(fundersBalance.String()).To(Equal(i.ACoins(139 * i.T_KYVE).String())) + Expect(poolBalance.String()).To(Equal(i.ACoins(11 * i.T_KYVE).String())) }) It("Charge funders once with multiple coins", func() { @@ -124,14 +147,14 @@ var _ = Describe("logic_funders.go", Ordered, func() { s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ Creator: i.ALICE, PoolId: 0, - Amounts: i.ACoins(1000 * i.T_KYVE), - AmountsPerBundle: i.ACoins(20 * i.T_KYVE), + Amounts: i.BCoins(1000 * i.T_KYVE), + AmountsPerBundle: i.BCoins(20 * i.T_KYVE), }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ Creator: i.BOB, PoolId: 0, - Amounts: i.ACoins(100 * i.T_KYVE), - AmountsPerBundle: i.ACoins(2 * i.T_KYVE), + Amounts: i.CCoins(100 * i.T_KYVE), + AmountsPerBundle: i.CCoins(2 * i.T_KYVE), }) // ACT @@ -139,17 +162,17 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(err).NotTo(HaveOccurred()) // ASSERT - Expect(payout.String()).To(Equal(sdk.NewCoins(i.ACoin(11), i.BCoin(20), i.CCoin(2)).String())) + Expect(payout.String()).To(Equal(sdk.NewCoins(i.ACoin(11*i.T_KYVE), i.BCoin(20*i.T_KYVE), i.CCoin(2*i.T_KYVE)).String())) fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) Expect(fundingAlice.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(99*i.T_KYVE), i.BCoin(980*i.T_KYVE)).String())) - Expect(fundingAlice.TotalFunded.String()).To(Equal(sdk.NewCoins(i.ACoin(40*i.T_KYVE), i.CCoin(98*i.T_KYVE)).String())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(20*i.T_KYVE)).String())) fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(foundBob).To(BeTrue()) - Expect(fundingBob.Amounts.String()).To(Equal(i.ACoins(40 * i.T_KYVE).String())) - Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) + Expect(fundingBob.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(40*i.T_KYVE), i.CCoin(98*i.T_KYVE)).String())) + Expect(fundingBob.TotalFunded.String()).To(Equal(sdk.NewCoins(i.ACoin(10*i.T_KYVE), i.CCoin(2*i.T_KYVE)).String())) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) @@ -158,8 +181,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) - Expect(fundersBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(139), i.BCoin(980), i.CCoin(98)).String())) - Expect(poolBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(11), i.BCoin(20), i.CCoin(2)).String())) + Expect(fundersBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(139*i.T_KYVE), i.BCoin(980*i.T_KYVE), i.CCoin(98*i.T_KYVE)).String())) + Expect(poolBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(11*i.T_KYVE), i.BCoin(20*i.T_KYVE), i.CCoin(2*i.T_KYVE)).String())) }) It("Charge funders until one funder runs out of funds", func() { @@ -167,7 +190,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { for range [5]struct{}{} { payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) - Expect(payout).To(Equal(11 * i.KYVE)) + Expect(payout.String()).To(Equal(i.ACoins(11 * i.T_KYVE).String())) } // ASSERT @@ -204,7 +227,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) - Expect(payout.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) + Expect(payout.String()).To(Equal(i.ACoins(20 * i.T_KYVE).String())) } fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) @@ -226,31 +249,31 @@ var _ = Describe("logic_funders.go", Ordered, func() { payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) - Expect(payout.String()).To(Equal(i.ACoins(10 * i.T_KYVE))) + Expect(payout.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) } fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) fundingAlice, foundAlice = s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) - Expect(fundingAlice.Amounts.IsZero()).To(Equal(BeTrue())) + Expect(fundingAlice.Amounts.IsZero()).To(BeTrue()) Expect(fundingAlice.TotalFunded.String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) fundingBob, foundBob = s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(foundBob).To(BeTrue()) - Expect(fundingBob.Amounts.IsZero()).To(Equal(BeTrue())) + Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) Expect(err).NotTo(HaveOccurred()) - Expect(payout.IsZero()).To(Equal(BeTrue())) + Expect(payout.IsZero()).To(BeTrue()) fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) - Expect(fundersBalance.IsZero()).To(Equal(BeTrue())) + Expect(fundersBalance.IsZero()).To(BeTrue()) Expect(poolBalance.String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) }) @@ -272,7 +295,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(foundAlice).To(BeTrue()) - Expect(fundingAlice.Amounts.IsZero()).To(Equal(BeTrue())) + Expect(fundingAlice.Amounts.IsZero()).To(BeTrue()) Expect(fundingAlice.TotalFunded.String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) @@ -304,7 +327,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { // ASSERT Expect(err).NotTo(HaveOccurred()) - Expect(payout.IsZero()).To(Equal(BeTrue())) + Expect(payout.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) @@ -345,19 +368,19 @@ var _ = Describe("logic_funders.go", Ordered, func() { { FunderAddress: i.DUMMY[0], PoolId: 0, - Amounts: sdk.NewCoins(i.ACoin(1000*i.T_KYVE), i.BCoin(500*i.T_KYVE), i.CCoin(100)), + Amounts: sdk.NewCoins(i.ACoin(1000*i.T_KYVE), i.BCoin(500*i.T_KYVE), i.CCoin(200*i.T_KYVE)), AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE), i.CCoin(1)), }, { FunderAddress: i.DUMMY[1], PoolId: 0, - Amounts: sdk.NewCoins(i.ACoin(1100*i.T_KYVE), i.BCoin(600*i.T_KYVE), i.CCoin(5)), + Amounts: sdk.NewCoins(i.ACoin(1100*i.T_KYVE), i.BCoin(600*i.T_KYVE), i.CCoin(5*i.T_KYVE)), AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE), i.CCoin(1)), }, { FunderAddress: i.DUMMY[2], PoolId: 0, - Amounts: sdk.NewCoins(i.ACoin(500*i.T_KYVE), i.CCoin(700)), + Amounts: sdk.NewCoins(i.ACoin(500*i.T_KYVE), i.CCoin(700*i.T_KYVE)), AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.CCoin(1)), }, } diff --git a/x/funders/keeper/msg_server_defund_pool.go b/x/funders/keeper/msg_server_defund_pool.go index 0f2f2590..a7750a18 100644 --- a/x/funders/keeper/msg_server_defund_pool.go +++ b/x/funders/keeper/msg_server_defund_pool.go @@ -24,19 +24,21 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( return nil, errors.Wrapf(errorsTypes.ErrNotFound, types.ErrFundingDoesNotExist.Error(), msg.PoolId, msg.Creator) } - // Verify if funder has enough coins to defund - if !msg.Amounts.IsAllLTE(funding.Amounts) { - return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrFundingIsUsedUp.Error(), msg.PoolId, msg.Creator) - } - // FundingState has to exist fundingState, found := k.GetFundingState(ctx, msg.PoolId) if !found { util.PanicHalt(k.upgradeKeeper, ctx, fmt.Sprintf("FundingState for pool %d does not exist", msg.PoolId)) } + // If funder defunds more than he has we defund the entire amount of that coin + defundAmounts := funding.Amounts.Min(msg.Amounts) + if defundAmounts.IsZero() { + return nil, errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrFundsTooLow.Error()) + } + // Subtract amount from funding - funding.Amounts.Sub(msg.Amounts...) + funding.Amounts = funding.Amounts.Sub(defundAmounts...) + if funding.Amounts.IsZero() { fundingState.SetInactive(&funding) } else { @@ -48,7 +50,7 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( // Transfer tokens from this module to sender. recipient := sdk.MustAccAddressFromBech32(msg.Creator) - if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, recipient, msg.Amounts); err != nil { + if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, recipient, defundAmounts); err != nil { return nil, err } @@ -60,7 +62,7 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( _ = ctx.EventManager().EmitTypedEvent(&types.EventDefundPool{ PoolId: msg.PoolId, Address: msg.Creator, - Amounts: msg.Amounts, + Amounts: defundAmounts, }) return &types.MsgDefundPoolResponse{}, nil diff --git a/x/funders/keeper/msg_server_defund_pool_test.go b/x/funders/keeper/msg_server_defund_pool_test.go index 192a9fb9..41d86cc1 100644 --- a/x/funders/keeper/msg_server_defund_pool_test.go +++ b/x/funders/keeper/msg_server_defund_pool_test.go @@ -225,14 +225,11 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { }) It("Try to defund below minimum funding params (but not full defund)", func() { - // ACT - _, err := s.RunTx(&types.MsgDefundPool{ + // ASSERT + s.RunTxFundersError(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, Amounts: i.ACoins(95 * i.T_KYVE), }) - - // ASSERT - Expect(err.Error()).To(Equal("minimum funding amount of 1000000000kyve not reached: invalid request")) }) }) diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index 86d8f2bc..8b57819e 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -114,8 +114,8 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(funding.FunderAddress).To(Equal(i.ALICE)) Expect(funding.PoolId).To(Equal(uint64(0))) - Expect(funding.Amounts).To(Equal(i.ACoins(100 * i.T_KYVE).String())) - Expect(funding.AmountsPerBundle).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.Amounts.String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) @@ -149,8 +149,8 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) Expect(funding.FunderAddress).To(Equal(i.ALICE)) Expect(funding.PoolId).To(Equal(uint64(0))) - Expect(funding.Amounts).To(Equal(i.ACoins(150 * i.T_KYVE).String())) - Expect(funding.AmountsPerBundle).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.Amounts.String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) @@ -211,7 +211,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) Expect(funding.Amounts.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) - Expect(funding.TotalFunded.IsZero()).To(Equal(BeTrue())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.PoolId).To(Equal(uint64(0))) @@ -366,7 +366,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(initialBalance.Sub(balanceEnd...).IsZero()).To(BeTrue()) balanceAfterBob := s.GetBalancesFromAddress(i.BOB) - Expect(initialBalanceBob.Sub(balanceAfterBob...).String()).To(Equal(i.ACoins(200 * i.T_KYVE))) + Expect(initialBalanceBob.Sub(balanceAfterBob...).String()).To(Equal(i.ACoins(200 * i.T_KYVE).String())) }) It("Refund a funding as the lowest funder", func() { diff --git a/x/funders/keeper/msg_server_update_params_test.go b/x/funders/keeper/msg_server_update_params_test.go index 85cd3e1c..6c87de97 100644 --- a/x/funders/keeper/msg_server_update_params_test.go +++ b/x/funders/keeper/msg_server_update_params_test.go @@ -67,7 +67,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { // ASSERT params := s.App().FundersKeeper.GetParams(s.Ctx()) - Expect(params.CoinWhitelist).To(BeEmpty()) + Expect(params.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) Expect(params.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) @@ -140,7 +140,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("acoin")) Expect(updatedParams.CoinWhitelist[0].MinFundingAmount).To(Equal(uint64(20000000000))) Expect(updatedParams.CoinWhitelist[0].MinFundingAmountPerBundle).To(Equal(uint64(2000000000))) - Expect(updatedParams.CoinWhitelist[0].CoinWeight.String()).To(Equal("5")) + Expect(updatedParams.CoinWhitelist[0].CoinWeight.TruncateInt64()).To(Equal(int64(5))) Expect(updatedParams.MinFundingMultiple).To(Equal(uint64(25))) }) @@ -245,7 +245,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("acoin")) Expect(updatedParams.CoinWhitelist[0].MinFundingAmount).To(Equal(uint64(20000000000))) Expect(updatedParams.CoinWhitelist[0].MinFundingAmountPerBundle).To(Equal(uint64(200000))) - Expect(updatedParams.CoinWhitelist[0].CoinWeight.String()).To(Equal("5")) + Expect(updatedParams.CoinWhitelist[0].CoinWeight.TruncateInt64()).To(Equal(int64(5))) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) diff --git a/x/funders/types/errors.go b/x/funders/types/errors.go index 4fc590c1..5d6268ae 100644 --- a/x/funders/types/errors.go +++ b/x/funders/types/errors.go @@ -8,13 +8,11 @@ import ( var ( ErrFunderAlreadyExists = errors.Register(ModuleName, 1100, "funder with address %v already exists") ErrFunderDoesNotExist = errors.Register(ModuleName, 1101, "funder with address %v does not exist") - ErrFundsTooLow = errors.Register(ModuleName, 1102, "minimum funding amount of %vkyve not reached") + ErrFundsTooLow = errors.Register(ModuleName, 1102, "can not defund zero coins") ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of coin not reached") ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount of coin not reached") ErrFundingDoesNotExist = errors.Register(ModuleName, 1105, "funding for pool %v and funder %v does not exist") - ErrFundingIsUsedUp = errors.Register(ModuleName, 1106, "funding for pool %v and funder %v is used up") - ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1107, "funding state for pool %v does not exist") - ErrMinFundingMultiple = errors.Register(ModuleName, 1108, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") - ErrCoinNotWhitelisted = errors.Register(ModuleName, 1109, "coin not in whitelist") - ErrCoinsNegative = errors.Register(ModuleName, 1110, "all coins must be greater than zero") + ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1106, "funding state for pool %v does not exist") + ErrMinFundingMultiple = errors.Register(ModuleName, 1107, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") + ErrCoinNotWhitelisted = errors.Register(ModuleName, 1108, "coin not in whitelist") ) diff --git a/x/funders/types/funders.go b/x/funders/types/funders.go index b8d6f1a9..e7a285bc 100644 --- a/x/funders/types/funders.go +++ b/x/funders/types/funders.go @@ -17,12 +17,9 @@ func (f *Funding) GetScore(whitelist []*WhitelistCoinEntry) (score uint64) { } func (f *Funding) ChargeOneBundle() (payouts sdk.Coins) { - amounts := f.Amounts - f.Amounts = f.Amounts.Sub(f.AmountsPerBundle...) - // we add the diff here in case amount per bundle is greater than amount - diff := amounts.Sub(f.Amounts...) - payouts.Add(diff...) - f.TotalFunded.Add(diff...) + payouts = f.Amounts.Min(f.AmountsPerBundle) + f.Amounts = f.Amounts.Sub(payouts...) + f.TotalFunded = f.TotalFunded.Add(payouts...) return } diff --git a/x/funders/types/message_fund_pool.go b/x/funders/types/message_fund_pool.go index 4ab6307e..0780067a 100644 --- a/x/funders/types/message_fund_pool.go +++ b/x/funders/types/message_fund_pool.go @@ -44,7 +44,7 @@ func (msg *MsgFundPool) ValidateBasic() error { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount") } - if !msg.AmountsPerBundle.IsAllPositive() { + if msg.AmountsPerBundle.Len() > 0 && !msg.AmountsPerBundle.IsAllPositive() { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount per bundle") } From 68fe337a6e84532693f195a8b80de27dee82480d Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Tue, 30 Apr 2024 09:36:01 +0200 Subject: [PATCH 10/28] test: further implemented unit tests --- x/funders/keeper/logic_funders.go | 16 +- x/funders/keeper/logic_funders_test.go | 51 +++- x/funders/keeper/msg_server_fund_pool_test.go | 242 ++++++++++++++++++ x/funders/types/errors.go | 19 +- x/funders/types/message_fund_pool.go | 6 +- 5 files changed, 318 insertions(+), 16 deletions(-) diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index 98741af9..2caf078c 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -97,6 +97,7 @@ func (k Keeper) GetLowestFunding(fundings []types.Funding, whitelist []*types.Wh // ensureParamsCompatibility checks compatibility of the provided funding with the pool params. // i.e. // - coin is in whitelist +// - there is an amount per bundle for every coin // - minimum funding per bundle // - minimum funding amount // - minimum funding multiple @@ -111,29 +112,34 @@ func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding types.Funding minFundingAmountsPerBundle = minFundingAmountsPerBundle.Add(sdk.NewInt64Coin(entry.CoinDenom, int64(entry.MinFundingAmountPerBundle))) } + // throw error if there is a coin in amounts with no corresponding coin in amounts per bundle + if !funding.Amounts.DenomsSubsetOf(funding.AmountsPerBundle) { + return types.ErrInvalidAmountPerBundleCoin + } + // throw error if a coin in amounts is not in the whitelist if !funding.Amounts.DenomsSubsetOf(minFundingAmounts) { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrCoinNotWhitelisted.Error()) + return types.ErrCoinNotWhitelisted } // throw error if a coin in amounts per bundle is not in the whitelist if !funding.AmountsPerBundle.DenomsSubsetOf(minFundingAmountsPerBundle) { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrCoinNotWhitelisted.Error()) + return types.ErrCoinNotWhitelisted } // throw error if a coin is less than the minimum funding amount if minFundingAmounts.IsAnyGT(funding.Amounts) { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingAmount.Error()) + return types.ErrMinFundingAmount } // throw error if a coin is less than the minimum funding amount per bundle if minFundingAmountsPerBundle.IsAnyGT(funding.AmountsPerBundle) { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinAmountPerBundle.Error()) + return types.ErrMinAmountPerBundle } // throw error if a coin can not fulfill the funding multiple threshold if funding.AmountsPerBundle.MulInt(math.NewInt(int64(params.MinFundingMultiple))).IsAnyGT(funding.Amounts) { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrMinFundingMultiple.Error()) + return types.ErrMinFundingMultiple } return nil diff --git a/x/funders/keeper/logic_funders_test.go b/x/funders/keeper/logic_funders_test.go index 84ee05cf..8032896e 100644 --- a/x/funders/keeper/logic_funders_test.go +++ b/x/funders/keeper/logic_funders_test.go @@ -15,8 +15,9 @@ import ( TEST CASES - logic_funders.go * Charge funders once with one coin -* TODO: Charge funders once with multiple coins +* Charge funders once with multiple coins * Charge funders until one funder runs out of funds +* Charge funders with multiple coins until he is completely out of funds * Charge funders until all funders run out of funds * Charge funder with less funds than amount_per_bundle * Charge without fundings @@ -214,6 +215,54 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(poolBalance.String()).To(Equal(i.ACoins(55 * i.T_KYVE).String())) }) + It("Charge funders with multiple coins until he is completely out of funds", func() { + // ACT + s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.BCoins(1000 * i.T_KYVE), + AmountsPerBundle: i.BCoins(20 * i.T_KYVE), + }) + s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ + Creator: i.BOB, + PoolId: 0, + Amounts: i.CCoins(100 * i.T_KYVE), + AmountsPerBundle: i.CCoins(10 * i.T_KYVE), + }) + + for range [5]struct{}{} { + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + Expect(err).NotTo(HaveOccurred()) + Expect(payout.String()).To(Equal(sdk.NewCoins(i.ACoin(11*i.T_KYVE), i.BCoin(20*i.T_KYVE), i.CCoin(10*i.T_KYVE)).String())) + } + + for range [5]struct{}{} { + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + Expect(err).NotTo(HaveOccurred()) + Expect(payout.String()).To(Equal(sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(20*i.T_KYVE), i.CCoin(10*i.T_KYVE)).String())) + } + + // ASSERT + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) + Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) + Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) + + fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) + Expect(foundAlice).To(BeTrue()) + Expect(fundingAlice.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(90*i.T_KYVE), i.BCoin(800*i.T_KYVE)).String())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(sdk.NewCoins(i.ACoin(10*i.T_KYVE), i.BCoin(200*i.T_KYVE)).String())) + + fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) + Expect(foundBob).To(BeTrue()) + Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) + Expect(fundingBob.TotalFunded.String()).To(Equal(sdk.NewCoins(i.ACoin(50*i.T_KYVE), i.CCoin(100*i.T_KYVE)).String())) + + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + Expect(fundersBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(90*i.T_KYVE), i.BCoin(800*i.T_KYVE)).String())) + Expect(poolBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(60*i.T_KYVE), i.BCoin(200*i.T_KYVE), i.CCoin(100*i.T_KYVE)).String())) + }) + It("Charge funders until all funders run out of funds", func() { // ARRANGE funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index 8b57819e..0768f6ab 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -16,17 +16,30 @@ TEST CASES - msg_server_fund_pool.go * Fund a pool with 100 coins * Fund additional 50 coins to an existing funding with 100 coins +* Fund additional 50 different coins to an existing funding with 100 coins +* Change amount per bundle after funding 100 coins +* Change multiple amounts per bundle and also fund 50 additional coins after funding 100 coins * Try to fund more coins than available in balance +* Try to fund multiple coins where one coin exceeds balance * Fund with a new funder less coins than the existing one * Fund with a new funder more coins than the existing one +* Try funding with no amounts and no amounts per bundle +* Try funding coin which is not in the whitelist +* Try funding multiple coins where one coin is not in the whitelist +* Try funding 100 coins but amount per bundle is not set yet and empty +* TODO: Try funding 100 coins but amount per bundle is a different coin +* TODO: Try changing the amount per bundle of a coin which is not funded * Try to fund with a non-existent funder * Try to fund less coins than the lowest funder with full funding slots * Fund more coins than the lowest funder with full funding slots * Refund a funding as the lowest funder * Try to fund a non-existent pool * Try to fund below the minimum amount +* TODO: Try to fund multiple coins where one is below the minimum amount * Try to fund below the minimum amount per bundle +* TODO: Try to fund multiple coins where one is below the minimum amount per bundle * Try to fund without fulfilling min_funding_multiple +* TODO: Try to fund multiple coins where one is not fulfilling min_funding_multiple */ @@ -164,7 +177,150 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) }) + It("Fund additional 50 different coins to an existing funding with 100 coins", func() { + // ARRANGE + s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) + + // ACT + s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.BCoins(50 * i.T_KYVE), + AmountsPerBundle: i.BCoins(1 * i.T_KYVE), + }) + + // ASSERT + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(50*i.T_KYVE)).String())) + + funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) + Expect(funding.FunderAddress).To(Equal(i.ALICE)) + Expect(funding.PoolId).To(Equal(uint64(0))) + Expect(funding.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(50*i.T_KYVE)).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE)).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) + + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) + Expect(fundingState.PoolId).To(Equal(uint64(0))) + Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(1)) + Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) + + activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) + Expect(err).To(BeNil()) + Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) + }) + + It("Change amount per bundle after funding 100 coins", func() { + // ARRANGE + s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) + + // ACT + s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(), + AmountsPerBundle: i.ACoins(2 * i.T_KYVE), + }) + + // ASSERT + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) + + funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) + Expect(funding.FunderAddress).To(Equal(i.ALICE)) + Expect(funding.PoolId).To(Equal(uint64(0))) + Expect(funding.Amounts.String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(2 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) + + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) + Expect(fundingState.PoolId).To(Equal(uint64(0))) + Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(1)) + Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) + + activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) + Expect(err).To(BeNil()) + Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) + }) + + It("Change multiple amounts per bundle and also fund 50 additional coins after funding 100 coins", func() { + // ARRANGE + s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) + + // ACT + s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.BCoins(50 * i.T_KYVE), + AmountsPerBundle: sdk.NewCoins(i.ACoin(2*i.T_KYVE), i.BCoin(1*i.T_KYVE)), + }) + + // ASSERT + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + + Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(50*i.T_KYVE)).String())) + + funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) + Expect(funding.FunderAddress).To(Equal(i.ALICE)) + Expect(funding.PoolId).To(Equal(uint64(0))) + Expect(funding.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(50*i.T_KYVE)).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(sdk.NewCoins(i.ACoin(2*i.T_KYVE), i.BCoin(1*i.T_KYVE)).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) + + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) + Expect(fundingState.PoolId).To(Equal(uint64(0))) + Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(1)) + Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) + + activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) + lowestFunding, err := s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) + Expect(err).To(BeNil()) + Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) + }) + It("Try to fund more coins than available in balance", func() { + // ACT + _, currentBalance := s.GetBalancesFromAddress(i.ALICE).Find(i.A_DENOM) + + s.RunTxFundersError(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(currentBalance.Add(i.ACoin(1))), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) + + // ASSERT + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) + + _, found := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) + Expect(found).To(BeFalse()) + + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) + Expect(fundingState.PoolId).To(Equal(uint64(0))) + Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(0)) + }) + + It("Try to fund multiple coins where one coin exceeds balance", func() { // ACT currentBalance := s.GetBalancesFromAddress(i.ALICE) @@ -259,6 +415,92 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) }) + It("Try funding with no amounts and no amounts per bundle", func() { + // ASSERT + s.RunTxFundersError(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(), + AmountsPerBundle: sdk.NewCoins(), + }) + }) + + It("Try funding coin which is not in the whitelist", func() { + // ARRANGE + whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + } + s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) + + // ASSERT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.CCoins(100 * i.T_KYVE), + AmountsPerBundle: i.CCoins(1 * i.T_KYVE), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrCoinNotWhitelisted.Error())) + }) + + It("Try funding multiple coins where one coin is not in the whitelist", func() { + // ARRANGE + whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + } + s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) + + // ACT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.CCoin(100*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.CCoin(1*i.T_KYVE)), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrCoinNotWhitelisted.Error())) + }) + + It("Try funding 100 coins but amount per bundle is not set yet and empty", func() { + // ACT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: sdk.NewCoins(), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrInvalidAmountPerBundleCoin.Error())) + }) + It("Try to fund with a non-existent funder", func() { // ASSERT s.RunTxFundersError(&funderstypes.MsgFundPool{ diff --git a/x/funders/types/errors.go b/x/funders/types/errors.go index 5d6268ae..8ec141d0 100644 --- a/x/funders/types/errors.go +++ b/x/funders/types/errors.go @@ -6,13 +6,14 @@ import ( // x/funders module sentinel errors var ( - ErrFunderAlreadyExists = errors.Register(ModuleName, 1100, "funder with address %v already exists") - ErrFunderDoesNotExist = errors.Register(ModuleName, 1101, "funder with address %v does not exist") - ErrFundsTooLow = errors.Register(ModuleName, 1102, "can not defund zero coins") - ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of coin not reached") - ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount of coin not reached") - ErrFundingDoesNotExist = errors.Register(ModuleName, 1105, "funding for pool %v and funder %v does not exist") - ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1106, "funding state for pool %v does not exist") - ErrMinFundingMultiple = errors.Register(ModuleName, 1107, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") - ErrCoinNotWhitelisted = errors.Register(ModuleName, 1108, "coin not in whitelist") + ErrFunderAlreadyExists = errors.Register(ModuleName, 1100, "funder with address %v already exists") + ErrFunderDoesNotExist = errors.Register(ModuleName, 1101, "funder with address %v does not exist") + ErrFundsTooLow = errors.Register(ModuleName, 1102, "can not defund zero coins") + ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of coin not reached") + ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount of coin not reached") + ErrFundingDoesNotExist = errors.Register(ModuleName, 1105, "funding for pool %v and funder %v does not exist") + ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1106, "funding state for pool %v does not exist") + ErrMinFundingMultiple = errors.Register(ModuleName, 1107, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") + ErrCoinNotWhitelisted = errors.Register(ModuleName, 1108, "coin not in whitelist") + ErrInvalidAmountPerBundleCoin = errors.Register(ModuleName, 1109, "coin in amount per bundle is not in funding amounts") ) diff --git a/x/funders/types/message_fund_pool.go b/x/funders/types/message_fund_pool.go index 0780067a..518fd7bc 100644 --- a/x/funders/types/message_fund_pool.go +++ b/x/funders/types/message_fund_pool.go @@ -40,7 +40,11 @@ func (msg *MsgFundPool) ValidateBasic() error { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid pool id") } - if !msg.Amounts.IsAllPositive() { + if msg.Amounts.Len() == 0 && msg.AmountsPerBundle.Len() == 0 { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, "empty request") + } + + if msg.Amounts.Len() > 0 && !msg.Amounts.IsAllPositive() { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount") } From afd49f90c416724cf8373f38974bbfd968f6d117 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Tue, 30 Apr 2024 09:54:57 +0200 Subject: [PATCH 11/28] test: completed funding tests --- x/funders/keeper/msg_server_fund_pool_test.go | 146 ++++++++++++++++-- 1 file changed, 135 insertions(+), 11 deletions(-) diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index 0768f6ab..13faa231 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -27,19 +27,20 @@ TEST CASES - msg_server_fund_pool.go * Try funding coin which is not in the whitelist * Try funding multiple coins where one coin is not in the whitelist * Try funding 100 coins but amount per bundle is not set yet and empty -* TODO: Try funding 100 coins but amount per bundle is a different coin -* TODO: Try changing the amount per bundle of a coin which is not funded +* Try funding 100 coins but amount per bundle is a different coin +* Try changing the amount per bundle of a coin which is not funded +* Try changing the amount per bundle of a coin which is not funded and whitelisted * Try to fund with a non-existent funder * Try to fund less coins than the lowest funder with full funding slots * Fund more coins than the lowest funder with full funding slots * Refund a funding as the lowest funder * Try to fund a non-existent pool * Try to fund below the minimum amount -* TODO: Try to fund multiple coins where one is below the minimum amount +* Try to fund multiple coins where one is below the minimum amount * Try to fund below the minimum amount per bundle -* TODO: Try to fund multiple coins where one is below the minimum amount per bundle -* Try to fund without fulfilling min_funding_multiple -* TODO: Try to fund multiple coins where one is not fulfilling min_funding_multiple +* Try to fund multiple coins where one is below the minimum amount per bundle +* Try to fund without fulfilling min funding multiple +* Try to fund multiple coins where one is not fulfilling min funding multiple */ @@ -501,6 +502,75 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(err.Error()).To(Equal(funderstypes.ErrInvalidAmountPerBundleCoin.Error())) }) + It("Try funding 100 coins but amount per bundle is a different coin", func() { + // ACT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.BCoins(1 * i.T_KYVE), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrInvalidAmountPerBundleCoin.Error())) + }) + + It("Try changing the amount per bundle of a coin which is not funded", func() { + // ARRANGE + s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) + + // ACT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(), + AmountsPerBundle: i.BCoins(1 * i.T_KYVE), + }) + + // ASSERT + // we actually allow this since the amount per bundle will not be automatically removed + // if the coin in amounts is empty. The funder can only specify amount per bundles which + // are whitelisted + Expect(err).ToNot(HaveOccurred()) + }) + + It("Try changing the amount per bundle of a coin which is not funded and whitelisted", func() { + // ARRANGE + whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + } + s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) + + // ASSERT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(), + AmountsPerBundle: i.CCoins(1 * i.T_KYVE), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrCoinNotWhitelisted.Error())) + }) + It("Try to fund with a non-existent funder", func() { // ASSERT s.RunTxFundersError(&funderstypes.MsgFundPool{ @@ -668,32 +738,86 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) It("Try to fund below the minimum amount", func() { - // ASSERT - s.RunTxFundersError(&funderstypes.MsgFundPool{ + // ACT + _, err := s.RunTx(&funderstypes.MsgFundPool{ Creator: i.ALICE, PoolId: 0, Amounts: i.ACoins(1 * i.T_KYVE), AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrMinFundingAmount.Error())) + }) + + It("Try to fund multiple coins where one is below the minimum amount", func() { + // ACT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(1*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE)), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrMinFundingAmount.Error())) }) It("Try to fund below the minimum amount per bundle", func() { // ASSERT - s.RunTxFundersError(&funderstypes.MsgFundPool{ + _, err := s.RunTx(&funderstypes.MsgFundPool{ Creator: i.ALICE, PoolId: 0, Amounts: i.ACoins(100 * i.T_KYVE), AmountsPerBundle: i.ACoins(1), }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrMinAmountPerBundle.Error())) + }) + + It("Try to fund multiple coins where one is below the minimum amount per bundle", func() { + // ASSERT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(100*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(1)), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrMinAmountPerBundle.Error())) }) - It("Try to fund without fulfilling min_funding_multiple", func() { + It("Try to fund without fulfilling min funding multiple", func() { // ASSERT - s.RunTxFundersError(&funderstypes.MsgFundPool{ + _, err := s.RunTx(&funderstypes.MsgFundPool{ Creator: i.ALICE, PoolId: 0, Amounts: i.ACoins(100 * i.T_KYVE), AmountsPerBundle: i.ACoins(50 * i.T_KYVE), }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrMinFundingMultiple.Error())) + }) + + It("Try to fund multiple coins where one is not fulfilling min funding multiple", func() { + // ASSERT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(100*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(50*i.T_KYVE)), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrMinFundingMultiple.Error())) }) }) From 6936d0383a549589910c8ea9abda7ed84139ef98 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Tue, 30 Apr 2024 11:03:57 +0200 Subject: [PATCH 12/28] test: further completed funders tests --- x/funders/keeper/logic_funders.go | 2 +- x/funders/keeper/logic_funders_test.go | 171 +++++++++++++++--- .../keeper/msg_server_defund_pool_test.go | 111 ++++++++++-- x/funders/keeper/msg_server_fund_pool_test.go | 97 +++++++--- x/funders/types/errors.go | 21 ++- x/funders/types/funders.go | 4 +- x/funders/types/params.go | 1 + 7 files changed, 333 insertions(+), 74 deletions(-) diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index 2caf078c..832ec493 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -124,7 +124,7 @@ func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding types.Funding // throw error if a coin in amounts per bundle is not in the whitelist if !funding.AmountsPerBundle.DenomsSubsetOf(minFundingAmountsPerBundle) { - return types.ErrCoinNotWhitelisted + return types.ErrAmountPerBundleCoinNotWhitelisted } // throw error if a coin is less than the minimum funding amount diff --git a/x/funders/keeper/logic_funders_test.go b/x/funders/keeper/logic_funders_test.go index 8032896e..24bf3415 100644 --- a/x/funders/keeper/logic_funders_test.go +++ b/x/funders/keeper/logic_funders_test.go @@ -20,9 +20,11 @@ TEST CASES - logic_funders.go * Charge funders with multiple coins until he is completely out of funds * Charge funders until all funders run out of funds * Charge funder with less funds than amount_per_bundle +* Charge funder that has coins which are not in the whitelist * Charge without fundings * Check if the lowest funding is returned correctly with one coin * Check if the lowest funding is returned correctly with multiple coins +* Check if the lowest funding is returned correctly with coins which are not whitelisted */ @@ -31,26 +33,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundersModuleAcc := s.App().AccountKeeper.GetModuleAccount(s.Ctx(), funderstypes.ModuleName).GetAddress() poolModuleAcc := s.App().AccountKeeper.GetModuleAccount(s.Ctx(), pooltypes.ModuleName).GetAddress() - whitelist := []*funderstypes.WhitelistCoinEntry{ - { - CoinDenom: i.A_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(1), - }, - { - CoinDenom: i.B_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(2), - }, - { - CoinDenom: i.C_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(3), - }, - } + var whitelist []*funderstypes.WhitelistCoinEntry BeforeEach(func() { s = i.NewCleanChain() @@ -76,6 +59,26 @@ var _ = Describe("logic_funders.go", Ordered, func() { s.RunTxPoolSuccess(msg) // set whitelist + whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) params := s.App().FundersKeeper.GetParams(s.Ctx()) @@ -358,6 +361,52 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(poolBalance.String()).To(Equal(i.ACoins(110 * i.T_KYVE).String())) }) + It("Charge funder that has coins which are not in the whitelist", func() { + // ARRANGE + whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } + s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) + + // ACT + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + Expect(err).NotTo(HaveOccurred()) + + // ASSERT + Expect(payout.String()).To(Equal(i.ACoins(11 * i.T_KYVE).String())) + + fundingAlice, foundAlice := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) + Expect(foundAlice).To(BeTrue()) + Expect(fundingAlice.Amounts.String()).To(Equal(i.ACoins(99 * i.T_KYVE).String())) + Expect(fundingAlice.TotalFunded.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + + fundingBob, foundBob := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) + Expect(foundBob).To(BeTrue()) + Expect(fundingBob.Amounts.String()).To(Equal(i.ACoins(40 * i.T_KYVE).String())) + Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) + + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) + Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) + Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) + Expect(fundingState.ActiveFunderAddresses[1]).To(Equal(i.BOB)) + + fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + Expect(fundersBalance.String()).To(Equal(i.ACoins(139 * i.T_KYVE).String())) + Expect(poolBalance.String()).To(Equal(i.ACoins(11 * i.T_KYVE).String())) + }) + It("Charge without fundings", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgDefundPool{ @@ -397,7 +446,49 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(poolBalance.IsZero()).To(BeTrue()) }) - It("Check if the lowest funding is returned correctly", func() { + It("Check if the lowest funding is returned correctly with one coin", func() { + whitelist := []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + CoinWeight: math.LegacyNewDec(3), + }, + } + + fundings := []funderstypes.Funding{ + { + FunderAddress: i.DUMMY[0], + PoolId: 0, + Amounts: i.ACoins(1000 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }, + { + FunderAddress: i.DUMMY[1], + PoolId: 0, + Amounts: i.ACoins(1100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }, + { + FunderAddress: i.DUMMY[2], + PoolId: 0, + Amounts: i.ACoins(900 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }, + } + + getLowestFunding, err := s.App().FundersKeeper.GetLowestFunding(fundings, whitelist) + Expect(err).NotTo(HaveOccurred()) + Expect(getLowestFunding.FunderAddress).To(Equal(i.DUMMY[2])) + }) + + It("Check if the lowest funding is returned correctly with multiple coins", func() { whitelist := []*funderstypes.WhitelistCoinEntry{ { CoinDenom: i.A_DENOM, @@ -438,4 +529,42 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(err).NotTo(HaveOccurred()) Expect(getLowestFunding.FunderAddress).To(Equal(i.DUMMY[1])) }) + + It("Check if the lowest funding is returned correctly with coins which are not whitelisted", func() { + whitelist := []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + CoinWeight: math.LegacyNewDec(2), + }, + } + + fundings := []funderstypes.Funding{ + { + FunderAddress: i.DUMMY[0], + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(1000*i.T_KYVE), i.BCoin(500*i.T_KYVE), i.CCoin(200*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE), i.CCoin(1)), + }, + { + FunderAddress: i.DUMMY[1], + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(1100*i.T_KYVE), i.BCoin(600*i.T_KYVE), i.CCoin(5*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE), i.CCoin(1)), + }, + { + FunderAddress: i.DUMMY[2], + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(500*i.T_KYVE), i.CCoin(700*i.T_KYVE)), + AmountsPerBundle: sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.CCoin(1)), + }, + } + + getLowestFunding, err := s.App().FundersKeeper.GetLowestFunding(fundings, whitelist) + Expect(err).NotTo(HaveOccurred()) + Expect(getLowestFunding.FunderAddress).To(Equal(i.DUMMY[2])) + }) }) diff --git a/x/funders/keeper/msg_server_defund_pool_test.go b/x/funders/keeper/msg_server_defund_pool_test.go index 41d86cc1..25d88404 100644 --- a/x/funders/keeper/msg_server_defund_pool_test.go +++ b/x/funders/keeper/msg_server_defund_pool_test.go @@ -20,6 +20,8 @@ TEST CASES - msg_server_defund_pool.go * Try to defund nonexistent fundings * Try to defund a funding twice * Try to defund below minimum funding params (but not full defund) +* Try to partially defund after a coin has been removed from the whitelist +* Try to fully defund after a coin has been removed from the whitelist */ @@ -27,26 +29,7 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s := i.NewCleanChain() initialBalance := s.GetBalancesFromAddress(i.ALICE) - whitelist := []*types.WhitelistCoinEntry{ - { - CoinDenom: i.A_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(1), - }, - { - CoinDenom: i.B_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(2), - }, - { - CoinDenom: i.C_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(3), - }, - } + var whitelist []*types.WhitelistCoinEntry BeforeEach(func() { // init new clean chain @@ -73,6 +56,26 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s.RunTxPoolSuccess(msg) // set whitelist + whitelist = []*types.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } s.App().FundersKeeper.SetParams(s.Ctx(), types.NewParams(whitelist, 20)) // create funder @@ -232,4 +235,72 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { Amounts: i.ACoins(95 * i.T_KYVE), }) }) + + It("Try to partially defund after a coin has been removed from the whitelist", func() { + // ARRANGE + whitelist = []*types.WhitelistCoinEntry{ + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } + s.App().FundersKeeper.SetParams(s.Ctx(), types.NewParams(whitelist, 20)) + + // ACT + _, err := s.RunTx(&types.MsgDefundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(50 * i.T_KYVE), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(types.ErrCoinNotWhitelisted.Error())) + }) + + It("Try to fully defund after a coin has been removed from the whitelist", func() { + // ARRANGE + whitelist = []*types.WhitelistCoinEntry{ + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } + s.App().FundersKeeper.SetParams(s.Ctx(), types.NewParams(whitelist, 20)) + + // ACT + s.RunTxFundersSuccess(&types.MsgDefundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + }) + + // ASSERT + balanceAfter := s.GetBalancesFromAddress(i.ALICE) + Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) + + funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) + Expect(funding.Amounts.IsZero()).To(BeTrue()) + Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) + + fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) + Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(0)) + }) }) diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index 13faa231..4e25e6d6 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -25,8 +25,10 @@ TEST CASES - msg_server_fund_pool.go * Fund with a new funder more coins than the existing one * Try funding with no amounts and no amounts per bundle * Try funding coin which is not in the whitelist +* Try additional coins after the coin has been removed from the whitelist * Try funding multiple coins where one coin is not in the whitelist * Try funding 100 coins but amount per bundle is not set yet and empty +* Try funding multiple coins but with not enough amounts per bundle * Try funding 100 coins but amount per bundle is a different coin * Try changing the amount per bundle of a coin which is not funded * Try changing the amount per bundle of a coin which is not funded and whitelisted @@ -48,26 +50,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { s := i.NewCleanChain() initialBalance := s.GetBalancesFromAddress(i.ALICE) - whitelist := []*funderstypes.WhitelistCoinEntry{ - { - CoinDenom: i.A_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(1), - }, - { - CoinDenom: i.B_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(2), - }, - { - CoinDenom: i.C_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(3), - }, - } + var whitelist []*funderstypes.WhitelistCoinEntry BeforeEach(func() { // init new clean chain @@ -94,6 +77,26 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { s.RunTxPoolSuccess(msg) // set whitelist + whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) // create funder @@ -457,6 +460,44 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(err.Error()).To(Equal(funderstypes.ErrCoinNotWhitelisted.Error())) }) + It("Try additional coins after the coin has been removed from the whitelist", func() { + // ARRANGE + s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.CCoins(100 * i.T_KYVE), + AmountsPerBundle: i.CCoins(1 * i.T_KYVE), + }) + + whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + } + s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) + + // ASSERT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.CCoins(100 * i.T_KYVE), + AmountsPerBundle: sdk.NewCoins(), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrCoinNotWhitelisted.Error())) + }) + It("Try funding multiple coins where one coin is not in the whitelist", func() { // ARRANGE whitelist = []*funderstypes.WhitelistCoinEntry{ @@ -502,6 +543,20 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(err.Error()).To(Equal(funderstypes.ErrInvalidAmountPerBundleCoin.Error())) }) + It("Try funding multiple coins but with not enough amounts per bundle", func() { + // ACT + _, err := s.RunTx(&funderstypes.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(100*i.T_KYVE)), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(funderstypes.ErrInvalidAmountPerBundleCoin.Error())) + }) + It("Try funding 100 coins but amount per bundle is a different coin", func() { // ACT _, err := s.RunTx(&funderstypes.MsgFundPool{ @@ -568,7 +623,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { // ASSERT Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(Equal(funderstypes.ErrCoinNotWhitelisted.Error())) + Expect(err.Error()).To(Equal(funderstypes.ErrAmountPerBundleCoinNotWhitelisted.Error())) }) It("Try to fund with a non-existent funder", func() { diff --git a/x/funders/types/errors.go b/x/funders/types/errors.go index 8ec141d0..25de0e59 100644 --- a/x/funders/types/errors.go +++ b/x/funders/types/errors.go @@ -6,14 +6,15 @@ import ( // x/funders module sentinel errors var ( - ErrFunderAlreadyExists = errors.Register(ModuleName, 1100, "funder with address %v already exists") - ErrFunderDoesNotExist = errors.Register(ModuleName, 1101, "funder with address %v does not exist") - ErrFundsTooLow = errors.Register(ModuleName, 1102, "can not defund zero coins") - ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of coin not reached") - ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount of coin not reached") - ErrFundingDoesNotExist = errors.Register(ModuleName, 1105, "funding for pool %v and funder %v does not exist") - ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1106, "funding state for pool %v does not exist") - ErrMinFundingMultiple = errors.Register(ModuleName, 1107, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") - ErrCoinNotWhitelisted = errors.Register(ModuleName, 1108, "coin not in whitelist") - ErrInvalidAmountPerBundleCoin = errors.Register(ModuleName, 1109, "coin in amount per bundle is not in funding amounts") + ErrFunderAlreadyExists = errors.Register(ModuleName, 1100, "funder with address %v already exists") + ErrFunderDoesNotExist = errors.Register(ModuleName, 1101, "funder with address %v does not exist") + ErrFundsTooLow = errors.Register(ModuleName, 1102, "can not defund zero coins") + ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of coin not reached") + ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount of coin not reached") + ErrFundingDoesNotExist = errors.Register(ModuleName, 1105, "funding for pool %v and funder %v does not exist") + ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1106, "funding state for pool %v does not exist") + ErrMinFundingMultiple = errors.Register(ModuleName, 1107, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") + ErrCoinNotWhitelisted = errors.Register(ModuleName, 1108, "coin in amount not in whitelist") + ErrAmountPerBundleCoinNotWhitelisted = errors.Register(ModuleName, 1109, "coin in amount per bundle not in whitelist") + ErrInvalidAmountPerBundleCoin = errors.Register(ModuleName, 1110, "coin in amount per bundle is not in funding amounts") ) diff --git a/x/funders/types/funders.go b/x/funders/types/funders.go index e7a285bc..32e03dbc 100644 --- a/x/funders/types/funders.go +++ b/x/funders/types/funders.go @@ -10,7 +10,9 @@ func (f *Funding) GetScore(whitelist []*WhitelistCoinEntry) (score uint64) { } for _, coin := range f.Amounts { - score += uint64(w[coin.Denom].CoinWeight.MulInt64(coin.Amount.Int64()).TruncateInt64()) + if entry, found := w[coin.Denom]; found { + score += uint64(entry.CoinWeight.MulInt64(coin.Amount.Int64()).TruncateInt64()) + } } return diff --git a/x/funders/types/params.go b/x/funders/types/params.go index 90f9cc2a..2ed98ed4 100644 --- a/x/funders/types/params.go +++ b/x/funders/types/params.go @@ -42,6 +42,7 @@ func DefaultParams() Params { } // Validate validates the set of params +// TODO: fail if kyve denom is not in whitelist func (p *Params) Validate() error { if err := util.ValidateNumber(p.MinFundingMultiple); err != nil { return err From 336a0c006d694686b94d3f7d52b5a6d31c594f34 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Thu, 2 May 2024 10:41:52 +0200 Subject: [PATCH 13/28] chore: implemented default kyve whitelist logic --- x/funders/keeper/logic_funders_test.go | 31 ++++++ .../keeper/msg_server_defund_pool_test.go | 19 ++++ x/funders/keeper/msg_server_fund_pool_test.go | 31 ++++++ .../keeper/msg_server_update_params_test.go | 105 ++++++++++++++++-- x/funders/types/params.go | 34 +++--- 5 files changed, 194 insertions(+), 26 deletions(-) diff --git a/x/funders/keeper/logic_funders_test.go b/x/funders/keeper/logic_funders_test.go index 24bf3415..fef46dad 100644 --- a/x/funders/keeper/logic_funders_test.go +++ b/x/funders/keeper/logic_funders_test.go @@ -4,6 +4,7 @@ import ( "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" funderstypes "github.com/KYVENetwork/chain/x/funders/types" + globaltypes "github.com/KYVENetwork/chain/x/global/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" sdk "github.com/cosmos/cosmos-sdk/types" . "github.com/onsi/ginkgo/v2" @@ -60,6 +61,12 @@ var _ = Describe("logic_funders.go", Ordered, func() { // set whitelist whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, MinFundingAmount: 10 * i.KYVE, @@ -364,6 +371,12 @@ var _ = Describe("logic_funders.go", Ordered, func() { It("Charge funder that has coins which are not in the whitelist", func() { // ARRANGE whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.B_DENOM, MinFundingAmount: 10 * i.KYVE, @@ -448,6 +461,12 @@ var _ = Describe("logic_funders.go", Ordered, func() { It("Check if the lowest funding is returned correctly with one coin", func() { whitelist := []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, CoinWeight: math.LegacyNewDec(1), @@ -490,6 +509,12 @@ var _ = Describe("logic_funders.go", Ordered, func() { It("Check if the lowest funding is returned correctly with multiple coins", func() { whitelist := []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, CoinWeight: math.LegacyNewDec(1), @@ -532,6 +557,12 @@ var _ = Describe("logic_funders.go", Ordered, func() { It("Check if the lowest funding is returned correctly with coins which are not whitelisted", func() { whitelist := []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, CoinWeight: math.LegacyNewDec(1), diff --git a/x/funders/keeper/msg_server_defund_pool_test.go b/x/funders/keeper/msg_server_defund_pool_test.go index 25d88404..8174c09f 100644 --- a/x/funders/keeper/msg_server_defund_pool_test.go +++ b/x/funders/keeper/msg_server_defund_pool_test.go @@ -4,6 +4,7 @@ import ( "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" "github.com/KYVENetwork/chain/x/funders/types" + globaltypes "github.com/KYVENetwork/chain/x/global/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -57,6 +58,12 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { // set whitelist whitelist = []*types.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, MinFundingAmount: 10 * i.KYVE, @@ -239,6 +246,12 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { It("Try to partially defund after a coin has been removed from the whitelist", func() { // ARRANGE whitelist = []*types.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.B_DENOM, MinFundingAmount: 10 * i.KYVE, @@ -269,6 +282,12 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { It("Try to fully defund after a coin has been removed from the whitelist", func() { // ARRANGE whitelist = []*types.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.B_DENOM, MinFundingAmount: 10 * i.KYVE, diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index 4e25e6d6..5c878279 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -4,6 +4,7 @@ import ( "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" funderstypes "github.com/KYVENetwork/chain/x/funders/types" + globaltypes "github.com/KYVENetwork/chain/x/global/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" sdk "github.com/cosmos/cosmos-sdk/types" . "github.com/onsi/ginkgo/v2" @@ -78,6 +79,12 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { // set whitelist whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, MinFundingAmount: 10 * i.KYVE, @@ -432,6 +439,12 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { It("Try funding coin which is not in the whitelist", func() { // ARRANGE whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, MinFundingAmount: 10 * i.KYVE, @@ -470,6 +483,12 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, MinFundingAmount: 10 * i.KYVE, @@ -501,6 +520,12 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { It("Try funding multiple coins where one coin is not in the whitelist", func() { // ARRANGE whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, MinFundingAmount: 10 * i.KYVE, @@ -598,6 +623,12 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { It("Try changing the amount per bundle of a coin which is not funded and whitelisted", func() { // ARRANGE whitelist = []*funderstypes.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, { CoinDenom: i.A_DENOM, MinFundingAmount: 10 * i.KYVE, diff --git a/x/funders/keeper/msg_server_update_params_test.go b/x/funders/keeper/msg_server_update_params_test.go index 6c87de97..6d170d1f 100644 --- a/x/funders/keeper/msg_server_update_params_test.go +++ b/x/funders/keeper/msg_server_update_params_test.go @@ -29,6 +29,8 @@ TEST CASES - msg_server_update_params.go * Update existing coin whitelist entry * Update existing coin whitelist entry with invalid value +* Update multiple coin whitelist entries +* Update coin whitelist entry without the native kyve coin * Update min-funding-multiple * Update min-funding-multiple with invalid value @@ -46,6 +48,9 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { BeforeEach(func() { s = i.NewCleanChain() + // set whitelist + s.App().FundersKeeper.SetParams(s.Ctx(), types.DefaultParams()) + gov = s.App().GovKeeper.GetGovernanceAccount(s.Ctx()).GetAddress().String() params, err := s.App().GovKeeper.Params.Get(s.Ctx()) Expect(err).NotTo(HaveOccurred()) @@ -67,7 +72,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { // ASSERT params := s.App().FundersKeeper.GetParams(s.Ctx()) - Expect(params.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) + Expect(params.CoinWhitelist).To(Equal(types.DefaultParams().CoinWhitelist)) Expect(params.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) @@ -106,7 +111,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { It("Update every param at once", func() { // ARRANGE payload := `{ - "coin_whitelist": [{"coin_denom":"acoin","min_funding_amount":20000000000,"min_funding_amount_per_bundle":2000000000,"coin_weight":"5"}], + "coin_whitelist": [{"coin_denom":"tkyve","min_funding_amount":20000000000,"min_funding_amount_per_bundle":2000000000,"coin_weight":"5"}], "min_funding_multiple": 25 }` @@ -137,7 +142,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(voteErr).NotTo(HaveOccurred()) Expect(updatedParams.CoinWhitelist).To(HaveLen(1)) - Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("acoin")) + Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("tkyve")) Expect(updatedParams.CoinWhitelist[0].MinFundingAmount).To(Equal(uint64(20000000000))) Expect(updatedParams.CoinWhitelist[0].MinFundingAmountPerBundle).To(Equal(uint64(2000000000))) Expect(updatedParams.CoinWhitelist[0].CoinWeight.TruncateInt64()).To(Equal(int64(5))) @@ -175,7 +180,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).NotTo(HaveOccurred()) Expect(voteErr).NotTo(HaveOccurred()) - Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultParams().CoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) @@ -205,14 +210,14 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).To(HaveOccurred()) - Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultParams().CoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) It("Update existing coin whitelist entry", func() { // ARRANGE payload := `{ - "coin_whitelist": [{"coin_denom":"acoin","min_funding_amount":20000000000,"min_funding_amount_per_bundle":200000,"coin_weight":"5"}] + "coin_whitelist": [{"coin_denom":"tkyve","min_funding_amount":20000000000,"min_funding_amount_per_bundle":200000,"coin_weight":"7"}] }` msg := &types.MsgUpdateParams{ @@ -242,10 +247,10 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(voteErr).NotTo(HaveOccurred()) Expect(updatedParams.CoinWhitelist).To(HaveLen(1)) - Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("acoin")) + Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("tkyve")) Expect(updatedParams.CoinWhitelist[0].MinFundingAmount).To(Equal(uint64(20000000000))) Expect(updatedParams.CoinWhitelist[0].MinFundingAmountPerBundle).To(Equal(uint64(200000))) - Expect(updatedParams.CoinWhitelist[0].CoinWeight.TruncateInt64()).To(Equal(int64(5))) + Expect(updatedParams.CoinWhitelist[0].CoinWeight.TruncateInt64()).To(Equal(int64(7))) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) @@ -253,7 +258,37 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { It("Update existing coin whitelist entry with invalid value", func() { // ARRANGE payload := `{ - "coin_whitelist": [{"coin_denom":"acoin","min_funding_amount":invalid,"min_funding_amount_per_bundle":100000,"coin_weight":"1"}] + "coin_whitelist": [{"coin_denom":"tkyve","min_funding_amount":invalid,"min_funding_amount_per_bundle":100000,"coin_weight":"1"}] + }` + + msg := &types.MsgUpdateParams{ + Authority: gov, + Payload: payload, + } + + proposal, _ := govV1Types.NewMsgSubmitProposal( + []sdk.Msg{msg}, minDeposit, i.DUMMY[0], "", "title", "summary", false, + ) + + // ACT + _, submitErr := s.RunTx(proposal) + + s.CommitAfter(*votingPeriod) + s.Commit() + + // ASSERT + updatedParams := s.App().FundersKeeper.GetParams(s.Ctx()) + + Expect(submitErr).To(HaveOccurred()) + + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultParams().CoinWhitelist)) + Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) + }) + + It("Update multiple coin whitelist entries", func() { + // ARRANGE + payload := `{ + "coin_whitelist": [{"coin_denom":"tkyve","min_funding_amount":20000000000,"min_funding_amount_per_bundle":200000,"coin_weight":"5"},{"coin_denom":"acoin","min_funding_amount":10000000000,"min_funding_amount_per_bundle":100000,"coin_weight":"2"}] }` msg := &types.MsgUpdateParams{ @@ -265,8 +300,13 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { []sdk.Msg{msg}, minDeposit, i.DUMMY[0], "", "title", "summary", false, ) + vote := govV1Types.NewMsgVote( + voter, 1, govV1Types.VoteOption_VOTE_OPTION_YES, "", + ) + // ACT _, submitErr := s.RunTx(proposal) + _, voteErr := s.RunTx(vote) s.CommitAfter(*votingPeriod) s.Commit() @@ -274,9 +314,50 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { // ASSERT updatedParams := s.App().FundersKeeper.GetParams(s.Ctx()) + Expect(submitErr).NotTo(HaveOccurred()) + Expect(voteErr).NotTo(HaveOccurred()) + + Expect(updatedParams.CoinWhitelist).To(HaveLen(2)) + + Expect(updatedParams.CoinWhitelist[0].CoinDenom).To(Equal("tkyve")) + Expect(updatedParams.CoinWhitelist[0].MinFundingAmount).To(Equal(uint64(20000000000))) + Expect(updatedParams.CoinWhitelist[0].MinFundingAmountPerBundle).To(Equal(uint64(200000))) + Expect(updatedParams.CoinWhitelist[0].CoinWeight.TruncateInt64()).To(Equal(int64(5))) + + Expect(updatedParams.CoinWhitelist[1].CoinDenom).To(Equal("acoin")) + Expect(updatedParams.CoinWhitelist[1].MinFundingAmount).To(Equal(uint64(10000000000))) + Expect(updatedParams.CoinWhitelist[1].MinFundingAmountPerBundle).To(Equal(uint64(100000))) + Expect(updatedParams.CoinWhitelist[1].CoinWeight.TruncateInt64()).To(Equal(int64(2))) + + Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) + }) + + It("Update coin whitelist entry without the native kyve coin", func() { + // ARRANGE + payload := `{ + "coin_whitelist": [{"coin_denom":"acoin","min_funding_amount":10000000000,"min_funding_amount_per_bundle":100000,"coin_weight":"2"}] + }` + + msg := &types.MsgUpdateParams{ + Authority: gov, + Payload: payload, + } + + proposal, _ := govV1Types.NewMsgSubmitProposal( + []sdk.Msg{msg}, minDeposit, i.DUMMY[0], "", "title", "summary", false, + ) + + // ACT + _, submitErr := s.RunTx(proposal) + + s.CommitAfter(*votingPeriod) + s.Commit() + + // ASSERT + updatedParams := s.App().FundersKeeper.GetParams(s.Ctx()) Expect(submitErr).To(HaveOccurred()) - Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultParams().CoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) @@ -312,7 +393,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).NotTo(HaveOccurred()) Expect(voteErr).NotTo(HaveOccurred()) - Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultParams().CoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(uint64(9))) }) @@ -342,7 +423,7 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { Expect(submitErr).To(HaveOccurred()) - Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultCoinWhitelist)) + Expect(updatedParams.CoinWhitelist).To(Equal(types.DefaultParams().CoinWhitelist)) Expect(updatedParams.MinFundingMultiple).To(Equal(types.DefaultMinFundingMultiple)) }) }) diff --git a/x/funders/types/params.go b/x/funders/types/params.go index 2ed98ed4..53d494d7 100644 --- a/x/funders/types/params.go +++ b/x/funders/types/params.go @@ -3,6 +3,7 @@ package types import ( "cosmossdk.io/math" "errors" + "fmt" "github.com/KYVENetwork/chain/util" globalTypes "github.com/KYVENetwork/chain/x/global/types" ) @@ -13,18 +14,6 @@ const ( DefaultMinFundingMultiple = uint64(20) ) -var ( - // DefaultCoinWhitelist ukyve - DefaultCoinWhitelist = []*WhitelistCoinEntry{ - { - CoinDenom: globalTypes.Denom, - MinFundingAmount: uint64(1_000_000_000), // 1,000 $KYVE - MinFundingAmountPerBundle: uint64(100_000), // 0.1 $KYVE - CoinWeight: math.LegacyNewDec(1), - }, - } -) - // NewParams creates a new Params instance func NewParams(coinWhitelist []*WhitelistCoinEntry, minFundingMultiple uint64) Params { return Params{ @@ -36,18 +25,27 @@ func NewParams(coinWhitelist []*WhitelistCoinEntry, minFundingMultiple uint64) P // DefaultParams returns a default set of parameters func DefaultParams() Params { return NewParams( - DefaultCoinWhitelist, + []*WhitelistCoinEntry{ + { + CoinDenom: globalTypes.Denom, + MinFundingAmount: uint64(1_000_000_000), // 1,000 $KYVE + MinFundingAmountPerBundle: uint64(100_000), // 0.1 $KYVE + CoinWeight: math.LegacyNewDec(1), + }, + }, DefaultMinFundingMultiple, ) } // Validate validates the set of params -// TODO: fail if kyve denom is not in whitelist func (p *Params) Validate() error { if err := util.ValidateNumber(p.MinFundingMultiple); err != nil { return err } + // the native $KYVE coin has to always be whitelisted + kyveWhitelisted := false + for _, entry := range p.CoinWhitelist { if entry.CoinDenom == "" { return errors.New("coin denom is empty") @@ -64,6 +62,14 @@ func (p *Params) Validate() error { if err := util.ValidateDecimal(entry.CoinWeight); err != nil { return err } + + if entry.CoinDenom == globalTypes.Denom { + kyveWhitelisted = true + } + } + + if !kyveWhitelisted { + return fmt.Errorf("native KYVE coin \"%s\" not whitelisted", globalTypes.Denom) } return nil From 0cfe839e11db7624fd211e23de876cc21ea4a7c8 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Thu, 2 May 2024 13:41:41 +0200 Subject: [PATCH 14/28] chore: wrote spec files for funders module --- proto/kyve/funders/v1beta1/funders.proto | 17 --- x/funders/spec/01_concepts.md | 37 +++++++ x/funders/spec/02_state.md | 119 +++++++++++++++++++++ x/funders/spec/03_messages.md | 37 +++++++ x/funders/spec/04_params.md | 12 +++ x/funders/spec/05_events.md | 130 +++++++++++++++++++++++ x/funders/spec/06_exported.md | 18 ++++ 7 files changed, 353 insertions(+), 17 deletions(-) create mode 100644 x/funders/spec/01_concepts.md create mode 100644 x/funders/spec/02_state.md create mode 100644 x/funders/spec/03_messages.md create mode 100644 x/funders/spec/04_params.md create mode 100644 x/funders/spec/05_events.md create mode 100644 x/funders/spec/06_exported.md diff --git a/proto/kyve/funders/v1beta1/funders.proto b/proto/kyve/funders/v1beta1/funders.proto index 711cdf44..382874b0 100644 --- a/proto/kyve/funders/v1beta1/funders.proto +++ b/proto/kyve/funders/v1beta1/funders.proto @@ -24,23 +24,6 @@ message Funder { string description = 6; } -// TODO: do this because else we would have to check the following things: -// if amounts and amounts_per_bundle are given seperately as arrays we would have to check the following: -// - are those arrays of equal size -// - are there any coins which are not whitelisted in one of those arrays -// - is amounts_per_bundle a subset of amounts -message FundEntry { - // amount is amount of the coin which is funded - cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // amounts_per_bundle defines the amount of each coin that are distributed - // per finalized bundle - uint64 amount_per_bundle = 2; -} - // Funding is the object which holds info about the current funding // funder_address and pool_id (m2m) are unique together which means that // a funder can only fund each pool once and a pool can only be funded diff --git a/x/funders/spec/01_concepts.md b/x/funders/spec/01_concepts.md new file mode 100644 index 00000000..8770b3a5 --- /dev/null +++ b/x/funders/spec/01_concepts.md @@ -0,0 +1,37 @@ + + +# Concepts + +This module contains the logic of maintaining and tracking the funds +of funders. Funders are special actors who provide liquidity to a pool +and basically pay for the rewards the validators earn for their work. +Funders would usually be stakeholders of the data that is being archived and +therefore have a strong interest in further archiving the data. Once a valid +bundle is produced and the reward is paid out the pool module takes care of +correctly deducting the funds equally from each funder in order to guarantee +a steady pool economy. + +## Funding Slots + +Currently, the KYVE protocol allows at maximum 50 funders per pool to limit +gas consumption. If the slots are full and a funder wants to join anyway he +has to fund more than the current lowest funder. By doing so the funds of the +lowest funder will be automatically returned to the lowest funder's wallet +and the new funder can join. + +## Multiple Coin Funding + +To ease the process of funding KYVE pools we introduced the concept of multiple +coin fundings. This implies that funders can not only provide the native $KYVE +coin as funds, but also other coins which are provided over IBC. This affects +the community pool, the protocol validators and the delegators who not only receive +$KYVE as rewards but also the other coins with which the pool was funded with. + +## Price per Bundle + +Funders can choose for themselves which total amount they want to contribute and +how much funds they want to distribute per validated and archived bundle of data. +This gives funders huge flexibility and promotes competition between pools in order +to attract validators who typically choose the pool with the highest provided funds. diff --git a/x/funders/spec/02_state.md b/x/funders/spec/02_state.md new file mode 100644 index 00000000..4d51bfda --- /dev/null +++ b/x/funders/spec/02_state.md @@ -0,0 +1,119 @@ + + +# State + +The module is mainly responsible for holding the funders state +and keeping track of each funded balance of a funder. + +## Funder + +A funder can exist independently of a pool and stores account information like address, moniker, description and so on. + +- Funder: `0x01 | FunderAddr -> ProtocolBuffer(funder)` + +```protobuf +syntax = "proto3"; + +message Funder { + // address ... + string address = 1; + // moniker ... + string moniker = 2; + // identity is the 64 bit keybase.io identity string + string identity = 3; + // website ... + string website = 4; + // contact ... + string contact = 5; + // description are some additional notes the funder finds important + string description = 6; +} +``` + +## Funding + +Since funders and pools have a many-to-many relation we track the funding status in the `Funding` object containing +the information about what the funder funded in the specific pool like the amount of coins and the corresponding +amount per bundle. We also track how much the funder spent in total in the pool. + +- Funding: `0x02 | 0x00 | PoolId | FunderAddr -> ProtocolBuffer(funding)` +- Funding: `0x02 | 0x01 | FunderAddr | PoolId -> ProtocolBuffer(funding)` + +```protobuf +syntax = "proto3"; + +message Funding { + // funder_id is the id of the funder + string funder_address = 1; + // pool_id is the id of the pool this funding is for + uint64 pool_id = 2; + // amounts is a list of coins the funder wants to fund the pool with + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // amounts_per_bundle defines the amount of each coin that are distributed + // per finalized bundle + repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // total_funded is the total amount of coins that the funder has funded + repeated cosmos.base.v1beta1.Coin total_funded = 5 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} +``` + +## FundingState + +`FundingState` is an object that keeps track of the funding state of the pool. It contains a list of all active +funders for each pool. + +- FundingState: `0x03 | PoolId -> ProtocolBuffer(fundingState)` + +```protobuf +syntax = "proto3"; + +message FundingState { + // pool_id is the id of the pool this funding is for + uint64 pool_id = 1; + // active_funder_addresses is the list of all active fundings + repeated string active_funder_addresses = 2; +} +``` + +## WhitelistCoinEntry + +With multiple coin funding being possible we also have to limit the amount of coin types funders can fund or +else a user could spam coins and dramatically increase the gas costs for protocol node operators. Therefore, +we have a coin whitelist so a funder can only fund a coin if it is included in the whitelist. For each coin there are +additional requirements like the minimum funding amount to also prevent spam. Note that the native $KYVE coin +is always included in the whitelist and can't be removed. + +```protobuf +syntax = "proto3"; + +message WhitelistCoinEntry { + // coin_denom is the denom of a coin which is allowed to be funded, this value + // needs to be unique + string coin_denom = 1; + // min_funding_amount is the minimum required amount of this denom that needs + // to be funded + uint64 min_funding_amount = 2; + // min_funding_amount_per_bundle is the minimum required amount of this denom + // that needs to be funded per bundle + uint64 min_funding_amount_per_bundle = 3; + // coin_weight is a factor used to sort funders after their funding amounts + string coin_weight = 4 [ + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} +``` diff --git a/x/funders/spec/03_messages.md b/x/funders/spec/03_messages.md new file mode 100644 index 00000000..ecd52eae --- /dev/null +++ b/x/funders/spec/03_messages.md @@ -0,0 +1,37 @@ + + +# Messages + +## MsgCreateFunder + +MsgCreateFunder creates the funder with all relevant information about the funder, this includes a moniker (human +readable name), an identity (keybase.io identity with avatar), a website, a contact and a description. +Note that this transaction fails if a funder with the same address already exists or if the moniker is empty. + +## MsgUpdateFunder + +MsgUpdateFunder can update all properties of the funder except the funder's address. + +## MsgFundPool + +MsgFundPool commits funds from the funder to a specific pool. The funder can fund multiple coins at the same time, but +they have to be whitelisted by the KYVE protocol. For each coin the funder funds the +`amount_per_bundle` has to be specified, too. This parameter specifies how much of each coin gets distributed +per finalized bundle to the protocol validators. + +## MsgDefundPool + +MsgDefundPool can withdraw remaining funds on the protocol if the funder decides to get his funds back or to allocate +them to a different pool. It takes a list of coins, so multiple coins can be also withdrawn in a single transaction. +If a funder wants to defund a coin which was removed from the whitelist since he funded he has to defund the entire +amount of that coin, else the transaction will fail. + +## MsgUpdateParams + +MsgDisablePool is a gov transaction and can be only called by the governance authority. To submit this transaction +someone has to create a MsgUpdateParams governance proposal. + +This will update the parameters of the funders module, containing the coin whitelist and the `MinFundingMultiple` +param. diff --git a/x/funders/spec/04_params.md b/x/funders/spec/04_params.md new file mode 100644 index 00000000..d24d0cda --- /dev/null +++ b/x/funders/spec/04_params.md @@ -0,0 +1,12 @@ + + +# Parameters + +The pool module contains the following parameters: + +| Key | Type | Example | +|--------------------|----------------------|---------| +| CoinWhitelist | WhitelistCoinEntry[] | | +| MinFundingMultiple | math.LegacyDec (%) | 20 | diff --git a/x/funders/spec/05_events.md b/x/funders/spec/05_events.md new file mode 100644 index 00000000..eaca4764 --- /dev/null +++ b/x/funders/spec/05_events.md @@ -0,0 +1,130 @@ + + +# Events + +The funders module contains the following events: + +## EventCreateFunder + +EventCreateFunder indicates that a new funder has been created. + +```protobuf +syntax = "proto3"; + +message EventCreateFunder { + // address is the account address of the funder. + string address = 1; + // moniker ... + string moniker = 2; + // identity is the 64 bit keybase.io identity string + string identity = 3; + // website ... + string website = 4; + // contact ... + string contact = 5; + // description are some additional notes the funder finds important + string description = 6; +} +``` + +It gets emitted by the following actions: + +- `MsgCreateFunder` + +## EventUpdateFunder + +EventUpdateFunder indicates that a funder has been updated. + +```protobuf +syntax = "proto3"; + +message EventUpdateFunder { + // address is the account address of the funder. + string address = 1; + // moniker ... + string moniker = 2; + // identity is the 64 bit keybase.io identity string + string identity = 3; + // website ... + string website = 4; + // contact ... + string contact = 5; + // description are some additional notes the funder finds important + string description = 6; +} +``` + +It gets emitted by the following actions: + +- `MsgUpdateFunder` + +## EventFundPool + +EventFundPool indicates that a funder has provided funds to a pool. + +```protobuf +syntax = "proto3"; + +message EventFundPool { + // pool_id is the unique ID of the pool. + uint64 pool_id = 1; + // address is the account address of the pool funder. + string address = 2; + // amounts is a list of coins the funder has funded + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // amounts_per_bundle is a list of coins the funder wants to distribute per finalized bundle + repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} +``` + +It gets emitted by the following actions: + +- `MsgFundPool` + +## EventDefundPool + +EventDefundPool indicates that a funder has withdrawn funds from a pool. + +```protobuf +syntax = "proto3"; + +message EventDefundPool { + // pool_id is the unique ID of the pool. + uint64 pool_id = 1; + // address is the account address of the pool funder. + string address = 2; + // amounts is a list of coins that the funder wants to defund + repeated cosmos.base.v1beta1.Coin amounts = 3 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} +``` + +It gets emitted by the following actions: + +- `MsgDefundPool` + +## EventPoolOutOfFunds + +EventPoolOutOfFunds get emitted when a pool runs out of funds. + +```protobuf +syntax = "proto3"; + +message EventPoolOutOfFunds { + // pool_id is the unique ID of the pool. + uint64 pool_id = 1; +} +``` diff --git a/x/funders/spec/06_exported.md b/x/funders/spec/06_exported.md new file mode 100644 index 00000000..40fc9e9f --- /dev/null +++ b/x/funders/spec/06_exported.md @@ -0,0 +1,18 @@ + + +# Exported + +The `x/funders` module exports the following functions, which can be used +outside the module. + +```go +type FundersKeeper interface { + // ChargeFundersOfPool equally splits the amount between all funders and removes + // the appropriate amount from each funder. + // All funders who can't afford the amount, are kicked out. + // The method returns the payout amount the pool was able to charge from the funders. + ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout sdk.Coins, err error) +} +``` From dccbfc68cf07a9551494e4ff418d04e14f9d5984 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Thu, 2 May 2024 13:55:53 +0200 Subject: [PATCH 15/28] chore: added funding score to x/query --- docs/static/openapi.yml | 40 ++++ proto/kyve/query/v1beta1/funders.proto | 6 + x/funders/types/funders.pb.go | 301 ++++--------------------- x/query/keeper/grpc_query_funders.go | 13 +- x/query/keeper/grpc_query_fundings.go | 9 +- x/query/types/funders.pb.go | 207 +++++++++++------ 6 files changed, 244 insertions(+), 332 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 4875a729..0c224fe5 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -8199,6 +8199,14 @@ paths: description: >- pools_funded are the ids of the pools that have been funded by the funder. + score: + type: string + format: uint64 + title: >- + score is the result of all coins of the funder + currently allocated times the coin weight + + specified in the params fundings: type: array items: @@ -8276,6 +8284,14 @@ paths: title: >- total_funded is the total amount of coins that the funder has funded + score: + type: string + format: uint64 + title: >- + score is the result of all coins allocated to this pool + times the coin weight specified + + by the params description: Funding ... description: fundings ... description: >- @@ -8624,6 +8640,14 @@ paths: description: >- pools_funded are the ids of the pools that have been funded by the funder. + score: + type: string + format: uint64 + title: >- + score is the result of all coins of the funder + currently allocated times the coin weight + + specified in the params description: Funder ... description: funders ... description: >- @@ -8990,6 +9014,14 @@ paths: title: >- total_funded is the total amount of coins that the funder has funded + score: + type: string + format: uint64 + title: >- + score is the result of all coins allocated to this pool + times the coin weight specified + + by the params description: Funding ... description: fundings ... description: >- @@ -9371,6 +9403,14 @@ paths: title: >- total_funded is the total amount of coins that the funder has funded + score: + type: string + format: uint64 + title: >- + score is the result of all coins allocated to this pool + times the coin weight specified + + by the params description: Funding ... description: fundings ... description: >- diff --git a/proto/kyve/query/v1beta1/funders.proto b/proto/kyve/query/v1beta1/funders.proto index 8acfa480..9492a537 100644 --- a/proto/kyve/query/v1beta1/funders.proto +++ b/proto/kyve/query/v1beta1/funders.proto @@ -75,6 +75,9 @@ message FundingStats { ]; // pools_funded are the ids of the pools that have been funded by the funder. repeated uint64 pools_funded = 4; + // score is the result of all coins of the funder currently allocated times the coin weight + // specified in the params + uint64 score = 5; } // Funding ... @@ -102,6 +105,9 @@ message Funding { (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + // score is the result of all coins allocated to this pool times the coin weight specified + // by the params + uint64 score = 6; } // FundingStatus ... diff --git a/x/funders/types/funders.pb.go b/x/funders/types/funders.pb.go index 40365f6a..d858a664 100644 --- a/x/funders/types/funders.pb.go +++ b/x/funders/types/funders.pb.go @@ -118,66 +118,6 @@ func (m *Funder) GetDescription() string { return "" } -// TODO: do this because else we would have to check the following things: -// if amounts and amounts_per_bundle are given seperately as arrays we would have to check the following: -// - are those arrays of equal size -// - are there any coins which are not whitelisted in one of those arrays -// - is amounts_per_bundle a subset of amounts -type FundEntry struct { - // amount is amount of the coin which is funded - Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` - // amounts_per_bundle defines the amount of each coin that are distributed - // per finalized bundle - AmountPerBundle uint64 `protobuf:"varint,2,opt,name=amount_per_bundle,json=amountPerBundle,proto3" json:"amount_per_bundle,omitempty"` -} - -func (m *FundEntry) Reset() { *m = FundEntry{} } -func (m *FundEntry) String() string { return proto.CompactTextString(m) } -func (*FundEntry) ProtoMessage() {} -func (*FundEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_252d80f89b0fa299, []int{1} -} -func (m *FundEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FundEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FundEntry.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FundEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_FundEntry.Merge(m, src) -} -func (m *FundEntry) XXX_Size() int { - return m.Size() -} -func (m *FundEntry) XXX_DiscardUnknown() { - xxx_messageInfo_FundEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_FundEntry proto.InternalMessageInfo - -func (m *FundEntry) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - -func (m *FundEntry) GetAmountPerBundle() uint64 { - if m != nil { - return m.AmountPerBundle - } - return 0 -} - // Funding is the object which holds info about the current funding // funder_address and pool_id (m2m) are unique together which means that // a funder can only fund each pool once and a pool can only be funded @@ -200,7 +140,7 @@ func (m *Funding) Reset() { *m = Funding{} } func (m *Funding) String() string { return proto.CompactTextString(m) } func (*Funding) ProtoMessage() {} func (*Funding) Descriptor() ([]byte, []int) { - return fileDescriptor_252d80f89b0fa299, []int{2} + return fileDescriptor_252d80f89b0fa299, []int{1} } func (m *Funding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +216,7 @@ func (m *FundingState) Reset() { *m = FundingState{} } func (m *FundingState) String() string { return proto.CompactTextString(m) } func (*FundingState) ProtoMessage() {} func (*FundingState) Descriptor() ([]byte, []int) { - return fileDescriptor_252d80f89b0fa299, []int{3} + return fileDescriptor_252d80f89b0fa299, []int{2} } func (m *FundingState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -339,7 +279,7 @@ func (m *WhitelistCoinEntry) Reset() { *m = WhitelistCoinEntry{} } func (m *WhitelistCoinEntry) String() string { return proto.CompactTextString(m) } func (*WhitelistCoinEntry) ProtoMessage() {} func (*WhitelistCoinEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_252d80f89b0fa299, []int{4} + return fileDescriptor_252d80f89b0fa299, []int{3} } func (m *WhitelistCoinEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -391,7 +331,6 @@ func (m *WhitelistCoinEntry) GetMinFundingAmountPerBundle() uint64 { func init() { proto.RegisterType((*Funder)(nil), "kyve.funders.v1beta1.Funder") - proto.RegisterType((*FundEntry)(nil), "kyve.funders.v1beta1.FundEntry") proto.RegisterType((*Funding)(nil), "kyve.funders.v1beta1.Funding") proto.RegisterType((*FundingState)(nil), "kyve.funders.v1beta1.FundingState") proto.RegisterType((*WhitelistCoinEntry)(nil), "kyve.funders.v1beta1.WhitelistCoinEntry") @@ -402,47 +341,45 @@ func init() { } var fileDescriptor_252d80f89b0fa299 = []byte{ - // 633 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0x13, 0x3d, - 0x14, 0xcd, 0x34, 0x6d, 0xf2, 0xc5, 0xe9, 0x07, 0xad, 0x55, 0xd4, 0x69, 0x51, 0xa7, 0x51, 0x10, - 0x52, 0x55, 0x95, 0x19, 0x15, 0x04, 0x6b, 0x1a, 0xda, 0x4a, 0x08, 0x84, 0x50, 0x90, 0xa8, 0x60, - 0x33, 0x72, 0xc6, 0x97, 0x19, 0x93, 0x8c, 0x1d, 0x8d, 0x9d, 0x96, 0x6c, 0x78, 0x06, 0x5e, 0x81, - 0x1d, 0xea, 0x02, 0xf1, 0x18, 0x5d, 0x76, 0x89, 0x58, 0x14, 0xd4, 0x2e, 0x10, 0x6f, 0x81, 0xfc, - 0x93, 0x30, 0x85, 0x75, 0x37, 0x89, 0xef, 0x3d, 0x3e, 0xbe, 0xd7, 0xe7, 0xdc, 0x31, 0x6a, 0xf7, - 0xc7, 0x87, 0x10, 0xbd, 0x19, 0x71, 0x0a, 0x85, 0x8c, 0x0e, 0xb7, 0x7b, 0xa0, 0xc8, 0xf6, 0x24, - 0x0e, 0x87, 0x85, 0x50, 0x02, 0x2f, 0xe9, 0x3d, 0xe1, 0x24, 0xe7, 0xf6, 0xac, 0x06, 0x89, 0x90, - 0xb9, 0x90, 0x51, 0x8f, 0x48, 0x98, 0x12, 0x13, 0xc1, 0xb8, 0x65, 0xad, 0x2e, 0xa5, 0x22, 0x15, - 0x66, 0x19, 0xe9, 0x95, 0xcb, 0x2e, 0x92, 0x9c, 0x71, 0x11, 0x99, 0x5f, 0x9b, 0x6a, 0x7f, 0xf6, - 0x50, 0x6d, 0xdf, 0x1c, 0x8e, 0x7d, 0x54, 0x27, 0x94, 0x16, 0x20, 0xa5, 0xef, 0xb5, 0xbc, 0x8d, - 0x46, 0x77, 0x12, 0x6a, 0x24, 0x17, 0x9c, 0xf5, 0xa1, 0xf0, 0x67, 0x2c, 0xe2, 0x42, 0xbc, 0x8a, - 0xfe, 0x63, 0x14, 0xb8, 0x62, 0x6a, 0xec, 0x57, 0x0d, 0x34, 0x8d, 0x35, 0xeb, 0x08, 0x7a, 0x92, - 0x29, 0xf0, 0x67, 0x2d, 0xcb, 0x85, 0x1a, 0x49, 0x04, 0x57, 0x24, 0x51, 0xfe, 0x9c, 0x45, 0x5c, - 0x88, 0x5b, 0xa8, 0x49, 0x41, 0x26, 0x05, 0x1b, 0x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xcb, 0xbd, 0x67, 0xa0, 0x8e, 0x44, 0xd1, 0x8f, 0x92, 0x8c, 0x30, 0x1e, - 0xbd, 0x9b, 0xbe, 0x82, 0xc6, 0xac, 0x5e, 0xcd, 0xbc, 0x4e, 0xf7, 0x7e, 0x07, 0x00, 0x00, 0xff, - 0xff, 0x12, 0xe5, 0x08, 0x8e, 0x22, 0x05, 0x00, 0x00, + // 599 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x4f, 0x6f, 0x12, 0x4f, + 0x18, 0x66, 0xbb, 0x2d, 0xfc, 0x18, 0xfa, 0x33, 0x75, 0x52, 0xd3, 0x2d, 0xa6, 0x0b, 0xc1, 0x98, + 0x10, 0x53, 0x77, 0x53, 0x8d, 0x9e, 0x2d, 0x52, 0x12, 0xa3, 0x31, 0x06, 0x13, 0x1b, 0xbd, 0x6c, + 0x66, 0x77, 0xc6, 0x65, 0x84, 0x9d, 0x21, 0x3b, 0x03, 0xc8, 0xc5, 0xcf, 0xe0, 0xc7, 0x30, 0x3d, + 0x18, 0x3f, 0x46, 0x8f, 0x3d, 0x1a, 0x0f, 0xd5, 0xc0, 0xc1, 0xf8, 0x2d, 0xcc, 0xfc, 0x01, 0x41, + 0xcf, 0xbd, 0xc0, 0xbc, 0xcf, 0x3b, 0xcf, 0xbe, 0xcf, 0x3e, 0xcf, 0xcc, 0x82, 0x46, 0x7f, 0x3a, + 0x26, 0xe1, 0xdb, 0x11, 0xc3, 0x24, 0x17, 0xe1, 0xf8, 0x28, 0x26, 0x12, 0x1d, 0x2d, 0xea, 0x60, + 0x98, 0x73, 0xc9, 0xe1, 0xae, 0xda, 0x13, 0x2c, 0x30, 0xbb, 0xa7, 0xea, 0x27, 0x5c, 0x64, 0x5c, + 0x84, 0x31, 0x12, 0x64, 0x49, 0x4c, 0x38, 0x65, 0x86, 0x55, 0xdd, 0x4d, 0x79, 0xca, 0x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f, 0x94, 0xd3, 0x21, 0x11, 0x9a, 0x20, 0x3e, 0xfd, 0xfc, 0x72, + 0xc7, 0xe9, 0x2e, 0x06, 0xc0, 0x0f, 0x00, 0xda, 0x65, 0x34, 0x24, 0x79, 0x14, 0x8f, 0x18, 0x1e, + 0x28, 0x63, 0xae, 0x66, 0xec, 0x8e, 0x9d, 0xf5, 0x82, 0xe4, 0x2d, 0x3d, 0x09, 0x0a, 0xb0, 0x2d, + 0xb9, 0x44, 0x83, 0x48, 0x7b, 0x83, 0xbd, 0xad, 0x2b, 0x9a, 0x5c, 0xd1, 0x53, 0xf4, 0x91, 0xc2, + 0x8d, 0x08, 0x6c, 0xdb, 0xac, 0x5e, 0x4a, 0x24, 0xc9, 0x6a, 0x12, 0xce, 0x5a, 0x12, 0x0f, 0xc1, + 0x1e, 0x4a, 0x24, 0x1d, 0x93, 0x68, 0x3d, 0x50, 0x22, 0xbc, 0x8d, 0xba, 0xdb, 0x2c, 0x77, 0x6f, + 0x98, 0x76, 0x67, 0x35, 0x58, 0x22, 0x1a, 0xbf, 0x1c, 0x00, 0x4f, 0x7b, 0x54, 0x92, 0x01, 0x15, + 0x52, 0xa9, 0x38, 0x61, 0x32, 0x9f, 0xc2, 0x03, 0x00, 0xd4, 0x65, 0x88, 0x30, 0x61, 0x3c, 0xb3, + 0x87, 0xa2, 0xac, 0x90, 0xb6, 0x02, 0xe0, 0x21, 0x80, 0x19, 0x65, 0x7a, 0x14, 0x65, 0x69, 0x64, + 0xbc, 0xb2, 0x67, 0x63, 0x27, 0xa3, 0xcc, 0x6a, 0x3e, 0xd6, 0x38, 0x7c, 0x04, 0x0e, 0xfe, 0xdd, + 0xbd, 0x1a, 0xa2, 0xab, 0x89, 0xfb, 0x7f, 0x13, 0xff, 0x78, 0xdf, 0x06, 0x15, 0x2d, 0x67, 0x42, + 0x68, 0xda, 0x93, 0xe6, 0x36, 0xb4, 0x6e, 0x29, 0x7f, 0xbf, 0x5d, 0xd6, 0x6e, 0x1a, 0x37, 0x05, + 0xee, 0x07, 0x94, 0x87, 0x19, 0x92, 0xbd, 0xe0, 0x19, 0x49, 0x51, 0x32, 0x6d, 0x93, 0xa4, 0xab, + 0x5f, 0xe3, 0x54, 0xd3, 0x5a, 0x9d, 0xf3, 0x99, 0xef, 0x5c, 0xcc, 0x7c, 0xe7, 0xc7, 0xcc, 0x77, + 0x3e, 0xce, 0xfd, 0xc2, 0xc5, 0xdc, 0x2f, 0x7c, 0x9d, 0xfb, 0x85, 0x37, 0x87, 0x2b, 0x11, 0x3d, + 0x7d, 0xfd, 0xea, 0xe4, 0x39, 0x91, 0x13, 0x9e, 0xf7, 0xc3, 0xa4, 0x87, 0x28, 0x0b, 0xdf, 0x2f, + 0xbf, 0x30, 0x3a, 0xac, 0xb8, 0xa8, 0x6f, 0xfe, 0xfd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5f, + 0xfa, 0xe8, 0xac, 0x7e, 0x04, 0x00, 0x00, } func (m *Funder) Marshal() (dAtA []byte, err error) { @@ -510,44 +447,6 @@ func (m *Funder) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FundEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FundEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AmountPerBundle != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.AmountPerBundle)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFunders(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *Funding) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -756,20 +655,6 @@ func (m *Funder) Size() (n int) { return n } -func (m *FundEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amount.Size() - n += 1 + l + sovFunders(uint64(l)) - if m.AmountPerBundle != 0 { - n += 1 + sovFunders(uint64(m.AmountPerBundle)) - } - return n -} - func (m *Funding) Size() (n int) { if m == nil { return 0 @@ -1091,108 +976,6 @@ func (m *Funder) Unmarshal(dAtA []byte) error { } return nil } -func (m *FundEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunders - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FundEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FundEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunders - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFunders - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFunders - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountPerBundle", wireType) - } - m.AmountPerBundle = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunders - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AmountPerBundle |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFunders(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFunders - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Funding) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/query/keeper/grpc_query_funders.go b/x/query/keeper/grpc_query_funders.go index 6ee8f172..968fb851 100644 --- a/x/query/keeper/grpc_query_funders.go +++ b/x/query/keeper/grpc_query_funders.go @@ -23,10 +23,12 @@ func (k Keeper) Funders(c context.Context, req *types.QueryFundersRequest) (*typ return nil, err } + params := k.fundersKeeper.GetParams(ctx) + data := make([]types.Funder, 0) for _, funder := range funders { fundings := k.fundersKeeper.GetFundingsOfFunder(ctx, funder.Address) - data = append(data, k.parseFunder(&funder, fundings)) + data = append(data, k.parseFunder(&funder, fundings, params.CoinWhitelist)) } return &types.QueryFundersResponse{Funders: data, Pagination: pageRes}, nil @@ -46,8 +48,9 @@ func (k Keeper) Funder(c context.Context, req *types.QueryFunderRequest) (*types allFundings := k.fundersKeeper.GetFundingsOfFunder(ctx, funder.Address) fundings := k.filterFundingsOnStatus(allFundings, req.Status) - funderData := k.parseFunder(&funder, allFundings) - fundingsData := k.parseFundings(fundings) + params := k.fundersKeeper.GetParams(ctx) + funderData := k.parseFunder(&funder, allFundings, params.CoinWhitelist) + fundingsData := k.parseFundings(fundings, params.CoinWhitelist) return &types.QueryFunderResponse{ Funder: &funderData, @@ -72,12 +75,13 @@ func (k Keeper) filterFundingsOnStatus(fundings []fundersTypes.Funding, fundingS return filtered } -func (k Keeper) parseFunder(funder *fundersTypes.Funder, fundings []fundersTypes.Funding) types.Funder { +func (k Keeper) parseFunder(funder *fundersTypes.Funder, fundings []fundersTypes.Funding, whitelist []*fundersTypes.WhitelistCoinEntry) types.Funder { stats := types.FundingStats{ TotalUsedFunds: sdk.NewCoins(), TotalAllocatedFunds: sdk.NewCoins(), TotalAmountPerBundle: sdk.NewCoins(), PoolsFunded: make([]uint64, 0), + Score: uint64(0), } for _, funding := range fundings { @@ -88,6 +92,7 @@ func (k Keeper) parseFunder(funder *fundersTypes.Funder, fundings []fundersTypes stats.TotalUsedFunds = stats.TotalUsedFunds.Add(funding.TotalFunded...) stats.TotalAllocatedFunds = stats.TotalAllocatedFunds.Add(funding.Amounts...) + stats.Score += funding.GetScore(whitelist) stats.PoolsFunded = append(stats.PoolsFunded, funding.PoolId) } diff --git a/x/query/keeper/grpc_query_fundings.go b/x/query/keeper/grpc_query_fundings.go index 53d4927e..9a3d40af 100644 --- a/x/query/keeper/grpc_query_fundings.go +++ b/x/query/keeper/grpc_query_fundings.go @@ -21,7 +21,8 @@ func (k Keeper) FundingsByFunder(c context.Context, req *types.QueryFundingsByFu return nil, err } - data := k.parseFundings(fundings) + params := k.fundersKeeper.GetParams(ctx) + data := k.parseFundings(fundings, params.CoinWhitelist) return &types.QueryFundingsByFunderResponse{Fundings: data, Pagination: pageRes}, nil } @@ -37,12 +38,13 @@ func (k Keeper) FundingsByPool(c context.Context, req *types.QueryFundingsByPool return nil, err } - data := k.parseFundings(fundings) + params := k.fundersKeeper.GetParams(ctx) + data := k.parseFundings(fundings, params.CoinWhitelist) return &types.QueryFundingsByPoolResponse{Fundings: data, Pagination: pageRes}, nil } -func (k Keeper) parseFundings(fundings []fundersTypes.Funding) []types.Funding { +func (k Keeper) parseFundings(fundings []fundersTypes.Funding, whitelist []*fundersTypes.WhitelistCoinEntry) []types.Funding { fundingsData := make([]types.Funding, 0) for _, funding := range fundings { fundingsData = append(fundingsData, types.Funding{ @@ -51,6 +53,7 @@ func (k Keeper) parseFundings(fundings []fundersTypes.Funding) []types.Funding { Amounts: funding.Amounts, AmountsPerBundle: funding.AmountsPerBundle, TotalFunded: funding.TotalFunded, + Score: funding.GetScore(whitelist), }) } return fundingsData diff --git a/x/query/types/funders.pb.go b/x/query/types/funders.pb.go index 43a30231..317e7373 100644 --- a/x/query/types/funders.pb.go +++ b/x/query/types/funders.pb.go @@ -176,6 +176,9 @@ type FundingStats struct { TotalAmountPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=total_amount_per_bundle,json=totalAmountPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_amount_per_bundle"` // pools_funded are the ids of the pools that have been funded by the funder. PoolsFunded []uint64 `protobuf:"varint,4,rep,packed,name=pools_funded,json=poolsFunded,proto3" json:"pools_funded,omitempty"` + // score is the result of all coins of the funder currently allocated times the coin weight + // specified in the params + Score uint64 `protobuf:"varint,5,opt,name=score,proto3" json:"score,omitempty"` } func (m *FundingStats) Reset() { *m = FundingStats{} } @@ -239,6 +242,13 @@ func (m *FundingStats) GetPoolsFunded() []uint64 { return nil } +func (m *FundingStats) GetScore() uint64 { + if m != nil { + return m.Score + } + return 0 +} + // Funding ... type Funding struct { // funder_id is the id of the funder @@ -252,6 +262,9 @@ type Funding struct { AmountsPerBundle github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amounts_per_bundle,json=amountsPerBundle,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amounts_per_bundle"` // total_funded is the total amount of coins that the funder has funded TotalFunded github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=total_funded,json=totalFunded,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_funded"` + // score is the result of all coins allocated to this pool times the coin weight specified + // by the params + Score uint64 `protobuf:"varint,6,opt,name=score,proto3" json:"score,omitempty"` } func (m *Funding) Reset() { *m = Funding{} } @@ -322,6 +335,13 @@ func (m *Funding) GetTotalFunded() github_com_cosmos_cosmos_sdk_types.Coins { return nil } +func (m *Funding) GetScore() uint64 { + if m != nil { + return m.Score + } + return 0 +} + // QueryFundersRequest is the request type for the Query/Funders RPC method. type QueryFundersRequest struct { // pagination defines an optional pagination for the request. @@ -798,72 +818,73 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/funders.proto", fileDescriptor_a182f068d9f0dba9) } var fileDescriptor_a182f068d9f0dba9 = []byte{ - // 1035 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xd8, 0x8e, 0x5d, 0xc6, 0x69, 0x64, 0xa6, 0x29, 0xd9, 0x6e, 0x5a, 0xd7, 0x35, 0x90, - 0x58, 0x11, 0xec, 0x26, 0x46, 0x54, 0x80, 0xc4, 0x21, 0xce, 0x8f, 0xca, 0x42, 0xb2, 0xc2, 0x26, - 0xa9, 0x04, 0x97, 0xd5, 0xda, 0x3b, 0x75, 0x96, 0xd8, 0x3b, 0xee, 0xce, 0x6c, 0x8b, 0xa9, 0x8a, - 0x04, 0x42, 0xa2, 0x47, 0x24, 0x8e, 0x1c, 0x11, 0x02, 0x7a, 0x82, 0x1b, 0x12, 0x12, 0xe7, 0x1e, - 0x2b, 0x71, 0xe1, 0x04, 0x28, 0x41, 0xf0, 0x4f, 0x70, 0x40, 0xf3, 0x63, 0xdd, 0xb5, 0x6b, 0xc7, - 0x45, 0x8d, 0xa5, 0x5e, 0xec, 0x99, 0x79, 0xef, 0xcd, 0xf7, 0xbd, 0x6f, 0xe6, 0x3d, 0x8f, 0x61, - 0xf1, 0xb0, 0x77, 0x0b, 0x9b, 0x37, 0x43, 0x1c, 0xf4, 0xcc, 0x5b, 0x6b, 0x0d,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a, 0x66, 0xd5, 0x01, 0xa2, 0x97, 0xe1, 0x9c, 0xac, 0x36, - 0x7b, 0xf0, 0xc6, 0x9e, 0x95, 0xab, 0xeb, 0xea, 0xde, 0x2e, 0xc0, 0x2c, 0xdf, 0xc1, 0xf6, 0x5c, - 0x71, 0x6f, 0xd3, 0x56, 0x86, 0x4f, 0x6b, 0x2e, 0xfa, 0x00, 0x66, 0x65, 0xc6, 0x74, 0x6a, 0x79, - 0x46, 0x00, 0xe8, 0x63, 0x88, 0xd4, 0x30, 0x2e, 0x6f, 0x7a, 0x4a, 0xb0, 0x79, 0x85, 0xf5, 0x48, - 0x5a, 0x0a, 0x67, 0xe5, 0x19, 0x2b, 0x69, 0x67, 0xa6, 0x84, 0x9c, 0x13, 0x28, 0xea, 0xb0, 0x42, - 0x78, 0xee, 0x5d, 0x5e, 0x92, 0xb2, 0xb5, 0x50, 0x0b, 0xdf, 0x0c, 0x31, 0x65, 0x68, 0x1b, 0xc2, - 0x47, 0x8d, 0x4e, 0x9c, 0x59, 0xae, 0xb2, 0x34, 0xc0, 0x64, 0xb0, 0x90, 0x77, 0x9c, 0x16, 0x56, - 0xb1, 0x56, 0x2c, 0x12, 0xbd, 0x00, 0x33, 0x14, 0x3b, 0x41, 0xf3, 0x40, 0xf5, 0x23, 0x35, 0x2b, - 0x7d, 0x05, 0xe0, 0xfc, 0x20, 0x2e, 0xed, 0x12, 0x9f, 0x62, 0x74, 0x6d, 0x04, 0xf0, 0xf2, 0x44, - 0x60, 0x19, 0x3c, 0x80, 0xfc, 0x16, 0xcc, 0xaa, 0x3e, 0xaf, 0x4a, 0x55, 0x1f, 0xd7, 0x80, 0x70, - 0x50, 0x4d, 0x73, 0x25, 0xad, 0x28, 0xa0, 0xe4, 0x41, 0x14, 0x23, 0x17, 0x69, 0x32, 0xbe, 0xed, - 0xbe, 0x09, 0x33, 0xbc, 0x77, 0x85, 0x54, 0xb4, 0xd6, 0xb9, 0xca, 0x95, 0x09, 0xbd, 0x2e, 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+ // 1051 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xc4, 0x8e, 0x5d, 0x9e, 0xd3, 0x28, 0x4c, 0x53, 0xb2, 0xdd, 0xb4, 0xae, 0x6b, 0x20, + 0xb1, 0x22, 0xd8, 0x4d, 0x8c, 0xa8, 0x00, 0x89, 0x43, 0x3e, 0x2b, 0x0b, 0x29, 0x0a, 0x9b, 0xa4, + 0x12, 0x5c, 0x56, 0xeb, 0xdd, 0xa9, 0xb3, 0xc4, 0xde, 0x71, 0x77, 0x76, 0x5b, 0x42, 0x55, 0x24, + 0x10, 0x12, 0x3d, 0x22, 0x71, 0xe4, 0x88, 0x10, 0x1f, 0x27, 0xb8, 0x21, 0x71, 0xe1, 0xd8, 0x63, + 0x25, 0x38, 0x70, 0x02, 0x94, 0x20, 0xf8, 0x27, 0x38, 0xa0, 0xf9, 0x58, 0x77, 0xed, 0xc6, 0x71, + 0x51, 0x63, 0xa9, 0x97, 0x64, 0x66, 0xde, 0x7b, 0xf3, 0xfb, 0xcd, 0x6f, 0xde, 0x7b, 0x3b, 0x86, + 0xf2, 0xfe, 0xc1, 0x2d, 0x62, 0xde, 0x8c, 0x49, 0x78, 0x60, 0xde, 0x5a, 0x6a, 0x90, 0xc8, 0x59, + 0x32, 0x6f, 0xc4, 0x81, 0x47, 0x42, 0x66, 0x74, 0x42, 0x1a, 0x51, 0x8c, 0xb9, 0x87, 0x21, 0x3c, + 0x0c, 0xe5, 0xa1, 0x2f, 0xb8, 0x94, 0xb5, 0x29, 0x33, 0x1b, 0x0e, 0xeb, 0x0f, 0xee, 0x38, 0x4d, + 0x3f, 0x70, 0x22, 0x9f, 0x06, 0x32, 0x5e, 0x9f, 0x6e, 0xd2, 0x26, 0x15, 0x43, 0x93, 0x8f, 0xd4, + 0xea, 0xc5, 0x26, 0xa5,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, + 0x43, 0xc0, 0x6a, 0x98, 0x16, 0x3d, 0x37, 0x22, 0xd8, 0x29, 0x85, 0xf5, 0x50, 0x70, 0x06, 0x13, + 0xf2, 0xe6, 0x95, 0xe0, 0xe3, 0x23, 0x42, 0x2e, 0x0a, 0x94, 0xfe, 0x2b, 0xcc, 0xa7, 0xaf, 0x30, + 0x86, 0x73, 0x6f, 0xf3, 0xf2, 0x95, 0x6d, 0x88, 0x59, 0xe4, 0x66, 0x4c, 0x58, 0x84, 0x37, 0x00, + 0x1e, 0x36, 0x45, 0x71, 0x93, 0xc5, 0xda, 0x5c, 0x0f, 0xbf, 0xde, 0xa2, 0xdf, 0x72, 0x9a, 0x44, + 0xc5, 0x5a, 0xa9, 0x48, 0xfc, 0x1c, 0xe4, 0x19, 0x71, 0x42, 0x77, 0x4f, 0xf5, 0x2e, 0x35, 0xab, + 0x7c, 0x81, 0x60, 0xba, 0x17, 0x97, 0x75, 0x68, 0xc0, 0x08, 0xbe, 0x76, 0x0c, 0xf0, 0xfc, 0x50, + 0x60, 0x19, 0xdc, 0x83, 0xfc, 0x06, 0x14, 0xd4, 0x37, 0x41, 0x95, 0xb5, 0x3e, 0xa8, 0x59, 0x91, + 0x70, 0x25, 0xc7, 0xf5, 0xb5, 0x92, 0x80, 0x8a, 0x0f, 0x38, 0x45, 0x2e, 0xd1, 0x64, 0x70, 0x8b, + 0x7e, 0x1d, 0xf2, 0xbc, 0xcf, 0xc5, 0x4c, 0xb4, 0xe1, 0xc9, 0xda, 0x95, 0x21, 0x7d, 0x31, 0x66, + 0x96, 0x0a, 0xa8, 0xdc, 0x43, 0x3d, 0x17, 0xd0, 0xd5, 0xa1, 0x06, 0x79, 0xc9, 0x46, 0x69, 0x70, + 0x02, 0x7b, 0x4b, 0x79, 0xe2, 0x37, 0xe1, 0xcc, 0x0d, 0x09, 0x92, 0x9c, 0x79, 0xf6, 0x04, 0x22, + 0xea, 0xd0, 0xdd, 0x90, 0xca, 0x4f, 0x08, 0x2e, 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1d, 0x55, 0xd4, + 0x77, 0xf1, 0x0f, 0x08, 0xa6, 0xfa, 0xab, 0x12, 0x2f, 0x9e, 0x88, 0x75, 0x4c, 0xfb, 0xd1, 0x97, + 0xfe, 0x47, 0x84, 0xe2, 0xf9, 0x9a, 0xe0, 0x59, 0xc3, 0x8b, 0x83, 0x78, 0xf2, 0x28, 0xbb, 0x71, + 0x60, 0x3f, 0xc2, 0xf9, 0x5b, 0x04, 0x93, 0xbd, 0x49, 0x8e, 0x8d, 0xc7, 0xc0, 0x4f, 0x15, 0xb2, + 0x6e, 0x3e, 0xb6, 0xbf, 0x62, 0x7b, 0x55, 0xb0, 0x5d, 0xc4, 0xc6, 0x30, 0xb6, 0xbc, 0x90, 0xcd, + 0x3b, 0xaa, 0xba, 0xef, 0xae, 0xac, 0xdd, 0x3f, 0x2c, 0xa1, 0x07, 0x87, 0x25, 0xf4, 0xe7, 0x61, + 0x09, 0x7d, 0x76, 0x54, 0xca, 0x3c, 0x38, 0x2a, 0x65, 0x7e, 0x3b, 0x2a, 0x65, 0xde, 0x5d, 0x48, + 0xbd, 0x17, 0xde, 0x7a, 0xe7, 0xfa, 0xfa, 0x26, 0x89, 0x6e, 0xd3, 0x70, 0xdf, 0x74, 0xf7, 0x1c, + 0x3f, 0x30, 0xdf, 0x57, 0x10, 0xe2, 0xdd, 0xd0, 0xc8, 0x8b, 0xdf, 0x24, 0xaf, 0xfc, 0x17, 0x00, + 0x00, 0xff, 0xff, 0x7b, 0x5a, 0xb5, 0xd7, 0x5e, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1159,6 +1180,11 @@ func (m *FundingStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Score != 0 { + i = encodeVarintFunders(dAtA, i, uint64(m.Score)) + i-- + dAtA[i] = 0x28 + } if len(m.PoolsFunded) > 0 { dAtA3 := make([]byte, len(m.PoolsFunded)*10) var j2 int @@ -1242,6 +1268,11 @@ func (m *Funding) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Score != 0 { + i = encodeVarintFunders(dAtA, i, uint64(m.Score)) + i-- + dAtA[i] = 0x30 + } if len(m.TotalFunded) > 0 { for iNdEx := len(m.TotalFunded) - 1; iNdEx >= 0; iNdEx-- { { @@ -1743,6 +1774,9 @@ func (m *FundingStats) Size() (n int) { } n += 1 + sovFunders(uint64(l)) + l } + if m.Score != 0 { + n += 1 + sovFunders(uint64(m.Score)) + } return n } @@ -1777,6 +1811,9 @@ func (m *Funding) Size() (n int) { n += 1 + l + sovFunders(uint64(l)) } } + if m.Score != 0 { + n += 1 + sovFunders(uint64(m.Score)) + } return n } @@ -2419,6 +2456,25 @@ func (m *FundingStats) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field PoolsFunded", wireType) } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + m.Score = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Score |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipFunders(dAtA[iNdEx:]) @@ -2622,6 +2678,25 @@ func (m *Funding) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + m.Score = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFunders + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Score |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipFunders(dAtA[iNdEx:]) From 18a69d4158378f99dfc7cdf2aa5442fb1bb95e4e Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Thu, 2 May 2024 15:01:13 +0200 Subject: [PATCH 16/28] test: fixed unit tests of x/delegation and x/bundles --- testutil/integration/integration.go | 8 + .../keeper_suite_dropped_bundles_test.go | 10 +- .../keeper_suite_funding_bundles_test.go | 150 ++++++++-------- .../keeper_suite_inflation_splitting_test.go | 168 +++++++++--------- .../keeper_suite_invalid_bundles_test.go | 14 +- x/bundles/keeper/keeper_suite_points_test.go | 8 +- .../keeper/keeper_suite_stakers_leave_test.go | 12 +- .../keeper/keeper_suite_valid_bundles_test.go | 20 +-- .../keeper_suite_zero_delegation_test.go | 18 +- x/bundles/keeper/logic_bundles.go | 11 +- x/bundles/keeper/logic_bundles_test.go | 8 +- ...ic_end_block_handle_upload_timeout_test.go | 18 +- .../msg_server_claim_uploader_role_test.go | 40 ++--- .../msg_server_skip_uploader_role_test.go | 6 +- .../msg_server_submit_bundle_proposal_test.go | 6 +- .../msg_server_vote_bundle_proposal_test.go | 6 +- x/delegation/keeper/keeper_suite_test.go | 4 +- .../keeper/msg_server_update_params_test.go | 3 - .../msg_server_withdraw_rewards_test.go | 8 +- x/funders/keeper/logic_funders.go | 5 + 20 files changed, 266 insertions(+), 257 deletions(-) diff --git a/testutil/integration/integration.go b/testutil/integration/integration.go index 6fb7cc4a..52664e97 100644 --- a/testutil/integration/integration.go +++ b/testutil/integration/integration.go @@ -68,6 +68,14 @@ var A_DENOM = "acoin" var B_DENOM = "bcoin" var C_DENOM = "ccoin" +func KYVECoin(amount int64) sdk.Coin { + return sdk.NewInt64Coin(KYVE_DENOM, amount) +} + +func KYVECoins(amount int64) sdk.Coins { + return sdk.NewCoins(KYVECoin(amount)) +} + func ACoin(amount int64) sdk.Coin { return sdk.NewInt64Coin(A_DENOM, amount) } diff --git a/x/bundles/keeper/keeper_suite_dropped_bundles_test.go b/x/bundles/keeper/keeper_suite_dropped_bundles_test.go index f695b523..29078059 100644 --- a/x/bundles/keeper/keeper_suite_dropped_bundles_test.go +++ b/x/bundles/keeper/keeper_suite_dropped_bundles_test.go @@ -58,10 +58,10 @@ var _ = Describe("dropped bundles", Ordered, func() { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ @@ -203,7 +203,7 @@ var _ = Describe("dropped bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) }) diff --git a/x/bundles/keeper/keeper_suite_funding_bundles_test.go b/x/bundles/keeper/keeper_suite_funding_bundles_test.go index c274211b..4db8e354 100644 --- a/x/bundles/keeper/keeper_suite_funding_bundles_test.go +++ b/x/bundles/keeper/keeper_suite_funding_bundles_test.go @@ -106,10 +106,10 @@ var _ = Describe("funding bundles", Ordered, func() { It("Produce a valid bundle with only one funder", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 10 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(10 * i.T_KYVE), }) s.CommitAfterSeconds(60) @@ -163,14 +163,14 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(90 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(90 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) // assert individual funds - Expect(funding.Amount).To(Equal(90 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(10 * i.KYVE)) + Expect(funding.Amounts[0].Amount.Uint64()).To(Equal(90 * i.KYVE)) + Expect(funding.TotalFunded[0].Amount.Uint64()).To(Equal(10 * i.KYVE)) // assert individual balances balanceAlice := s.GetBalanceFromAddress(i.ALICE) @@ -180,17 +180,17 @@ var _ = Describe("funding bundles", Ordered, func() { It("Produce a valid bundle with multiple funders and same funding amounts", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 10 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(10 * i.T_KYVE), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 10 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(10 * i.T_KYVE), }) s.CommitAfterSeconds(60) @@ -244,17 +244,17 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(180 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(180 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) fundingAlice, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) fundingBob, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) // assert individual funds - Expect(fundingAlice.Amount).To(Equal(90 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(10 * i.KYVE)) - Expect(fundingBob.Amount).To(Equal(90 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(10 * i.KYVE)) + Expect(fundingAlice.Amounts[0].Amount.Uint64()).To(Equal(90 * i.KYVE)) + Expect(fundingAlice.TotalFunded[0].Amount.Uint64()).To(Equal(10 * i.KYVE)) + Expect(fundingBob.Amounts[0].Amount.Uint64()).To(Equal(90 * i.KYVE)) + Expect(fundingBob.TotalFunded[0].Amount.Uint64()).To(Equal(10 * i.KYVE)) // assert individual balances balanceAlice := s.GetBalanceFromAddress(i.ALICE) @@ -267,17 +267,17 @@ var _ = Describe("funding bundles", Ordered, func() { It("Produce a valid bundle with multiple funders and different funding amounts", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 150 * i.KYVE, - AmountPerBundle: 15 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(150 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(15 * i.T_KYVE), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 50 * i.KYVE, - AmountPerBundle: 5 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(50 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5 * i.T_KYVE), }) s.CommitAfterSeconds(60) @@ -331,17 +331,17 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(180 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(180 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) fundingAlice, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) fundingBob, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) // assert individual funds - Expect(fundingAlice.Amount).To(Equal(135 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(15 * i.KYVE)) - Expect(fundingBob.Amount).To(Equal(45 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(5 * i.KYVE)) + Expect(fundingAlice.Amounts[0].Amount.Uint64()).To(Equal(135 * i.KYVE)) + Expect(fundingAlice.TotalFunded[0].Amount.Uint64()).To(Equal(15 * i.KYVE)) + Expect(fundingBob.Amounts[0].Amount.Uint64()).To(Equal(45 * i.KYVE)) + Expect(fundingBob.TotalFunded[0].Amount.Uint64()).To(Equal(5 * i.KYVE)) // assert individual balances balanceAlice := s.GetBalanceFromAddress(i.ALICE) @@ -354,17 +354,17 @@ var _ = Describe("funding bundles", Ordered, func() { It("Produce a valid bundle with multiple funders and different funding amounts where not everyone can afford the full funds", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 10 * i.KYVE, - AmountPerBundle: 50 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(10 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(50 * i.T_KYVE), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 50 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(50 * i.T_KYVE), }) s.CommitAfterSeconds(60) @@ -418,7 +418,7 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(50 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(50 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.BOB)) @@ -426,10 +426,10 @@ var _ = Describe("funding bundles", Ordered, func() { fundingBob, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) // assert individual funds - Expect(fundingAlice.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(10 * i.KYVE)) - Expect(fundingBob.Amount).To(Equal(50 * i.KYVE)) - Expect(fundingBob.TotalFunded).To(Equal(50 * i.KYVE)) + Expect(fundingAlice.Amounts.IsZero()).To(BeTrue()) + Expect(fundingAlice.TotalFunded[0].Amount.Uint64()).To(Equal(10 * i.KYVE)) + Expect(fundingBob.Amounts[0].Amount.Uint64()).To(Equal(50 * i.KYVE)) + Expect(fundingBob.TotalFunded[0].Amount.Uint64()).To(Equal(50 * i.KYVE)) // assert individual balances balanceAlice := s.GetBalanceFromAddress(i.ALICE) @@ -442,10 +442,10 @@ var _ = Describe("funding bundles", Ordered, func() { It("Produce a valid bundle although the only funder can not pay for the full bundle reward", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 10 * i.KYVE, - AmountPerBundle: 20 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(10 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(20 * i.T_KYVE), }) s.CommitAfterSeconds(60) @@ -499,14 +499,14 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(0 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId).IsZero()).To(BeTrue()) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) fundingAlice, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) // assert individual funds - Expect(fundingAlice.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(10 * i.KYVE)) + Expect(fundingAlice.Amounts.IsZero()).To(BeTrue()) + Expect(fundingAlice.TotalFunded[0].Amount.Uint64()).To(Equal(10 * i.KYVE)) // assert individual balances balanceAlice := s.GetBalanceFromAddress(i.ALICE) @@ -516,17 +516,17 @@ var _ = Describe("funding bundles", Ordered, func() { It("Produce a valid bundle although multiple funders with same amount can not pay for the bundle reward", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 10 * i.KYVE, - AmountPerBundle: 20 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(10 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(20 * i.T_KYVE), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 10 * i.KYVE, - AmountPerBundle: 20 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(10 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(20 * i.T_KYVE), }) s.CommitAfterSeconds(60) @@ -581,7 +581,7 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(uint64(0))) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId).IsZero()).To(BeTrue()) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) // assert individual balances @@ -595,17 +595,17 @@ var _ = Describe("funding bundles", Ordered, func() { It("Produce a dropped bundle because multiple funders with different amount can not pay for the bundle reward", func() { // ARRANGE s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 10 * i.KYVE, - AmountPerBundle: 10 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(10 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(10 * i.T_KYVE), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 20 * i.KYVE, - AmountPerBundle: 20 * i.KYVE, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(20 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(20 * i.T_KYVE), }) s.CommitAfterSeconds(60) @@ -659,14 +659,14 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(0 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId).IsZero()).To(BeTrue()) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) fundingAlice, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) // assert individual funds - Expect(fundingAlice.Amount).To(Equal(0 * i.KYVE)) - Expect(fundingAlice.TotalFunded).To(Equal(10 * i.KYVE)) + Expect(fundingAlice.Amounts.IsZero()).To(BeTrue()) + Expect(fundingAlice.TotalFunded[0].Amount.Uint64()).To(Equal(10 * i.KYVE)) // assert individual balances balanceAlice := s.GetBalanceFromAddress(i.ALICE) @@ -702,7 +702,7 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(0 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId).IsZero()).To(BeTrue()) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) s.CommitAfterSeconds(60) @@ -732,7 +732,7 @@ var _ = Describe("funding bundles", Ordered, func() { fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(0 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId).IsZero()).To(BeTrue()) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) }) }) diff --git a/x/bundles/keeper/keeper_suite_inflation_splitting_test.go b/x/bundles/keeper/keeper_suite_inflation_splitting_test.go index e0586d69..0978e5b4 100644 --- a/x/bundles/keeper/keeper_suite_inflation_splitting_test.go +++ b/x/bundles/keeper/keeper_suite_inflation_splitting_test.go @@ -60,9 +60,9 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxPoolSuccess(msg) - params := s.App().FundersKeeper.GetParams(s.Ctx()) - params.MinFundingAmountPerBundle = 1_000 - params.MinFundingAmount = 100 + params := funderstypes.DefaultParams() + params.CoinWhitelist[0].MinFundingAmount = 100 + params.CoinWhitelist[0].MinFundingAmountPerBundle = 1_000 params.MinFundingMultiple = 0 s.App().FundersKeeper.SetParams(s.Ctx(), params) @@ -390,17 +390,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -479,7 +479,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(200*i.KYVE - 10_000)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(200*i.KYVE - 10_000)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) }) @@ -496,17 +496,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -586,7 +586,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(200*i.KYVE - 10_000)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(200*i.KYVE - 10_000)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) }) @@ -603,17 +603,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -693,7 +693,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(200*i.KYVE - 10_000)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(200*i.KYVE - 10_000)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) }) @@ -710,17 +710,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 200, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(200), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -798,7 +798,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(BeZero()) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId).IsZero()).To(BeTrue()) Expect(fundingState.ActiveFunderAddresses).To(BeEmpty()) }) @@ -815,17 +815,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 200, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(200), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -905,7 +905,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(BeZero()) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId).IsZero()).To(BeTrue()) Expect(fundingState.ActiveFunderAddresses).To(BeEmpty()) }) @@ -922,17 +922,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 200, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(200), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -1012,7 +1012,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(BeZero()) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId).IsZero()).To(BeTrue()) Expect(fundingState.ActiveFunderAddresses).To(BeEmpty()) }) @@ -1029,17 +1029,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 200, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(200), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -1117,7 +1117,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 5_000)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 5_000)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -1134,17 +1134,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 200, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(200), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -1224,7 +1224,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 5_000)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 5_000)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -1241,17 +1241,17 @@ var _ = Describe("inflation splitting", Ordered, func() { } s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 5_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.BOB, - PoolId: 0, - Amount: 200, - AmountPerBundle: 5_000, + Creator: i.BOB, + PoolId: 0, + Amounts: i.KYVECoins(200), + AmountsPerBundle: i.KYVECoins(5_000), }) s.RunTxBundlesSuccess(&bundletypes.MsgSubmitBundleProposal{ @@ -1331,7 +1331,7 @@ var _ = Describe("inflation splitting", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 5_000)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 5_000)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) }) diff --git a/x/bundles/keeper/keeper_suite_invalid_bundles_test.go b/x/bundles/keeper/keeper_suite_invalid_bundles_test.go index 22f317b0..e2b2e161 100644 --- a/x/bundles/keeper/keeper_suite_invalid_bundles_test.go +++ b/x/bundles/keeper/keeper_suite_invalid_bundles_test.go @@ -65,10 +65,10 @@ var _ = Describe("invalid bundles", Ordered, func() { }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ @@ -260,7 +260,7 @@ var _ = Describe("invalid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -431,7 +431,7 @@ var _ = Describe("invalid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -649,7 +649,7 @@ var _ = Describe("invalid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) }) diff --git a/x/bundles/keeper/keeper_suite_points_test.go b/x/bundles/keeper/keeper_suite_points_test.go index 833d5522..7073612a 100644 --- a/x/bundles/keeper/keeper_suite_points_test.go +++ b/x/bundles/keeper/keeper_suite_points_test.go @@ -59,10 +59,10 @@ var _ = Describe("points", Ordered, func() { }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ diff --git a/x/bundles/keeper/keeper_suite_stakers_leave_test.go b/x/bundles/keeper/keeper_suite_stakers_leave_test.go index 007dad85..74ad906e 100644 --- a/x/bundles/keeper/keeper_suite_stakers_leave_test.go +++ b/x/bundles/keeper/keeper_suite_stakers_leave_test.go @@ -60,15 +60,15 @@ var _ = Describe("stakers leave", Ordered, func() { Moniker: "Alice", }) - params := s.App().FundersKeeper.GetParams(s.Ctx()) - params.MinFundingAmountPerBundle = 10_000 + params := funderstypes.DefaultParams() + params.CoinWhitelist[0].MinFundingAmountPerBundle = 10_000 s.App().FundersKeeper.SetParams(s.Ctx(), params) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 10_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(10_000), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ diff --git a/x/bundles/keeper/keeper_suite_valid_bundles_test.go b/x/bundles/keeper/keeper_suite_valid_bundles_test.go index 8726437b..d03152d5 100644 --- a/x/bundles/keeper/keeper_suite_valid_bundles_test.go +++ b/x/bundles/keeper/keeper_suite_valid_bundles_test.go @@ -70,13 +70,13 @@ var _ = Describe("valid bundles", Ordered, func() { Moniker: "Alice", }) - params := s.App().FundersKeeper.GetParams(s.Ctx()) - params.MinFundingAmountPerBundle = amountPerBundle + params := fundersTypes.DefaultParams() + params.CoinWhitelist[0].MinFundingAmountPerBundle = amountPerBundle s.App().FundersKeeper.SetParams(s.Ctx(), params) s.RunTxPoolSuccess(&fundersTypes.MsgFundPool{ - Creator: i.ALICE, - Amount: 100 * i.KYVE, - AmountPerBundle: amountPerBundle, + Creator: i.ALICE, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(int64(amountPerBundle)), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ @@ -250,7 +250,7 @@ var _ = Describe("valid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 1*amountPerBundle)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 1*amountPerBundle)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -411,7 +411,7 @@ var _ = Describe("valid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 1*amountPerBundle)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 1*amountPerBundle)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -582,7 +582,7 @@ var _ = Describe("valid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 1*amountPerBundle)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 1*amountPerBundle)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -761,7 +761,7 @@ var _ = Describe("valid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 1*amountPerBundle)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 1*amountPerBundle)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -950,7 +950,7 @@ var _ = Describe("valid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 1*amountPerBundle)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 1*amountPerBundle)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) }) diff --git a/x/bundles/keeper/keeper_suite_zero_delegation_test.go b/x/bundles/keeper/keeper_suite_zero_delegation_test.go index 27433b78..6543f024 100644 --- a/x/bundles/keeper/keeper_suite_zero_delegation_test.go +++ b/x/bundles/keeper/keeper_suite_zero_delegation_test.go @@ -60,8 +60,8 @@ var _ = Describe("zero delegation", Ordered, func() { } s.RunTxPoolSuccess(msg) - params := s.App().FundersKeeper.GetParams(s.Ctx()) - params.MinFundingAmountPerBundle = amountPerBundle + params := funderstypes.DefaultParams() + params.CoinWhitelist[0].MinFundingAmountPerBundle = amountPerBundle s.App().FundersKeeper.SetParams(s.Ctx(), params) // create funders @@ -71,10 +71,10 @@ var _ = Describe("zero delegation", Ordered, func() { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: amountPerBundle, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(int64(amountPerBundle)), }) s.CommitAfterSeconds(60) @@ -479,7 +479,7 @@ var _ = Describe("zero delegation", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 1*amountPerBundle)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 1*amountPerBundle)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -651,7 +651,7 @@ var _ = Describe("zero delegation", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) @@ -909,7 +909,7 @@ var _ = Describe("zero delegation", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100 * i.KYVE)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) }) diff --git a/x/bundles/keeper/logic_bundles.go b/x/bundles/keeper/logic_bundles.go index ea047eab..277c3ee7 100644 --- a/x/bundles/keeper/logic_bundles.go +++ b/x/bundles/keeper/logic_bundles.go @@ -3,7 +3,6 @@ package keeper import ( "cosmossdk.io/errors" "cosmossdk.io/math" - "fmt" globalTypes "github.com/KYVENetwork/chain/x/global/types" poolTypes "github.com/KYVENetwork/chain/x/pool/types" @@ -532,9 +531,9 @@ func (k msgServer) tallyBundleProposal(ctx sdk.Context, bundleProposal types.Bun return types.TallyResult{}, err } - found, fundersPayout := fundersPayouts.Find(globalTypes.Denom) - if !found { - return types.TallyResult{}, fmt.Errorf("could not find denom ukyve in payouts") + fundersPayout := uint64(0) + if found, payout := fundersPayouts.Find(globalTypes.Denom); found { + fundersPayout = payout.Amount.Uint64() } // charge the inflation pool @@ -544,7 +543,7 @@ func (k msgServer) tallyBundleProposal(ctx sdk.Context, bundleProposal types.Bun } // calculate payouts to the different stakeholders like treasury, uploader and delegators - bundleReward := k.calculatePayouts(ctx, poolId, fundersPayout.Amount.Uint64()+inflationPayout) + bundleReward := k.calculatePayouts(ctx, poolId, fundersPayout+inflationPayout) // payout rewards to treasury if err := util.TransferFromModuleToTreasury(k.accountKeeper, k.distrkeeper, ctx, poolTypes.ModuleName, bundleReward.Treasury); err != nil { @@ -569,7 +568,7 @@ func (k msgServer) tallyBundleProposal(ctx sdk.Context, bundleProposal types.Bun return types.TallyResult{ Status: types.TallyResultValid, VoteDistribution: voteDistribution, - FundersPayout: fundersPayout.Amount.Uint64(), + FundersPayout: fundersPayout, InflationPayout: inflationPayout, BundleReward: bundleReward, }, nil diff --git a/x/bundles/keeper/logic_bundles_test.go b/x/bundles/keeper/logic_bundles_test.go index 3d7d6195..368efda4 100644 --- a/x/bundles/keeper/logic_bundles_test.go +++ b/x/bundles/keeper/logic_bundles_test.go @@ -70,10 +70,10 @@ var _ = Describe("logic_bundles.go", Ordered, func() { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) }) diff --git a/x/bundles/keeper/logic_end_block_handle_upload_timeout_test.go b/x/bundles/keeper/logic_end_block_handle_upload_timeout_test.go index 13d79f97..a2bc8cc7 100644 --- a/x/bundles/keeper/logic_end_block_handle_upload_timeout_test.go +++ b/x/bundles/keeper/logic_end_block_handle_upload_timeout_test.go @@ -71,10 +71,10 @@ var _ = Describe("logic_end_block_handle_upload_timeout.go", Ordered, func() { }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ @@ -115,7 +115,7 @@ var _ = Describe("logic_end_block_handle_upload_timeout.go", Ordered, func() { s.RunTxPoolSuccess(&funderstypes.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 100 * i.KYVE, + Amounts: i.KYVECoins(100 * i.T_KYVE), }) // ACT @@ -1031,10 +1031,10 @@ var _ = Describe("logic_end_block_handle_upload_timeout.go", Ordered, func() { s.RunTxPoolSuccess(msg) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 1, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 1, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{ diff --git a/x/bundles/keeper/msg_server_claim_uploader_role_test.go b/x/bundles/keeper/msg_server_claim_uploader_role_test.go index c070b533..59f63b2c 100644 --- a/x/bundles/keeper/msg_server_claim_uploader_role_test.go +++ b/x/bundles/keeper/msg_server_claim_uploader_role_test.go @@ -102,10 +102,10 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { It("Try to claim uploader role without being a staker", func() { // ARRANGE s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) // ACT @@ -123,10 +123,10 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { It("Try to claim uploader role if the next uploader is not set yet", func() { // ARRANGE s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) // ACT @@ -159,10 +159,10 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { It("Try to claim uploader role with non existing valaccount", func() { // ARRANGE s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) // ACT @@ -180,10 +180,10 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { It("Try to claim uploader role with valaccount that belongs to another pool", func() { // ARRANGE s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) msg := &pooltypes.MsgCreatePool{ @@ -225,10 +225,10 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { It("Try to claim uploader role if someone else is already next uploader", func() { // ARRANGE s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxBundlesSuccess(&bundletypes.MsgClaimUploaderRole{ diff --git a/x/bundles/keeper/msg_server_skip_uploader_role_test.go b/x/bundles/keeper/msg_server_skip_uploader_role_test.go index a1c5aa0f..36e9b134 100644 --- a/x/bundles/keeper/msg_server_skip_uploader_role_test.go +++ b/x/bundles/keeper/msg_server_skip_uploader_role_test.go @@ -56,9 +56,9 @@ var _ = Describe("msg_server_skip_uploader_role.go", Ordered, func() { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ diff --git a/x/bundles/keeper/msg_server_submit_bundle_proposal_test.go b/x/bundles/keeper/msg_server_submit_bundle_proposal_test.go index 7f0c7157..bbd42cf4 100644 --- a/x/bundles/keeper/msg_server_submit_bundle_proposal_test.go +++ b/x/bundles/keeper/msg_server_submit_bundle_proposal_test.go @@ -62,9 +62,9 @@ var _ = Describe("msg_server_submit_bundle_proposal.go", Ordered, func() { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.STAKER_0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.STAKER_0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ diff --git a/x/bundles/keeper/msg_server_vote_bundle_proposal_test.go b/x/bundles/keeper/msg_server_vote_bundle_proposal_test.go index 7cdb9d50..899bb46e 100644 --- a/x/bundles/keeper/msg_server_vote_bundle_proposal_test.go +++ b/x/bundles/keeper/msg_server_vote_bundle_proposal_test.go @@ -60,9 +60,9 @@ var _ = Describe("msg_server_vote_bundle_proposal.go", Ordered, func() { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ diff --git a/x/delegation/keeper/keeper_suite_test.go b/x/delegation/keeper/keeper_suite_test.go index 53209734..55485e92 100644 --- a/x/delegation/keeper/keeper_suite_test.go +++ b/x/delegation/keeper/keeper_suite_test.go @@ -35,7 +35,7 @@ func PayoutRewards(s *i.KeeperTestSuite, staker string, amount uint64) { Expect(err).To(BeNil()) err = s.App().DelegationKeeper.PayoutRewards(s.Ctx(), staker, amount, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) - Expect(amount).To(Equal(payout)) + Expect(amount).To(Equal(payout[0].Amount.Uint64())) } func CreateFundedPool(s *i.KeeperTestSuite) { @@ -76,7 +76,7 @@ func CreateFundedPool(s *i.KeeperTestSuite) { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100 * i.KYVE)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100 * i.KYVE)) } func CheckAndContinueChainForOneMonth(s *i.KeeperTestSuite) { diff --git a/x/delegation/keeper/msg_server_update_params_test.go b/x/delegation/keeper/msg_server_update_params_test.go index 216c4b3e..3efaf9a9 100644 --- a/x/delegation/keeper/msg_server_update_params_test.go +++ b/x/delegation/keeper/msg_server_update_params_test.go @@ -1,8 +1,6 @@ package keeper_test import ( - "fmt" - "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" @@ -518,7 +516,6 @@ var _ = Describe("msg_server_update_params.go", Ordered, func() { // ASSERT updatedParams := s.App().DelegationKeeper.GetParams(s.Ctx()) - fmt.Println(msg.ValidateBasic()) Expect(submitErr).To(HaveOccurred()) Expect(updatedParams.UnbondingDelegationTime).To(Equal(types.DefaultUnbondingDelegationTime)) diff --git a/x/delegation/keeper/msg_server_withdraw_rewards_test.go b/x/delegation/keeper/msg_server_withdraw_rewards_test.go index 1d32e1fb..d486044e 100644 --- a/x/delegation/keeper/msg_server_withdraw_rewards_test.go +++ b/x/delegation/keeper/msg_server_withdraw_rewards_test.go @@ -156,10 +156,10 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { // fund pool module s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) // ACT diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index 832ec493..c14f1939 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -137,6 +137,11 @@ func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding types.Funding return types.ErrMinAmountPerBundle } + // if MinFundingMultiple is zero we can already return + if params.MinFundingMultiple == 0 { + return nil + } + // throw error if a coin can not fulfill the funding multiple threshold if funding.AmountsPerBundle.MulInt(math.NewInt(int64(params.MinFundingMultiple))).IsAnyGT(funding.Amounts) { return types.ErrMinFundingMultiple From 5ccc1addc1f201714d26f36e7e837a012e8753e4 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Thu, 2 May 2024 15:13:39 +0200 Subject: [PATCH 17/28] test: fixed remaining unit tests --- x/funders/types/funders_test.go | 90 ++++++++++--------- x/global/ante_test.go | 2 +- x/pool/keeper/msg_server_disable_pool_test.go | 16 ++-- x/query/keeper/grpc_query_can_propose_test.go | 10 +-- x/query/keeper/grpc_query_can_vote_test.go | 10 +-- ...sg_server_claim_commission_rewards_test.go | 14 +-- 6 files changed, 75 insertions(+), 67 deletions(-) diff --git a/x/funders/types/funders_test.go b/x/funders/types/funders_test.go index 47763b61..d0476220 100644 --- a/x/funders/types/funders_test.go +++ b/x/funders/types/funders_test.go @@ -1,8 +1,11 @@ package types_test import ( + "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" "github.com/KYVENetwork/chain/x/funders/types" + globaltypes "github.com/KYVENetwork/chain/x/global/types" + sdk "github.com/cosmos/cosmos-sdk/types" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -24,16 +27,48 @@ TEST CASES - funders.go */ var _ = Describe("logic_funders.go", Ordered, func() { + s := i.NewCleanChain() + funding := types.Funding{} fundingState := types.FundingState{} + var whitelist []*types.WhitelistCoinEntry BeforeEach(func() { + // set whitelist + whitelist = []*types.WhitelistCoinEntry{ + { + CoinDenom: globaltypes.Denom, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.A_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(1), + }, + { + CoinDenom: i.B_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(2), + }, + { + CoinDenom: i.C_DENOM, + MinFundingAmount: 10 * i.KYVE, + MinFundingAmountPerBundle: 1 * i.KYVE, + CoinWeight: math.LegacyNewDec(3), + }, + } + s.App().FundersKeeper.SetParams(s.Ctx(), types.NewParams(whitelist, 20)) + funding = types.Funding{ - FunderAddress: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, - TotalFunded: 0, + FunderAddress: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + TotalFunded: sdk.NewCoins(), } fundingState = types.FundingState{ PoolId: 0, @@ -41,54 +76,27 @@ var _ = Describe("logic_funders.go", Ordered, func() { } }) - It("Funding.AddAmount", func() { - // ACT - funding.AddAmount(100 * i.KYVE) - - // ASSERT - Expect(funding.Amount).To(Equal(200 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(uint64(0))) - }) - - It("Funding.SubtractAmount", func() { - // ACT - funding.SubtractAmount(50 * i.KYVE) - - // ASSERT - Expect(funding.Amount).To(Equal(50 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(uint64(0))) - }) - - It("Funding.SubtractAmount - subtract more than available", func() { - // ACT - subtracted := funding.SubtractAmount(200 * i.KYVE) - - // ASSERT - Expect(subtracted).To(Equal(100 * i.KYVE)) - Expect(funding.Amount).To(Equal(uint64(0))) - }) - It("Funding.ChargeOneBundle", func() { // ACT - amount := funding.ChargeOneBundle() + amounts := funding.ChargeOneBundle() // ASSERT - Expect(amount).To(Equal(1 * i.KYVE)) - Expect(funding.Amount).To(Equal(99 * i.KYVE)) - Expect(funding.TotalFunded).To(Equal(1 * i.KYVE)) + Expect(amounts.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.Amounts.String()).To(Equal(i.ACoins(99 * i.T_KYVE).String())) + Expect(funding.TotalFunded.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) }) It("Funding.ChargeOneBundle - charge more than available", func() { // ARRANGE - funding.Amount = 1 * i.KYVE / 2 + funding.Amounts = i.ACoins(1 * i.T_KYVE / 2) // ACT - amount := funding.ChargeOneBundle() + amounts := funding.ChargeOneBundle() // ASSERT - Expect(amount).To(Equal(1 * i.KYVE / 2)) - Expect(funding.Amount).To(Equal(uint64(0))) - Expect(funding.TotalFunded).To(Equal(1 * i.KYVE / 2)) + Expect(amounts.String()).To(Equal(i.ACoins(1 * i.T_KYVE / 2).String())) + Expect(funding.Amounts.IsZero()).To(BeTrue()) + Expect(funding.TotalFunded.String()).To(Equal(i.ACoins(1 * i.T_KYVE / 2).String())) }) It("FundintState.SetActive", func() { diff --git a/x/global/ante_test.go b/x/global/ante_test.go index d32b7410..3b9e6951 100644 --- a/x/global/ante_test.go +++ b/x/global/ante_test.go @@ -291,7 +291,7 @@ var _ = Describe("GasAdjustmentDecorator", Ordered, func() { // NOTE: This will change as implementation changes. // TODO: Why does this change as the implementation changes? - BaseCost := 32716 + BaseCost := 63439 BeforeEach(func() { s = i.NewCleanChain() diff --git a/x/pool/keeper/msg_server_disable_pool_test.go b/x/pool/keeper/msg_server_disable_pool_test.go index bab9a2e1..426bab03 100644 --- a/x/pool/keeper/msg_server_disable_pool_test.go +++ b/x/pool/keeper/msg_server_disable_pool_test.go @@ -70,10 +70,10 @@ var _ = Describe("msg_server_disable_pool.go", Ordered, func() { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: fundingAmount, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(int64(fundingAmount)), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) msg = &types.MsgCreatePool{ @@ -95,10 +95,10 @@ var _ = Describe("msg_server_disable_pool.go", Ordered, func() { s.RunTxPoolSuccess(msg) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 1, - Amount: fundingAmount, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 1, + Amounts: i.KYVECoins(int64(fundingAmount)), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) }) diff --git a/x/query/keeper/grpc_query_can_propose_test.go b/x/query/keeper/grpc_query_can_propose_test.go index 201a09cf..99920d8f 100644 --- a/x/query/keeper/grpc_query_can_propose_test.go +++ b/x/query/keeper/grpc_query_can_propose_test.go @@ -54,10 +54,10 @@ var _ = Describe("grpc_query_can_propose.go", Ordered, func() { }) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ @@ -528,7 +528,7 @@ var _ = Describe("grpc_query_can_propose.go", Ordered, func() { s.RunTxPoolSuccess(&funderstypes.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 100 * i.KYVE, + Amounts: i.KYVECoins(100 * i.T_KYVE), }) // ACT diff --git a/x/query/keeper/grpc_query_can_vote_test.go b/x/query/keeper/grpc_query_can_vote_test.go index af9e14a1..ede75f43 100644 --- a/x/query/keeper/grpc_query_can_vote_test.go +++ b/x/query/keeper/grpc_query_can_vote_test.go @@ -55,10 +55,10 @@ var _ = Describe("grpc_query_can_vote.go", Ordered, func() { }) s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 1 * i.KYVE, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), }) s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ @@ -477,7 +477,7 @@ var _ = Describe("grpc_query_can_vote.go", Ordered, func() { s.RunTxPoolSuccess(&funderstypes.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, - Amount: 100 * i.KYVE, + Amounts: i.KYVECoins(100 * i.T_KYVE), }) // ACT diff --git a/x/stakers/keeper/msg_server_claim_commission_rewards_test.go b/x/stakers/keeper/msg_server_claim_commission_rewards_test.go index c6da4844..507c40de 100644 --- a/x/stakers/keeper/msg_server_claim_commission_rewards_test.go +++ b/x/stakers/keeper/msg_server_claim_commission_rewards_test.go @@ -89,16 +89,16 @@ var _ = Describe("msg_server_claim_commission_rewards.go", Ordered, func() { Moniker: "Alice", }) - params := s.App().FundersKeeper.GetParams(s.Ctx()) - params.MinFundingAmountPerBundle = 10_000 + params := funderstypes.DefaultParams() + params.CoinWhitelist[0].MinFundingAmountPerBundle = 10_000 s.App().FundersKeeper.SetParams(s.Ctx(), params) // create a valid bundle so that uploader earns commission rewards s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amount: 100 * i.KYVE, - AmountPerBundle: 10_000, + Creator: i.ALICE, + PoolId: 0, + Amounts: i.KYVECoins(100 * i.T_KYVE), + AmountsPerBundle: i.KYVECoins(10_000), }) s.CommitAfterSeconds(60) @@ -181,7 +181,7 @@ var _ = Describe("msg_server_claim_commission_rewards.go", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 10_000)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 10_000)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) From a7cb0870cc96bdda8a256c36d24b69f43f88e698 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Thu, 2 May 2024 15:34:57 +0200 Subject: [PATCH 18/28] chore: run make all --- proto/kyve/funders/v1beta1/events.proto | 16 +-- proto/kyve/funders/v1beta1/funders.proto | 14 +-- proto/kyve/funders/v1beta1/params.proto | 4 +- proto/kyve/funders/v1beta1/tx.proto | 17 ++- proto/kyve/query/v1beta1/account.proto | 12 +- proto/kyve/query/v1beta1/funders.proto | 28 ++--- proto/kyve/query/v1beta1/query.proto | 8 +- testutil/integration/checks.go | 3 +- testutil/integration/integration.go | 10 +- .../msg_server_submit_bundle_proposal.go | 1 + x/delegation/keeper/keeper_suite_test.go | 3 +- x/funders/keeper/logic_funders.go | 3 +- x/funders/types/events.pb.go | 64 +++++----- x/funders/types/funders.pb.go | 66 +++++----- x/funders/types/funders_test.go | 41 +++++-- x/funders/types/params.go | 4 +- x/funders/types/tx.pb.go | 87 +++++++------ x/query/types/account.pb.go | 108 ++++++++-------- x/query/types/funders.pb.go | 116 +++++++++--------- x/query/types/query.pb.go | 94 +++++++------- 20 files changed, 366 insertions(+), 333 deletions(-) diff --git a/proto/kyve/funders/v1beta1/events.proto b/proto/kyve/funders/v1beta1/events.proto index 35391f0a..b467a0b6 100644 --- a/proto/kyve/funders/v1beta1/events.proto +++ b/proto/kyve/funders/v1beta1/events.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package kyve.funders.v1beta1; -import "kyve/funders/v1beta1/params.proto"; +import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; -import "amino/amino.proto"; +import "kyve/funders/v1beta1/params.proto"; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; @@ -63,14 +63,14 @@ message EventFundPool { string address = 2; // amounts is a list of coins the funder has funded repeated cosmos.base.v1beta1.Coin amounts = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // amounts_per_bundle is a list of coins the funder wants to distribute per finalized bundle repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } @@ -84,8 +84,8 @@ message EventDefundPool { string address = 2; // amounts is a list of coins that the funder wants to defund repeated cosmos.base.v1beta1.Coin amounts = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/proto/kyve/funders/v1beta1/funders.proto b/proto/kyve/funders/v1beta1/funders.proto index 382874b0..ec9445be 100644 --- a/proto/kyve/funders/v1beta1/funders.proto +++ b/proto/kyve/funders/v1beta1/funders.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package kyve.funders.v1beta1; +import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; -import "amino/amino.proto"; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; @@ -35,21 +35,21 @@ message Funding { uint64 pool_id = 2; // amounts is a list of coins the funder wants to fund the pool with repeated cosmos.base.v1beta1.Coin amounts = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // amounts_per_bundle defines the amount of each coin that are distributed // per finalized bundle repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // total_funded is the total amount of coins that the funder has funded repeated cosmos.base.v1beta1.Coin total_funded = 5 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/proto/kyve/funders/v1beta1/params.proto b/proto/kyve/funders/v1beta1/params.proto index f7f22bab..270712ba 100644 --- a/proto/kyve/funders/v1beta1/params.proto +++ b/proto/kyve/funders/v1beta1/params.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package kyve.funders.v1beta1; -option go_package = "github.com/KYVENetwork/chain/x/funders/types"; - import "kyve/funders/v1beta1/funders.proto"; +option go_package = "github.com/KYVENetwork/chain/x/funders/types"; + // Params defines the funders module parameters. message Params { // coin_whitelist is a list of coins that are allowed to fund a pool diff --git a/proto/kyve/funders/v1beta1/tx.proto b/proto/kyve/funders/v1beta1/tx.proto index 5509ab43..d08586f2 100644 --- a/proto/kyve/funders/v1beta1/tx.proto +++ b/proto/kyve/funders/v1beta1/tx.proto @@ -2,12 +2,11 @@ syntax = "proto3"; package kyve.funders.v1beta1; +import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; -import "amino/amino.proto"; -import "kyve/funders/v1beta1/funders.proto"; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; @@ -77,15 +76,15 @@ message MsgFundPool { uint64 pool_id = 2; // amounts is a list of coins the creator wants to fund repeated cosmos.base.v1beta1.Coin amounts = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // amounts_per_bundle is a list of coins the creator wants to distribute // per finalized bundle repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } @@ -102,8 +101,8 @@ message MsgDefundPool { uint64 pool_id = 2; // amounts is a list of coins the creator wants to defund from the pool repeated cosmos.base.v1beta1.Coin amounts = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/proto/kyve/query/v1beta1/account.proto b/proto/kyve/query/v1beta1/account.proto index acf941c3..869da272 100644 --- a/proto/kyve/query/v1beta1/account.proto +++ b/proto/kyve/query/v1beta1/account.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package kyve.query.v1beta1; +import "amino/amino.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "amino/amino.proto"; import "kyve/query/v1beta1/query.proto"; option go_package = "github.com/KYVENetwork/chain/x/query/types"; @@ -60,8 +60,8 @@ message QueryAccountAssetsResponse { uint64 protocol_rewards = 6; // protocol_funding ... repeated cosmos.base.v1beta1.Coin protocol_funding = 7 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } @@ -120,8 +120,8 @@ message QueryAccountFundedListResponse { message Funded { // amounts ... repeated cosmos.base.v1beta1.Coin amounts = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // pool ... diff --git a/proto/kyve/query/v1beta1/funders.proto b/proto/kyve/query/v1beta1/funders.proto index 9492a537..8c9f36d6 100644 --- a/proto/kyve/query/v1beta1/funders.proto +++ b/proto/kyve/query/v1beta1/funders.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package kyve.query.v1beta1; +import "amino/amino.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "amino/amino.proto"; option go_package = "github.com/KYVENetwork/chain/x/query/types"; @@ -56,21 +56,21 @@ message Funder { message FundingStats { // total_used_funds are the total funds that have been distributed by the funder. repeated cosmos.base.v1beta1.Coin total_used_funds = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // total_allocated_funds are the total funds that have been allocated by the funder. // They can either get distributed or refunded. repeated cosmos.base.v1beta1.Coin total_allocated_funds = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // total_amount_per_bundle is the total amount per bundle of all fundings of the funder. repeated cosmos.base.v1beta1.Coin total_amount_per_bundle = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // pools_funded are the ids of the pools that have been funded by the funder. @@ -88,21 +88,21 @@ message Funding { uint64 pool_id = 2; // amounts is a list of coins the funder wants to fund the pool with repeated cosmos.base.v1beta1.Coin amounts = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // amounts_per_bundle defines the amount of each coin that are distributed // per finalized bundle repeated cosmos.base.v1beta1.Coin amounts_per_bundle = 4 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // total_funded is the total amount of coins that the funder has funded repeated cosmos.base.v1beta1.Coin total_funded = 5 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // score is the result of all coins allocated to this pool times the coin weight specified diff --git a/proto/kyve/query/v1beta1/query.proto b/proto/kyve/query/v1beta1/query.proto index e2168400..b74e711d 100644 --- a/proto/kyve/query/v1beta1/query.proto +++ b/proto/kyve/query/v1beta1/query.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package kyve.query.v1beta1; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; import "kyve/pool/v1beta1/pool.proto"; option go_package = "github.com/KYVENetwork/chain/x/query/types"; @@ -49,8 +49,8 @@ message BasicPool { // total_funds of the pool. If the pool runs // out of funds no more bundles will be produced repeated cosmos.base.v1beta1.Coin total_funds = 7 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; diff --git a/testutil/integration/checks.go b/testutil/integration/checks.go index d3090b39..474c51e4 100644 --- a/testutil/integration/checks.go +++ b/testutil/integration/checks.go @@ -2,9 +2,10 @@ package integration import ( "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" "time" + sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/store" storeTypes "cosmossdk.io/store/types" diff --git a/testutil/integration/integration.go b/testutil/integration/integration.go index 52664e97..f95f15eb 100644 --- a/testutil/integration/integration.go +++ b/testutil/integration/integration.go @@ -63,10 +63,12 @@ const ( T_KYVE = int64(KYVE) ) -var KYVE_DENOM = globalTypes.Denom -var A_DENOM = "acoin" -var B_DENOM = "bcoin" -var C_DENOM = "ccoin" +var ( + KYVE_DENOM = globalTypes.Denom + A_DENOM = "acoin" + B_DENOM = "bcoin" + C_DENOM = "ccoin" +) func KYVECoin(amount int64) sdk.Coin { return sdk.NewInt64Coin(KYVE_DENOM, amount) diff --git a/x/bundles/keeper/msg_server_submit_bundle_proposal.go b/x/bundles/keeper/msg_server_submit_bundle_proposal.go index 7bb784e3..b37ffd48 100644 --- a/x/bundles/keeper/msg_server_submit_bundle_proposal.go +++ b/x/bundles/keeper/msg_server_submit_bundle_proposal.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "github.com/KYVENetwork/chain/x/bundles/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/delegation/keeper/keeper_suite_test.go b/x/delegation/keeper/keeper_suite_test.go index 55485e92..7f68bd08 100644 --- a/x/delegation/keeper/keeper_suite_test.go +++ b/x/delegation/keeper/keeper_suite_test.go @@ -2,9 +2,10 @@ package keeper_test import ( "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" "testing" + sdk "github.com/cosmos/cosmos-sdk/types" + funderstypes "github.com/KYVENetwork/chain/x/funders/types" i "github.com/KYVENetwork/chain/testutil/integration" diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index c14f1939..e8e7b63a 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -1,9 +1,10 @@ package keeper import ( + "fmt" + "cosmossdk.io/errors" "cosmossdk.io/math" - "fmt" "github.com/KYVENetwork/chain/x/funders/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" diff --git a/x/funders/types/events.pb.go b/x/funders/types/events.pb.go index b4b2f949..7a69f235 100644 --- a/x/funders/types/events.pb.go +++ b/x/funders/types/events.pb.go @@ -474,40 +474,40 @@ func init() { proto.RegisterFile("kyve/funders/v1beta1/events.proto", fileDescri var fileDescriptor_1cf957abd56bbcb0 = []byte{ // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0x4f, 0x8b, 0xd3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x4d, 0xdd, 0xb0, 0x67, 0x74, 0x7c, 0x35, 0x5a, 0xd6, 0xf3, 0xd0, 0x6d, 0x4d, 0xac, 0x58, 0x8f, + 0x72, 0x79, 0x34, 0x56, 0xdf, 0x5a, 0xfc, 0x93, 0x7a, 0x70, 0x78, 0xba, 0x74, 0xad, 0xb3, 0xa5, 0x6b, 0xfd, 0x5a, 0xba, 0xd6, 0xc7, 0x95, 0x5b, 0x39, 0x5b, 0xb9, 0x95, 0xef, 0x2b, 0xb7, 0xf2, 0xf6, 0xe1, 0x06, 0xc1, 0x8b, 0x37, 0xaf, 0x0f, 0x5e, 0x52, 0x39, 0x87, 0x6c, 0xea, 0x47, 0xc7, - 0x98, 0x71, 0xff, 0xfd, 0xfa, 0x0b, 0xa7, 0x59, 0xc2, 0x86, 0xfe, 0x20, 0x3d, 0xfe, 0x13, 0x00, - 0x00, 0xff, 0xff, 0xde, 0x6c, 0x83, 0xdc, 0x37, 0x05, 0x00, 0x00, + 0x98, 0x71, 0xff, 0xfd, 0xfa, 0x62, 0xd2, 0x2c, 0x61, 0x43, 0x5f, 0x48, 0x8f, 0xff, 0x04, 0x00, + 0x00, 0xff, 0xff, 0x99, 0xde, 0xd9, 0x0f, 0x37, 0x05, 0x00, 0x00, } func (m *EventUpdateParams) Marshal() (dAtA []byte, err error) { diff --git a/x/funders/types/funders.pb.go b/x/funders/types/funders.pb.go index d858a664..11fec6ee 100644 --- a/x/funders/types/funders.pb.go +++ b/x/funders/types/funders.pb.go @@ -347,39 +347,39 @@ var fileDescriptor_252d80f89b0fa299 = []byte{ 0x10, 0x53, 0x77, 0x53, 0x8d, 0x9e, 0x2d, 0x52, 0x12, 0xa3, 0x31, 0x06, 0x13, 0x1b, 0xbd, 0x6c, 0x66, 0x77, 0xc6, 0x65, 0x84, 0x9d, 0x21, 0x3b, 0x03, 0xc8, 0xc5, 0xcf, 0xe0, 0xc7, 0x30, 0x3d, 0x18, 0x3f, 0x46, 0x8f, 0x3d, 0x1a, 0x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3, 0x24, 0x17, 0xe1, 0xf8, 0x28, 0x26, 0x12, 0x1d, 0x2d, 0xe2, 0x60, + 0x98, 0x73, 0xc9, 0xe1, 0xae, 0xaa, 0x09, 0x16, 0x39, 0x5b, 0x53, 0xbd, 0x8e, 0x32, 0xca, 0x78, + 0xa8, 0x3f, 0x4d, 0x61, 0xd5, 0x4f, 0xb8, 0xc8, 0xb8, 0x08, 0x63, 0x24, 0xc8, 0xf2, 0xae, 0x84, + 0x53, 0x66, 0xf1, 0xdd, 0x94, 0xa7, 0x5c, 0x1f, 0x43, 0x75, 0x32, 0xd9, 0xc6, 0x67, 0x07, 0x14, + 0x3b, 0xfa, 0x72, 0xe8, 0x81, 0x12, 0xc2, 0x38, 0x27, 0x42, 0x78, 0x4e, 0xdd, 0x69, 0x96, 0xbb, + 0x8b, 0x50, 0x21, 0x19, 0x67, 0xb4, 0x4f, 0x72, 0x6f, 0xc3, 0x20, 0x36, 0x84, 0x55, 0xf0, 0x1f, + 0xc5, 0x84, 0x49, 0x2a, 0xa7, 0x9e, 0xab, 0xa1, 0x65, 0xac, 0xba, 0x26, 0x24, 0x16, 0x54, 0x12, + 0x6f, 0xd3, 0x74, 0xd9, 0x50, 0x21, 0x09, 0x67, 0x12, 0x25, 0xd2, 0xdb, 0x32, 0x88, 0x0d, 0x61, + 0x1d, 0x54, 0x30, 0x11, 0x49, 0x4e, 0x87, 0x92, 0x72, 0xe6, 0x15, 0x35, 0xba, 0x9a, 0x6a, 0x9c, + 0xb9, 0xa0, 0xa4, 0x08, 0x53, 0x96, 0xc2, 0xdb, 0xe0, 0x9a, 0x11, 0x26, 0x5a, 0x27, 0xfe, 0xbf, + 0xc9, 0x1e, 0x5b, 0xfa, 0x7b, 0xa0, 0x34, 0xe4, 0x7c, 0x10, 0x51, 0xac, 0xe9, 0x6f, 0x76, 0x8b, + 0x2a, 0x7c, 0x82, 0xe1, 0x3b, 0x50, 0x42, 0x19, 0x1f, 0x31, 0x29, 0x3c, 0xb7, 0xee, 0x36, 0x2b, + 0xf7, 0xf6, 0x03, 0x23, 0x62, 0xa0, 0x44, 0x5c, 0x88, 0x1d, 0x3c, 0xe6, 0x94, 0xb5, 0x1e, 0x9c, + 0x5f, 0xd6, 0x0a, 0x67, 0xdf, 0x6b, 0xcd, 0x94, 0xca, 0xde, 0x28, 0x0e, 0x12, 0x9e, 0x85, 0x56, + 0x71, 0xf3, 0x75, 0x57, 0xe0, 0x7e, 0x28, 0xa7, 0x43, 0x22, 0x74, 0x83, 0xf8, 0xf4, 0xf3, 0xcb, + 0x1d, 0xa7, 0xbb, 0x18, 0x00, 0x3f, 0x00, 0x68, 0x8f, 0xd1, 0x90, 0xe4, 0x51, 0x3c, 0x62, 0x78, + 0xa0, 0x84, 0xb9, 0x9a, 0xb1, 0x3b, 0x76, 0xd6, 0x0b, 0x92, 0xb7, 0xf4, 0x24, 0x28, 0xc0, 0xb6, + 0xe4, 0x12, 0x0d, 0x22, 0xad, 0x0d, 0xf6, 0xb6, 0xae, 0x68, 0x72, 0x45, 0x4f, 0xd1, 0x2b, 0x85, + 0x1b, 0x11, 0xd8, 0xb6, 0x5e, 0xbd, 0x94, 0x48, 0x92, 0x55, 0x27, 0x9c, 0x35, 0x27, 0x1e, 0x82, + 0x3d, 0x94, 0x48, 0x3a, 0x26, 0xd1, 0xba, 0xa1, 0x44, 0x78, 0x1b, 0x75, 0xb7, 0x59, 0xee, 0xde, + 0x30, 0x70, 0x67, 0xd5, 0x58, 0x22, 0x1a, 0xbf, 0x1c, 0x00, 0x4f, 0x7b, 0x54, 0x92, 0x01, 0x15, + 0x52, 0xb1, 0x38, 0x61, 0x32, 0x9f, 0xc2, 0x03, 0x00, 0xd4, 0xe6, 0x47, 0x98, 0x30, 0x9e, 0xd9, + 0xa5, 0x28, 0xab, 0x4c, 0x5b, 0x25, 0xe0, 0x21, 0x80, 0x19, 0x65, 0x7a, 0x14, 0x65, 0x69, 0x64, + 0xb4, 0xb2, 0xbb, 0xb1, 0x93, 0x51, 0x66, 0x39, 0x1f, 0xeb, 0x3c, 0x7c, 0x04, 0x0e, 0xfe, 0xad, + 0x5e, 0x35, 0xd1, 0xd5, 0x8d, 0xfb, 0x7f, 0x37, 0xfe, 0xd1, 0xbe, 0x0d, 0x2a, 0x9a, 0xce, 0x84, + 0xd0, 0xb4, 0x27, 0xcd, 0x6b, 0x68, 0xdd, 0x52, 0xfa, 0x7e, 0xbb, 0xac, 0xdd, 0x34, 0x6a, 0x0a, + 0xdc, 0x0f, 0x28, 0x0f, 0x33, 0x24, 0x7b, 0xc1, 0x33, 0x92, 0xa2, 0x64, 0xda, 0x26, 0x49, 0x57, + 0xff, 0x8c, 0x53, 0xdd, 0xd6, 0xea, 0x9c, 0xcf, 0x7c, 0xe7, 0x62, 0xe6, 0x3b, 0x3f, 0x66, 0xbe, + 0xf3, 0x71, 0xee, 0x17, 0x2e, 0xe6, 0x7e, 0xe1, 0xeb, 0xdc, 0x2f, 0xbc, 0x39, 0x5c, 0xb1, 0xe8, + 0xe9, 0xeb, 0x57, 0x27, 0xcf, 0x89, 0x9c, 0xf0, 0xbc, 0x1f, 0x26, 0x3d, 0x44, 0x59, 0xf8, 0x7e, + 0xf9, 0x0f, 0xa3, 0xcd, 0x8a, 0x8b, 0xfa, 0xe5, 0xdf, 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xde, + 0x23, 0x35, 0xaf, 0x7e, 0x04, 0x00, 0x00, } func (m *Funder) Marshal() (dAtA []byte, err error) { diff --git a/x/funders/types/funders_test.go b/x/funders/types/funders_test.go index d0476220..80a4d7c6 100644 --- a/x/funders/types/funders_test.go +++ b/x/funders/types/funders_test.go @@ -14,11 +14,10 @@ import ( TEST CASES - funders.go -* Funding.AddAmount -* Funding.SubtractAmount -* Funding.SubtractAmount - subtract more than available * Funding.ChargeOneBundle * Funding.ChargeOneBundle - charge more than available +* Funding.ChargeOneBundle - charge with multiple coins +* Funding.ChargeOneBundle - charge with no coins * FundintState.SetActive * FundintState.SetActive - add same funder twice * FundintState.SetInactive @@ -78,10 +77,10 @@ var _ = Describe("logic_funders.go", Ordered, func() { It("Funding.ChargeOneBundle", func() { // ACT - amounts := funding.ChargeOneBundle() + payouts := funding.ChargeOneBundle() // ASSERT - Expect(amounts.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(payouts.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) Expect(funding.Amounts.String()).To(Equal(i.ACoins(99 * i.T_KYVE).String())) Expect(funding.TotalFunded.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) }) @@ -91,14 +90,42 @@ var _ = Describe("logic_funders.go", Ordered, func() { funding.Amounts = i.ACoins(1 * i.T_KYVE / 2) // ACT - amounts := funding.ChargeOneBundle() + payouts := funding.ChargeOneBundle() // ASSERT - Expect(amounts.String()).To(Equal(i.ACoins(1 * i.T_KYVE / 2).String())) + Expect(payouts.String()).To(Equal(i.ACoins(1 * i.T_KYVE / 2).String())) Expect(funding.Amounts.IsZero()).To(BeTrue()) Expect(funding.TotalFunded.String()).To(Equal(i.ACoins(1 * i.T_KYVE / 2).String())) }) + It("Funding.ChargeOneBundle - charge with multiple coins", func() { + // ARRANGE + funding.Amounts = sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(100*i.T_KYVE)) + funding.AmountsPerBundle = sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(2*i.T_KYVE)) + + // ACT + payouts := funding.ChargeOneBundle() + + // ASSERT + Expect(payouts.String()).To(Equal(sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(2*i.T_KYVE)).String())) + Expect(funding.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(99*i.T_KYVE), i.BCoin(98*i.T_KYVE)).String())) + Expect(funding.TotalFunded.String()).To(Equal(sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(2*i.T_KYVE)).String())) + }) + + It("Funding.ChargeOneBundle - charge with no coins", func() { + // ARRANGE + funding.Amounts = sdk.NewCoins() + funding.AmountsPerBundle = sdk.NewCoins() + + // ACT + payouts := funding.ChargeOneBundle() + + // ASSERT + Expect(payouts.IsZero()).To(BeTrue()) + Expect(funding.Amounts.IsZero()).To(BeTrue()) + Expect(funding.TotalFunded.IsZero()).To(BeTrue()) + }) + It("FundintState.SetActive", func() { // ARRANGE fundingState.ActiveFunderAddresses = []string{} diff --git a/x/funders/types/params.go b/x/funders/types/params.go index 53d494d7..3ba0e194 100644 --- a/x/funders/types/params.go +++ b/x/funders/types/params.go @@ -1,9 +1,11 @@ package types import ( - "cosmossdk.io/math" "errors" "fmt" + + "cosmossdk.io/math" + "github.com/KYVENetwork/chain/util" globalTypes "github.com/KYVENetwork/chain/x/global/types" ) diff --git a/x/funders/types/tx.pb.go b/x/funders/types/tx.pb.go index 2c136918..8019ca44 100644 --- a/x/funders/types/tx.pb.go +++ b/x/funders/types/tx.pb.go @@ -609,50 +609,49 @@ func init() { func init() { proto.RegisterFile("kyve/funders/v1beta1/tx.proto", fileDescriptor_5145d80c2db97f3d) } var fileDescriptor_5145d80c2db97f3d = []byte{ - // 678 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0x4f, 0x4f, 0xd4, 0x4e, - 0x18, 0xde, 0xb2, 0xfc, 0x1d, 0xf8, 0xfd, 0xd4, 0x0a, 0xd9, 0xd2, 0xc4, 0x82, 0x18, 0x13, 0x44, - 0x69, 0x03, 0x46, 0x0f, 0xdc, 0x5c, 0x94, 0xc4, 0x98, 0x35, 0x64, 0x8d, 0x46, 0x3d, 0xb8, 0x69, - 0x3b, 0x43, 0x19, 0x77, 0x3b, 0xd3, 0xcc, 0xcc, 0x02, 0x7b, 0x31, 0xc6, 0x4f, 0xe0, 0xc7, 0x30, - 0x9e, 0x38, 0x78, 0x32, 0x5e, 0x4d, 0x38, 0x12, 0x4f, 0x9e, 0xd4, 0xc0, 0x81, 0xaf, 0xe0, 0xd1, - 0xcc, 0x74, 0x5a, 0xba, 0x2b, 0xff, 0x2e, 0x1e, 0xf4, 0x42, 0xfb, 0xce, 0xf3, 0xbc, 0x3c, 0xef, - 0xf3, 0xee, 0xfb, 0x4e, 0xc1, 0xa5, 0x66, 0x67, 0x03, 0x79, 0x6b, 0x6d, 0x02, 0x11, 0xe3, 0xde, - 0xc6, 0x42, 0x80, 0x84, 0xbf, 0xe0, 0x89, 0x2d, 0x37, 0x61, 0x54, 0x50, 0x73, 0x5c, 0xc2, 0xae, - 0x86, 0x5d, 0x0d, 0xdb, 0x95, 0x90, 0xf2, 0x98, 0x72, 0x2f, 0xe6, 0x91, 0xb7, 0xb1, 0x20, 0x1f, - 0x29, 0xdd, 0x9e, 0x4c, 0x81, 0x86, 0x8a, 0xbc, 0x34, 0xd0, 0x90, 0xa3, 0x73, 0x02, 0x9f, 0xa3, - 0x5c, 0x27, 0xa4, 0x98, 0x68, 0x7c, 0x3c, 0xa2, 0x11, 0x4d, 0xf3, 0xe4, 0x9b, 0x3e, 0xbd, 0xe0, - 0xc7, 0x98, 0x50, 0x4f, 0xfd, 0xd5, 0x47, 0x33, 0x47, 0x56, 0x9c, 0x95, 0xa8, 0x38, 0x33, 0x9f, - 0x0d, 0x70, 0xae, 0xc6, 0xa3, 0x65, 0x86, 0x7c, 0x81, 0x56, 0x14, 0x64, 0x5a, 0x60, 0x28, 0x94, - 0x31, 0x65, 0x96, 0x31, 0x6d, 0xcc, 0x8e, 0xd4, 0xb3, 0x50, 0x22, 0x31, 0x25, 0xb8, 0x89, 0x98, - 0xd5, 0x97, 0x22, 0x3a, 0x34, 0x6d, 0x30, 0x8c, 0x21, 0x22, 0x02, 0x8b, 0x8e, 0x55, 0x56, 0x50, - 0x1e, 0xcb, 0xac, 0x4d, 0x14, 0x70, 0x2c, 0x90, 0xd5, 0x9f, 0x66, 0xe9, 0x50, 0x29, 0x51, 0x22, - 0xfc, 0x50, 0x58, 0x03, 0x5a, 0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x4a, 0xbb, 0xfb, 0x4e, 0xe9, 0xeb, 0xbe, 0x53, 0x7a, 0x7e, 0xa3, 0xb0, 0x03, 0x0f, 0x9e, - 0x3d, 0xb9, 0xf7, 0x10, 0x89, 0x4d, 0xca, 0x9a, 0x5e, 0xb8, 0xee, 0x63, 0xe2, 0x6d, 0xe5, 0x1f, - 0x35, 0xb5, 0x0d, 0xc1, 0xa0, 0xfa, 0x96, 0xdd, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x33, - 0x81, 0x9d, 0xa3, 0x07, 0x00, 0x00, + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0xbd, 0x6e, 0xd4, 0x4c, + 0x14, 0x5d, 0x67, 0xf3, 0x3b, 0xc9, 0xf7, 0x01, 0x26, 0xd1, 0x3a, 0x96, 0x70, 0x42, 0x10, 0x52, + 0x08, 0xc4, 0x56, 0x82, 0xa0, 0x48, 0xc7, 0x06, 0x22, 0x21, 0xb4, 0x28, 0x5a, 0x04, 0x02, 0x0a, + 0x56, 0xb6, 0x67, 0xe2, 0x0c, 0xbb, 0x9e, 0xb1, 0x66, 0x66, 0x93, 0x6c, 0x83, 0x10, 0x4f, 0xc0, + 0x63, 0x20, 0xaa, 0x14, 0x54, 0x88, 0x16, 0x29, 0x65, 0x44, 0x45, 0x05, 0x28, 0x29, 0xf2, 0x0a, + 0x94, 0x68, 0xc6, 0x63, 0xc7, 0xbb, 0xe4, 0xaf, 0xa1, 0x80, 0x66, 0xed, 0x3b, 0xe7, 0x5c, 0x9f, + 0x7b, 0xee, 0xde, 0x6b, 0x83, 0x4b, 0xcd, 0xce, 0x06, 0xf2, 0xd6, 0xda, 0x04, 0x22, 0xc6, 0xbd, + 0x8d, 0x85, 0x00, 0x09, 0x7f, 0xc1, 0x13, 0x5b, 0x6e, 0xc2, 0xa8, 0xa0, 0xe6, 0xb8, 0x84, 0x5d, + 0x0d, 0xbb, 0x1a, 0xb6, 0x2f, 0xf8, 0x31, 0x26, 0xd4, 0x53, 0xbf, 0x29, 0xd1, 0x76, 0x42, 0xca, + 0x63, 0xca, 0xbd, 0xc0, 0xe7, 0x28, 0x7f, 0x4c, 0x48, 0x31, 0xd1, 0x78, 0x45, 0xe3, 0x31, 0x8f, + 0xbc, 0x8d, 0x05, 0x79, 0xd1, 0xc0, 0x64, 0x0a, 0x34, 0x54, 0xe4, 0xa5, 0x81, 0x86, 0xc6, 0x23, + 0x1a, 0xd1, 0xf4, 0x5c, 0xde, 0xa5, 0xa7, 0x33, 0x9f, 0x0d, 0x70, 0xae, 0xc6, 0xa3, 0x65, 0x86, + 0x7c, 0x81, 0x56, 0x54, 0x65, 0xa6, 0x05, 0x86, 0x42, 0x19, 0x53, 0x66, 0x19, 0xd3, 0xc6, 0xec, + 0x48, 0x3d, 0x0b, 0x25, 0x12, 0x53, 0x82, 0x9b, 0x88, 0x59, 0x7d, 0x29, 0xa2, 0x43, 0xd3, 0x06, + 0xc3, 0x18, 0x22, 0x22, 0xb0, 0xe8, 0x58, 0x65, 0x05, 0xe5, 0xb1, 0xcc, 0xda, 0x44, 0x01, 0xc7, + 0x02, 0x59, 0xfd, 0x69, 0x96, 0x0e, 0x95, 0x12, 0x25, 0xc2, 0x0f, 0x85, 0x35, 0xa0, 0x95, 0xd2, + 0xd0, 0x9c, 0x06, 0xa3, 0x10, 0xf1, 0x90, 0xe1, 0x44, 0x60, 0x4a, 0xac, 0x41, 0x85, 0x16, 0x8f, + 0x96, 0xc6, 0xde, 0x1c, 0x6c, 0xcf, 0x65, 0x95, 0xcd, 0x4c, 0x82, 0x4a, 0x8f, 0x8d, 0x3a, 0xe2, + 0x09, 0x25, 0x1c, 0x65, 0x16, 0x1f, 0x27, 0xf0, 0x5f, 0xb0, 0x58, 0xb4, 0x91, 0x5b, 0xfc, 0xd8, + 0x07, 0x46, 0x6b, 0x3c, 0x92, 0xa7, 0xab, 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0x5a, 0xd4, + 0x87, 0xd9, 0xae, 0xe8, 0x70, 0xe9, 0x7f, 0x59, 0xcb, 0x21, 0xb3, 0x6b, 0x76, 0x53, 0xd1, 0xac, + 0x9e, 0xc5, 0x9f, 0x65, 0x50, 0xae, 0xf1, 0xc8, 0x84, 0x60, 0xac, 0xeb, 0x2d, 0x74, 0xd5, 0x3d, + 0xea, 0x6d, 0xe9, 0xf6, 0x6c, 0xb9, 0x3d, 0x7f, 0x26, 0x5a, 0xa6, 0x26, 0x55, 0xba, 0x5e, 0x04, + 0xc7, 0xab, 0x14, 0x69, 0x27, 0xa8, 0x1c, 0xb5, 0x8f, 0xe6, 0x53, 0x30, 0x9c, 0xef, 0xe2, 0xe5, + 0x63, 0x53, 0x33, 0x8a, 0x7d, 0xed, 0x54, 0x4a, 0xfe, 0xe4, 0x17, 0x00, 0x14, 0x26, 0xf2, 0xca, + 0xb1, 0x89, 0x87, 0x24, 0xfb, 0xfa, 0x19, 0x48, 0xbf, 0xf7, 0x47, 0x8f, 0xc6, 0x69, 0xfd, 0x49, + 0x69, 0xa7, 0xf6, 0xa7, 0xfb, 0x3f, 0xb7, 0x07, 0x5e, 0xcb, 0xd1, 0xad, 0xae, 0xec, 0xec, 0x39, + 0xc6, 0xee, 0x9e, 0x63, 0xfc, 0xd8, 0x73, 0x8c, 0xb7, 0xfb, 0x4e, 0x69, 0x77, 0xdf, 0x29, 0x7d, + 0xdd, 0x77, 0x4a, 0xcf, 0x6f, 0x14, 0x76, 0xe0, 0xc1, 0xb3, 0x27, 0xf7, 0x1e, 0x22, 0xb1, 0x49, + 0x59, 0xd3, 0x0b, 0xd7, 0x7d, 0x4c, 0xbc, 0xad, 0xfc, 0x13, 0xab, 0xb6, 0x21, 0x18, 0x54, 0xdf, + 0xb2, 0x9b, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x33, 0x59, 0x7f, 0xa8, 0x7f, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/query/types/account.pb.go b/x/query/types/account.pb.go index fc71e3dc..0e9e1d54 100644 --- a/x/query/types/account.pb.go +++ b/x/query/types/account.pb.go @@ -684,61 +684,61 @@ var fileDescriptor_51ca316755261aec = []byte{ 0x00, 0x52, 0x7b, 0xb1, 0xc6, 0xbb, 0xe3, 0xcd, 0x90, 0xf5, 0x8e, 0xbb, 0x33, 0x4e, 0x88, 0x2a, 0x2e, 0x1c, 0x81, 0x03, 0x12, 0xff, 0x02, 0x12, 0x88, 0x13, 0x17, 0x6e, 0x3d, 0x71, 0xea, 0xb1, 0x12, 0x17, 0x84, 0xc4, 0x0f, 0x25, 0x48, 0xfc, 0x1b, 0x68, 0x67, 0x66, 0xed, 0x31, 0x5e, 0xdb, - 0x14, 0x89, 0x4b, 0xe2, 0x7d, 0xf3, 0x3e, 0xef, 0xbd, 0xcf, 0x9b, 0xcf, 0x7b, 0x03, 0x6b, 0xc7, + 0x14, 0x89, 0x4b, 0xe2, 0x9d, 0xf9, 0x7c, 0xde, 0x7b, 0x9f, 0x37, 0x9f, 0x37, 0x03, 0x6b, 0xc7, 0x67, 0x27, 0xc4, 0x7b, 0xd0, 0x23, 0xe9, 0x99, 0x77, 0x52, 0x6b, 0x11, 0x81, 0x6b, 0x1e, 0x0e, - 0x02, 0xd6, 0x4b, 0x84, 0xdb, 0x4d, 0x99, 0x60, 0x08, 0x65, 0x1e, 0xae, 0xf4, 0x70, 0xb5, 0x47, - 0x65, 0x33, 0x60, 0xbc, 0xc3, 0xb8, 0xd7, 0xc2, 0xfc, 0xef, 0xe0, 0x2e, 0x8e, 0x68, 0x82, 0x05, - 0x65, 0x89, 0xc2, 0x57, 0x9e, 0x8b, 0x58, 0xc4, 0xe4, 0x4f, 0x2f, 0xfb, 0xa5, 0xad, 0xcf, 0x47, - 0x8c, 0x45, 0x31, 0xf1, 0x70, 0x97, 0x7a, 0x38, 0x49, 0x98, 0x90, 0x10, 0xae, 0x4f, 0x6d, 0x33, - 0x7e, 0x1e, 0x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0x8e, 0xf7, 0x50, 0x1f, 0xe8, 0xc7, 0xe8, 0x17, 0x0b, 0x56, 0x26, + 0x5c, 0x4e, 0x68, 0x67, 0x5a, 0x15, 0x13, 0x2e, 0xd8, 0xca, 0xeb, 0xff, 0x8e, 0xac, 0x05, 0xed, + 0x4a, 0x41, 0x6f, 0xa0, 0x9d, 0x49, 0x82, 0x8a, 0xde, 0x33, 0x53, 0xdf, 0xf7, 0x16, 0x2c, 0x8d, + 0x0c, 0x3c, 0xaa, 0x4d, 0x2b, 0x6c, 0xe4, 0x5e, 0xa9, 0xd4, 0x9f, 0x86, 0xa2, 0x15, 0xdc, 0x92, + 0x0a, 0xb6, 0x50, 0x6d, 0x92, 0x02, 0x75, 0x83, 0x34, 0x63, 0xca, 0x85, 0x51, 0xf7, 0x23, 0x0b, + 0x96, 0x0b, 0x86, 0x0c, 0x6d, 0x4d, 0x2b, 0xa3, 0x60, 0xa0, 0x2b, 0xdb, 0x4f, 0x47, 0xd2, 0xd5, + 0xbf, 0x26, 0xab, 0xdf, 0x46, 0xf5, 0x49, 0xd5, 0x9b, 0x73, 0x39, 0x28, 0xbf, 0xb1, 0xf7, 0xf8, + 0xdc, 0xb6, 0x9e, 0x9c, 0xdb, 0xd6, 0xef, 0xe7, 0xb6, 0xf5, 0xc5, 0x85, 0x3d, 0xf3, 0xe4, 0xc2, + 0x9e, 0xf9, 0xe9, 0xc2, 0x9e, 0xb9, 0xbf, 0x69, 0x5c, 0x75, 0x77, 0xee, 0x7d, 0xb0, 0xff, 0x0e, + 0x11, 0xa7, 0x2c, 0x3d, 0xf6, 0x82, 0x23, 0x4c, 0x13, 0xef, 0x23, 0x9d, 0x46, 0x5e, 0x79, 0xad, + 0x92, 0x7c, 0xdd, 0xb7, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x9f, 0x92, 0x17, 0xd2, 0x0a, 0x00, 0x00, } diff --git a/x/query/types/funders.pb.go b/x/query/types/funders.pb.go index 317e7373..0a6402b9 100644 --- a/x/query/types/funders.pb.go +++ b/x/query/types/funders.pb.go @@ -818,7 +818,7 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/funders.proto", fileDescriptor_a182f068d9f0dba9) } var fileDescriptor_a182f068d9f0dba9 = []byte{ - // 1051 bytes of a gzipped FileDescriptorProto + // 1050 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45, 0x14, 0xf7, 0xc4, 0x8e, 0x5d, 0x9e, 0xd3, 0x28, 0x4c, 0x53, 0xb2, 0xdd, 0xb4, 0xae, 0x6b, 0x20, 0xb1, 0x22, 0xd8, 0x4d, 0x8c, 0xa8, 0x00, 0x89, 0x43, 0x3e, 0x2b, 0x0b, 0x29, 0x0a, 0x9b, 0xa4, @@ -828,63 +828,63 @@ var fileDescriptor_a182f068d9f0dba9 = []byte{ 0x51, 0x63, 0xa9, 0x97, 0x64, 0x66, 0xde, 0x7b, 0xf3, 0xfb, 0xcd, 0x6f, 0xde, 0x7b, 0x3b, 0x86, 0xf2, 0xfe, 0xc1, 0x2d, 0x62, 0xde, 0x8c, 0x49, 0x78, 0x60, 0xde, 0x5a, 0x6a, 0x90, 0xc8, 0x59, 0x32, 0x6f, 0xc4, 0x81, 0x47, 0x42, 0x66, 0x74, 0x42, 0x1a, 0x51, 0x8c, 0xb9, 0x87, 0x21, 0x3c, - 0x0c, 0xe5, 0xa1, 0x2f, 0xb8, 0x94, 0xb5, 0x29, 0x33, 0x1b, 0x0e, 0xeb, 0x0f, 0xee, 0x38, 0x4d, - 0x3f, 0x70, 0x22, 0x9f, 0x06, 0x32, 0x5e, 0x9f, 0x6e, 0xd2, 0x26, 0x15, 0x43, 0x93, 0x8f, 0xd4, - 0xea, 0xc5, 0x26, 0xa5, 0xcd, 0x16, 0x31, 0x9d, 0x8e, 0x6f, 0x3a, 0x41, 0x40, 0x23, 0x11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85, 0xf5, 0x50, 0x70, 0x06, 0x13, - 0xf2, 0xe6, 0x95, 0xe0, 0xe3, 0x23, 0x42, 0x2e, 0x0a, 0x94, 0xfe, 0x2b, 0xcc, 0xa7, 0xaf, 0x30, - 0x86, 0x73, 0x6f, 0xf3, 0xf2, 0x95, 0x6d, 0x88, 0x59, 0xe4, 0x66, 0x4c, 0x58, 0x84, 0x37, 0x00, - 0x1e, 0x36, 0x45, 0x71, 0x93, 0xc5, 0xda, 0x5c, 0x0f, 0xbf, 0xde, 0xa2, 0xdf, 0x72, 0x9a, 0x44, - 0xc5, 0x5a, 0xa9, 0x48, 0xfc, 0x1c, 0xe4, 0x19, 0x71, 0x42, 0x77, 0x4f, 0xf5, 0x2e, 0x35, 0xab, - 0x7c, 0x81, 0x60, 0xba, 0x17, 0x97, 0x75, 0x68, 0xc0, 0x08, 0xbe, 0x76, 0x0c, 0xf0, 0xfc, 0x50, - 0x60, 0x19, 0xdc, 0x83, 0xfc, 0x06, 0x14, 0xd4, 0x37, 0x41, 0x95, 0xb5, 0x3e, 0xa8, 0x59, 0x91, - 0x70, 0x25, 0xc7, 0xf5, 0xb5, 0x92, 0x80, 0x8a, 0x0f, 0x38, 0x45, 0x2e, 0xd1, 0x64, 0x70, 0x8b, - 0x7e, 0x1d, 0xf2, 0xbc, 0xcf, 0xc5, 0x4c, 0xb4, 0xe1, 0xc9, 0xda, 0x95, 0x21, 0x7d, 0x31, 0x66, - 0x96, 0x0a, 0xa8, 0xdc, 0x43, 0x3d, 0x17, 0xd0, 0xd5, 0xa1, 0x06, 0x79, 0xc9, 0x46, 0x69, 0x70, - 0x02, 0x7b, 0x4b, 0x79, 0xe2, 0x37, 0xe1, 0xcc, 0x0d, 0x09, 0x92, 0x9c, 0x79, 0xf6, 0x04, 0x22, - 0xea, 0xd0, 0xdd, 0x90, 0xca, 0x4f, 0x08, 0x2e, 0x76, 0xa9, 0xf0, 0x95, 0x95, 0x3e, 0x01, 0x4e, - 0x2b, 0x29, 0x52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13, 0xf2, + 0xe6, 0x95, 0xe0, 0xe3, 0x23, 0x42, 0x2e, 0x0a, 0x94, 0xfe, 0x2b, 0xcc, 0xa7, 0xaf, 0x30, 0x86, + 0x73, 0x6f, 0xf3, 0xf2, 0x95, 0x6d, 0x88, 0x59, 0xe4, 0x66, 0x4c, 0x58, 0x84, 0x37, 0x00, 0x1e, + 0x76, 0x40, 0x71, 0x93, 0xc5, 0xda, 0x5c, 0x0f, 0xbf, 0xde, 0xa2, 0xdf, 0x72, 0x9a, 0x44, 0xc5, + 0x5a, 0xa9, 0x48, 0xfc, 0x1c, 0xe4, 0x19, 0x71, 0x42, 0x77, 0x4f, 0xf5, 0x2e, 0x35, 0xab, 0x7c, + 0x81, 0x60, 0xba, 0x17, 0x97, 0x75, 0x68, 0xc0, 0x08, 0xbe, 0x76, 0x0c, 0xf0, 0xfc, 0x50, 0x60, + 0x19, 0xdc, 0x83, 0xfc, 0x06, 0x14, 0xd4, 0x37, 0x41, 0x95, 0xb5, 0x3e, 0xa8, 0x59, 0x91, 0x70, + 0x25, 0xc7, 0xf5, 0xb5, 0x92, 0x80, 0x8a, 0x0f, 0x38, 0x45, 0x2e, 0xd1, 0x64, 0x70, 0x8b, 0x7e, + 0x1d, 0xf2, 0xbc, 0xcf, 0xc5, 0x4c, 0xb4, 0xe1, 0xc9, 0xda, 0x95, 0x21, 0x7d, 0x31, 0x66, 0x96, + 0x0a, 0xa8, 0xdc, 0x43, 0x3d, 0x17, 0xd0, 0xd5, 0xa1, 0x06, 0x79, 0xc9, 0x46, 0x69, 0x70, 0x02, + 0x7b, 0x4b, 0x79, 0xe2, 0x37, 0xe1, 0xcc, 0x0d, 0x09, 0x92, 0x9c, 0x79, 0xf6, 0x04, 0x22, 0xea, + 0xd0, 0xdd, 0x90, 0xca, 0x4f, 0x08, 0x2e, 0x76, 0xa9, 0xf0, 0x95, 0x95, 0x3e, 0x01, 0x4e, 0x2b, + 0x29, 0x52, 0x42, 0x8e, 0x9d, 0x9a, 0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c, 0xfb, 0xd1, 0x97, 0xfe, + 0x47, 0x84, 0xe2, 0xf9, 0x9a, 0xe0, 0x59, 0xc3, 0x8b, 0x83, 0x78, 0xf2, 0x28, 0xbb, 0x71, 0x60, + 0x3f, 0xc2, 0xf9, 0x5b, 0x04, 0x93, 0xbd, 0x49, 0x8e, 0x8d, 0xc7, 0xc0, 0x4f, 0x15, 0xb2, 0x6e, + 0x3e, 0xb6, 0xbf, 0x62, 0x7b, 0x55, 0xb0, 0x5d, 0xc4, 0xc6, 0x30, 0xb6, 0xbc, 0x90, 0xcd, 0x3b, + 0xaa, 0xba, 0xef, 0xae, 0xac, 0xdd, 0x3f, 0x2c, 0xa1, 0x07, 0x87, 0x25, 0xf4, 0xe7, 0x61, 0x09, + 0x7d, 0x76, 0x54, 0xca, 0x3c, 0x38, 0x2a, 0x65, 0x7e, 0x3b, 0x2a, 0x65, 0xde, 0x5d, 0x48, 0xbd, + 0x17, 0xde, 0x7a, 0xe7, 0xfa, 0xfa, 0x26, 0x89, 0x6e, 0xd3, 0x70, 0xdf, 0x74, 0xf7, 0x1c, 0x3f, + 0x30, 0xdf, 0x57, 0x10, 0xe2, 0xdd, 0xd0, 0xc8, 0x8b, 0xdf, 0x24, 0xaf, 0xfc, 0x17, 0x00, 0x00, + 0xff, 0xff, 0x01, 0x21, 0xab, 0xbd, 0x5e, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/query/types/query.pb.go b/x/query/types/query.pb.go index 05d5b58c..5cab9252 100644 --- a/x/query/types/query.pb.go +++ b/x/query/types/query.pb.go @@ -529,55 +529,55 @@ var fileDescriptor_6b41255feae93a15 = []byte{ 0xdd, 0x56, 0xaa, 0xad, 0x04, 0x2a, 0x21, 0x0e, 0x1c, 0xb2, 0x69, 0x25, 0x44, 0x8b, 0xd0, 0x54, 0x80, 0xe0, 0x62, 0xcd, 0xda, 0x2f, 0xde, 0xd1, 0xda, 0x33, 0x5b, 0xcf, 0x78, 0xc3,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x7d, 0x9b, 0xf6, + 0xb8, 0x7a, 0xea, 0x00, 0x12, 0x00, 0xcc, 0x59, 0xde, 0xcc, 0xb4, 0x73, 0x7e, 0x09, 0x31, 0x86, + 0x8e, 0x59, 0xce, 0x44, 0x82, 0xf5, 0xa0, 0x34, 0xe1, 0xc9, 0xe9, 0xcb, 0x8b, 0xc0, 0x7b, 0x75, + 0x11, 0x78, 0x7f, 0x5f, 0x04, 0xde, 0x8f, 0x97, 0xc1, 0xda, 0xab, 0xcb, 0x60, 0xed, 0xf7, 0xcb, + 0x60, 0xed, 0xdb, 0x07, 0x4b, 0x0f, 0xda, 0x67, 0xdf, 0x7c, 0xf5, 0xf8, 0x73, 0xd4, 0xe7, 0xb2, + 0x9c, 0x46, 0xc9, 0x84, 0x71, 0x11, 0x7d, 0x57, 0xff, 0xf8, 0xd8, 0x87, 0x6d, 0xbc, 0x69, 0x9f, + 0xfe, 0x0f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xec, 0x6b, 0xf2, 0x97, 0x06, 0x00, 0x00, } func (m *BasicPool) Marshal() (dAtA []byte, err error) { From c0d9bb327a25cce71311d856ec87919083561be1 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Thu, 2 May 2024 16:40:40 +0200 Subject: [PATCH 19/28] fix: unit tests --- x/bundles/keeper/keeper_suite_valid_bundles_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/bundles/keeper/keeper_suite_valid_bundles_test.go b/x/bundles/keeper/keeper_suite_valid_bundles_test.go index f29fa263..1f6a0a0c 100644 --- a/x/bundles/keeper/keeper_suite_valid_bundles_test.go +++ b/x/bundles/keeper/keeper_suite_valid_bundles_test.go @@ -1097,7 +1097,7 @@ var _ = Describe("valid bundles", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) // assert total pool funds - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)).To(Equal(100*i.KYVE - 1*amountPerBundle)) + Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100*i.KYVE - 1*amountPerBundle)) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) }) From f3ff04222862cbf4f52a158886818d09a3187acb Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 11:33:54 +0200 Subject: [PATCH 20/28] chore: implemented review feedback --- proto/kyve/funders/v1beta1/funders.proto | 21 +- proto/kyve/funders/v1beta1/params.proto | 22 ++ .../keeper/msg_server_defund_pool_test.go | 17 + x/funders/spec/02_state.md | 29 -- x/funders/spec/04_params.md | 29 ++ x/funders/types/errors.go | 13 +- x/funders/types/funders.pb.go | 368 ++---------------- x/funders/types/message_defund_pool.go | 8 +- x/funders/types/message_fund_pool.go | 10 +- x/funders/types/params.pb.go | 346 +++++++++++++++- 10 files changed, 447 insertions(+), 416 deletions(-) diff --git a/proto/kyve/funders/v1beta1/funders.proto b/proto/kyve/funders/v1beta1/funders.proto index ec9445be..bfb6325b 100644 --- a/proto/kyve/funders/v1beta1/funders.proto +++ b/proto/kyve/funders/v1beta1/funders.proto @@ -29,7 +29,7 @@ message Funder { // a funder can only fund each pool once and a pool can only be funded // by each funder once. However, a funder can update the amount of funds. message Funding { - // funder_id is the id of the funder + // funder_address is the address of the funder string funder_address = 1; // pool_id is the id of the pool this funding is for uint64 pool_id = 2; @@ -61,22 +61,3 @@ message FundingState { // active_funder_addresses is the list of all active fundings repeated string active_funder_addresses = 2; } - -// WhitelistCoinEntry is an object containing information around a coin which -// is allowed to be funded in pools -message WhitelistCoinEntry { - // coin_denom is the denom of a coin which is allowed to be funded, this value - // needs to be unique - string coin_denom = 1; - // min_funding_amount is the minimum required amount of this denom that needs - // to be funded - uint64 min_funding_amount = 2; - // min_funding_amount_per_bundle is the minimum required amount of this denom - // that needs to be funded per bundle - uint64 min_funding_amount_per_bundle = 3; - // coin_weight is a factor used to sort funders after their funding amounts - string coin_weight = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} diff --git a/proto/kyve/funders/v1beta1/params.proto b/proto/kyve/funders/v1beta1/params.proto index 270712ba..d4d7ce3b 100644 --- a/proto/kyve/funders/v1beta1/params.proto +++ b/proto/kyve/funders/v1beta1/params.proto @@ -2,10 +2,32 @@ syntax = "proto3"; package kyve.funders.v1beta1; +import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; import "kyve/funders/v1beta1/funders.proto"; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; +// WhitelistCoinEntry is an object containing information around a coin which +// is allowed to be funded in pools +message WhitelistCoinEntry { + // coin_denom is the denom of a coin which is allowed to be funded, this value + // needs to be unique + string coin_denom = 1; + // min_funding_amount is the minimum required amount of this denom that needs + // to be funded + uint64 min_funding_amount = 2; + // min_funding_amount_per_bundle is the minimum required amount of this denom + // that needs to be funded per bundle + uint64 min_funding_amount_per_bundle = 3; + // coin_weight is a factor used to sort funders after their funding amounts + string coin_weight = 4 [ + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} + // Params defines the funders module parameters. message Params { // coin_whitelist is a list of coins that are allowed to fund a pool diff --git a/x/funders/keeper/msg_server_defund_pool_test.go b/x/funders/keeper/msg_server_defund_pool_test.go index 8174c09f..95dd38f1 100644 --- a/x/funders/keeper/msg_server_defund_pool_test.go +++ b/x/funders/keeper/msg_server_defund_pool_test.go @@ -1,11 +1,14 @@ package keeper_test import ( + "cosmossdk.io/errors" "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" "github.com/KYVENetwork/chain/x/funders/types" globaltypes "github.com/KYVENetwork/chain/x/global/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" + sdk "github.com/cosmos/cosmos-sdk/types" + errorsTypes "github.com/cosmos/cosmos-sdk/types/errors" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -18,6 +21,7 @@ TEST CASES - msg_server_defund_pool.go * Defund more than actually funded * Defund full funding amount from a funder who has previously funded 100 coins * Defund as highest funder 75 coins in order to be the lowest funder afterward +* Try to defund zero amounts * Try to defund nonexistent fundings * Try to defund a funding twice * Try to defund below minimum funding params (but not full defund) @@ -203,6 +207,19 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) }) + It("Try to defund zero amounts", func() { + // ACT + _, err := s.RunTx(&types.MsgDefundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: sdk.NewCoins(), + }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(errors.Wrapf(errorsTypes.ErrInvalidRequest, "empty amount").Error())) + }) + It("Try to defund nonexistent fundings", func() { // ASSERT s.RunTxFundersError(&types.MsgDefundPool{ diff --git a/x/funders/spec/02_state.md b/x/funders/spec/02_state.md index 4d51bfda..1d2f8750 100644 --- a/x/funders/spec/02_state.md +++ b/x/funders/spec/02_state.md @@ -88,32 +88,3 @@ message FundingState { repeated string active_funder_addresses = 2; } ``` - -## WhitelistCoinEntry - -With multiple coin funding being possible we also have to limit the amount of coin types funders can fund or -else a user could spam coins and dramatically increase the gas costs for protocol node operators. Therefore, -we have a coin whitelist so a funder can only fund a coin if it is included in the whitelist. For each coin there are -additional requirements like the minimum funding amount to also prevent spam. Note that the native $KYVE coin -is always included in the whitelist and can't be removed. - -```protobuf -syntax = "proto3"; - -message WhitelistCoinEntry { - // coin_denom is the denom of a coin which is allowed to be funded, this value - // needs to be unique - string coin_denom = 1; - // min_funding_amount is the minimum required amount of this denom that needs - // to be funded - uint64 min_funding_amount = 2; - // min_funding_amount_per_bundle is the minimum required amount of this denom - // that needs to be funded per bundle - uint64 min_funding_amount_per_bundle = 3; - // coin_weight is a factor used to sort funders after their funding amounts - string coin_weight = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} -``` diff --git a/x/funders/spec/04_params.md b/x/funders/spec/04_params.md index d24d0cda..a5e49dac 100644 --- a/x/funders/spec/04_params.md +++ b/x/funders/spec/04_params.md @@ -10,3 +10,32 @@ The pool module contains the following parameters: |--------------------|----------------------|---------| | CoinWhitelist | WhitelistCoinEntry[] | | | MinFundingMultiple | math.LegacyDec (%) | 20 | + +## WhitelistCoinEntry + +With multiple coin funding being possible we also have to limit the amount of coin types funders can fund or +else a user could spam coins and dramatically increase the gas costs for protocol node operators. Therefore, +we have a coin whitelist so a funder can only fund a coin if it is included in the whitelist. For each coin there are +additional requirements like the minimum funding amount to also prevent spam. Note that the native $KYVE coin +is always included in the whitelist and can't be removed. + +```protobuf +syntax = "proto3"; + +message WhitelistCoinEntry { + // coin_denom is the denom of a coin which is allowed to be funded, this value + // needs to be unique + string coin_denom = 1; + // min_funding_amount is the minimum required amount of this denom that needs + // to be funded + uint64 min_funding_amount = 2; + // min_funding_amount_per_bundle is the minimum required amount of this denom + // that needs to be funded per bundle + uint64 min_funding_amount_per_bundle = 3; + // coin_weight is a factor used to sort funders after their funding amounts + string coin_weight = 4 [ + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} +``` diff --git a/x/funders/types/errors.go b/x/funders/types/errors.go index 25de0e59..5a14336d 100644 --- a/x/funders/types/errors.go +++ b/x/funders/types/errors.go @@ -8,13 +8,14 @@ import ( var ( ErrFunderAlreadyExists = errors.Register(ModuleName, 1100, "funder with address %v already exists") ErrFunderDoesNotExist = errors.Register(ModuleName, 1101, "funder with address %v does not exist") - ErrFundsTooLow = errors.Register(ModuleName, 1102, "can not defund zero coins") + ErrFundsTooLow = errors.Register(ModuleName, 1102, "minimum funding amount of %vkyve not reached") ErrMinAmountPerBundle = errors.Register(ModuleName, 1103, "minimum amount per bundle of coin not reached") ErrMinFundingAmount = errors.Register(ModuleName, 1104, "minimum funding amount of coin not reached") ErrFundingDoesNotExist = errors.Register(ModuleName, 1105, "funding for pool %v and funder %v does not exist") - ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1106, "funding state for pool %v does not exist") - ErrMinFundingMultiple = errors.Register(ModuleName, 1107, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") - ErrCoinNotWhitelisted = errors.Register(ModuleName, 1108, "coin in amount not in whitelist") - ErrAmountPerBundleCoinNotWhitelisted = errors.Register(ModuleName, 1109, "coin in amount per bundle not in whitelist") - ErrInvalidAmountPerBundleCoin = errors.Register(ModuleName, 1110, "coin in amount per bundle is not in funding amounts") + ErrFundingIsUsedUp = errors.Register(ModuleName, 1106, "funding for pool %v and funder %v is used up") + ErrFundingStateDoesNotExist = errors.Register(ModuleName, 1107, "funding state for pool %v does not exist") + ErrMinFundingMultiple = errors.Register(ModuleName, 1108, "per_bundle_amount times min_funding_multiple is smaller than funded_amount") + ErrCoinNotWhitelisted = errors.Register(ModuleName, 1109, "coin in amount not in whitelist") + ErrAmountPerBundleCoinNotWhitelisted = errors.Register(ModuleName, 1110, "coin in amount per bundle not in whitelist") + ErrInvalidAmountPerBundleCoin = errors.Register(ModuleName, 1111, "coin in amount per bundle is not in funding amounts") ) diff --git a/x/funders/types/funders.pb.go b/x/funders/types/funders.pb.go index 11fec6ee..e8cfd5d1 100644 --- a/x/funders/types/funders.pb.go +++ b/x/funders/types/funders.pb.go @@ -4,7 +4,6 @@ package types import ( - cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -259,81 +258,10 @@ func (m *FundingState) GetActiveFunderAddresses() []string { return nil } -// WhitelistCoinEntry is an object containing information around a coin which -// is allowed to be funded in pools -type WhitelistCoinEntry struct { - // coin_denom is the denom of a coin which is allowed to be funded, this value - // needs to be unique - CoinDenom string `protobuf:"bytes,1,opt,name=coin_denom,json=coinDenom,proto3" json:"coin_denom,omitempty"` - // min_funding_amount is the minimum required amount of this denom that needs - // to be funded - MinFundingAmount uint64 `protobuf:"varint,2,opt,name=min_funding_amount,json=minFundingAmount,proto3" json:"min_funding_amount,omitempty"` - // min_funding_amount_per_bundle is the minimum required amount of this denom - // that needs to be funded per bundle - MinFundingAmountPerBundle uint64 `protobuf:"varint,3,opt,name=min_funding_amount_per_bundle,json=minFundingAmountPerBundle,proto3" json:"min_funding_amount_per_bundle,omitempty"` - // coin_weight is a factor used to sort funders after their funding amounts - CoinWeight cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=coin_weight,json=coinWeight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"coin_weight"` -} - -func (m *WhitelistCoinEntry) Reset() { *m = WhitelistCoinEntry{} } -func (m *WhitelistCoinEntry) String() string { return proto.CompactTextString(m) } -func (*WhitelistCoinEntry) ProtoMessage() {} -func (*WhitelistCoinEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_252d80f89b0fa299, []int{3} -} -func (m *WhitelistCoinEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WhitelistCoinEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WhitelistCoinEntry.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WhitelistCoinEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_WhitelistCoinEntry.Merge(m, src) -} -func (m *WhitelistCoinEntry) XXX_Size() int { - return m.Size() -} -func (m *WhitelistCoinEntry) XXX_DiscardUnknown() { - xxx_messageInfo_WhitelistCoinEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_WhitelistCoinEntry proto.InternalMessageInfo - -func (m *WhitelistCoinEntry) GetCoinDenom() string { - if m != nil { - return m.CoinDenom - } - return "" -} - -func (m *WhitelistCoinEntry) GetMinFundingAmount() uint64 { - if m != nil { - return m.MinFundingAmount - } - return 0 -} - -func (m *WhitelistCoinEntry) GetMinFundingAmountPerBundle() uint64 { - if m != nil { - return m.MinFundingAmountPerBundle - } - return 0 -} - func init() { proto.RegisterType((*Funder)(nil), "kyve.funders.v1beta1.Funder") proto.RegisterType((*Funding)(nil), "kyve.funders.v1beta1.Funding") proto.RegisterType((*FundingState)(nil), "kyve.funders.v1beta1.FundingState") - proto.RegisterType((*WhitelistCoinEntry)(nil), "kyve.funders.v1beta1.WhitelistCoinEntry") } func init() { @@ -341,45 +269,38 @@ func init() { } var fileDescriptor_252d80f89b0fa299 = []byte{ - // 599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x4f, 0x6f, 0x12, 0x4f, - 0x18, 0x66, 0xbb, 0x2d, 0xfc, 0x18, 0xfa, 0x33, 0x75, 0x52, 0xd3, 0x2d, 0xa6, 0x0b, 0xc1, 0x98, - 0x10, 0x53, 0x77, 0x53, 0x8d, 0x9e, 0x2d, 0x52, 0x12, 0xa3, 0x31, 0x06, 0x13, 0x1b, 0xbd, 0x6c, - 0x66, 0x77, 0xc6, 0x65, 0x84, 0x9d, 0x21, 0x3b, 0x03, 0xc8, 0xc5, 0xcf, 0xe0, 0xc7, 0x30, 0x3d, - 0x18, 0x3f, 0x46, 0x8f, 0x3d, 0x1a, 0x0f, 0xd5, 0xc0, 0xc1, 0xf8, 0x2d, 0xcc, 0xfc, 0x01, 0x41, - 0xcf, 0xbd, 0xc0, 0xbc, 0xef, 0xf3, 0xbe, 0xf3, 0x3e, 0x3c, 0xcf, 0x3b, 0x80, 0x46, 0x7f, 0x3a, - 0x26, 0xe1, 0xdb, 0x11, 0xc3, 0x24, 0x17, 0xe1, 0xf8, 0x28, 0x26, 0x12, 0x1d, 0x2d, 0xe2, 0x60, - 0x98, 0x73, 0xc9, 0xe1, 0xae, 0xaa, 0x09, 0x16, 0x39, 0x5b, 0x53, 0xbd, 0x8e, 0x32, 0xca, 0x78, - 0xa8, 0x3f, 0x4d, 0x61, 0xd5, 0x4f, 0xb8, 0xc8, 0xb8, 0x08, 0x63, 0x24, 0xc8, 0xf2, 0xae, 0x84, - 0x53, 0x66, 0xf1, 0xdd, 0x94, 0xa7, 0x5c, 0x1f, 0x43, 0x75, 0x32, 0xd9, 0xc6, 0x67, 0x07, 0x14, - 0x3b, 0xfa, 0x72, 0xe8, 0x81, 0x12, 0xc2, 0x38, 0x27, 0x42, 0x78, 0x4e, 0xdd, 0x69, 0x96, 0xbb, - 0x8b, 0x50, 0x21, 0x19, 0x67, 0xb4, 0x4f, 0x72, 0x6f, 0xc3, 0x20, 0x36, 0x84, 0x55, 0xf0, 0x1f, - 0xc5, 0x84, 0x49, 0x2a, 0xa7, 0x9e, 0xab, 0xa1, 0x65, 0xac, 0xba, 0x26, 0x24, 0x16, 0x54, 0x12, - 0x6f, 0xd3, 0x74, 0xd9, 0x50, 0x21, 0x09, 0x67, 0x12, 0x25, 0xd2, 0xdb, 0x32, 0x88, 0x0d, 0x61, - 0x1d, 0x54, 0x30, 0x11, 0x49, 0x4e, 0x87, 0x92, 0x72, 0xe6, 0x15, 0x35, 0xba, 0x9a, 0x6a, 0x9c, - 0xb9, 0xa0, 0xa4, 0x08, 0x53, 0x96, 0xc2, 0xdb, 0xe0, 0x9a, 0x11, 0x26, 0x5a, 0x27, 0xfe, 0xbf, - 0xc9, 0x1e, 0x5b, 0xfa, 0x7b, 0xa0, 0x34, 0xe4, 0x7c, 0x10, 0x51, 0xac, 0xe9, 0x6f, 0x76, 0x8b, - 0x2a, 0x7c, 0x82, 0xe1, 0x3b, 0x50, 0x42, 0x19, 0x1f, 0x31, 0x29, 0x3c, 0xb7, 0xee, 0x36, 0x2b, - 0xf7, 0xf6, 0x03, 0x23, 0x62, 0xa0, 0x44, 0x5c, 0x88, 0x1d, 0x3c, 0xe6, 0x94, 0xb5, 0x1e, 0x9c, - 0x5f, 0xd6, 0x0a, 0x67, 0xdf, 0x6b, 0xcd, 0x94, 0xca, 0xde, 0x28, 0x0e, 0x12, 0x9e, 0x85, 0x56, - 0x71, 0xf3, 0x75, 0x57, 0xe0, 0x7e, 0x28, 0xa7, 0x43, 0x22, 0x74, 0x83, 0xf8, 0xf4, 0xf3, 0xcb, - 0x1d, 0xa7, 0xbb, 0x18, 0x00, 0x3f, 0x00, 0x68, 0x8f, 0xd1, 0x90, 0xe4, 0x51, 0x3c, 0x62, 0x78, - 0xa0, 0x84, 0xb9, 0x9a, 0xb1, 0x3b, 0x76, 0xd6, 0x0b, 0x92, 0xb7, 0xf4, 0x24, 0x28, 0xc0, 0xb6, - 0xe4, 0x12, 0x0d, 0x22, 0xad, 0x0d, 0xf6, 0xb6, 0xae, 0x68, 0x72, 0x45, 0x4f, 0xd1, 0x2b, 0x85, - 0x1b, 0x11, 0xd8, 0xb6, 0x5e, 0xbd, 0x94, 0x48, 0x92, 0x55, 0x27, 0x9c, 0x35, 0x27, 0x1e, 0x82, - 0x3d, 0x94, 0x48, 0x3a, 0x26, 0xd1, 0xba, 0xa1, 0x44, 0x78, 0x1b, 0x75, 0xb7, 0x59, 0xee, 0xde, - 0x30, 0x70, 0x67, 0xd5, 0x58, 0x22, 0x1a, 0xbf, 0x1c, 0x00, 0x4f, 0x7b, 0x54, 0x92, 0x01, 0x15, - 0x52, 0xb1, 0x38, 0x61, 0x32, 0x9f, 0xc2, 0x03, 0x00, 0xd4, 0xe6, 0x47, 0x98, 0x30, 0x9e, 0xd9, - 0xa5, 0x28, 0xab, 0x4c, 0x5b, 0x25, 0xe0, 0x21, 0x80, 0x19, 0x65, 0x7a, 0x14, 0x65, 0x69, 0x64, - 0xb4, 0xb2, 0xbb, 0xb1, 0x93, 0x51, 0x66, 0x39, 0x1f, 0xeb, 0x3c, 0x7c, 0x04, 0x0e, 0xfe, 0xad, - 0x5e, 0x35, 0xd1, 0xd5, 0x8d, 0xfb, 0x7f, 0x37, 0xfe, 0xd1, 0xbe, 0x0d, 0x2a, 0x9a, 0xce, 0x84, - 0xd0, 0xb4, 0x27, 0xcd, 0x6b, 0x68, 0xdd, 0x52, 0xfa, 0x7e, 0xbb, 0xac, 0xdd, 0x34, 0x6a, 0x0a, - 0xdc, 0x0f, 0x28, 0x0f, 0x33, 0x24, 0x7b, 0xc1, 0x33, 0x92, 0xa2, 0x64, 0xda, 0x26, 0x49, 0x57, - 0xff, 0x8c, 0x53, 0xdd, 0xd6, 0xea, 0x9c, 0xcf, 0x7c, 0xe7, 0x62, 0xe6, 0x3b, 0x3f, 0x66, 0xbe, - 0xf3, 0x71, 0xee, 0x17, 0x2e, 0xe6, 0x7e, 0xe1, 0xeb, 0xdc, 0x2f, 0xbc, 0x39, 0x5c, 0xb1, 0xe8, - 0xe9, 0xeb, 0x57, 0x27, 0xcf, 0x89, 0x9c, 0xf0, 0xbc, 0x1f, 0x26, 0x3d, 0x44, 0x59, 0xf8, 0x7e, - 0xf9, 0x0f, 0xa3, 0xcd, 0x8a, 0x8b, 0xfa, 0xe5, 0xdf, 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xde, - 0x23, 0x35, 0xaf, 0x7e, 0x04, 0x00, 0x00, + // 482 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0x6e, 0x36, 0xbb, 0xad, 0x3b, 0x5d, 0x45, 0xc3, 0xca, 0x8e, 0x3d, 0x64, 0x4b, 0x41, 0x28, + 0xa2, 0x09, 0xab, 0xe8, 0xdd, 0x8a, 0x05, 0x11, 0x44, 0x2a, 0x08, 0x7a, 0x09, 0x93, 0xcc, 0xb3, + 0x3b, 0xb6, 0x99, 0x17, 0x32, 0xd3, 0xae, 0xbd, 0xf8, 0x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 0xf4, 0xfe, 0x2e, 0x43, 0xef, 0xdb, 0x2a, 0x6c, 0x5c, 0xaf, + 0xc2, 0xc6, 0xaf, 0x55, 0xd8, 0xf8, 0xf8, 0x70, 0x63, 0xec, 0xd7, 0x1f, 0xde, 0xbf, 0x7c, 0x03, + 0xfa, 0x02, 0xcb, 0x49, 0x9c, 0x9d, 0x33, 0x21, 0xe3, 0x2f, 0xeb, 0x5b, 0x67, 0x3e, 0x20, 0x6d, + 0x9a, 0xdb, 0xf0, 0xe4, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xf7, 0xe8, 0x0e, 0x92, 0x03, + 0x00, 0x00, } func (m *Funder) Marshal() (dAtA []byte, err error) { @@ -561,56 +482,6 @@ func (m *FundingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *WhitelistCoinEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WhitelistCoinEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WhitelistCoinEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.CoinWeight.Size() - i -= size - if _, err := m.CoinWeight.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintFunders(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.MinFundingAmountPerBundle != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.MinFundingAmountPerBundle)) - i-- - dAtA[i] = 0x18 - } - if m.MinFundingAmount != 0 { - i = encodeVarintFunders(dAtA, i, uint64(m.MinFundingAmount)) - i-- - dAtA[i] = 0x10 - } - if len(m.CoinDenom) > 0 { - i -= len(m.CoinDenom) - copy(dAtA[i:], m.CoinDenom) - i = encodeVarintFunders(dAtA, i, uint64(len(m.CoinDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintFunders(dAtA []byte, offset int, v uint64) int { offset -= sovFunders(v) base := offset @@ -707,27 +578,6 @@ func (m *FundingState) Size() (n int) { return n } -func (m *WhitelistCoinEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CoinDenom) - if l > 0 { - n += 1 + l + sovFunders(uint64(l)) - } - if m.MinFundingAmount != 0 { - n += 1 + sovFunders(uint64(m.MinFundingAmount)) - } - if m.MinFundingAmountPerBundle != 0 { - n += 1 + sovFunders(uint64(m.MinFundingAmountPerBundle)) - } - l = m.CoinWeight.Size() - n += 1 + l + sovFunders(uint64(l)) - return n -} - func sovFunders(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1280,160 +1130,6 @@ func (m *FundingState) Unmarshal(dAtA []byte) error { } return nil } -func (m *WhitelistCoinEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunders - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WhitelistCoinEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WhitelistCoinEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoinDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunders - } - 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 ErrInvalidLengthFunders - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFunders - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CoinDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinFundingAmount", wireType) - } - m.MinFundingAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunders - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinFundingAmount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinFundingAmountPerBundle", wireType) - } - m.MinFundingAmountPerBundle = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunders - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinFundingAmountPerBundle |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoinWeight", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunders - } - 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 ErrInvalidLengthFunders - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFunders - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CoinWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFunders(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFunders - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipFunders(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/funders/types/message_defund_pool.go b/x/funders/types/message_defund_pool.go index 292eb181..a00e3dd4 100644 --- a/x/funders/types/message_defund_pool.go +++ b/x/funders/types/message_defund_pool.go @@ -40,8 +40,12 @@ func (msg *MsgDefundPool) ValidateBasic() error { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid pool id") } - if !msg.Amounts.IsAllPositive() { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount") + if msg.Amounts.Empty() { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, "empty amount") + } + + if err := msg.Amounts.Validate(); err != nil { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount: %s", err) } return nil diff --git a/x/funders/types/message_fund_pool.go b/x/funders/types/message_fund_pool.go index 518fd7bc..746350b5 100644 --- a/x/funders/types/message_fund_pool.go +++ b/x/funders/types/message_fund_pool.go @@ -40,16 +40,16 @@ func (msg *MsgFundPool) ValidateBasic() error { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid pool id") } - if msg.Amounts.Len() == 0 && msg.AmountsPerBundle.Len() == 0 { + if msg.Amounts.Empty() && msg.AmountsPerBundle.Empty() { return errors.Wrapf(errorsTypes.ErrInvalidRequest, "empty request") } - if msg.Amounts.Len() > 0 && !msg.Amounts.IsAllPositive() { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount") + if err := msg.Amounts.Validate(); !msg.Amounts.Empty() && err != nil { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount: %s", err) } - if msg.AmountsPerBundle.Len() > 0 && !msg.AmountsPerBundle.IsAllPositive() { - return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount per bundle") + if err := msg.AmountsPerBundle.Validate(); !msg.AmountsPerBundle.Empty() && err != nil { + return errors.Wrapf(errorsTypes.ErrInvalidRequest, "invalid amount per bundle: %s", err) } return nil diff --git a/x/funders/types/params.pb.go b/x/funders/types/params.pb.go index 8c3684e6..bf2366eb 100644 --- a/x/funders/types/params.pb.go +++ b/x/funders/types/params.pb.go @@ -4,7 +4,11 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -22,6 +26,76 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// WhitelistCoinEntry is an object containing information around a coin which +// is allowed to be funded in pools +type WhitelistCoinEntry struct { + // coin_denom is the denom of a coin which is allowed to be funded, this value + // needs to be unique + CoinDenom string `protobuf:"bytes,1,opt,name=coin_denom,json=coinDenom,proto3" json:"coin_denom,omitempty"` + // min_funding_amount is the minimum required amount of this denom that needs + // to be funded + MinFundingAmount uint64 `protobuf:"varint,2,opt,name=min_funding_amount,json=minFundingAmount,proto3" json:"min_funding_amount,omitempty"` + // min_funding_amount_per_bundle is the minimum required amount of this denom + // that needs to be funded per bundle + MinFundingAmountPerBundle uint64 `protobuf:"varint,3,opt,name=min_funding_amount_per_bundle,json=minFundingAmountPerBundle,proto3" json:"min_funding_amount_per_bundle,omitempty"` + // coin_weight is a factor used to sort funders after their funding amounts + CoinWeight cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=coin_weight,json=coinWeight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"coin_weight"` +} + +func (m *WhitelistCoinEntry) Reset() { *m = WhitelistCoinEntry{} } +func (m *WhitelistCoinEntry) String() string { return proto.CompactTextString(m) } +func (*WhitelistCoinEntry) ProtoMessage() {} +func (*WhitelistCoinEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_906a9a55094dc984, []int{0} +} +func (m *WhitelistCoinEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WhitelistCoinEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WhitelistCoinEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WhitelistCoinEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_WhitelistCoinEntry.Merge(m, src) +} +func (m *WhitelistCoinEntry) XXX_Size() int { + return m.Size() +} +func (m *WhitelistCoinEntry) XXX_DiscardUnknown() { + xxx_messageInfo_WhitelistCoinEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_WhitelistCoinEntry proto.InternalMessageInfo + +func (m *WhitelistCoinEntry) GetCoinDenom() string { + if m != nil { + return m.CoinDenom + } + return "" +} + +func (m *WhitelistCoinEntry) GetMinFundingAmount() uint64 { + if m != nil { + return m.MinFundingAmount + } + return 0 +} + +func (m *WhitelistCoinEntry) GetMinFundingAmountPerBundle() uint64 { + if m != nil { + return m.MinFundingAmountPerBundle + } + return 0 +} + // Params defines the funders module parameters. type Params struct { // coin_whitelist is a list of coins that are allowed to fund a pool @@ -36,7 +110,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_906a9a55094dc984, []int{0} + return fileDescriptor_906a9a55094dc984, []int{1} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,29 +154,90 @@ func (m *Params) GetMinFundingMultiple() uint64 { } func init() { + proto.RegisterType((*WhitelistCoinEntry)(nil), "kyve.funders.v1beta1.WhitelistCoinEntry") proto.RegisterType((*Params)(nil), "kyve.funders.v1beta1.Params") } func init() { proto.RegisterFile("kyve/funders/v1beta1/params.proto", fileDescriptor_906a9a55094dc984) } var fileDescriptor_906a9a55094dc984 = []byte{ - // 244 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcc, 0xae, 0x2c, 0x4b, - 0xd5, 0x4f, 0x2b, 0xcd, 0x4b, 0x49, 0x2d, 0x2a, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, - 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x01, - 0x29, 0xd1, 0x83, 0x2a, 0xd1, 0x83, 0x2a, 0x91, 0x52, 0xc2, 0xaa, 0x11, 0xa6, 0x0a, 0xac, 0x53, - 0xa9, 0x9b, 0x91, 0x8b, 0x2d, 0x00, 0x6c, 0x94, 0x90, 0x3f, 0x17, 0x5f, 0x72, 0x7e, 0x66, 0x5e, - 0x7c, 0x79, 0x46, 0x66, 0x49, 0x6a, 0x4e, 0x66, 0x71, 0x89, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, - 0x91, 0x86, 0x1e, 0x36, 0xd3, 0xf5, 0xc2, 0x61, 0xca, 0x9c, 0xf3, 0x33, 0xf3, 0x5c, 0xf3, 0x4a, - 0x8a, 0x2a, 0x83, 0x78, 0x41, 0xfa, 0xe1, 0xe2, 0x42, 0x06, 0x5c, 0x22, 0xb9, 0x99, 0x79, 0xf1, - 0x20, 0x8d, 0x99, 0x79, 0xe9, 0xf1, 0xb9, 0xa5, 0x39, 0x25, 0x99, 0x05, 0x39, 0xa9, 0x12, 0x4c, - 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x42, 0xb9, 0x99, 0x79, 0x6e, 0x10, 0x29, 0x5f, 0xa8, 0x8c, 0x93, - 0xdb, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, - 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa4, 0x67, 0x96, 0x64, - 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x7b, 0x47, 0x86, 0xb9, 0xfa, 0xa5, 0x96, 0x94, 0xe7, - 0x17, 0x65, 0xeb, 0x27, 0x67, 0x24, 0x66, 0xe6, 0xe9, 0x57, 0xc0, 0x7d, 0x59, 0x52, 0x59, 0x90, - 0x5a, 0x9c, 0xc4, 0x06, 0xf6, 0x9c, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x56, 0x38, 0xef, 0xb1, - 0x3b, 0x01, 0x00, 0x00, + // 410 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x4d, 0x8f, 0xd3, 0x30, + 0x10, 0x8d, 0xd9, 0xd5, 0x4a, 0xeb, 0x15, 0x08, 0xac, 0x1e, 0xc2, 0xa2, 0xcd, 0x96, 0x72, 0xc9, + 0x61, 0x65, 0xb3, 0xf0, 0x07, 0xa0, 0x74, 0xf7, 0xc2, 0x57, 0x95, 0x03, 0x15, 0x5c, 0x22, 0x27, + 0x31, 0x89, 0xd5, 0xd8, 0x8e, 0x62, 0xa7, 0x25, 0xbf, 0x81, 0x0b, 0x3f, 0xab, 0xc7, 0x1e, 0x11, + 0x87, 0x0a, 0xb5, 0x27, 0xfe, 0x05, 0x8a, 0x93, 0x16, 0xb4, 0xed, 0xc5, 0x1a, 0xbd, 0x79, 0xf3, + 0x3c, 0xef, 0x0d, 0x7c, 0x3a, 0xad, 0x67, 0x8c, 0x7c, 0xad, 0x64, 0xc2, 0x4a, 0x4d, 0x66, 0xd7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x3b, 0x96, 0xd2, 0xb8, 0x1e, 0xb1, 0x38, 0xb0, 0x36, 0x26, 0x76, 0x6c, + 0xf0, 0x1d, 0xc0, 0x93, 0xb1, 0xcd, 0x1f, 0x7d, 0x84, 0x0f, 0x5a, 0xc1, 0xad, 0x75, 0x17, 0xf4, + 0x8f, 0xfc, 0xb3, 0x17, 0x3e, 0x3e, 0x74, 0x12, 0xbc, 0x9f, 0x50, 0x70, 0xdf, 0x0a, 0x6f, 0x71, + 0xf4, 0x1c, 0xf6, 0xfe, 0xf7, 0x28, 0xaa, 0xdc, 0xf0, 0x22, 0x67, 0x5d, 0x26, 0xe8, 0x9f, 0xb5, + 0xf7, 0x5d, 0x67, 0x78, 0xbb, 0x58, 0x7b, 0x60, 0xb9, 0xf6, 0xc0, 0xef, 0xb5, 0x07, 0x7e, 0x6c, + 0x3c, 0x67, 0xb9, 0xf1, 0x9c, 0x9f, 0x1b, 0xcf, 0xf9, 0x72, 0x95, 0x72, 0x93, 0x55, 0x11, 0x8e, + 0x95, 0x20, 0x6f, 0x3f, 0x7f, 0xba, 0xf9, 0xc0, 0xcc, 0x5c, 0x95, 0x53, 0x12, 0x67, 0x94, 0x4b, + 0xf2, 0x6d, 0x77, 0x51, 0x53, 0x17, 0x4c, 0x47, 0x27, 0xf6, 0x90, 0x2f, 0xff, 0x06, 0x00, 0x00, + 0xff, 0xff, 0xee, 0x97, 0x01, 0x98, 0x70, 0x02, 0x00, 0x00, +} + +func (m *WhitelistCoinEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WhitelistCoinEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WhitelistCoinEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.CoinWeight.Size() + i -= size + if _, err := m.CoinWeight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.MinFundingAmountPerBundle != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MinFundingAmountPerBundle)) + i-- + dAtA[i] = 0x18 + } + if m.MinFundingAmount != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MinFundingAmount)) + i-- + dAtA[i] = 0x10 + } + if len(m.CoinDenom) > 0 { + i -= len(m.CoinDenom) + copy(dAtA[i:], m.CoinDenom) + i = encodeVarintParams(dAtA, i, uint64(len(m.CoinDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -158,6 +293,27 @@ func encodeVarintParams(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *WhitelistCoinEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CoinDenom) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + if m.MinFundingAmount != 0 { + n += 1 + sovParams(uint64(m.MinFundingAmount)) + } + if m.MinFundingAmountPerBundle != 0 { + n += 1 + sovParams(uint64(m.MinFundingAmountPerBundle)) + } + l = m.CoinWeight.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + func (m *Params) Size() (n int) { if m == nil { return 0 @@ -182,6 +338,160 @@ func sovParams(x uint64) (n int) { func sozParams(x uint64) (n int) { return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *WhitelistCoinEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WhitelistCoinEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WhitelistCoinEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoinDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinFundingAmount", wireType) + } + m.MinFundingAmount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinFundingAmount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinFundingAmountPerBundle", wireType) + } + m.MinFundingAmountPerBundle = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinFundingAmountPerBundle |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinWeight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CoinWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From ccf91fd9f02782c4354ae3735e1a891da0f44b34 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 13:42:09 +0200 Subject: [PATCH 21/28] chore: clean amounts per bundle --- x/funders/keeper/logic_funders.go | 6 +- x/funders/keeper/msg_server_defund_pool.go | 9 ++- .../keeper/msg_server_defund_pool_test.go | 70 ++++++++++++++++--- x/funders/keeper/msg_server_fund_pool.go | 2 +- x/funders/keeper/msg_server_fund_pool_test.go | 37 ---------- x/funders/types/funders.go | 17 ++++- x/funders/types/funders_test.go | 58 ++++++++++++--- 7 files changed, 135 insertions(+), 64 deletions(-) diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index e8e7b63a..61175d07 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -102,7 +102,7 @@ func (k Keeper) GetLowestFunding(fundings []types.Funding, whitelist []*types.Wh // - minimum funding per bundle // - minimum funding amount // - minimum funding multiple -func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding types.Funding) error { +func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding *types.Funding) error { params := k.GetParams(ctx) minFundingAmounts := sdk.NewCoins() @@ -113,6 +113,9 @@ func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding types.Funding minFundingAmountsPerBundle = minFundingAmountsPerBundle.Add(sdk.NewInt64Coin(entry.CoinDenom, int64(entry.MinFundingAmountPerBundle))) } + // before we perform compatibility checks we clean the funding state + funding.CleanAmountsPerBundle() + // throw error if there is a coin in amounts with no corresponding coin in amounts per bundle if !funding.Amounts.DenomsSubsetOf(funding.AmountsPerBundle) { return types.ErrInvalidAmountPerBundleCoin @@ -191,6 +194,7 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi } lowestFunding.Amounts = lowestFunding.Amounts.Sub(lowestFunding.Amounts...) + lowestFunding.CleanAmountsPerBundle() fundingState.SetInactive(lowestFunding) k.SetFunding(ctx, lowestFunding) diff --git a/x/funders/keeper/msg_server_defund_pool.go b/x/funders/keeper/msg_server_defund_pool.go index a7750a18..0b4da9c5 100644 --- a/x/funders/keeper/msg_server_defund_pool.go +++ b/x/funders/keeper/msg_server_defund_pool.go @@ -39,13 +39,12 @@ func (k msgServer) DefundPool(goCtx context.Context, msg *types.MsgDefundPool) ( // Subtract amount from funding funding.Amounts = funding.Amounts.Sub(defundAmounts...) + if err := k.ensureParamsCompatibility(ctx, &funding); err != nil { + return nil, err + } + if funding.Amounts.IsZero() { fundingState.SetInactive(&funding) - } else { - // If funding is not fully revoked, check if updated funding is still compatible with params. - if err := k.ensureParamsCompatibility(ctx, funding); err != nil { - return nil, err - } } // Transfer tokens from this module to sender. diff --git a/x/funders/keeper/msg_server_defund_pool_test.go b/x/funders/keeper/msg_server_defund_pool_test.go index 95dd38f1..e7bed96b 100644 --- a/x/funders/keeper/msg_server_defund_pool_test.go +++ b/x/funders/keeper/msg_server_defund_pool_test.go @@ -129,6 +129,14 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(1)) Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) + + // assert if the funder can still fund afterwards + s.RunTxFundersSuccess(&types.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) }) It("Defund more than actually funded", func() { @@ -144,12 +152,20 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) - Expect(funding.Amounts.IsZero()).To(BeTrue()) - Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.Amounts).To(BeEmpty()) + Expect(funding.AmountsPerBundle).To(BeEmpty()) Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(0)) + + // assert if the funder can still fund afterwards + s.RunTxFundersSuccess(&types.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) }) It("Defund full funding amount from a funder who has previously funded 100 coins", func() { @@ -165,12 +181,20 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) - Expect(funding.Amounts.IsZero()).To(BeTrue()) - Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.Amounts).To(BeEmpty()) + Expect(funding.AmountsPerBundle).To(BeEmpty()) Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(0)) + + // assert if the funder can still fund afterwards + s.RunTxFundersSuccess(&types.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) }) It("Defund as highest funder 75 coins in order to be the lowest funder afterwards", func() { @@ -205,6 +229,14 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { lowestFunding, err = s.App().FundersKeeper.GetLowestFunding(activeFundings, whitelist) Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.ALICE)) + + // assert if the funder can still fund afterwards + s.RunTxFundersSuccess(&types.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.ACoins(100 * i.T_KYVE), + AmountsPerBundle: i.ACoins(1 * i.T_KYVE), + }) }) It("Try to defund zero amounts", func() { @@ -236,28 +268,36 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { }) It("Try to defund a funding twice", func() { - // ACT + // ARRANGE s.RunTxFundersSuccess(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, Amounts: i.ACoins(100 * i.T_KYVE), }) - // ASSERT - s.RunTxFundersError(&types.MsgDefundPool{ + // ACT + _, err := s.RunTx(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, Amounts: i.ACoins(100 * i.T_KYVE), }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(errors.Wrapf(errorsTypes.ErrInvalidRequest, types.ErrFundsTooLow.Error()).Error())) }) It("Try to defund below minimum funding params (but not full defund)", func() { - // ASSERT - s.RunTxFundersError(&types.MsgDefundPool{ + // ACT + _, err := s.RunTx(&types.MsgDefundPool{ Creator: i.ALICE, PoolId: 0, Amounts: i.ACoins(95 * i.T_KYVE), }) + + // ASSERT + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(types.ErrMinFundingAmount.Error())) }) It("Try to partially defund after a coin has been removed from the whitelist", func() { @@ -332,11 +372,19 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) - Expect(funding.Amounts.IsZero()).To(BeTrue()) - Expect(funding.AmountsPerBundle.String()).To(Equal(i.ACoins(1 * i.T_KYVE).String())) + Expect(funding.Amounts).To(BeEmpty()) + Expect(funding.AmountsPerBundle).To(BeEmpty()) Expect(funding.TotalFunded.IsZero()).To(BeTrue()) fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(0)) + + // assert if the funder can still fund afterwards + s.RunTxFundersSuccess(&types.MsgFundPool{ + Creator: i.ALICE, + PoolId: 0, + Amounts: i.BCoins(100 * i.T_KYVE), + AmountsPerBundle: i.BCoins(1 * i.T_KYVE), + }) }) }) diff --git a/x/funders/keeper/msg_server_fund_pool.go b/x/funders/keeper/msg_server_fund_pool.go index df6da368..ef9d9b89 100644 --- a/x/funders/keeper/msg_server_fund_pool.go +++ b/x/funders/keeper/msg_server_fund_pool.go @@ -60,7 +60,7 @@ func (k msgServer) FundPool(goCtx context.Context, msg *types.MsgFundPool) (*typ } // Check if updated (or new) funding is compatible with module params - if err := k.ensureParamsCompatibility(ctx, funding); err != nil { + if err := k.ensureParamsCompatibility(ctx, &funding); err != nil { return nil, err } diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index 5c878279..d8032205 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -620,43 +620,6 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(err).ToNot(HaveOccurred()) }) - It("Try changing the amount per bundle of a coin which is not funded and whitelisted", func() { - // ARRANGE - whitelist = []*funderstypes.WhitelistCoinEntry{ - { - CoinDenom: globaltypes.Denom, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(1), - }, - { - CoinDenom: i.A_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(1), - }, - { - CoinDenom: i.B_DENOM, - MinFundingAmount: 10 * i.KYVE, - MinFundingAmountPerBundle: 1 * i.KYVE, - CoinWeight: math.LegacyNewDec(2), - }, - } - s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) - - // ASSERT - _, err := s.RunTx(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amounts: sdk.NewCoins(), - AmountsPerBundle: i.CCoins(1 * i.T_KYVE), - }) - - // ASSERT - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(Equal(funderstypes.ErrAmountPerBundleCoinNotWhitelisted.Error())) - }) - It("Try to fund with a non-existent funder", func() { // ASSERT s.RunTxFundersError(&funderstypes.MsgFundPool{ diff --git a/x/funders/types/funders.go b/x/funders/types/funders.go index 32e03dbc..a85a8427 100644 --- a/x/funders/types/funders.go +++ b/x/funders/types/funders.go @@ -18,10 +18,25 @@ func (f *Funding) GetScore(whitelist []*WhitelistCoinEntry) (score uint64) { return } +// CleanAmountsPerBundle removes every coin in amounts per bundle +// which is not present in the amounts coins list +func (f *Funding) CleanAmountsPerBundle() { + amountsPerBundle := sdk.NewCoins() + + for _, coin := range f.AmountsPerBundle { + if found, _ := f.Amounts.Find(coin.Denom); found { + amountsPerBundle = amountsPerBundle.Add(coin) + } + } + + f.AmountsPerBundle = amountsPerBundle +} + func (f *Funding) ChargeOneBundle() (payouts sdk.Coins) { payouts = f.Amounts.Min(f.AmountsPerBundle) - f.Amounts = f.Amounts.Sub(payouts...) f.TotalFunded = f.TotalFunded.Add(payouts...) + f.Amounts = f.Amounts.Sub(payouts...) + f.CleanAmountsPerBundle() return } diff --git a/x/funders/types/funders_test.go b/x/funders/types/funders_test.go index 80a4d7c6..e766bd14 100644 --- a/x/funders/types/funders_test.go +++ b/x/funders/types/funders_test.go @@ -18,10 +18,13 @@ TEST CASES - funders.go * Funding.ChargeOneBundle - charge more than available * Funding.ChargeOneBundle - charge with multiple coins * Funding.ChargeOneBundle - charge with no coins -* FundintState.SetActive -* FundintState.SetActive - add same funder twice -* FundintState.SetInactive -* FundintState.SetInactive - with multiple funders +* Funding.CleanAmountsPerBundle - same coins are present in amounts and in amounts per bundle +* Funding.CleanAmountsPerBundle - more coins are present in amounts per bundle than in amounts +* Funding.CleanAmountsPerBundle - coins are present in amounts per bundle but not in amounts +* FundingState.SetActive +* FundingState.SetActive - add same funder twice +* FundingState.SetInactive +* FundingState.SetInactive - with multiple funders */ @@ -126,7 +129,46 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(funding.TotalFunded.IsZero()).To(BeTrue()) }) - It("FundintState.SetActive", func() { + It("Funding.CleanAmountsPerBundle - same coins are present in amounts and in amounts per bundle", func() { + // ARRANGE + funding.Amounts = sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(80*i.T_KYVE)) + funding.AmountsPerBundle = sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE)) + + // ACT + funding.CleanAmountsPerBundle() + + // ASSERT + Expect(funding.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(80*i.T_KYVE)).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE)).String())) + }) + + It("Funding.CleanAmountsPerBundle - more coins are present in amounts per bundle than in amounts", func() { + // ARRANGE + funding.Amounts = sdk.NewCoins(i.ACoin(100 * i.T_KYVE)) + funding.AmountsPerBundle = sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE)) + + // ACT + funding.CleanAmountsPerBundle() + + // ASSERT + Expect(funding.Amounts.String()).To(Equal(sdk.NewCoins(i.ACoin(100 * i.T_KYVE)).String())) + Expect(funding.AmountsPerBundle.String()).To(Equal(sdk.NewCoins(i.ACoin(1 * i.T_KYVE)).String())) + }) + + It("Funding.CleanAmountsPerBundle - coins are present in amounts per bundle but not in amounts", func() { + // ARRANGE + funding.Amounts = sdk.NewCoins() + funding.AmountsPerBundle = sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(1*i.T_KYVE)) + + // ACT + funding.CleanAmountsPerBundle() + + // ASSERT + Expect(funding.Amounts).To(BeEmpty()) + Expect(funding.AmountsPerBundle).To(BeEmpty()) + }) + + It("FundingState.SetActive", func() { // ARRANGE fundingState.ActiveFunderAddresses = []string{} @@ -138,7 +180,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) }) - It("FundintState.SetActive - add same funder twice", func() { + It("FundingState.SetActive - add same funder twice", func() { // ACT Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) @@ -150,7 +192,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) }) - It("FundintState.SetInactive", func() { + It("FundingState.SetInactive", func() { // ACT Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) fundingState.SetInactive(&funding) @@ -159,7 +201,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) }) - It("FundintState.SetInactive - with multiple funders", func() { + It("FundingState.SetInactive - with multiple funders", func() { // ARRANGE fundingState.ActiveFunderAddresses = []string{i.ALICE, i.BOB, i.CHARLIE} From b3aa6e2df6f21e033364be0145a5729df97ca70d Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 13:54:45 +0200 Subject: [PATCH 22/28] chore: implemented feedback --- proto/kyve/funders/v1beta1/params.proto | 3 --- x/funders/keeper/msg_server_defund_pool_test.go | 4 +++- x/funders/spec/02_state.md | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/proto/kyve/funders/v1beta1/params.proto b/proto/kyve/funders/v1beta1/params.proto index d4d7ce3b..77d1ebf8 100644 --- a/proto/kyve/funders/v1beta1/params.proto +++ b/proto/kyve/funders/v1beta1/params.proto @@ -2,10 +2,7 @@ syntax = "proto3"; package kyve.funders.v1beta1; -import "amino/amino.proto"; -import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; -import "kyve/funders/v1beta1/funders.proto"; option go_package = "github.com/KYVENetwork/chain/x/funders/types"; diff --git a/x/funders/keeper/msg_server_defund_pool_test.go b/x/funders/keeper/msg_server_defund_pool_test.go index e7bed96b..dbb9fea8 100644 --- a/x/funders/keeper/msg_server_defund_pool_test.go +++ b/x/funders/keeper/msg_server_defund_pool_test.go @@ -33,13 +33,15 @@ TEST CASES - msg_server_defund_pool.go var _ = Describe("msg_server_defund_pool.go", Ordered, func() { s := i.NewCleanChain() - initialBalance := s.GetBalancesFromAddress(i.ALICE) + var initialBalance sdk.Coins var whitelist []*types.WhitelistCoinEntry BeforeEach(func() { // init new clean chain s = i.NewCleanChain() + initialBalance = s.GetBalancesFromAddress(i.ALICE) + // create clean pool for every test case gov := s.App().GovKeeper.GetGovernanceAccount(s.Ctx()).GetAddress().String() msg := &pooltypes.MsgCreatePool{ diff --git a/x/funders/spec/02_state.md b/x/funders/spec/02_state.md index 1d2f8750..4bd3d053 100644 --- a/x/funders/spec/02_state.md +++ b/x/funders/spec/02_state.md @@ -34,8 +34,8 @@ message Funder { ## Funding -Since funders and pools have a many-to-many relation we track the funding status in the `Funding` object containing -the information about what the funder funded in the specific pool like the amount of coins and the corresponding +Since funders and pools have a many-to-many relation, we track the funding status in the `Funding` object containing +the information about what the funder funded in the specific pool, like the amount of coins and the corresponding amount per bundle. We also track how much the funder spent in total in the pool. - Funding: `0x02 | 0x00 | PoolId | FunderAddr -> ProtocolBuffer(funding)` From 5f180ab3ad8312728cdd4b2499dba3ed16952dad Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 15:41:24 +0200 Subject: [PATCH 23/28] WIP: sync with main --- docs/static/openapi.yml | 4 +- testutil/integration/integration.go | 58 ++++---- x/delegation/keeper/keeper_suite_test.go | 7 +- x/funders/types/funders.pb.go | 2 +- x/funders/types/params.pb.go | 54 ++++--- x/query/types/account.pb.go | 177 +++++++++++++---------- 6 files changed, 159 insertions(+), 143 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 62606f1c..0bb94e32 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -5235,7 +5235,7 @@ paths: properties: funder_address: type: string - title: funder_id is the id of the funder + title: funder_address is the address of the funder pool_id: type: string format: uint64 @@ -5823,7 +5823,7 @@ paths: properties: funder_address: type: string - title: funder_id is the id of the funder + title: funder_address is the address of the funder pool_id: type: string format: uint64 diff --git a/testutil/integration/integration.go b/testutil/integration/integration.go index 06d3ff9a..fff8a116 100644 --- a/testutil/integration/integration.go +++ b/testutil/integration/integration.go @@ -117,30 +117,30 @@ func NewCleanChainAtTime(startTime int64) *KeeperTestSuite { } func (suite *KeeperTestSuite) initDummyAccounts() { - _ = suite.Mint(ALICE, 1000*KYVE) - _ = suite.Mint(BOB, 1000*KYVE) - _ = suite.Mint(CHARLIE, 1000*KYVE) - _ = suite.Mint(DAVID, 1000*KYVE) - - _ = suite.Mint(STAKER_0, 1000*KYVE) - _ = suite.Mint(VALADDRESS_0_A, 1000*KYVE) - _ = suite.Mint(VALADDRESS_0_B, 1000*KYVE) - _ = suite.Mint(VALADDRESS_0_C, 1000*KYVE) - - _ = suite.Mint(STAKER_1, 1000*KYVE) - _ = suite.Mint(VALADDRESS_1_A, 1000*KYVE) - _ = suite.Mint(VALADDRESS_1_B, 1000*KYVE) - _ = suite.Mint(VALADDRESS_1_C, 1000*KYVE) - - _ = suite.Mint(STAKER_2, 1000*KYVE) - _ = suite.Mint(VALADDRESS_2_A, 1000*KYVE) - _ = suite.Mint(VALADDRESS_2_B, 1000*KYVE) - _ = suite.Mint(VALADDRESS_2_C, 1000*KYVE) - - _ = suite.Mint(STAKER_3, 1000*KYVE) - _ = suite.Mint(VALADDRESS_3_A, 1000*KYVE) - _ = suite.Mint(VALADDRESS_3_B, 1000*KYVE) - _ = suite.Mint(VALADDRESS_3_C, 1000*KYVE) + _ = suite.MintCoins(ALICE, 1000*KYVE) + _ = suite.MintCoins(BOB, 1000*KYVE) + _ = suite.MintCoins(CHARLIE, 1000*KYVE) + _ = suite.MintCoins(DAVID, 1000*KYVE) + + _ = suite.MintCoins(STAKER_0, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_0_A, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_0_B, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_0_C, 1000*KYVE) + + _ = suite.MintCoins(STAKER_1, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_1_A, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_1_B, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_1_C, 1000*KYVE) + + _ = suite.MintCoins(STAKER_2, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_2_A, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_2_B, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_2_C, 1000*KYVE) + + _ = suite.MintCoins(STAKER_3, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_3_A, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_3_B, 1000*KYVE) + _ = suite.MintCoins(VALADDRESS_3_C, 1000*KYVE) DUMMY = make([]string, 50) @@ -152,7 +152,7 @@ func (suite *KeeperTestSuite) initDummyAccounts() { } dummy, _ := sdk.Bech32ifyAddressBytes("kyve", byteAddr) DUMMY[i] = dummy - _ = suite.Mint(dummy, 1000*KYVE) + _ = suite.MintCoins(dummy, 1000*KYVE) } VALDUMMY = make([]string, 50) @@ -164,11 +164,11 @@ func (suite *KeeperTestSuite) initDummyAccounts() { } dummy, _ := sdk.Bech32ifyAddressBytes("kyve", byteAddr) VALDUMMY[i] = dummy - _ = suite.Mint(dummy, 1000*KYVE) + _ = suite.MintCoins(dummy, 1000*KYVE) } } -func (suite *KeeperTestSuite) Mint(address string, amount uint64) error { +func (suite *KeeperTestSuite) MintCoins(address string, amount uint64) error { // mint coins ukyve, A, B, C coins := sdk.NewCoins( sdk.NewInt64Coin(KYVE_DENOM, int64(amount)), @@ -213,10 +213,6 @@ func (suite *KeeperTestSuite) MintDenomToModule(moduleAddress string, amount uin return nil } -func (suite *KeeperTestSuite) Mint(address string, amount uint64) error { - return suite.MintDenom(address, amount, KYVE_DENOM) -} - type KeeperTestSuite struct { suite.Suite diff --git a/x/delegation/keeper/keeper_suite_test.go b/x/delegation/keeper/keeper_suite_test.go index aabc33a6..49989784 100644 --- a/x/delegation/keeper/keeper_suite_test.go +++ b/x/delegation/keeper/keeper_suite_test.go @@ -3,14 +3,11 @@ package keeper_test import ( "cosmossdk.io/math" "fmt" + funderstypes "github.com/KYVENetwork/chain/x/funders/types" "testing" sdk "github.com/cosmos/cosmos-sdk/types" - globalTypes "github.com/KYVENetwork/chain/x/global/types" - - funderstypes "github.com/KYVENetwork/chain/x/funders/types" - i "github.com/KYVENetwork/chain/testutil/integration" "github.com/KYVENetwork/chain/x/delegation/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" @@ -40,7 +37,7 @@ func PayoutRewards(s *i.KeeperTestSuite, staker string, coins sdk.Coins) { Expect(err).To(BeNil()) err = s.App().DelegationKeeper.PayoutRewards(s.Ctx(), staker, coins, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) - Expect(coins.AmountOf(globalTypes.Denom).Uint64()).To(Equal(payout)) + Expect(coins.String()).To(Equal(payout.String())) } func CreateFundedPool(s *i.KeeperTestSuite) { diff --git a/x/funders/types/funders.pb.go b/x/funders/types/funders.pb.go index e8cfd5d1..af1e55e2 100644 --- a/x/funders/types/funders.pb.go +++ b/x/funders/types/funders.pb.go @@ -122,7 +122,7 @@ func (m *Funder) GetDescription() string { // a funder can only fund each pool once and a pool can only be funded // by each funder once. However, a funder can update the amount of funds. type Funding struct { - // funder_id is the id of the funder + // funder_address is the address of the funder FunderAddress string `protobuf:"bytes,1,opt,name=funder_address,json=funderAddress,proto3" json:"funder_address,omitempty"` // pool_id is the id of the pool this funding is for PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` diff --git a/x/funders/types/params.pb.go b/x/funders/types/params.pb.go index bf2366eb..11bb9fc4 100644 --- a/x/funders/types/params.pb.go +++ b/x/funders/types/params.pb.go @@ -6,8 +6,6 @@ package types import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -161,33 +159,31 @@ func init() { func init() { proto.RegisterFile("kyve/funders/v1beta1/params.proto", fileDescriptor_906a9a55094dc984) } var fileDescriptor_906a9a55094dc984 = []byte{ - // 410 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x4d, 0x8f, 0xd3, 0x30, - 0x10, 0x8d, 0xd9, 0xd5, 0x4a, 0xeb, 0x15, 0x08, 0xac, 0x1e, 0xc2, 0xa2, 0xcd, 0x96, 0x72, 0xc9, - 0x61, 0x65, 0xb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 0x06, 0x00, 0x00, - 0xff, 0xff, 0xee, 0x97, 0x01, 0x98, 0x70, 0x02, 0x00, 0x00, + // 381 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcd, 0x8e, 0xda, 0x30, + 0x14, 0x85, 0xe3, 0x82, 0x90, 0x30, 0x6a, 0x55, 0x59, 0x2c, 0xd2, 0x56, 0x04, 0x4a, 0x37, 0x59, + 0x20, 0xbb, 0xb4, 0x2f, 0xd0, 0x52, 0x60, 0xd3, 0x3f, 0x94, 0x45, 0x51, 0xbb, 0x89, 0xf2, 0xe3, + 0x26, 0x16, 0xb1, 0x1d, 0x25, 0x0e, 0x34, 0xcf, 0xd0, 0x4d, 0x1f, 0x8b, 0x25, 0xcb, 0xaa, 0x0b, + 0x54, 0xc1, 0x6a, 0xde, 0x62, 0x14, 0x13, 0x66, 0x46, 0xc3, 0xec, 0xac, 0x73, 0xbf, 0x7b, 0x7d, + 0xcf, 0xb9, 0xf0, 0xe5, 0xaa, 0x5c, 0x53, 0xf2, 0xb3, 0x10, 0x21, 0xcd, 0x72, 0xb2, 0x1e, 0xfb, + 0x54, 0x79, 0x63, 0x92, 0x7a, 0x99, 0xc7, 0x73, 0x9c, 0x66, 0x52, 0x49, 0xd4, 0xad, 0x10, 0x5c, + 0x23, 0xb8, 0x46, 0x9e, 0x77, 0x23, 0x19, 0x49, 0x0d, 0x90, 0xea, 0x75, 0x62, 0x87, 0x57, 0x00, + 0xa2, 0x65, 0xcc, 0x14, 0x4d, 0x58, 0xae, 0x3e, 0x48, 0x26, 0x66, 0x42, 0x65, 0x25, 0xea, 0x41, + 0x18, 0x48, 0x26, 0xdc, 0x90, 0x0a, 0xc9, 0x4d, 0x30, 0x00, 0x76, 0xdb, 0x69, 0x57, 0xca, 0xb4, + 0x12, 0xd0, 0x08, 0x22, 0xce, 0x84, 0x5b, 0x7d, 0xc1, 0x44, 0xe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x48, + 0x10, 0x7b, 0x4c, 0x90, 0x5f, 0x37, 0xc7, 0x57, 0x65, 0x4a, 0x73, 0xbf, 0xa5, 0x0f, 0xf9, 0xf6, + 0x3a, 0x00, 0x00, 0xff, 0xff, 0x73, 0xb9, 0xd1, 0x11, 0x19, 0x02, 0x00, 0x00, } func (m *WhitelistCoinEntry) Marshal() (dAtA []byte, err error) { diff --git a/x/query/types/account.pb.go b/x/query/types/account.pb.go index 0e9e1d54..072dd724 100644 --- a/x/query/types/account.pb.go +++ b/x/query/types/account.pb.go @@ -92,7 +92,7 @@ type QueryAccountAssetsResponse struct { // protocol_delegation_unbonding ... ProtocolDelegationUnbonding uint64 `protobuf:"varint,5,opt,name=protocol_delegation_unbonding,json=protocolDelegationUnbonding,proto3" json:"protocol_delegation_unbonding,omitempty"` // protocol_rewards ... - ProtocolRewards uint64 `protobuf:"varint,6,opt,name=protocol_rewards,json=protocolRewards,proto3" json:"protocol_rewards,omitempty"` + ProtocolRewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=protocol_rewards,json=protocolRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"protocol_rewards"` // protocol_funding ... ProtocolFunding github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=protocol_funding,json=protocolFunding,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"protocol_funding"` } @@ -165,11 +165,11 @@ func (m *QueryAccountAssetsResponse) GetProtocolDelegationUnbonding() uint64 { return 0 } -func (m *QueryAccountAssetsResponse) GetProtocolRewards() uint64 { +func (m *QueryAccountAssetsResponse) GetProtocolRewards() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.ProtocolRewards } - return 0 + return nil } func (m *QueryAccountAssetsResponse) GetProtocolFunding() github_com_cosmos_cosmos_sdk_types.Coins { @@ -677,69 +677,69 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/account.proto", fileDescriptor_51ca316755261aec) } var fileDescriptor_51ca316755261aec = []byte{ - // 978 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0x26, 0xf9, 0x3a, 0xfa, 0xbe, 0xb4, 0x94, 0x4c, 0x50, 0xe5, 0x3a, 0x64, 0x1d, 0x2d, - 0x82, 0x84, 0x88, 0xee, 0xca, 0x4e, 0x8a, 0x5a, 0x02, 0x87, 0x3a, 0x3f, 0x38, 0x14, 0x50, 0xd9, - 0x00, 0x52, 0x7b, 0xb1, 0xc6, 0xbb, 0xe3, 0xcd, 0x90, 0xf5, 0x8e, 0xbb, 0x33, 0x4e, 0x88, 0x2a, - 0x2e, 0x1c, 0x81, 0x03, 0x12, 0xff, 0x02, 0x12, 0x88, 0x13, 0x17, 0x6e, 0x3d, 0x71, 0xea, 0xb1, - 0x12, 0x17, 0x84, 0xc4, 0x0f, 0x25, 0x48, 0xfc, 0x1b, 0x68, 0x67, 0x66, 0xed, 0x31, 0x5e, 0xdb, - 0x14, 0x89, 0x4b, 0xe2, 0x9d, 0xf9, 0x7c, 0xde, 0x7b, 0x9f, 0x37, 0x9f, 0x37, 0x03, 0x6b, 0xc7, - 0x67, 0x27, 0xc4, 0x7b, 0xd0, 0x23, 0xe9, 0x99, 0x77, 0x52, 0x6b, 0x11, 0x81, 0x6b, 0x1e, 0x0e, - 0x02, 0xd6, 0x4b, 0x84, 0xdb, 0x4d, 0x99, 0x60, 0x08, 0x65, 0x08, 0x57, 0x22, 0x5c, 0x8d, 0xa8, - 0x2c, 0xe1, 0x0e, 0x4d, 0x98, 0x27, 0xff, 0x2a, 0x58, 0x65, 0x33, 0x60, 0xbc, 0xc3, 0xb8, 0xd7, - 0xc2, 0xfc, 0xef, 0xf1, 0xba, 0x38, 0xa2, 0x09, 0x16, 0x94, 0x25, 0x1a, 0x6b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x49, 0xd5, 0x9b, 0x73, 0x39, 0x28, 0xbf, 0xb1, 0xf7, 0xf8, - 0xdc, 0xb6, 0x9e, 0x9c, 0xdb, 0xd6, 0xef, 0xe7, 0xb6, 0xf5, 0xc5, 0x85, 0x3d, 0xf3, 0xe4, 0xc2, - 0x9e, 0xf9, 0xe9, 0xc2, 0x9e, 0xb9, 0xbf, 0x69, 0x5c, 0x75, 0x77, 0xee, 0x7d, 0xb0, 0xff, 0x0e, - 0x11, 0xa7, 0x2c, 0x3d, 0xf6, 0x82, 0x23, 0x4c, 0x13, 0xef, 0x23, 0x9d, 0x46, 0x5e, 0x79, 0xad, - 0x92, 0x7c, 0xdd, 0xb7, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x9f, 0x92, 0x17, 0xd2, 0x0a, - 0x00, 0x00, + // 979 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0x26, 0xfe, 0x3a, 0xfa, 0xbe, 0xb4, 0x94, 0x4c, 0x50, 0xe5, 0x3a, 0x64, 0x1d, 0x2d, + 0x82, 0x44, 0x11, 0xdd, 0x95, 0x9d, 0x14, 0xb5, 0x04, 0x0e, 0x75, 0x7e, 0x70, 0x28, 0xa0, 0xb2, + 0x01, 0xa4, 0xf6, 0x62, 0x8d, 0x77, 0xc7, 0x9b, 0x21, 0xeb, 0x1d, 0x77, 0x67, 0x9c, 0x10, 0x55, + 0x5c, 0x38, 0x02, 0x07, 0x24, 0xfe, 0x05, 0x24, 0x10, 0xe2, 0xc0, 0x85, 0x5b, 0x4f, 0x9c, 0x7a, + 0xac, 0xc4, 0x85, 0x0b, 0x3f, 0x94, 0x20, 0xf1, 0x6f, 0xa0, 0x9d, 0x99, 0x75, 0xc6, 0x78, 0x6d, + 0x53, 0xa4, 0x5e, 0x92, 0x9d, 0x99, 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, + 0xda, 0x91, 0x01, 0xbd, 0x89, 0xb6, 0x27, 0x05, 0x54, 0xf4, 0x42, 0x9a, 0xf1, 0xfd, 0x68, 0xc1, + 0xe2, 0x48, 0xc3, 0xa3, 0xfa, 0x34, 0x61, 0x23, 0x73, 0xa5, 0xda, 0x78, 0x1a, 0x8a, 0x8e, 0xe0, + 0x96, 0x8c, 0x60, 0x13, 0xd5, 0x27, 0x45, 0xa0, 0x26, 0x48, 0x2b, 0xa6, 0x5c, 0x18, 0xba, 0x1f, + 0x59, 0xb0, 0x54, 0xd0, 0x64, 0x68, 0x73, 0x9a, 0x8c, 0x82, 0x86, 0xae, 0x6e, 0x3d, 0x1d, 0x49, + 0xab, 0x7f, 0x5d, 0xaa, 0xdf, 0x42, 0x8d, 0x49, 0xea, 0xcd, 0xbe, 0xbc, 0x90, 0xdf, 0xdc, 0x7d, + 0x7c, 0x66, 0x5b, 0x4f, 0xce, 0x6c, 0xeb, 0x8f, 0x33, 0xdb, 0xfa, 0xf2, 0xdc, 0x9e, 0x79, 0x72, + 0x6e, 0xcf, 0xfc, 0x72, 0x6e, 0xcf, 0xdc, 0xdf, 0x30, 0x46, 0xdd, 0x9d, 0x7b, 0x1f, 0xee, 0xbd, + 0x4b, 0xc4, 0x09, 0x4b, 0x8f, 0xbc, 0xe0, 0x10, 0xd3, 0xc4, 0xfb, 0x58, 0xbb, 0x91, 0x23, 0xaf, + 0x5d, 0x96, 0xaf, 0xfb, 0xe6, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x21, 0xde, 0xf4, 0x2f, 0x24, + 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1002,10 +1002,19 @@ func (m *QueryAccountAssetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err dAtA[i] = 0x3a } } - if m.ProtocolRewards != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.ProtocolRewards)) - i-- - dAtA[i] = 0x30 + if len(m.ProtocolRewards) > 0 { + for iNdEx := len(m.ProtocolRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ProtocolRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAccount(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } } if m.ProtocolDelegationUnbonding != 0 { i = encodeVarintAccount(dAtA, i, uint64(m.ProtocolDelegationUnbonding)) @@ -1437,8 +1446,11 @@ func (m *QueryAccountAssetsResponse) Size() (n int) { if m.ProtocolDelegationUnbonding != 0 { n += 1 + sovAccount(uint64(m.ProtocolDelegationUnbonding)) } - if m.ProtocolRewards != 0 { - n += 1 + sovAccount(uint64(m.ProtocolRewards)) + if len(m.ProtocolRewards) > 0 { + for _, e := range m.ProtocolRewards { + l = e.Size() + n += 1 + l + sovAccount(uint64(l)) + } } if len(m.ProtocolFunding) > 0 { for _, e := range m.ProtocolFunding { @@ -1810,10 +1822,10 @@ func (m *QueryAccountAssetsResponse) Unmarshal(dAtA []byte) error { } } case 6: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtocolRewards", wireType) } - m.ProtocolRewards = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAccount @@ -1823,11 +1835,26 @@ func (m *QueryAccountAssetsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ProtocolRewards |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthAccount + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProtocolRewards = append(m.ProtocolRewards, types.Coin{}) + if err := m.ProtocolRewards[len(m.ProtocolRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtocolFunding", wireType) From 4253e6eb3cf238d54ac3a795b78e02c66a5d79b5 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 15:48:27 +0200 Subject: [PATCH 24/28] chore: added recipient address for ChargeFundersOfPool --- x/bundles/keeper/logic_bundles.go | 2 +- x/bundles/types/expected_keepers.go | 2 +- x/delegation/keeper/keeper_suite_test.go | 2 +- x/funders/keeper/logic_funders.go | 7 +++---- x/funders/keeper/logic_funders_test.go | 22 +++++++++++----------- x/funders/spec/06_exported.md | 11 ++++++----- x/pool/spec/07_exported.md | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/x/bundles/keeper/logic_bundles.go b/x/bundles/keeper/logic_bundles.go index e9c79b9c..e92ceee2 100644 --- a/x/bundles/keeper/logic_bundles.go +++ b/x/bundles/keeper/logic_bundles.go @@ -533,7 +533,7 @@ func (k Keeper) tallyBundleProposal(ctx sdk.Context, bundleProposal types.Bundle switch voteDistribution.Status { case types.BUNDLE_STATUS_VALID: // charge the funders of the pool - fundersPayouts, err := k.fundersKeeper.ChargeFundersOfPool(ctx, poolId) + fundersPayouts, err := k.fundersKeeper.ChargeFundersOfPool(ctx, poolId, poolTypes.ModuleName) if err != nil { return types.TallyResult{}, err } diff --git a/x/bundles/types/expected_keepers.go b/x/bundles/types/expected_keepers.go index 3d1a8beb..ae16e50b 100644 --- a/x/bundles/types/expected_keepers.go +++ b/x/bundles/types/expected_keepers.go @@ -48,7 +48,7 @@ type DelegationKeeper interface { } type FundersKeeper interface { - ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout sdk.Coins, err error) + ChargeFundersOfPool(ctx sdk.Context, poolId uint64, recipient string) (payout sdk.Coins, err error) } type TeamKeeper interface { diff --git a/x/delegation/keeper/keeper_suite_test.go b/x/delegation/keeper/keeper_suite_test.go index 49989784..7d99caab 100644 --- a/x/delegation/keeper/keeper_suite_test.go +++ b/x/delegation/keeper/keeper_suite_test.go @@ -33,7 +33,7 @@ func PayoutRewards(s *i.KeeperTestSuite, staker string, coins sdk.Coins) { s.App().FundersKeeper.SetFunding(s.Ctx(), &funding) } - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).To(BeNil()) err = s.App().DelegationKeeper.PayoutRewards(s.Ctx(), staker, coins, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index 61175d07..ab50c591 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -7,7 +7,6 @@ import ( "cosmossdk.io/math" "github.com/KYVENetwork/chain/x/funders/types" - pooltypes "github.com/KYVENetwork/chain/x/pool/types" sdk "github.com/cosmos/cosmos-sdk/types" errorsTypes "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -35,9 +34,9 @@ func (k Keeper) GetTotalActiveFunding(ctx sdk.Context, poolId uint64) (amounts s // ChargeFundersOfPool charges all funders of a pool with their amount_per_bundle // If the amount is lower than the amount_per_bundle, // the max amount is charged and the funder is removed from the active funders list. -// The amount is transferred from the funders to the pool module account where it can be paid out. +// The amount is transferred from the funders to the recipient module account. // If there are no more active funders, an event is emitted. -func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payouts sdk.Coins, err error) { +func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64, recipient string) (payouts sdk.Coins, err error) { // Get funding state for pool fundingState, found := k.GetFundingState(ctx, poolId) if !found { @@ -71,7 +70,7 @@ func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payouts sdk // Move funds to pool module account if !payouts.IsZero() { - if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, pooltypes.ModuleName, payouts); err != nil { + if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, recipient, payouts); err != nil { return sdk.NewCoins(), err } } diff --git a/x/funders/keeper/logic_funders_test.go b/x/funders/keeper/logic_funders_test.go index fef46dad..ee569c85 100644 --- a/x/funders/keeper/logic_funders_test.go +++ b/x/funders/keeper/logic_funders_test.go @@ -126,7 +126,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { It("Charge funders once with one coin", func() { // ACT - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) // ASSERT @@ -169,7 +169,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { }) // ACT - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) // ASSERT @@ -199,7 +199,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { It("Charge funders until one funder runs out of funds", func() { // ACT for range [5]struct{}{} { - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) Expect(payout.String()).To(Equal(i.ACoins(11 * i.T_KYVE).String())) } @@ -241,13 +241,13 @@ var _ = Describe("logic_funders.go", Ordered, func() { }) for range [5]struct{}{} { - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) Expect(payout.String()).To(Equal(sdk.NewCoins(i.ACoin(11*i.T_KYVE), i.BCoin(20*i.T_KYVE), i.CCoin(10*i.T_KYVE)).String())) } for range [5]struct{}{} { - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) Expect(payout.String()).To(Equal(sdk.NewCoins(i.ACoin(1*i.T_KYVE), i.BCoin(20*i.T_KYVE), i.CCoin(10*i.T_KYVE)).String())) } @@ -284,7 +284,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(2)) - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) Expect(payout.String()).To(Equal(i.ACoins(20 * i.T_KYVE).String())) } @@ -306,7 +306,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(1)) - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) Expect(payout.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) } @@ -323,7 +323,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) Expect(payout.IsZero()).To(BeTrue()) @@ -343,7 +343,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { s.App().FundersKeeper.SetFunding(s.Ctx(), &funding) // ACT - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) Expect(payout.String()).To(Equal(i.ACoins(110 * i.T_KYVE).String())) @@ -393,7 +393,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { s.App().FundersKeeper.SetParams(s.Ctx(), funderstypes.NewParams(whitelist, 20)) // ACT - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) Expect(err).NotTo(HaveOccurred()) // ASSERT @@ -434,7 +434,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { }) // ACT - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0) + payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) // ASSERT Expect(err).NotTo(HaveOccurred()) diff --git a/x/funders/spec/06_exported.md b/x/funders/spec/06_exported.md index 40fc9e9f..2364838e 100644 --- a/x/funders/spec/06_exported.md +++ b/x/funders/spec/06_exported.md @@ -9,10 +9,11 @@ outside the module. ```go type FundersKeeper interface { - // ChargeFundersOfPool equally splits the amount between all funders and removes - // the appropriate amount from each funder. - // All funders who can't afford the amount, are kicked out. - // The method returns the payout amount the pool was able to charge from the funders. - ChargeFundersOfPool(ctx sdk.Context, poolId uint64) (payout sdk.Coins, err error) + // ChargeFundersOfPool charges all funders of a pool with their amount_per_bundle + // If the amount is lower than the amount_per_bundle, + // the max amount is charged and the funder is removed from the active funders list. + // The amount is transferred from the funders to the recipient module account. + // If there are no more active funders, an event is emitted. + ChargeFundersOfPool(ctx sdk.Context, poolId uint64, recipient string) (payout sdk.Coins, err error) } ``` diff --git a/x/pool/spec/07_exported.md b/x/pool/spec/07_exported.md index cdf6c302..3ea145aa 100644 --- a/x/pool/spec/07_exported.md +++ b/x/pool/spec/07_exported.md @@ -29,6 +29,6 @@ type PoolKeeper interface { // the appropriate amount from each funder. // All funders who can't afford the amount, are kicked out. // The method returns the payout amount the pool was able to charge from the funders. - ChargeFundersOfPool(ctx sdk.Context, poolId uint64, amount uint64) (payout uint64, err error) + ChargeFundersOfPool(ctx sdk.Context, poolId uint64, amount uint64, recipient string) (payout uint64, err error) } ``` From 2e5f59f1d9171b9371249fb28e195ef1e11d17eb Mon Sep 17 00:00:00 2001 From: mbreithecker Date: Fri, 3 May 2024 16:48:55 +0200 Subject: [PATCH 25/28] test: resolve conflicts --- x/delegation/keeper/keeper_suite_test.go | 43 ++--------- .../keeper/msg_server_delegate_test.go | 12 +-- .../keeper/msg_server_redelegate_test.go | 2 +- .../keeper/msg_server_undelegate_test.go | 2 +- .../msg_server_withdraw_rewards_test.go | 73 ++++++++++--------- 5 files changed, 47 insertions(+), 85 deletions(-) diff --git a/x/delegation/keeper/keeper_suite_test.go b/x/delegation/keeper/keeper_suite_test.go index 7d99caab..f2841edc 100644 --- a/x/delegation/keeper/keeper_suite_test.go +++ b/x/delegation/keeper/keeper_suite_test.go @@ -1,11 +1,11 @@ package keeper_test import ( - "cosmossdk.io/math" "fmt" - funderstypes "github.com/KYVENetwork/chain/x/funders/types" "testing" + mintTypes "github.com/cosmos/cosmos-sdk/x/mint/types" + sdk "github.com/cosmos/cosmos-sdk/types" i "github.com/KYVENetwork/chain/testutil/integration" @@ -22,25 +22,16 @@ func TestDelegationKeeper(t *testing.T) { } func PayoutRewards(s *i.KeeperTestSuite, staker string, coins sdk.Coins) { - fundingState, found := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) - Expect(found).To(BeTrue()) + err := s.App().BankKeeper.MintCoins(s.Ctx(), mintTypes.ModuleName, coins) + Expect(err).NotTo(HaveOccurred()) - // TODO support all denominations once the funding module supports it - // divide amount by number of active fundings so that total payout is equal to amount - activeFundings := s.App().FundersKeeper.GetActiveFundings(s.Ctx(), fundingState) - for _, funding := range activeFundings { - funding.AmountsPerBundle = coins.QuoInt(math.NewInt(int64(len(activeFundings)))) - s.App().FundersKeeper.SetFunding(s.Ctx(), &funding) - } + s.Commit() - payout, err := s.App().FundersKeeper.ChargeFundersOfPool(s.Ctx(), 0, pooltypes.ModuleName) - Expect(err).To(BeNil()) - err = s.App().DelegationKeeper.PayoutRewards(s.Ctx(), staker, coins, pooltypes.ModuleName) + err = s.App().DelegationKeeper.PayoutRewards(s.Ctx(), staker, coins, mintTypes.ModuleName) Expect(err).NotTo(HaveOccurred()) - Expect(coins.String()).To(Equal(payout.String())) } -func CreateFundedPool(s *i.KeeperTestSuite) { +func CreatePool(s *i.KeeperTestSuite) { gov := s.App().GovKeeper.GetGovernanceAccount(s.Ctx()).GetAddress().String() msg := &pooltypes.MsgCreatePool{ Authority: gov, @@ -59,26 +50,6 @@ func CreateFundedPool(s *i.KeeperTestSuite) { CompressionId: 1, } s.RunTxPoolSuccess(msg) - - s.CommitAfterSeconds(7) - - s.RunTxFundersSuccess(&funderstypes.MsgCreateFunder{ - Creator: i.ALICE, - Moniker: "Alice", - }) - - s.RunTxPoolSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amounts: sdk.NewCoins(sdk.NewInt64Coin(i.KYVE_DENOM, 100*i.T_KYVE)), - AmountsPerBundle: sdk.NewCoins(sdk.NewInt64Coin(i.KYVE_DENOM, 1*i.T_KYVE)), - }) - - s.CommitAfterSeconds(7) - - fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) - - Expect(s.App().FundersKeeper.GetTotalActiveFunding(s.Ctx(), fundingState.PoolId)[0].Amount.Uint64()).To(Equal(100 * i.KYVE)) } func CheckAndContinueChainForOneMonth(s *i.KeeperTestSuite) { diff --git a/x/delegation/keeper/msg_server_delegate_test.go b/x/delegation/keeper/msg_server_delegate_test.go index 52954928..ce97dca5 100644 --- a/x/delegation/keeper/msg_server_delegate_test.go +++ b/x/delegation/keeper/msg_server_delegate_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - funderstypes "github.com/KYVENetwork/chain/x/funders/types" globalTypes "github.com/KYVENetwork/chain/x/global/types" sdk "github.com/cosmos/cosmos-sdk/types" . "github.com/onsi/ginkgo/v2" @@ -36,7 +35,7 @@ var _ = Describe("msg_server_delegate.go", Ordered, func() { BeforeEach(func() { s = i.NewCleanChain() - CreateFundedPool(s) + CreatePool(s) s.RunTxStakersSuccess(&stakerstypes.MsgCreateStaker{ Creator: i.ALICE, @@ -158,9 +157,6 @@ var _ = Describe("msg_server_delegate.go", Ordered, func() { Amount: 209 * i.KYVE, }) - fundersModuleBalance := s.GetBalanceFromModule(funderstypes.ModuleName) - - Expect(fundersModuleBalance).To(Equal(100 * i.KYVE)) Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[0])).To(BeEmpty()) Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[1])).To(BeEmpty()) @@ -189,7 +185,6 @@ var _ = Describe("msg_server_delegate.go", Ordered, func() { Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[1]).AmountOf(globalTypes.Denom).Uint64()).To(Equal(uint64(5_110_024_449))) Expect(s.GetBalanceFromAddress(i.DUMMY[0])).To(Equal(900*i.KYVE + 2_444_987_775)) - Expect(s.GetBalanceFromModule(funderstypes.ModuleName)).To(Equal(90 * i.KYVE)) Expect(s.GetBalanceFromModule(types.ModuleName)).To(Equal((200+409)*i.KYVE + uint64(2_444_987_775+5_110_024_449+1))) }) @@ -207,10 +202,6 @@ var _ = Describe("msg_server_delegate.go", Ordered, func() { Amount: 200 * i.KYVE, }) - fundersModuleBalance := s.GetBalanceFromModule(funderstypes.ModuleName) - - Expect(fundersModuleBalance).To(Equal(100 * i.KYVE)) - Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[0])).To(BeEmpty()) Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[1])).To(BeEmpty()) @@ -241,7 +232,6 @@ var _ = Describe("msg_server_delegate.go", Ordered, func() { Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[1]).AmountOf(globalTypes.Denom).Uint64()).To(Equal(uint64(5_000_000_000))) Expect(s.GetBalanceFromAddress(i.DUMMY[0])).To(Equal(900*i.KYVE + 2_500_000_000)) - Expect(s.GetBalanceFromModule(funderstypes.ModuleName)).To(Equal(90 * i.KYVE)) Expect(s.GetBalanceFromModule(types.ModuleName)).To(Equal(600*i.KYVE + 7_500_000_000)) }) diff --git a/x/delegation/keeper/msg_server_redelegate_test.go b/x/delegation/keeper/msg_server_redelegate_test.go index f8c49d51..596f8498 100644 --- a/x/delegation/keeper/msg_server_redelegate_test.go +++ b/x/delegation/keeper/msg_server_redelegate_test.go @@ -32,7 +32,7 @@ var _ = Describe("Delegation - Redelegation", Ordered, func() { BeforeEach(func() { s = i.NewCleanChain() - CreateFundedPool(s) + CreatePool(s) gov := s.App().GovKeeper.GetGovernanceAccount(s.Ctx()).GetAddress().String() msg := &pooltypes.MsgCreatePool{ diff --git a/x/delegation/keeper/msg_server_undelegate_test.go b/x/delegation/keeper/msg_server_undelegate_test.go index ff4473fe..77f2f3f6 100644 --- a/x/delegation/keeper/msg_server_undelegate_test.go +++ b/x/delegation/keeper/msg_server_undelegate_test.go @@ -39,7 +39,7 @@ var _ = Describe("msg_server_undelegate.go", Ordered, func() { BeforeEach(func() { s = i.NewCleanChain() - CreateFundedPool(s) + CreatePool(s) s.RunTxStakersSuccess(&stakerstypes.MsgCreateStaker{ Creator: i.ALICE, diff --git a/x/delegation/keeper/msg_server_withdraw_rewards_test.go b/x/delegation/keeper/msg_server_withdraw_rewards_test.go index eac68b7a..f9ca06a2 100644 --- a/x/delegation/keeper/msg_server_withdraw_rewards_test.go +++ b/x/delegation/keeper/msg_server_withdraw_rewards_test.go @@ -4,7 +4,6 @@ import ( "cosmossdk.io/math" i "github.com/KYVENetwork/chain/testutil/integration" "github.com/KYVENetwork/chain/x/delegation/types" - funderstypes "github.com/KYVENetwork/chain/x/funders/types" globalTypes "github.com/KYVENetwork/chain/x/global/types" pooltypes "github.com/KYVENetwork/chain/x/pool/types" stakerstypes "github.com/KYVENetwork/chain/x/stakers/types" @@ -33,10 +32,17 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { const aliceSelfDelegation = 0 * i.KYVE const bobSelfDelegation = 0 * i.KYVE + var ( + initialBalanceAlice = sdk.NewCoins() + initialBalanceBob = sdk.NewCoins() + initialBalanceCharlie = sdk.NewCoins() + initialBalanceDummy []sdk.Coins + ) + BeforeEach(func() { s = i.NewCleanChain() - CreateFundedPool(s) + CreatePool(s) // Stake s.RunTxStakersSuccess(&stakerstypes.MsgCreateStaker{ @@ -54,6 +60,17 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { _, stakerFound = s.App().StakersKeeper.GetStaker(s.Ctx(), i.BOB) Expect(stakerFound).To(BeTrue()) + + initialBalanceAlice = s.GetCoinsFromAddress(i.ALICE) + initialBalanceBob = s.GetCoinsFromAddress(i.BOB) + initialBalanceCharlie = s.GetCoinsFromAddress(i.CHARLIE) + initialBalanceDummy = make([]sdk.Coins, len(i.DUMMY)) + for k := range len(i.DUMMY) { + initialBalanceDummy[k] = s.GetCoinsFromAddress(i.DUMMY[k]) + } + _ = initialBalanceAlice + _ = initialBalanceBob + _ = initialBalanceCharlie }) AfterEach(func() { @@ -87,7 +104,6 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { Expect(s.App().DelegationKeeper.GetDelegationAmount(s.Ctx(), i.ALICE)).To(Equal(aliceSelfDelegation + 30*i.KYVE)) delegationModuleBalanceBefore := s.GetBalanceFromModule(types.ModuleName) - fundersModuleBalanceBefore := s.GetBalanceFromModule(funderstypes.ModuleName) s.PerformValidityChecks() // ACT @@ -99,10 +115,8 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { // ASSERT delegationModuleBalanceAfter := s.GetBalanceFromModule(types.ModuleName) - fundersModuleBalanceAfter := s.GetBalanceFromModule(funderstypes.ModuleName) Expect(delegationModuleBalanceAfter).To(Equal(delegationModuleBalanceBefore + 20*i.KYVE)) - Expect(fundersModuleBalanceAfter).To(Equal(fundersModuleBalanceBefore - 20*i.KYVE)) Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[0]).AmountOf(globalTypes.Denom).Uint64()).To(Equal(uint64(6666666666))) Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[1]).AmountOf(globalTypes.Denom).Uint64()).To(Equal(uint64(6666666666))) @@ -121,9 +135,9 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { Staker: i.ALICE, }) - Expect(s.GetBalanceFromAddress(i.DUMMY[0])).To(Equal(uint64(996666666666))) - Expect(s.GetBalanceFromAddress(i.DUMMY[1])).To(Equal(uint64(996666666666))) - Expect(s.GetBalanceFromAddress(i.DUMMY[2])).To(Equal(uint64(996666666666))) + Expect(initialBalanceDummy[0].Sub(s.GetCoinsFromAddress(i.DUMMY[0])...).String()).To(Equal("3333333334tkyve")) + Expect(initialBalanceDummy[1].Sub(s.GetCoinsFromAddress(i.DUMMY[1])...).String()).To(Equal("3333333334tkyve")) + Expect(initialBalanceDummy[2].Sub(s.GetCoinsFromAddress(i.DUMMY[2])...).String()).To(Equal("3333333334tkyve")) Expect(s.GetBalanceFromModule(types.ModuleName)).To(Equal(uint64(30000000002))) }) @@ -156,16 +170,6 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { }) It("Test invalid payouts to delegators", func() { - // ARRANGE - - // fund pool module - s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ - Creator: i.ALICE, - PoolId: 0, - Amounts: i.KYVECoins(100 * i.T_KYVE), - AmountsPerBundle: i.KYVECoins(1 * i.T_KYVE), - }) - // ACT // not enough balance in pool module err1 := s.App().DelegationKeeper.PayoutRewards(s.Ctx(), i.ALICE, sdk.NewCoins(sdk.NewInt64Coin(globalTypes.Denom, int64(20000*i.KYVE))), pooltypes.ModuleName) @@ -267,7 +271,6 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { Expect(s.App().DelegationKeeper.GetDelegationAmount(s.Ctx(), i.ALICE)).To(Equal(aliceSelfDelegation + 30*i.KYVE)) delegationModuleBalanceBefore := s.GetCoinsFromModule(types.ModuleName) - poolsModuleBalanceBefore := s.GetCoinsFromModule(pooltypes.ModuleName) s.PerformValidityChecks() // ACT @@ -279,10 +282,8 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { // ASSERT delegationModuleBalanceAfter := s.GetCoinsFromModule(types.ModuleName) - poolsModuleBalanceAfter := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(delegationModuleBalanceAfter).To(Equal(delegationModuleBalanceBefore.Add(payoutCoins...))) - Expect(poolsModuleBalanceAfter).To(Equal(poolsModuleBalanceBefore.Sub(payoutCoins...))) Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[0]).String()).To(Equal("3333333acoin,1666666bcoin")) Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[1]).String()).To(Equal("3333333acoin,1666666bcoin")) @@ -301,9 +302,9 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { Staker: i.ALICE, }) - Expect(s.GetCoinsFromAddress(i.DUMMY[0]).String()).To(Equal("3333333acoin,1666666bcoin,990000000000tkyve")) - Expect(s.GetCoinsFromAddress(i.DUMMY[1]).String()).To(Equal("3333333acoin,1666666bcoin,990000000000tkyve")) - Expect(s.GetCoinsFromAddress(i.DUMMY[2]).String()).To(Equal("3333333acoin,1666666bcoin,990000000000tkyve")) + Expect(s.GetCoinsFromAddress(i.DUMMY[0]).String()).To(Equal("1000003333333acoin,1000001666666bcoin,1000000000000ccoin,990000000000tkyve")) + Expect(s.GetCoinsFromAddress(i.DUMMY[1]).String()).To(Equal("1000003333333acoin,1000001666666bcoin,1000000000000ccoin,990000000000tkyve")) + Expect(s.GetCoinsFromAddress(i.DUMMY[2]).String()).To(Equal("1000003333333acoin,1000001666666bcoin,1000000000000ccoin,990000000000tkyve")) Expect(s.GetCoinsFromModule(types.ModuleName).String()).To(Equal("1acoin,2bcoin,30000000000tkyve")) }) @@ -337,7 +338,6 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { Expect(s.App().DelegationKeeper.GetDelegationAmount(s.Ctx(), i.ALICE)).To(Equal(aliceSelfDelegation + 25*i.KYVE)) delegationModuleBalanceBefore := s.GetCoinsFromModule(types.ModuleName) - poolsModuleBalanceBefore := s.GetCoinsFromModule(pooltypes.ModuleName) s.PerformValidityChecks() // ACT @@ -361,12 +361,10 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { // ASSERT delegationModuleBalanceAfter := s.GetCoinsFromModule(types.ModuleName) - poolsModuleBalanceAfter := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(delegationModuleBalanceAfter).To(Equal( delegationModuleBalanceBefore.Add(payoutCoins1.Add(payoutCoins2...).Add(sdk.NewInt64Coin(globalTypes.Denom, int64(3*i.KYVE)))...)), ) - Expect(poolsModuleBalanceAfter).To(Equal(poolsModuleBalanceBefore.Sub(payoutCoins1.Add(payoutCoins2...)...))) // Calculate outstanding rewards // phase1: @@ -400,9 +398,12 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { Staker: i.ALICE, }) - Expect(s.GetCoinsFromAddress(i.DUMMY[0]).String()).To(Equal("8000000acoin,9714285bcoin,5000000ccoin,980000000000tkyve")) - Expect(s.GetCoinsFromAddress(i.DUMMY[1]).String()).To(Equal("2000000acoin,2428571bcoin,1250000ccoin,995000000000tkyve")) - Expect(s.GetCoinsFromAddress(i.DUMMY[2]).String()).To(Equal("857142bcoin,750000ccoin,997000000000tkyve")) + differenceDummy0, _ := s.GetCoinsFromAddress(i.DUMMY[0]).SafeSub(initialBalanceDummy[0]...) + Expect(differenceDummy0.String()).To(Equal("8000000acoin,9714285bcoin,5000000ccoin,-20000000000tkyve")) + differenceDummy1, _ := s.GetCoinsFromAddress(i.DUMMY[1]).SafeSub(initialBalanceDummy[1]...) + Expect(differenceDummy1.String()).To(Equal("2000000acoin,2428571bcoin,1250000ccoin,-5000000000tkyve")) + differenceDummy2, _ := s.GetCoinsFromAddress(i.DUMMY[2]).SafeSub(initialBalanceDummy[2]...) + Expect(differenceDummy2.String()).To(Equal("857142bcoin,750000ccoin,-3000000000tkyve")) Expect(s.GetCoinsFromModule(types.ModuleName).String()).To(Equal("2bcoin,28000000000tkyve")) }) @@ -433,7 +434,6 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { Expect(s.App().DelegationKeeper.GetDelegationAmount(s.Ctx(), i.ALICE)).To(Equal(aliceSelfDelegation + 25*i.KYVE)) delegationModuleBalanceBefore := s.GetCoinsFromModule(types.ModuleName) - poolsModuleBalanceBefore := s.GetCoinsFromModule(pooltypes.ModuleName) s.PerformValidityChecks() // ACT @@ -465,7 +465,6 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { // ASSERT delegationModuleBalanceAfter := s.GetCoinsFromModule(types.ModuleName) - poolsModuleBalanceAfter := s.GetCoinsFromModule(pooltypes.ModuleName) compare := delegationModuleBalanceBefore.Add(payoutCoins1...) compare = compare.Add(payoutCoins2...) @@ -473,7 +472,6 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { compare = compare.Sub(sdk.NewInt64Coin("acoin", 8_000_000)) compare = compare.Sub(sdk.NewInt64Coin("bcoin", 2_285_714)) Expect(delegationModuleBalanceAfter).To(Equal(compare)) - Expect(poolsModuleBalanceAfter).To(Equal(poolsModuleBalanceBefore.Sub(payoutCoins1.Add(payoutCoins2...)...))) // Calculate outstanding rewards // phase1: @@ -496,9 +494,12 @@ var _ = Describe("msg_server_withdraw_rewards.go", Ordered, func() { Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[1]).String()).To(Equal("2000000acoin,1142857bcoin")) Expect(s.App().DelegationKeeper.GetOutstandingRewards(s.Ctx(), i.ALICE, i.DUMMY[2]).String()).To(Equal("")) - Expect(s.GetCoinsFromAddress(i.DUMMY[0]).String()).To(Equal("8000000acoin,980000000000tkyve")) - Expect(s.GetCoinsFromAddress(i.DUMMY[1]).String()).To(Equal("995000000000tkyve")) - Expect(s.GetCoinsFromAddress(i.DUMMY[2]).String()).To(Equal("2285714bcoin,990000000000tkyve")) + differenceDummy0, _ := s.GetCoinsFromAddress(i.DUMMY[0]).SafeSub(initialBalanceDummy[0]...) + Expect(differenceDummy0.String()).To(Equal("8000000acoin,-20000000000tkyve")) + differenceDummy1, _ := s.GetCoinsFromAddress(i.DUMMY[1]).SafeSub(initialBalanceDummy[1]...) + Expect(differenceDummy1.String()).To(Equal("-5000000000tkyve")) + differenceDummy2, _ := s.GetCoinsFromAddress(i.DUMMY[2]).SafeSub(initialBalanceDummy[2]...) + Expect(differenceDummy2.String()).To(Equal("2285714bcoin,-10000000000tkyve")) Expect(s.GetCoinsFromModule(types.ModuleName).String()).To(Equal("2000000acoin,5714286bcoin,35000000000tkyve")) }) }) From 7de4ce3d6460814f2c775f47e23a5005ee301705 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 17:01:58 +0200 Subject: [PATCH 26/28] chore: removed duplicate helpers --- testutil/integration/helpers.go | 9 ----- x/funders/keeper/logic_funders_test.go | 36 +++++++++--------- .../keeper/msg_server_defund_pool_test.go | 10 ++--- x/funders/keeper/msg_server_fund_pool_test.go | 38 +++++++++---------- 4 files changed, 41 insertions(+), 52 deletions(-) diff --git a/testutil/integration/helpers.go b/testutil/integration/helpers.go index 2905b832..514aea52 100644 --- a/testutil/integration/helpers.go +++ b/testutil/integration/helpers.go @@ -16,15 +16,6 @@ func (suite *KeeperTestSuite) GetBalanceFromAddress(address string) uint64 { return uint64(balance.Amount.Int64()) } -func (suite *KeeperTestSuite) GetBalancesFromAddress(address string) sdk.Coins { - accAddress, err := sdk.AccAddressFromBech32(address) - if err != nil { - return sdk.NewCoins() - } - - return suite.App().BankKeeper.GetAllBalances(suite.Ctx(), accAddress) -} - func (suite *KeeperTestSuite) GetCoinsFromAddress(address string) sdk.Coins { accAddress, err := sdk.AccAddressFromBech32(address) if err != nil { diff --git a/x/funders/keeper/logic_funders_test.go b/x/funders/keeper/logic_funders_test.go index ee569c85..abf5030e 100644 --- a/x/funders/keeper/logic_funders_test.go +++ b/x/funders/keeper/logic_funders_test.go @@ -31,8 +31,6 @@ TEST CASES - logic_funders.go var _ = Describe("logic_funders.go", Ordered, func() { s := i.NewCleanChain() - fundersModuleAcc := s.App().AccountKeeper.GetModuleAccount(s.Ctx(), funderstypes.ModuleName).GetAddress() - poolModuleAcc := s.App().AccountKeeper.GetModuleAccount(s.Ctx(), pooltypes.ModuleName).GetAddress() var whitelist []*funderstypes.WhitelistCoinEntry @@ -116,7 +114,7 @@ var _ = Describe("logic_funders.go", Ordered, func() { AmountsPerBundle: i.ACoins(10 * i.T_KYVE), }) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) Expect(fundersBalance.String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) }) @@ -147,8 +145,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) Expect(fundingState.ActiveFunderAddresses[1]).To(Equal(i.BOB)) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) - poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) + poolBalance := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(fundersBalance.String()).To(Equal(i.ACoins(139 * i.T_KYVE).String())) Expect(poolBalance.String()).To(Equal(i.ACoins(11 * i.T_KYVE).String())) }) @@ -190,8 +188,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) Expect(fundingState.ActiveFunderAddresses[1]).To(Equal(i.BOB)) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) - poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) + poolBalance := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(fundersBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(139*i.T_KYVE), i.BCoin(980*i.T_KYVE), i.CCoin(98*i.T_KYVE)).String())) Expect(poolBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(11*i.T_KYVE), i.BCoin(20*i.T_KYVE), i.CCoin(2*i.T_KYVE)).String())) }) @@ -219,8 +217,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) - poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) + poolBalance := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(fundersBalance.String()).To(Equal(i.ACoins(95 * i.T_KYVE).String())) Expect(poolBalance.String()).To(Equal(i.ACoins(55 * i.T_KYVE).String())) }) @@ -267,8 +265,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) Expect(fundingBob.TotalFunded.String()).To(Equal(sdk.NewCoins(i.ACoin(50*i.T_KYVE), i.CCoin(100*i.T_KYVE)).String())) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) - poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) + poolBalance := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(fundersBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(90*i.T_KYVE), i.BCoin(800*i.T_KYVE)).String())) Expect(poolBalance.String()).To(Equal(sdk.NewCoins(i.ACoin(60*i.T_KYVE), i.BCoin(200*i.T_KYVE), i.CCoin(100*i.T_KYVE)).String())) }) @@ -330,8 +328,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(fundingState.ActiveFunderAddresses).To(HaveLen(0)) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) - poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) + poolBalance := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(fundersBalance.IsZero()).To(BeTrue()) Expect(poolBalance.String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) }) @@ -362,8 +360,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingBob.Amounts.String()).To(Equal(i.ACoins(40 * i.T_KYVE).String())) Expect(fundingBob.TotalFunded.String()).To(Equal(i.ACoins(10 * i.T_KYVE).String())) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) - poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) + poolBalance := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(fundersBalance.String()).To(Equal(i.ACoins(40 * i.T_KYVE).String())) Expect(poolBalance.String()).To(Equal(i.ACoins(110 * i.T_KYVE).String())) }) @@ -414,8 +412,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingState.ActiveFunderAddresses[0]).To(Equal(i.ALICE)) Expect(fundingState.ActiveFunderAddresses[1]).To(Equal(i.BOB)) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) - poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) + poolBalance := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(fundersBalance.String()).To(Equal(i.ACoins(139 * i.T_KYVE).String())) Expect(poolBalance.String()).To(Equal(i.ACoins(11 * i.T_KYVE).String())) }) @@ -453,8 +451,8 @@ var _ = Describe("logic_funders.go", Ordered, func() { Expect(fundingBob.Amounts.IsZero()).To(BeTrue()) Expect(fundingBob.TotalFunded.IsZero()).To(BeTrue()) - fundersBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), fundersModuleAcc) - poolBalance := s.App().BankKeeper.GetAllBalances(s.Ctx(), poolModuleAcc) + fundersBalance := s.GetCoinsFromModule(funderstypes.ModuleName) + poolBalance := s.GetCoinsFromModule(pooltypes.ModuleName) Expect(fundersBalance.IsZero()).To(BeTrue()) Expect(poolBalance.IsZero()).To(BeTrue()) }) diff --git a/x/funders/keeper/msg_server_defund_pool_test.go b/x/funders/keeper/msg_server_defund_pool_test.go index dbb9fea8..97dfce39 100644 --- a/x/funders/keeper/msg_server_defund_pool_test.go +++ b/x/funders/keeper/msg_server_defund_pool_test.go @@ -40,7 +40,7 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { // init new clean chain s = i.NewCleanChain() - initialBalance = s.GetBalancesFromAddress(i.ALICE) + initialBalance = s.GetCoinsFromAddress(i.ALICE) // create clean pool for every test case gov := s.App().GovKeeper.GetGovernanceAccount(s.Ctx()).GetAddress().String() @@ -119,7 +119,7 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) @@ -150,7 +150,7 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) @@ -179,7 +179,7 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) @@ -370,7 +370,7 @@ var _ = Describe("msg_server_defund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index d8032205..9a0ebc6b 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -50,7 +50,7 @@ TEST CASES - msg_server_fund_pool.go var _ = Describe("msg_server_fund_pool.go", Ordered, func() { s := i.NewCleanChain() - initialBalance := s.GetBalancesFromAddress(i.ALICE) + initialBalance := s.GetCoinsFromAddress(i.ALICE) var whitelist []*funderstypes.WhitelistCoinEntry BeforeEach(func() { @@ -131,7 +131,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) @@ -166,7 +166,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) @@ -206,7 +206,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(50*i.T_KYVE)).String())) @@ -246,7 +246,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) @@ -286,7 +286,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(sdk.NewCoins(i.ACoin(100*i.T_KYVE), i.BCoin(50*i.T_KYVE)).String())) @@ -310,7 +310,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { It("Try to fund more coins than available in balance", func() { // ACT - _, currentBalance := s.GetBalancesFromAddress(i.ALICE).Find(i.A_DENOM) + _, currentBalance := s.GetCoinsFromAddress(i.ALICE).Find(i.A_DENOM) s.RunTxFundersError(&funderstypes.MsgFundPool{ Creator: i.ALICE, @@ -320,7 +320,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) _, found := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) @@ -333,7 +333,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { It("Try to fund multiple coins where one coin exceeds balance", func() { // ACT - currentBalance := s.GetBalancesFromAddress(i.ALICE) + currentBalance := s.GetCoinsFromAddress(i.ALICE) s.RunTxFundersError(&funderstypes.MsgFundPool{ Creator: i.ALICE, @@ -343,7 +343,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).IsZero()).To(BeTrue()) _, found := s.App().FundersKeeper.GetFunding(s.Ctx(), i.ALICE, 0) @@ -372,7 +372,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.BOB) + balanceAfter := s.GetCoinsFromAddress(i.BOB) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(50 * i.T_KYVE).String())) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) @@ -408,7 +408,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { }) // ASSERT - balanceAfter := s.GetBalancesFromAddress(i.BOB) + balanceAfter := s.GetCoinsFromAddress(i.BOB) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(200 * i.T_KYVE).String())) funding, _ := s.App().FundersKeeper.GetFunding(s.Ctx(), i.BOB, 0) @@ -656,7 +656,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(funderstypes.MaxFunders)) - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...)).To(Equal(i.ACoins(100 * i.T_KYVE))) // ACT @@ -680,7 +680,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { It("Fund more coins than the lowest funder with full funding slots", func() { // ARRANGE - initialBalanceBob := s.GetBalancesFromAddress(i.BOB) + initialBalanceBob := s.GetCoinsFromAddress(i.BOB) s.RunTxFundersSuccess(&funderstypes.MsgFundPool{ Creator: i.ALICE, PoolId: 0, @@ -701,7 +701,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) } - balanceAfter := s.GetBalancesFromAddress(i.ALICE) + balanceAfter := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceAfter...).String()).To(Equal(i.ACoins(100 * i.T_KYVE).String())) // ACT @@ -711,7 +711,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Amounts: i.ACoins(200 * i.T_KYVE), AmountsPerBundle: i.ACoins(1 * i.T_KYVE), }) - x := s.GetBalancesFromAddress(i.BOB) + x := s.GetCoinsFromAddress(i.BOB) Expect(initialBalanceBob.Sub(x...).String()).To(Equal(i.ACoins(200 * i.T_KYVE).String())) // ASSERT fundingState, _ := s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) @@ -723,10 +723,10 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { Expect(err).To(BeNil()) Expect(lowestFunding.FunderAddress).To(Equal(i.BOB)) - balanceEnd := s.GetBalancesFromAddress(i.ALICE) + balanceEnd := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceEnd...).IsZero()).To(BeTrue()) - balanceAfterBob := s.GetBalancesFromAddress(i.BOB) + balanceAfterBob := s.GetCoinsFromAddress(i.BOB) Expect(initialBalanceBob.Sub(balanceAfterBob...).String()).To(Equal(i.ACoins(200 * i.T_KYVE).String())) }) @@ -772,7 +772,7 @@ var _ = Describe("msg_server_fund_pool.go", Ordered, func() { fundingState, _ = s.App().FundersKeeper.GetFundingState(s.Ctx(), 0) Expect(len(fundingState.ActiveFunderAddresses)).To(Equal(funderstypes.MaxFunders)) - balanceEnd := s.GetBalancesFromAddress(i.ALICE) + balanceEnd := s.GetCoinsFromAddress(i.ALICE) Expect(initialBalance.Sub(balanceEnd...).String()).To(Equal(i.ACoins(150 * i.T_KYVE).String())) }) From 5bd9a9f76808fac5951291f338a8caaf0130731d Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 17:14:02 +0200 Subject: [PATCH 27/28] chore: implemented final feedback --- app/upgrades/v1_5/upgrade.go | 2 ++ x/bundles/keeper/logic_bundles.go | 1 + x/funders/keeper/logic_funders.go | 16 +++++++--------- x/funders/keeper/msg_server_fund_pool_test.go | 1 - x/funders/types/params.go | 1 + 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/upgrades/v1_5/upgrade.go b/app/upgrades/v1_5/upgrade.go index 3553e1e3..91eed388 100644 --- a/app/upgrades/v1_5/upgrade.go +++ b/app/upgrades/v1_5/upgrade.go @@ -34,6 +34,8 @@ func CreateUpgradeHandler(mm *module.Manager, configurator module.Configurator, // TODO: migrate gov params + // TODO: migrate fundings + // TODO: migrate delegation outstanding rewards return mm.RunMigrations(ctx, configurator, fromVM) diff --git a/x/bundles/keeper/logic_bundles.go b/x/bundles/keeper/logic_bundles.go index e92ceee2..bff939ed 100644 --- a/x/bundles/keeper/logic_bundles.go +++ b/x/bundles/keeper/logic_bundles.go @@ -538,6 +538,7 @@ func (k Keeper) tallyBundleProposal(ctx sdk.Context, bundleProposal types.Bundle return types.TallyResult{}, err } + // TODO: support all coins in separate PR fundersPayout := uint64(0) if found, payout := fundersPayouts.Find(globalTypes.Denom); found { fundersPayout = payout.Amount.Uint64() diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index ab50c591..9ef51b78 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -3,9 +3,9 @@ package keeper import ( "fmt" - "cosmossdk.io/errors" "cosmossdk.io/math" + "cosmossdk.io/errors" "github.com/KYVENetwork/chain/x/funders/types" sdk "github.com/cosmos/cosmos-sdk/types" errorsTypes "github.com/cosmos/cosmos-sdk/types/errors" @@ -140,14 +140,12 @@ func (k Keeper) ensureParamsCompatibility(ctx sdk.Context, funding *types.Fundin return types.ErrMinAmountPerBundle } - // if MinFundingMultiple is zero we can already return - if params.MinFundingMultiple == 0 { - return nil - } - - // throw error if a coin can not fulfill the funding multiple threshold - if funding.AmountsPerBundle.MulInt(math.NewInt(int64(params.MinFundingMultiple))).IsAnyGT(funding.Amounts) { - return types.ErrMinFundingMultiple + // we have to perform a zero check here or else the coin multiplication panics + if params.MinFundingMultiple > 0 { + // throw error if a coin can not fulfill the funding multiple threshold + if funding.AmountsPerBundle.MulInt(math.NewInt(int64(params.MinFundingMultiple))).IsAnyGT(funding.Amounts) { + return types.ErrMinFundingMultiple + } } return nil diff --git a/x/funders/keeper/msg_server_fund_pool_test.go b/x/funders/keeper/msg_server_fund_pool_test.go index 9a0ebc6b..dc262927 100644 --- a/x/funders/keeper/msg_server_fund_pool_test.go +++ b/x/funders/keeper/msg_server_fund_pool_test.go @@ -32,7 +32,6 @@ TEST CASES - msg_server_fund_pool.go * Try funding multiple coins but with not enough amounts per bundle * Try funding 100 coins but amount per bundle is a different coin * Try changing the amount per bundle of a coin which is not funded -* Try changing the amount per bundle of a coin which is not funded and whitelisted * Try to fund with a non-existent funder * Try to fund less coins than the lowest funder with full funding slots * Fund more coins than the lowest funder with full funding slots diff --git a/x/funders/types/params.go b/x/funders/types/params.go index 3ba0e194..f6fb7e0d 100644 --- a/x/funders/types/params.go +++ b/x/funders/types/params.go @@ -17,6 +17,7 @@ const ( ) // NewParams creates a new Params instance +// TODO: consider changing to value instead of pointer func NewParams(coinWhitelist []*WhitelistCoinEntry, minFundingMultiple uint64) Params { return Params{ CoinWhitelist: coinWhitelist, From 9ab9dc28ad0e98567a7d512639bac4542479f4ce Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 3 May 2024 17:28:29 +0200 Subject: [PATCH 28/28] chore: implemented final feedback --- x/funders/keeper/logic_funders.go | 4 ++-- x/funders/spec/01_concepts.md | 4 ++-- x/funders/spec/03_messages.md | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/x/funders/keeper/logic_funders.go b/x/funders/keeper/logic_funders.go index 9ef51b78..eaff409d 100644 --- a/x/funders/keeper/logic_funders.go +++ b/x/funders/keeper/logic_funders.go @@ -190,8 +190,8 @@ func (k Keeper) ensureFreeSlot(ctx sdk.Context, newFunding *types.Funding, fundi return err } - lowestFunding.Amounts = lowestFunding.Amounts.Sub(lowestFunding.Amounts...) - lowestFunding.CleanAmountsPerBundle() + lowestFunding.Amounts = sdk.NewCoins() + lowestFunding.AmountsPerBundle = sdk.NewCoins() fundingState.SetInactive(lowestFunding) k.SetFunding(ctx, lowestFunding) diff --git a/x/funders/spec/01_concepts.md b/x/funders/spec/01_concepts.md index 8770b3a5..a7614b5e 100644 --- a/x/funders/spec/01_concepts.md +++ b/x/funders/spec/01_concepts.md @@ -15,7 +15,7 @@ a steady pool economy. ## Funding Slots -Currently, the KYVE protocol allows at maximum 50 funders per pool to limit +Currently, the KYVE protocol allows at most 50 funders per pool to limit gas consumption. If the slots are full and a funder wants to join anyway he has to fund more than the current lowest funder. By doing so the funds of the lowest funder will be automatically returned to the lowest funder's wallet @@ -31,7 +31,7 @@ $KYVE as rewards but also the other coins with which the pool was funded with. ## Price per Bundle -Funders can choose for themselves which total amount they want to contribute and +Funders can choose for themselves that total amount they want to contribute and how much funds they want to distribute per validated and archived bundle of data. This gives funders huge flexibility and promotes competition between pools in order to attract validators who typically choose the pool with the highest provided funds. diff --git a/x/funders/spec/03_messages.md b/x/funders/spec/03_messages.md index ecd52eae..f4e25447 100644 --- a/x/funders/spec/03_messages.md +++ b/x/funders/spec/03_messages.md @@ -17,21 +17,21 @@ MsgUpdateFunder can update all properties of the funder except the funder's addr ## MsgFundPool MsgFundPool commits funds from the funder to a specific pool. The funder can fund multiple coins at the same time, but -they have to be whitelisted by the KYVE protocol. For each coin the funder funds the +they have to be whitelisted by the KYVE protocol. For each coin the funder funds, the `amount_per_bundle` has to be specified, too. This parameter specifies how much of each coin gets distributed per finalized bundle to the protocol validators. ## MsgDefundPool MsgDefundPool can withdraw remaining funds on the protocol if the funder decides to get his funds back or to allocate -them to a different pool. It takes a list of coins, so multiple coins can be also withdrawn in a single transaction. +them to a different pool. It takes a list of coins, so multiple coins can also be withdrawn in a single transaction. If a funder wants to defund a coin which was removed from the whitelist since he funded he has to defund the entire amount of that coin, else the transaction will fail. ## MsgUpdateParams -MsgDisablePool is a gov transaction and can be only called by the governance authority. To submit this transaction +MsgUpdateParams is a gov transaction and can be only called by the governance authority. To submit this transaction someone has to create a MsgUpdateParams governance proposal. This will update the parameters of the funders module, containing the coin whitelist and the `MinFundingMultiple` -param. +parameter.