Commit 495ee2bd authored by mattverse's avatar mattverse
Browse files

Change comments and proto field name

parent a0f6297f
Showing with 76 additions and 106 deletions
+76 -106
......@@ -43,7 +43,7 @@ message LockableDurationsInfo {
];
}
// HistoricalReward stores the accumulator value for rewards
// HistoricalReward stores the accumulator value for rewards, indexed by lockDuration + denom + epochNumber combination
message HistoricalReward {
// Reward per share for each denom
repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [
......@@ -67,7 +67,7 @@ message CurrentReward {
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
// denom of share
string denom = 4;
string lock_denom = 4;
google.protobuf.Duration lock_duration = 5 [
(gogoproto.stdduration) = true,
(gogoproto.nullable) = false,
......
......@@ -20,7 +20,6 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
)
......@@ -31,7 +30,6 @@ var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
var (
filter_Query_Pools_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
......@@ -540,14 +538,12 @@ func local_request_Query_EstimateSwapExactAmountOut_0(ctx context.Context, marsh
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error {
mux.Handle("GET", pattern_Query_Pools_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -555,7 +551,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_Pools_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -569,8 +564,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_NumPools_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -578,7 +571,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_NumPools_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -592,8 +584,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_TotalLiquidity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -601,7 +591,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_TotalLiquidity_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -615,8 +604,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_Pool_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -624,7 +611,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_Pool_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -638,8 +624,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_PoolParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -647,7 +631,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_PoolParams_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -661,8 +644,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_TotalShares_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -670,7 +651,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_TotalShares_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -684,8 +664,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_PoolAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -693,7 +671,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_PoolAssets_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -707,8 +684,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_SpotPrice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -716,7 +691,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_SpotPrice_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -730,8 +704,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_EstimateSwapExactAmountIn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -739,7 +711,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_EstimateSwapExactAmountIn_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......@@ -753,8 +724,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
mux.Handle("GET", pattern_Query_EstimateSwapExactAmountOut_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
......@@ -762,7 +731,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return
}
resp, md, err := local_request_Query_EstimateSwapExactAmountOut_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
......
......@@ -21,7 +21,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState)
}
for _, genesisReward := range genState.GenesisReward {
currentReward := genesisReward.CurrentReward
denom := currentReward.Denom
denom := currentReward.LockDenom
duration := currentReward.LockDuration
err := k.SetCurrentReward(ctx, currentReward, denom, duration)
if err != nil {
......@@ -56,7 +56,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
func GetGenesisRewards(ctx sdk.Context, k keeper.Keeper) []types.GenesisReward {
var genesisRewards []types.GenesisReward
for _, currentReward := range k.GetAllCurrentReward(ctx) {
denom := currentReward.Denom
denom := currentReward.LockDenom
duration := currentReward.LockDuration
genesisReward := types.GenesisReward{}
genesisReward.CurrentReward = currentReward
......@@ -70,7 +70,7 @@ func GetGenesisRewards(ctx sdk.Context, k keeper.Keeper) []types.GenesisReward {
}
historicalRewards = append(historicalRewards, historicalReward)
latestEpoch, err = k.GetLatestEpochForHistoricalReward(ctx, currentReward.Denom, currentReward.LockDuration, latestEpoch)
latestEpoch, err = k.GetLatestEpochForHistoricalReward(ctx, currentReward.LockDenom, currentReward.LockDuration, latestEpoch)
if err != nil {
panic(fmt.Sprintf("unable to retrieve historical reward for denom(%v) d(%v) period(%v)", denom, duration, latestEpoch))
}
......
......@@ -55,7 +55,7 @@ func TestIncentivesExportGenesis(t *testing.T) {
currentReward := types.CurrentReward{
LastProcessedEpoch: 5,
TotalShares: sdk.NewCoin("stake", sdk.NewInt(10)),
Denom: denom,
LockDenom: denom,
LockDuration: duration,
}
app.IncentivesKeeper.SetCurrentReward(ctx, currentReward, denom, duration)
......
package keeper_test
import (
"fmt"
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
......@@ -240,6 +241,7 @@ func (suite *KeeperTestSuite) TestLockAndUnlockFor14Days() {
estLockReward, err := suite.app.IncentivesKeeper.EstimateLockReward(suite.ctx, *lock)
suite.Require().NoError(err)
fmt.Println(i)
suite.Require().Equal(reward, estLockReward.Rewards)
}
......
......@@ -334,7 +334,7 @@ func (suite *KeeperTestSuite) TestGRPCCurrentReward() {
LastProcessedEpoch: 1,
TotalShares: sdk.NewInt64Coin("stake", 100),
Rewards: sdk.Coins{sdk.NewInt64Coin("reward", 100)},
Denom: denom,
LockDenom: denom,
LockDuration: duration,
}
......@@ -399,7 +399,7 @@ func (suite *KeeperTestSuite) TestGRPCRewards() {
LastProcessedEpoch: 1,
TotalShares: sdk.NewInt64Coin("lptoken", 100),
Rewards: sdk.Coins{sdk.NewInt64Coin("reward", 100)},
Denom: denom,
LockDenom: denom,
LockDuration: duration,
}
......
......@@ -51,7 +51,7 @@ func (k Keeper) SetCurrentReward(ctx sdk.Context, currentReward types.CurrentRew
store := ctx.KVStore(k.storeKey)
rewardKey := combineKeys(types.KeyCurrentReward, []byte(denom+"/"+lockDuration.String()))
currentReward.Denom = denom
currentReward.LockDenom = denom
currentReward.LockDuration = lockDuration
bz, err := proto.Marshal(&currentReward)
if err != nil {
......
......@@ -233,7 +233,7 @@ func (m *HistoricalReward) GetEpoch() int64 {
return 0
}
// CurrentReward stores reward at the most recent epoch for each denom + lockDuration
// CurrentReward stores reward at the latest reward for each denom + lockDuration
type CurrentReward struct {
LastProcessedEpoch int64 `protobuf:"varint,1,opt,name=last_processed_epoch,json=lastProcessedEpoch,proto3" json:"last_processed_epoch,omitempty"`
// total shares locked for the denom + lockDuration
......@@ -241,7 +241,7 @@ type CurrentReward struct {
// total reward that is to be distributed
Rewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"rewards"`
// denom of share
Denom string `protobuf:"bytes,4,opt,name=denom,proto3" json:"denom,omitempty"`
LockDenom string `protobuf:"bytes,4,opt,name=lock_denom,json=lockDenom,proto3" json:"lock_denom,omitempty"`
LockDuration time.Duration `protobuf:"bytes,5,opt,name=lock_duration,json=lockDuration,proto3,stdduration" json:"lock_duration" yaml:"duration"`
}
......@@ -299,9 +299,9 @@ func (m *CurrentReward) GetRewards() github_com_cosmos_cosmos_sdk_types.Coins {
return nil
}
func (m *CurrentReward) GetDenom() string {
func (m *CurrentReward) GetLockDenom() string {
if m != nil {
return m.Denom
return m.LockDenom
}
return ""
}
......@@ -447,60 +447,60 @@ func init() {
func init() { proto.RegisterFile("osmosis/incentives/gauge.proto", fileDescriptor_c0304e2bb0159901) }
var fileDescriptor_c0304e2bb0159901 = []byte{
// 836 bytes of a gzipped FileDescriptorProto
// 846 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6f, 0xdc, 0x44,
0x14, 0xcf, 0xec, 0x6e, 0x92, 0x76, 0xb2, 0x81, 0x64, 0x94, 0xaa, 0x4e, 0x00, 0xef, 0xe2, 0x0a,
0xb1, 0x12, 0xaa, 0xdd, 0xa6, 0x07, 0x24, 0x6e, 0x6c, 0x52, 0x41, 0xa4, 0x48, 0x04, 0xd3, 0x03,
0x82, 0x83, 0x35, 0xb6, 0x27, 0xce, 0x28, 0x63, 0x8f, 0x35, 0x33, 0x0e, 0xcd, 0x37, 0x00, 0x4e,
0x15, 0x27, 0x3e, 0x03, 0x07, 0x4e, 0x7c, 0x88, 0x1e, 0x7b, 0xe4, 0xd4, 0xa2, 0xe4, 0x1b, 0x70,
0x47, 0x42, 0xf3, 0x2f, 0xbb, 0x24, 0x28, 0xca, 0x21, 0x3d, 0xd9, 0x33, 0xbf, 0x79, 0xef, 0xfd,
0xde, 0xef, 0xfd, 0xc6, 0x86, 0x21, 0x97, 0x35, 0x97, 0x54, 0x26, 0xb4, 0x29, 0x48, 0xa3, 0xe8,
0x09, 0x91, 0x49, 0x85, 0xbb, 0x8a, 0xc4, 0xad, 0xe0, 0x8a, 0x23, 0xe4, 0xf0, 0x78, 0x86, 0x6f,
0x6d, 0x54, 0xbc, 0xe2, 0x06, 0x4e, 0xf4, 0x9b, 0x3d, 0xb9, 0x15, 0x56, 0x9c, 0x57, 0x8c, 0x24,
0x66, 0x95, 0x77, 0x87, 0x49, 0xd9, 0x09, 0xac, 0x28, 0x6f, 0x1c, 0x3e, 0xba, 0x8c, 0x2b, 0x5a,
0x13, 0xa9, 0x70, 0xdd, 0xfa, 0x04, 0x85, 0xa9, 0x95, 0xe4, 0x58, 0x92, 0xe4, 0xe4, 0x71, 0x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, 0x65, 0xd3, 0x47, 0xb6, 0x6c, 0x26, 0xf4, 0xe4,
0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0x8b, 0xe4, 0x8f, 0xba, 0x07, 0x00, 0x00,
}
func (m *Gauge) Marshal() (dAtA []byte, err error) {
......@@ -702,10 +702,10 @@ func (m *CurrentReward) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintGauge(dAtA, i, uint64(n3))
i--
dAtA[i] = 0x2a
if len(m.Denom) > 0 {
i -= len(m.Denom)
copy(dAtA[i:], m.Denom)
i = encodeVarintGauge(dAtA, i, uint64(len(m.Denom)))
if len(m.LockDenom) > 0 {
i -= len(m.LockDenom)
copy(dAtA[i:], m.LockDenom)
i = encodeVarintGauge(dAtA, i, uint64(len(m.LockDenom)))
i--
dAtA[i] = 0x22
}
......@@ -938,7 +938,7 @@ func (m *CurrentReward) Size() (n int) {
n += 1 + l + sovGauge(uint64(l))
}
}
l = len(m.Denom)
l = len(m.LockDenom)
if l > 0 {
n += 1 + l + sovGauge(uint64(l))
}
......@@ -1560,7 +1560,7 @@ func (m *CurrentReward) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field LockDenom", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
......@@ -1588,7 +1588,7 @@ func (m *CurrentReward) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Denom = string(dAtA[iNdEx:postIndex])
m.LockDenom = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment