diff --git a/go.mod b/go.mod index 26516c1456..73f837253d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/Sifchain/sifnode -go 1.22.2 +go 1.21 require ( github.com/BurntSushi/toml v1.2.1 @@ -64,7 +64,7 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect - github.com/cometbft/cometbft-db v0.12.0 // indirect + github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/confio/ics23/go v0.9.1 // indirect github.com/cosmos/btcutil v1.0.4 // indirect github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 // indirect @@ -80,7 +80,6 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -97,10 +96,8 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/gateway v1.1.0 // indirect github.com/golang/glog v1.0.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/flatbuffers v1.12.1 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect @@ -158,8 +155,7 @@ require ( github.com/tklauser/numcpus v0.2.2 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect - go.opencensus.io v0.24.0 // indirect + go.etcd.io/bbolt v1.3.8 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/crypto v0.21.0 // indirect diff --git a/go.sum b/go.sum index e483c28dbb..80eb919cf1 100644 --- a/go.sum +++ b/go.sum @@ -200,8 +200,8 @@ github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZ github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= github.com/cometbft/cometbft v0.34.33 h1:2nnMU8smD1fpkY4JP6GWSaWmxE4BhqL60LG+Sr+Ijzo= github.com/cometbft/cometbft v0.34.33/go.mod h1:S1rXDQyGEJQVle3vneIHV570I1ulneWgF1ScGvUO+bI= -github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= -github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= +github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= +github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= @@ -268,8 +268,6 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= -github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= @@ -411,8 +409,6 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= @@ -450,8 +446,6 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= -github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -459,7 +453,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -948,7 +941,6 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -1013,8 +1005,8 @@ github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= -go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1023,8 +1015,6 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1144,7 +1134,6 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= diff --git a/proto/sifnode/clp/v1/params.proto b/proto/sifnode/clp/v1/params.proto index d79e21a9fd..0037ecaf67 100644 --- a/proto/sifnode/clp/v1/params.proto +++ b/proto/sifnode/clp/v1/params.proto @@ -93,6 +93,7 @@ message ProviderDistributionPeriod { uint64 distribution_period_start_block = 2; uint64 distribution_period_end_block = 3; uint64 distribution_period_mod = 4; + bool distribution_period_burn = 5; } message ProviderDistributionParams { diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 9db012c1f6..f029463ebc 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash -set -eo pipefail +# FIXME: causes the script to fail with this error: `make: *** [proto-gen] Error 1` +# set -eo pipefail protoc_gen_gocosmos() { if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then diff --git a/x/clp/keeper/migrations.go b/x/clp/keeper/migrations.go index 43097d6821..374095c343 100644 --- a/x/clp/keeper/migrations.go +++ b/x/clp/keeper/migrations.go @@ -114,3 +114,9 @@ func (m Migrator) MigrateToVer5(ctx sdk.Context) error { return nil } + +func (m Migrator) MigrateToVer6(ctx sdk.Context) error { + m.keeper.SetProviderDistributionParams(ctx, types.GetDefaultProviderDistributionParams()) + + return nil +} diff --git a/x/clp/keeper/provider_distribution.go b/x/clp/keeper/provider_distribution.go index 29fac42e58..2e174956a3 100644 --- a/x/clp/keeper/provider_distribution.go +++ b/x/clp/keeper/provider_distribution.go @@ -13,28 +13,33 @@ type LpRowanMap map[string]sdk.Uint type LpPoolMap map[string][]LPPool func (k Keeper) ProviderDistributionPolicyRun(ctx sdk.Context) { - a, b, c := k.doProviderDistribution(ctx) - k.TransferProviderDistribution(ctx, a, b, c) + a, b, c, d := k.doProviderDistribution(ctx) + k.TransferProviderDistribution(ctx, a, b, c, d) } -func (k Keeper) doProviderDistribution(ctx sdk.Context) (PoolRowanMap, LpRowanMap, LpPoolMap) { +func (k Keeper) doProviderDistribution(ctx sdk.Context) (PoolRowanMap, LpRowanMap, LpPoolMap, bool) { blockHeight := ctx.BlockHeight() params := k.GetProviderDistributionParams(ctx) if params == nil { - return make(PoolRowanMap), make(LpRowanMap), make(LpPoolMap) + return make(PoolRowanMap), make(LpRowanMap), make(LpPoolMap), false } period := FindProviderDistributionPeriod(blockHeight, params.DistributionPeriods) if period == nil { - return make(PoolRowanMap), make(LpRowanMap), make(LpPoolMap) + return make(PoolRowanMap), make(LpRowanMap), make(LpPoolMap), false } allPools := k.GetPools(ctx) - return k.CollectProviderDistributions(ctx, allPools, period.DistributionPeriodBlockRate) + poolRowanMap, lpRowanMap, lpPoolMap := k.CollectProviderDistributions(ctx, allPools, period.DistributionPeriodBlockRate) + return poolRowanMap, lpRowanMap, lpPoolMap, period.DistributionPeriodBurn } -func (k Keeper) TransferProviderDistribution(ctx sdk.Context, poolRowanMap PoolRowanMap, lpRowanMap LpRowanMap, lpPoolMap LpPoolMap) { - k.TransferProviderDistributionGeneric(ctx, poolRowanMap, lpRowanMap, lpPoolMap, "lppd/liquidity_provider_payout_error", "lppd/distribution") +func (k Keeper) TransferProviderDistribution(ctx sdk.Context, poolRowanMap PoolRowanMap, lpRowanMap LpRowanMap, lpPoolMap LpPoolMap, burnRowan bool) { + if burnRowan { + k.TransferWheatToLiquidityProviders(ctx, poolRowanMap, lpRowanMap, lpPoolMap, "lppd/liquidity_provider_payout_error", "lppd/distribution") + } else { + k.TransferProviderDistributionGeneric(ctx, poolRowanMap, lpRowanMap, lpPoolMap, "lppd/liquidity_provider_payout_error", "lppd/distribution") + } for pool, sub := range poolRowanMap { // will never fail @@ -61,6 +66,51 @@ func (k Keeper) TransferProviderDistributionGeneric(ctx sdk.Context, poolRowanMa } } +// transfer wheat to liquidity providers +func (k Keeper) TransferWheatToLiquidityProviders(ctx sdk.Context, poolRowanMap PoolRowanMap, lpRowanMap LpRowanMap, lpPoolMap LpPoolMap, typeStr string, successEventType string) { + for lpAddress, totalRowan := range lpRowanMap { + addr, _ := sdk.AccAddressFromBech32(lpAddress) // We know this can't fail as we previously filtered out invalid strings + wheatCoin := sdk.NewCoin(types.WheatSymbol, sdk.NewIntFromBigInt(totalRowan.BigInt())) + + // first mint equivalent amount of rowan in wheat within the module account + if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(wheatCoin)); err != nil { + fireLPPayoutErrorEvent(ctx, addr, typeStr, err) + + for _, lpPool := range lpPoolMap[lpAddress] { + poolRowanMap[lpPool.Pool] = poolRowanMap[lpPool.Pool].Sub(lpPool.Amount) + } + + continue + } + + // second send wheat amount to the liquidity provider + if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, addr, sdk.NewCoins(wheatCoin)); err != nil { + fireLPPayoutErrorEvent(ctx, addr, typeStr, err) + + for _, lpPool := range lpPoolMap[lpAddress] { + poolRowanMap[lpPool.Pool] = poolRowanMap[lpPool.Pool].Sub(lpPool.Amount) + } + + continue + } + + rowanCoin := sdk.NewCoin(types.NativeSymbol, sdk.NewIntFromBigInt(totalRowan.BigInt())) + + // third burn equivalent amount of rowan in the module account + if err := k.bankKeeper.BurnCoins(ctx, types.ModuleName, sdk.NewCoins(rowanCoin)); err != nil { + fireLPPayoutErrorEvent(ctx, addr, typeStr, err) + + for _, lpPool := range lpPoolMap[lpAddress] { + poolRowanMap[lpPool.Pool] = poolRowanMap[lpPool.Pool].Sub(lpPool.Amount) + } + + continue + } + + fireDistributeSuccessEvent(ctx, lpAddress, lpPoolMap[lpAddress], totalRowan, successEventType) + } +} + func fireDistributeSuccessEvent(ctx sdk.Context, lpAddress string, pools []LPPool, totalDistributed sdk.Uint, typeStr string) { data := PrintPools(pools) successEvent := sdk.NewEvent( @@ -100,7 +150,7 @@ func fireLPPayoutErrorEvent(ctx sdk.Context, address sdk.AccAddress, typeStr str ctx.EventManager().EmitEvents(sdk.Events{failureEvent}) } -//nolint +// nolint func fireDistributionEvent(ctx sdk.Context, amount sdk.Uint, to sdk.Address) { coin := sdk.NewCoin(types.NativeSymbol, sdk.NewIntFromBigInt(amount.BigInt())) distribtionEvent := sdk.NewEvent( diff --git a/x/clp/module.go b/x/clp/module.go index 7af7c65cfa..2e9b6f547a 100644 --- a/x/clp/module.go +++ b/x/clp/module.go @@ -150,6 +150,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err != nil { panic(err) } + err = cfg.RegisterMigration(types.ModuleName, 5, m.MigrateToVer6) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the clp module. It returns @@ -179,4 +183,4 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val return EndBlocker(ctx, am.keeper) } -func (AppModule) ConsensusVersion() uint64 { return 5 } +func (AppModule) ConsensusVersion() uint64 { return 6 } diff --git a/x/clp/types/keys.go b/x/clp/types/keys.go index 4cab268d99..b0a89db65a 100644 --- a/x/clp/types/keys.go +++ b/x/clp/types/keys.go @@ -24,6 +24,7 @@ const ( QuerierRoute = ModuleName NativeSymbol = "rowan" + WheatSymbol = "wheat" PoolThrehold = "1000000000000000000" NativeAssetDecimals = 18 diff --git a/x/clp/types/params.pb.go b/x/clp/types/params.pb.go index 54ef1c9f2a..73df52614c 100644 --- a/x/clp/types/params.pb.go +++ b/x/clp/types/params.pb.go @@ -504,6 +504,7 @@ type ProviderDistributionPeriod struct { DistributionPeriodStartBlock uint64 `protobuf:"varint,2,opt,name=distribution_period_start_block,json=distributionPeriodStartBlock,proto3" json:"distribution_period_start_block,omitempty"` DistributionPeriodEndBlock uint64 `protobuf:"varint,3,opt,name=distribution_period_end_block,json=distributionPeriodEndBlock,proto3" json:"distribution_period_end_block,omitempty"` DistributionPeriodMod uint64 `protobuf:"varint,4,opt,name=distribution_period_mod,json=distributionPeriodMod,proto3" json:"distribution_period_mod,omitempty"` + DistributionPeriodBurn bool `protobuf:"varint,5,opt,name=distribution_period_burn,json=distributionPeriodBurn,proto3" json:"distribution_period_burn,omitempty"` } func (m *ProviderDistributionPeriod) Reset() { *m = ProviderDistributionPeriod{} } @@ -560,6 +561,13 @@ func (m *ProviderDistributionPeriod) GetDistributionPeriodMod() uint64 { return 0 } +func (m *ProviderDistributionPeriod) GetDistributionPeriodBurn() bool { + if m != nil { + return m.DistributionPeriodBurn + } + return false +} + type ProviderDistributionParams struct { DistributionPeriods []*ProviderDistributionPeriod `protobuf:"bytes,1,rep,name=distribution_periods,json=distributionPeriods,proto3" json:"distribution_periods,omitempty"` } @@ -712,81 +720,82 @@ func init() { func init() { proto.RegisterFile("sifnode/clp/v1/params.proto", fileDescriptor_61de66e331088d04) } var fileDescriptor_61de66e331088d04 = []byte{ - // 1173 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x5b, 0x6f, 0x1b, 0x45, - 0x1b, 0xce, 0xda, 0x6e, 0x1b, 0xbf, 0x39, 0x7c, 0x5f, 0x27, 0x76, 0xb2, 0x39, 0xd9, 0xe9, 0x22, - 0x41, 0x14, 0x54, 0x9b, 0x14, 0x95, 0xc2, 0xa5, 0x73, 0x00, 0x05, 0xa5, 0x92, 0xd9, 0x84, 0x1b, - 0x24, 0xb4, 0xda, 0xec, 0x4e, 0xec, 0x51, 0x76, 0x77, 0xb6, 0x33, 0x63, 0x27, 0x01, 0x89, 0xdf, - 0xd0, 0x7b, 0x04, 0x7f, 0x81, 0x6b, 0x7e, 0x00, 0x52, 0x2f, 0x8b, 0xb8, 0x41, 0xbd, 0x88, 0x50, - 0xf2, 0x47, 0xd0, 0xce, 0xec, 0xd1, 0x76, 0x50, 0x1b, 0xb8, 0x4a, 0xd6, 0xef, 0xbc, 0xcf, 0xf3, - 0x1e, 0x9f, 0xd9, 0x85, 0x55, 0x4e, 0x4e, 0x03, 0xea, 0xe2, 0xb6, 0xe3, 0x85, 0xed, 0xe1, 0x76, - 0x3b, 0xb4, 0x99, 0xed, 0xf3, 0x56, 0xc8, 0xa8, 0xa0, 0x68, 0x3e, 0x36, 0xb6, 0x1c, 0x2f, 0x6c, - 0x0d, 0xb7, 0x57, 0x6a, 0x3d, 0xda, 0xa3, 0xd2, 0xd4, 0x8e, 0xfe, 0x53, 0xa7, 0x8c, 0x01, 0xdc, -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0e, 0x47, 0x91, 0xf5, 0x98, 0xf8, 0x18, 0xb5, 0x60, - 0x41, 0x19, 0x78, 0x21, 0xfb, 0xfb, 0x32, 0xf0, 0x87, 0xb1, 0x29, 0x97, 0xf4, 0xa7, 0x09, 0x11, - 0xb7, 0x70, 0x48, 0x9d, 0xbe, 0x45, 0x5c, 0x1c, 0x08, 0x72, 0x4a, 0x30, 0xd3, 0x1f, 0x48, 0xa2, - 0xc5, 0xd8, 0xbe, 0x1f, 0x99, 0x0f, 0x52, 0x2b, 0x7a, 0x0c, 0x28, 0xf1, 0x74, 0x09, 0x17, 0x8c, - 0x9c, 0x0c, 0x04, 0xd6, 0xa7, 0x65, 0xcb, 0x12, 0xa2, 0xbd, 0xd4, 0x60, 0xfc, 0x56, 0x82, 0xf9, - 0xae, 0x2f, 0x42, 0x33, 0xea, 0xbe, 0xea, 0x99, 0x03, 0x8b, 0xa1, 0x2f, 0xc2, 0x24, 0xc5, 0x13, - 0x19, 0x30, 0xb3, 0x85, 0x6a, 0x7c, 0x75, 0xa7, 0xf5, 0xea, 0xaa, 0x39, 0xf5, 0xe6, 0xaa, 0xf9, - 0x7e, 0x8f, 0x88, 0xfe, 0xe0, 0xa4, 0xe5, 0x50, 0xbf, 0xed, 0x50, 0xee, 0x53, 0x1e, 0xff, 0x79, - 0xcc, 0xdd, 0xb3, 0xb6, 0xb8, 0x0c, 0x31, 0x6f, 0xed, 0x61, 0xc7, 0x5c, 0x88, 0xd0, 0x54, 0x5e, - 0x3b, 0x11, 0x56, 0x44, 0x85, 0x08, 0x2c, 0x4b, 0x12, 0x67, 0xc0, 0x18, 0x0e, 0x84, 0xc5, 0x06, - 0x41, 0x40, 0x82, 0x9e, 0xe2, 0x29, 0xdf, 0x89, 0x47, 0x46, 0xbd, 0xab, 0xf0, 0x4c, 0x05, 0x27, - 0xa9, 0x92, 0x7c, 0x48, 0x20, 0x30, 0xb3, 0x42, 0xea, 0x11, 0xe7, 0x52, 0xf1, 0x54, 0xee, 0x9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, 0x12, 0xf7, 0x6c, 0x56, 0xd0, 0x33, 0x1c, 0x58, 0xea, 0xd5, 0x5d, 0x2f, 0xc9, 0x5c, 0x8c, - 0xd1, 0x5c, 0x62, 0x97, 0xe3, 0xe8, 0xa8, 0x0a, 0xce, 0x9c, 0x11, 0xd9, 0x83, 0xf1, 0x03, 0xa0, - 0xf1, 0x23, 0xa8, 0x06, 0xf7, 0xf2, 0x92, 0xa6, 0x1e, 0x90, 0x09, 0x73, 0xc5, 0x6c, 0xee, 0xf6, - 0xb2, 0x36, 0xc3, 0xb3, 0x34, 0x76, 0x3a, 0xaf, 0xae, 0x1b, 0xda, 0xeb, 0xeb, 0x86, 0xf6, 0xd7, - 0x75, 0x43, 0x7b, 0x79, 0xd3, 0x98, 0x7a, 0x7d, 0xd3, 0x98, 0xfa, 0xf3, 0xa6, 0x31, 0xf5, 0x4d, - 0x7e, 0xe3, 0x8e, 0xc8, 0xa9, 0xd3, 0xb7, 0x49, 0xd0, 0x4e, 0x3e, 0x5b, 0x2e, 0xe4, 0x87, 0x8b, - 0xc4, 0x3c, 0xb9, 0x2f, 0xbf, 0x47, 0x3e, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x72, 0x3e, 0x7c, - 0xae, 0xd4, 0x0c, 0x00, 0x00, + // 1190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x5b, 0x6f, 0xe3, 0x44, + 0x14, 0xae, 0x93, 0xb4, 0xdb, 0x9c, 0x5e, 0x60, 0xdd, 0xa4, 0x75, 0x6f, 0x49, 0xd7, 0x48, 0x50, + 0x15, 0x6d, 0x42, 0x17, 0x2d, 0x0b, 0x8f, 0xe9, 0x05, 0x54, 0xd4, 0x4a, 0xc1, 0x2d, 0x2f, 0x48, + 0xc8, 0x72, 0xed, 0x69, 0x32, 0xaa, 0xed, 0xf1, 0xce, 0x8c, 0xd3, 0x16, 0x24,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62, 0x92, 0x44, 0xb0, 0x92, 0x1e, 0x8a, 0xe1, 0x0e, 0x89, 0x7d, 0xde, 0x15, + 0x27, 0xd4, 0x7d, 0x68, 0x8e, 0x42, 0xd8, 0x96, 0x6f, 0x23, 0x37, 0x01, 0x29, 0x09, 0x90, 0xb5, + 0x61, 0x90, 0x5d, 0x71, 0x28, 0x86, 0xd9, 0x85, 0x79, 0x2a, 0x22, 0x8b, 0x9d, 0x98, 0x56, 0xd9, + 0x28, 0x6f, 0xce, 0x3c, 0x59, 0x6b, 0x15, 0x0b, 0xda, 0x8a, 0xe3, 0x17, 0x87, 0x8c, 0x39, 0x9a, + 0x7b, 0x62, 0xea, 0x33, 0xd0, 0x0a, 0x20, 0x26, 0xe3, 0x16, 0xe5, 0x26, 0xc7, 0x1e, 0xd2, 0x26, + 0x37, 0x94, 0xcd, 0xaa, 0x51, 0xcf, 0x3b, 0x1c, 0x47, 0xd6, 0x13, 0xec, 0x21, 0xb5, 0x05, 0x0b, + 0xd2, 0xc0, 0x0a, 0xd9, 0x4f, 0x89, 0xc0, 0x1f, 0xc6, 0xa6, 0x5c, 0xd2, 0x9f, 0x27, 0x44, 0xcc, + 0x44, 0x01, 0xb1, 0xfb, 0x26, 0x76, 0x90, 0xcf, 0xf1, 0x19, 0x46, 0x54, 0x7b, 0x20, 0x88, 0x16, + 0x63, 0xfb, 0x7e, 0x64, 0x3e, 0x48, 0xad, 0xea, 0x63, 0x50, 0x13, 0x4f, 0x07, 0x33, 0x4e, 0xf1, + 0x69, 0xc8, 0x91, 0x36, 0x2d, 0x5a, 0x96, 0x10, 0xed, 0xa5, 0x06, 0xfd, 0xcf, 0x12, 0xcc, 0x77, + 0x3d, 0x1e, 0x18, 0x51, 0xf7, 0x65, 0xcf, 0x6c, 0x58, 0x0c, 0x3c, 0x1e, 0x24, 0x29, 0x9e, 0x8a, + 0x80, 0xa9, 0xc5, 0x65, 0xe3, 0xab, 0x3b, 0xad, 0x97, 0xd7, 0xcd, 0x89, 0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 0xd9, 0x7d, 0x0b, 0xfb, 0xed, 0xe4, 0x83, 0xe7, 0x52, 0x7c, 0xf2, + 0x08, 0xcc, 0xd3, 0x29, 0xf1, 0x25, 0xf3, 0xe9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x99, + 0x1d, 0x54, 0x0e, 0x0d, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1247,6 +1256,16 @@ func (m *ProviderDistributionPeriod) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if m.DistributionPeriodBurn { + i-- + if m.DistributionPeriodBurn { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } if m.DistributionPeriodMod != 0 { i = encodeVarintParams(dAtA, i, uint64(m.DistributionPeriodMod)) i-- @@ -1600,6 +1619,9 @@ func (m *ProviderDistributionPeriod) Size() (n int) { if m.DistributionPeriodMod != 0 { n += 1 + sovParams(uint64(m.DistributionPeriodMod)) } + if m.DistributionPeriodBurn { + n += 2 + } return n } @@ -3005,6 +3027,26 @@ func (m *ProviderDistributionPeriod) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DistributionPeriodBurn", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DistributionPeriodBurn = bool(v != 0) default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:])