Merge PR #190: Bump SDK version to latest master

This commit is contained in:
Alexander Bezobchuk
2019-11-09 19:27:34 -05:00
committed by GitHub
parent c48202e1aa
commit a88a62bde2
4 changed files with 28 additions and 12 deletions

View File

@@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
flag and configuration.
* (gaiacli) [\#132](https://github.com/cosmos/gaia/pull/132) Add `tx decode` command to decode
Base64 encoded transactions.
* (modules) [\#190](https://github.com/cosmos/gaia/pull/190) Introduce use of the `x/evidence` module.
## [v2.0.3] - 2019-11-04

View File

@@ -20,6 +20,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/bank"
"github.com/cosmos/cosmos-sdk/x/crisis"
distr "github.com/cosmos/cosmos-sdk/x/distribution"
"github.com/cosmos/cosmos-sdk/x/evidence"
"github.com/cosmos/cosmos-sdk/x/genutil"
"github.com/cosmos/cosmos-sdk/x/gov"
"github.com/cosmos/cosmos-sdk/x/mint"
@@ -54,6 +55,7 @@ var (
crisis.AppModuleBasic{},
slashing.AppModuleBasic{},
supply.AppModuleBasic{},
evidence.AppModuleBasic{},
)
// module account permissions
@@ -90,7 +92,7 @@ type GaiaApp struct {
// keys to access the substores
keys map[string]*sdk.KVStoreKey
tkeys map[string]*sdk.TransientStoreKey
tKeys map[string]*sdk.TransientStoreKey
// keepers
accountKeeper auth.AccountKeeper
@@ -103,6 +105,7 @@ type GaiaApp struct {
govKeeper gov.Keeper
crisisKeeper crisis.Keeper
paramsKeeper params.Keeper
evidenceKeeper *evidence.Keeper
// the module manager
mm *module.Manager
@@ -124,22 +127,22 @@ func NewGaiaApp(
bApp.SetAppVersion(version.Version)
keys := sdk.NewKVStoreKeys(
bam.MainStoreKey, auth.StoreKey, staking.StoreKey,
supply.StoreKey, mint.StoreKey, distr.StoreKey, slashing.StoreKey,
gov.StoreKey, params.StoreKey,
bam.MainStoreKey, auth.StoreKey, staking.StoreKey, supply.StoreKey,
mint.StoreKey, distr.StoreKey, slashing.StoreKey, gov.StoreKey,
params.StoreKey, evidence.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(staking.TStoreKey, params.TStoreKey)
tKeys := sdk.NewTransientStoreKeys(staking.TStoreKey, params.TStoreKey)
app := &GaiaApp{
BaseApp: bApp,
cdc: cdc,
invCheckPeriod: invCheckPeriod,
keys: keys,
tkeys: tkeys,
tKeys: tKeys,
}
// init params keeper and subspaces
app.paramsKeeper = params.NewKeeper(app.cdc, keys[params.StoreKey], tkeys[params.TStoreKey], params.DefaultCodespace)
app.paramsKeeper = params.NewKeeper(app.cdc, keys[params.StoreKey], tKeys[params.TStoreKey], params.DefaultCodespace)
authSubspace := app.paramsKeeper.Subspace(auth.DefaultParamspace)
bankSubspace := app.paramsKeeper.Subspace(bank.DefaultParamspace)
stakingSubspace := app.paramsKeeper.Subspace(staking.DefaultParamspace)
@@ -148,6 +151,7 @@ func NewGaiaApp(
slashingSubspace := app.paramsKeeper.Subspace(slashing.DefaultParamspace)
govSubspace := app.paramsKeeper.Subspace(gov.DefaultParamspace).WithKeyTable(gov.ParamKeyTable())
crisisSubspace := app.paramsKeeper.Subspace(crisis.DefaultParamspace)
evidenceSubspace := app.paramsKeeper.Subspace(evidence.DefaultParamspace)
// add keepers
app.accountKeeper = auth.NewAccountKeeper(app.cdc, keys[auth.StoreKey], authSubspace, auth.ProtoBaseAccount)
@@ -164,6 +168,14 @@ func NewGaiaApp(
)
app.crisisKeeper = crisis.NewKeeper(crisisSubspace, invCheckPeriod, app.supplyKeeper, auth.FeeCollectorName)
// create evidence keeper with evidence router
app.evidenceKeeper = evidence.NewKeeper(
app.cdc, keys[evidence.StoreKey], evidenceSubspace, evidence.DefaultCodespace,
)
evidenceRouter := evidence.NewRouter()
// TODO: Register evidence routes.
app.evidenceKeeper.SetRouter(evidenceRouter)
// register the proposal types
govRouter := gov.NewRouter()
govRouter.AddRoute(gov.RouterKey, gov.ProposalHandler).
@@ -193,6 +205,7 @@ func NewGaiaApp(
mint.NewAppModule(app.mintKeeper),
slashing.NewAppModule(app.slashingKeeper, app.stakingKeeper),
staking.NewAppModule(app.stakingKeeper, app.accountKeeper, app.supplyKeeper),
evidence.NewAppModule(*app.evidenceKeeper),
)
// During begin block slashing happens after distr.BeginBlocker so that
@@ -207,7 +220,7 @@ func NewGaiaApp(
app.mm.SetOrderInitGenesis(
distr.ModuleName, staking.ModuleName, auth.ModuleName, bank.ModuleName,
slashing.ModuleName, gov.ModuleName, mint.ModuleName, supply.ModuleName,
crisis.ModuleName, genutil.ModuleName,
crisis.ModuleName, genutil.ModuleName, evidence.ModuleName,
)
app.mm.RegisterInvariants(&app.crisisKeeper)
@@ -232,7 +245,7 @@ func NewGaiaApp(
// initialize stores
app.MountKVStores(keys)
app.MountTransientStores(tkeys)
app.MountTransientStores(tKeys)
// initialize BaseApp
app.SetInitChainer(app.InitChainer)

2
go.mod
View File

@@ -4,7 +4,7 @@ go 1.13
require (
github.com/btcsuite/btcd v0.0.0-20190807005414-4063feeff79a // indirect
github.com/cosmos/cosmos-sdk v0.34.4-0.20191031200835-02c6c9fafd58
github.com/cosmos/cosmos-sdk v0.34.4-0.20191108144056-d81d46192a0c
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect
github.com/golang/mock v1.3.1 // indirect
github.com/onsi/ginkgo v1.8.0 // indirect

6
go.sum
View File

@@ -40,8 +40,8 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cosmos/cosmos-sdk v0.34.4-0.20191031200835-02c6c9fafd58 h1:B3fXc6Y9ztj9glE2ANU0+NQJ0M1BXaG5LpnyKFwHW4M=
github.com/cosmos/cosmos-sdk v0.34.4-0.20191031200835-02c6c9fafd58/go.mod h1:PuN72vbZxlorpnHmoIl6RjzVMXEOMejmwORJlZ74K7Q=
github.com/cosmos/cosmos-sdk v0.34.4-0.20191108144056-d81d46192a0c h1:XYIUjgiFabdbRTvhqeY9Dc7k95bvFbgC47mv/Dk13S8=
github.com/cosmos/cosmos-sdk v0.34.4-0.20191108144056-d81d46192a0c/go.mod h1:0sLtjU+qex1OfpGQHjWhJByx74IoH78R742PEAdoQJk=
github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
@@ -375,5 +375,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=