Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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