From 6220799bfb473cf28235801291aa54c3d7ecb21a Mon Sep 17 00:00:00 2001 From: Ed FitzGerald Date: Wed, 17 Feb 2021 21:48:55 +0000 Subject: [PATCH] chore: bump consensus to v0.15.1 and sdk to v0.15.0 (#68) --- Dockerfile | 2 +- ci.Dockerfile | 8 ++++---- cli_test/cli_test.go | 4 ---- cli_test/test_helpers.go | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- lcd_test/helpers.go | 16 ++++------------ 7 files changed, 16 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8dd620d6..bc76453e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM golang:1.14-buster as builder # Set up dependencies -ENV PACKAGES curl wget jq file make git libgmp-dev gcc g++ swig libboost-serialization1.67-dev +ENV PACKAGES curl wget jq file make git libgmp-dev gcc g++ swig RUN apt-get update && \ apt-get install -y $PACKAGES && \ diff --git a/ci.Dockerfile b/ci.Dockerfile index 53caff22..775a062b 100644 --- a/ci.Dockerfile +++ b/ci.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:buster +FROM golang:1.14-buster WORKDIR /workspace/mcl RUN apt-get update && \ @@ -12,12 +12,12 @@ RUN apt-get update && \ libgmp-dev \ gcc \ g++ \ - swig \ - libboost-serialization-dev && \ + swig && \ wget https://github.com/herumi/mcl/archive/v1.05.tar.gz && \ tar xvf v1.05.tar.gz && cd mcl-1.05 && \ make install && ldconfig -WORKDIR /workspace/cosmos-sdk +WORKDIR /workspace/fetchd COPY . . + RUN make go-mod-cache && make build diff --git a/cli_test/cli_test.go b/cli_test/cli_test.go index a52fc8f1..09d3a816 100644 --- a/cli_test/cli_test.go +++ b/cli_test/cli_test.go @@ -422,8 +422,6 @@ func TestGaiaCLIQueryRewards(t *testing.T) { var mintData mint.GenesisState cdc.UnmarshalJSON(genesisState[mint.ModuleName], &mintData) mintData.Minter.Inflation = inflationMin - mintData.Params.InflationMin = inflationMin - mintData.Params.InflationMax = sdk.MustNewDecFromStr("1.0") mintDataBz, err := cdc.MarshalJSON(mintData) require.NoError(t, err) genesisState[mint.ModuleName] = mintDataBz @@ -682,8 +680,6 @@ func TestGaiaCLISubmitCommunityPoolSpendProposal(t *testing.T) { var mintData mint.GenesisState cdc.UnmarshalJSON(genesisState[mint.ModuleName], &mintData) mintData.Minter.Inflation = inflationMin - mintData.Params.InflationMin = inflationMin - mintData.Params.InflationMax = sdk.MustNewDecFromStr("1.0") mintDataBz, err := cdc.MarshalJSON(mintData) require.NoError(t, err) genesisState[mint.ModuleName] = mintDataBz diff --git a/cli_test/test_helpers.go b/cli_test/test_helpers.go index 9ec861b2..a7a96523 100644 --- a/cli_test/test_helpers.go +++ b/cli_test/test_helpers.go @@ -48,7 +48,7 @@ var ( sdk.NewCoin(fee2Denom, sdk.TokensFromConsensusPower(2000000)), sdk.NewCoin(feeDenom, sdk.TokensFromConsensusPower(2000000)), sdk.NewCoin(fooDenom, sdk.TokensFromConsensusPower(2000)), - sdk.NewCoin(denom, sdk.TokensFromConsensusPower(300).Add(sdk.NewInt(12358355850598))), // add coins from inflation + sdk.NewCoin(denom, sdk.TokensFromConsensusPower(300).Add(sdk.NewInt(2851927910040))), // add coins from inflation ) startCoins = sdk.NewCoins( diff --git a/go.mod b/go.mod index c6c5a385..6c6943cd 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,6 @@ require ( replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // this include a few extra debug helpers on top of cosmos v0.38.3 but original also works fine -replace github.com/cosmos/cosmos-sdk => github.com/fetchai/cosmos-sdk v0.13.3 +replace github.com/cosmos/cosmos-sdk => github.com/fetchai/cosmos-sdk v0.15.0 -replace github.com/tendermint/tendermint => github.com/fetchai/cosmos-consensus v0.13.2 +replace github.com/tendermint/tendermint => github.com/fetchai/cosmos-consensus v0.15.1 diff --git a/go.sum b/go.sum index 2ee7647c..9ba8f375 100644 --- a/go.sum +++ b/go.sum @@ -118,10 +118,10 @@ github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqL github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fetchai/cosmos-consensus v0.13.2 h1:hZBp5+Wj6Az7CtoXz39X7B4MaKN4zq51Q5ck3++5moQ= -github.com/fetchai/cosmos-consensus v0.13.2/go.mod h1:3uBzeHvXTweU0DE0ja1RmM/rxcf+tTajjRCfcF+DG3A= -github.com/fetchai/cosmos-sdk v0.13.3 h1:YB4WqmjFEnt4kalgY3bbCNlJZiSJlD1I81i42K0Q7EU= -github.com/fetchai/cosmos-sdk v0.13.3/go.mod h1:0l1KozXgxvClGGUX2rAkxzf2vsM0IIkLvlQy4c8OowI= +github.com/fetchai/cosmos-consensus v0.15.1 h1:oR6yyQeULd531TOVRYq50t5MmJEfaf86jDlhL2kg2sk= +github.com/fetchai/cosmos-consensus v0.15.1/go.mod h1:3uBzeHvXTweU0DE0ja1RmM/rxcf+tTajjRCfcF+DG3A= +github.com/fetchai/cosmos-sdk v0.15.0 h1:91N0xmSGgrKgNKdMUsNX8b1uJSuEVIb7ejkQNoWjWM4= +github.com/fetchai/cosmos-sdk v0.15.0/go.mod h1:N1vdhTWYFv18ZIRpzDDrzwfHc5X9V0eQO6t1bLNTciA= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= diff --git a/lcd_test/helpers.go b/lcd_test/helpers.go index b9928daa..6a353fa6 100644 --- a/lcd_test/helpers.go +++ b/lcd_test/helpers.go @@ -255,15 +255,11 @@ func defaultGenesis(config *tmcfg.Config, nValidators int, initAddrs []sdk.AccAd // mint genesis (none set within genesisState) mintData := mint.DefaultGenesisState() - inflationMin := sdk.ZeroDec() if minting { - inflationMin = sdk.MustNewDecFromStr("0.9") - mintData.Params.InflationMax = sdk.MustNewDecFromStr("1.0") + mintData.Minter.Inflation = sdk.MustNewDecFromStr("0.9") } else { - mintData.Params.InflationMax = inflationMin + mintData.Minter.Inflation = sdk.ZeroDec() } - mintData.Minter.Inflation = inflationMin - mintData.Params.InflationMin = inflationMin mintDataBz := cdc.MustMarshalJSON(mintData) genesisState[mint.ModuleName] = mintDataBz @@ -277,16 +273,12 @@ func defaultGenesis(config *tmcfg.Config, nValidators int, initAddrs []sdk.AccAd //// double check inflation is set according to the minting boolean flag if minting { - if !(mintData.Params.InflationMax.Equal(sdk.MustNewDecFromStr("1.0")) && - mintData.Minter.Inflation.Equal(sdk.MustNewDecFromStr("0.9")) && - mintData.Params.InflationMin.Equal(sdk.MustNewDecFromStr("0.9"))) { + if !(mintData.Minter.Inflation.Equal(sdk.MustNewDecFromStr("0.9"))) { err = errors.New("mint parameters does not correspond to their defaults") return } } else { - if !(mintData.Params.InflationMax.Equal(sdk.ZeroDec()) && - mintData.Minter.Inflation.Equal(sdk.ZeroDec()) && - mintData.Params.InflationMin.Equal(sdk.ZeroDec())) { + if !(mintData.Minter.Inflation.Equal(sdk.ZeroDec())) { err = errors.New("mint parameters not equal to decimal 0") return }