Skip to content

Commit

Permalink
chore: bump consensus to v0.15.1 and sdk to v0.15.0 (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
ejfitzgerald authored Feb 17, 2021
1 parent dac9b72 commit 6220799
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand Down
8 changes: 4 additions & 4 deletions ci.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:buster
FROM golang:1.14-buster

WORKDIR /workspace/mcl
RUN apt-get update && \
Expand All @@ -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
4 changes: 0 additions & 4 deletions cli_test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cli_test/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
16 changes: 4 additions & 12 deletions lcd_test/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
}
Expand Down

0 comments on commit 6220799

Please sign in to comment.