diff --git a/app/app.go b/app/app.go index c8e432df..449cc89f 100644 --- a/app/app.go +++ b/app/app.go @@ -659,6 +659,7 @@ func NewKYVEApp( app.GlobalKeeper, *app.GovKeeper, app.TeamKeeper, + app.FundersKeeper, ) // this line is used by starport scaffolding # stargate/app/keeperDefinition diff --git a/x/query/keeper/grpc_account_funded.go b/x/query/keeper/grpc_account_funded.go index ed30e273..5ffe02ee 100644 --- a/x/query/keeper/grpc_account_funded.go +++ b/x/query/keeper/grpc_account_funded.go @@ -19,27 +19,29 @@ func (k Keeper) AccountFundedList(goCtx context.Context, req *types.QueryAccount pools := k.poolKeeper.GetAllPools(ctx) - for i := range pools { - pool := pools[i] - // TODO(rapha): fix this - //amount := pool.GetFunderAmount(req.Address) - amount := uint64(0) + for _, pool := range pools { + funding, found := k.fundersKeeper.GetFunding(ctx, req.Address, pool.Id) + if !found { + return nil, status.Error(codes.Internal, "funding not found") + } + fundingState, found := k.fundersKeeper.GetFundingState(ctx, pool.Id) + if !found { + return nil, status.Error(codes.Internal, "funding state not found") + } - if amount > 0 { + if funding.Amount > 0 { funded = append(funded, types.Funded{ - Amount: amount, + Amount: funding.Amount, Pool: &types.BasicPool{ - Id: pool.Id, - Name: pool.Name, - Runtime: pool.Runtime, - Logo: pool.Logo, - OperatingCost: pool.OperatingCost, - UploadInterval: pool.UploadInterval, - // TODO(rapha): fix this - TotalFunds: 0, - //TotalFunds: pool.TotalFunds, - TotalDelegation: k.delegationKeeper.GetDelegationOfPool(ctx, pool.Id), - Status: k.GetPoolStatus(ctx, &pool), + Id: pool.Id, + Name: pool.Name, + Runtime: pool.Runtime, + Logo: pool.Logo, + InflationShareWeight: pool.InflationShareWeight, + UploadInterval: pool.UploadInterval, + TotalFunds: fundingState.TotalAmount, + TotalDelegation: k.delegationKeeper.GetDelegationOfPool(ctx, pool.Id), + Status: k.GetPoolStatus(ctx, &pool, &fundingState), }, }) } diff --git a/x/query/keeper/grpc_query_pool.go b/x/query/keeper/grpc_query_pool.go index 71c692c1..0f2ad33b 100644 --- a/x/query/keeper/grpc_query_pool.go +++ b/x/query/keeper/grpc_query_pool.go @@ -70,7 +70,7 @@ func (k Keeper) parsePoolResponse(ctx sdk.Context, pool *poolTypes.Pool) types.P Stakers: stakers, TotalSelfDelegation: totalSelfDelegation, TotalDelegation: totalDelegation, - Status: k.GetPoolStatus(ctx, pool), + Status: k.GetPoolStatus(ctx, pool, nil), Account: poolAccount.String(), AccountBalance: poolBalance, } diff --git a/x/query/keeper/helper.go b/x/query/keeper/helper.go index c0359469..4558f999 100644 --- a/x/query/keeper/helper.go +++ b/x/query/keeper/helper.go @@ -1,6 +1,7 @@ package keeper 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" "github.com/KYVENetwork/chain/x/query/types" @@ -37,6 +38,7 @@ func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.Full for _, valaccount := range k.stakerKeeper.GetValaccountsFromStaker(ctx, staker.Address) { pool, _ := k.poolKeeper.GetPool(ctx, valaccount.PoolId) + fundingState, _ := k.fundersKeeper.GetFundingState(ctx, valaccount.PoolId) accountValaddress, _ := sdk.AccAddressFromBech32(valaccount.Valaddress) balanceValaccount := k.bankKeeper.GetBalance(ctx, accountValaddress, globalTypes.Denom).Amount.Uint64() @@ -44,16 +46,15 @@ func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.Full poolMemberships = append( poolMemberships, &types.PoolMembership{ Pool: &types.BasicPool{ - Id: pool.Id, - Name: pool.Name, - Runtime: pool.Runtime, - Logo: pool.Logo, - OperatingCost: pool.OperatingCost, - UploadInterval: pool.UploadInterval, - // TODO(rapha): fix this - //TotalFunds: pool.TotalFunds, - TotalDelegation: k.delegationKeeper.GetDelegationOfPool(ctx, pool.Id), - Status: k.GetPoolStatus(ctx, &pool), + Id: pool.Id, + Name: pool.Name, + Runtime: pool.Runtime, + Logo: pool.Logo, + InflationShareWeight: pool.InflationShareWeight, + UploadInterval: pool.UploadInterval, + TotalFunds: fundingState.TotalAmount, + TotalDelegation: k.delegationKeeper.GetDelegationOfPool(ctx, pool.Id), + Status: k.GetPoolStatus(ctx, &pool, &fundingState), }, Points: valaccount.Points, IsLeaving: valaccount.IsLeaving, @@ -82,22 +83,27 @@ func (k Keeper) GetFullStaker(ctx sdk.Context, stakerAddress string) *types.Full } } -func (k Keeper) GetPoolStatus(ctx sdk.Context, pool *pooltypes.Pool) pooltypes.PoolStatus { +func (k Keeper) GetPoolStatus(ctx sdk.Context, pool *pooltypes.Pool, fundingState *funderstypes.FundingState) pooltypes.PoolStatus { totalDelegation := k.delegationKeeper.GetDelegationOfPool(ctx, pool.Id) var poolStatus pooltypes.PoolStatus + poolStatus = pooltypes.POOL_STATUS_ACTIVE if pool.UpgradePlan.ScheduledAt > 0 && uint64(ctx.BlockTime().Unix()) >= pool.UpgradePlan.ScheduledAt { poolStatus = pooltypes.POOL_STATUS_UPGRADING } else if pool.Disabled { poolStatus = pooltypes.POOL_STATUS_DISABLED } else if totalDelegation < pool.MinDelegation { poolStatus = pooltypes.POOL_STATUS_NOT_ENOUGH_DELEGATION - // TODO(rapha): fix this - //} else if pool.TotalFunds == 0 { - // poolStatus = pooltypes.POOL_STATUS_NO_FUNDS } else { - poolStatus = pooltypes.POOL_STATUS_ACTIVE + // Get funding state if not provided + if fundingState == nil { + fs, _ := k.fundersKeeper.GetFundingState(ctx, pool.Id) + fundingState = &fs + } + if fundingState.TotalAmount == 0 { + poolStatus = pooltypes.POOL_STATUS_NO_FUNDS + } } return poolStatus diff --git a/x/query/keeper/keeper.go b/x/query/keeper/keeper.go index 570911f4..2ea59f71 100644 --- a/x/query/keeper/keeper.go +++ b/x/query/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + fundersKeeper "github.com/KYVENetwork/chain/x/funders/keeper" globalKeeper "github.com/KYVENetwork/chain/x/global/keeper" teamKeeper "github.com/KYVENetwork/chain/x/team/keeper" @@ -41,6 +42,7 @@ type ( globalKeeper globalKeeper.Keeper govKeeper govkeeper.Keeper teamKeeper teamKeeper.Keeper + fundersKeeper fundersKeeper.Keeper } ) @@ -60,6 +62,7 @@ func NewKeeper( globalKeeper globalKeeper.Keeper, govKeeper govkeeper.Keeper, teamKeeper teamKeeper.Keeper, + fundersKeeper fundersKeeper.Keeper, ) *Keeper { return &Keeper{ cdc: cdc, @@ -77,6 +80,7 @@ func NewKeeper( globalKeeper: globalKeeper, govKeeper: govKeeper, teamKeeper: teamKeeper, + fundersKeeper: fundersKeeper, } } diff --git a/x/query/types/query.pb.go b/x/query/types/query.pb.go index 24b741e6..1ebb132a 100644 --- a/x/query/types/query.pb.go +++ b/x/query/types/query.pb.go @@ -37,8 +37,8 @@ type BasicPool struct { Runtime string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"` // logo of the pool Logo string `protobuf:"bytes,4,opt,name=logo,proto3" json:"logo,omitempty"` - // operating_cost is the base payout for each bundle reward - OperatingCost uint64 `protobuf:"varint,5,opt,name=operating_cost,json=operatingCost,proto3" json:"operating_cost,omitempty"` + // inflation_share_weight is the base payout for each bundle reward + InflationShareWeight uint64 `protobuf:"varint,5,opt,name=inflation_share_weight,json=inflationShareWeight,proto3" json:"inflation_share_weight,omitempty"` // upload_interval is the interval bundles get created 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 @@ -112,9 +112,9 @@ func (m *BasicPool) GetLogo() string { return "" } -func (m *BasicPool) GetOperatingCost() uint64 { +func (m *BasicPool) GetInflationShareWeight() uint64 { if m != nil { - return m.OperatingCost + return m.InflationShareWeight } return 0 } @@ -520,56 +520,57 @@ func init() { func init() { proto.RegisterFile("kyve/query/v1beta1/query.proto", fileDescriptor_6b41255feae93a15) } var fileDescriptor_6b41255feae93a15 = []byte{ - // 782 bytes of a gzipped FileDescriptorProto - 0x1f, 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e5, 0x4d, 0xd0, 0xfa, 0xe3, 0x26, - 0x68, 0xfd, 0xf0, 0xd1, 0x16, 0xa9, 0x2f, 0xbf, 0xff, 0xee, 0xd9, 0x4b, 0xaa, 0x2f, 0x84, 0x5c, - 0x4d, 0xe3, 0x25, 0x61, 0x7c, 0xfa, 0x53, 0x75, 0xfd, 0x5b, 0x62, 0x8b, 0x9e, 0xbd, 0xaf, 0x3f, - 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0x50, 0x8f, 0x9d, 0x37, 0x19, 0x06, 0x00, 0x00, + // 790 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xda, 0x4e, 0x1a, 0xbf, 0x80, 0x03, 0xa3, 0xd2, 0x6e, 0x23, 0xba, 0x89, 0x8c, 0x44, + 0x53, 0xa4, 0xae, 0x95, 0x00, 0x12, 0xe2, 0xc0, 0x21, 0x49, 0x2b, 0x21, 0x68, 0x85, 0xa6, 0x02, + 0x04, 0x97, 0xd5, 0x78, 0xf7, 0x65, 0x3d, 0xf2, 0xee, 0x8c, 0x99, 0x99, 0xb5, 0xf1, 0x6f, 0x80, + 0x03, 0x3f, 0x86, 0x3b, 0xd7, 0x1e, 0x7b, 0x04, 0x0e, 0x15, 0x4a, 0xfe, 0x08, 0x9a, 0x99, 0xdd, + 0xad, 0x1d, 0xcc, 0xad, 0x27, 0xef, 0xfb, 0xbe, 0x6f, 0xde, 0xcc, 0x7c, 0xef, 0xbd, 0x31, 0x44, + 0xd3, 0xe5, 0x1c, 0x47, 0x3f, 0x55, 0xa8, 0x96, 0xa3, 0xf9, 0xc9, 0x18, 0x0d, 0x3b, 0xf1, 0x51, + 0x3c, 0x53, 0xd2, 0x48, 0x42, 0x2c, 0x1f, 0x7b, 0xa4, 0xe6, 0x0f, 0x6e, 0xe7, 0x32, 0x97, 0x8e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 0x4c, 0x72, 0x61, 0xb4, 0xdb, 0xa3, 0x47, 0xeb, 0x88, 0xdc, 0x07, 0xe0, 0x3a, 0x29, 0x90, 0xcd, + 0xed, 0xd4, 0xd8, 0x06, 0xd8, 0xa5, 0x7d, 0xae, 0xbf, 0xf6, 0x00, 0x89, 0x00, 0xe6, 0xac, 0x68, + 0x26, 0xdd, 0x37, 0xc1, 0x0a, 0x62, 0x6b, 0x3b, 0x66, 0x05, 0x13, 0x29, 0xd6, 0xe3, 0xd3, 0x84, + 0x67, 0x17, 0x2f, 0xae, 0xa2, 0xe0, 0xe5, 0x55, 0x14, 0xfc, 0x73, 0x15, 0x05, 0xbf, 0x5d, 0x47, + 0x5b, 0x2f, 0xaf, 0xa3, 0xad, 0x3f, 0xaf, 0xa3, 0xad, 0x1f, 0x3f, 0x5a, 0x71, 0xea, 0xab, 0x1f, + 0xbe, 0x7b, 0xfc, 0x0c, 0xcd, 0x42, 0xaa, 0xe9, 0x28, 0x9d, 0x30, 0x2e, 0x46, 0x3f, 0xd7, 0xff, + 0x06, 0xce, 0xb1, 0xf1, 0x8e, 0x7b, 0xbe, 0x3f, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x52, 0x8f, + 0x3f, 0x0f, 0x28, 0x06, 0x00, 0x00, } func (m *BasicPool) Marshal() (dAtA []byte, err error) { @@ -612,8 +613,8 @@ func (m *BasicPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - if m.OperatingCost != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.OperatingCost)) + if m.InflationShareWeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.InflationShareWeight)) i-- dAtA[i] = 0x28 } @@ -939,8 +940,8 @@ func (m *BasicPool) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.OperatingCost != 0 { - n += 1 + sovQuery(uint64(m.OperatingCost)) + if m.InflationShareWeight != 0 { + n += 1 + sovQuery(uint64(m.InflationShareWeight)) } if m.UploadInterval != 0 { n += 1 + sovQuery(uint64(m.UploadInterval)) @@ -1222,9 +1223,9 @@ func (m *BasicPool) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatingCost", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InflationShareWeight", wireType) } - m.OperatingCost = 0 + m.InflationShareWeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1234,7 +1235,7 @@ func (m *BasicPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.OperatingCost |= uint64(b&0x7F) << shift + m.InflationShareWeight |= uint64(b&0x7F) << shift if b < 0x80 { break }