Skip to content

Commit

Permalink
fix!: revert to ICS v1.1.0-multiden (#2559)
Browse files Browse the repository at this point in the history
* use ICS v1.1.0-multiden

* multisig + distribution fix
  • Loading branch information
mpoke authored May 31, 2023
1 parent 9637d1b commit 82b71bb
Show file tree
Hide file tree
Showing 6 changed files with 2,211 additions and 20 deletions.
7 changes: 3 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
ibctesting "github.com/cosmos/interchain-security/legacy_ibc_testing/testing"
providertypes "github.com/cosmos/interchain-security/x/ccv/provider/types"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
Expand Down Expand Up @@ -269,10 +270,8 @@ func (app *GaiaApp) BlockedModuleAccountAddrs(modAccAddrs map[string]bool) map[s
// remove module accounts that are ALLOWED to received funds
delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String())

// Remove the fee-pool from the group of blocked recipient addresses in bank
// this is required for the provider chain to be able to receive tokens from
// the consumer chain
delete(modAccAddrs, authtypes.NewModuleAddress(authtypes.FeeCollectorName).String())
// Remove the ConsumerRewardsPool from the group of blocked recipient addresses in bank
delete(modAccAddrs, authtypes.NewModuleAddress(providertypes.ConsumerRewardsPool).String())

return modAccAddrs
}
Expand Down
4 changes: 4 additions & 0 deletions app/app_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ func (app *GaiaApp) GetE2eSlashingKeeper() e2e.E2eSlashingKeeper { //nolint:noli
func (app *GaiaApp) GetE2eDistributionKeeper() e2e.E2eDistributionKeeper { //nolint:nolintlint
return app.DistrKeeper
}

func (app *GaiaApp) GetE2eAccountKeeper() e2e.E2eAccountKeeper { //nolint:nolintlint
return app.AccountKeeper
}
2 changes: 2 additions & 0 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ func NewAppKeeper(
appKeepers.SlashingKeeper,
appKeepers.AccountKeeper,
appKeepers.EvidenceKeeper,
appKeepers.DistrKeeper,
appKeepers.BankKeeper,
authtypes.FeeCollectorName,
)

Expand Down
19 changes: 10 additions & 9 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ import (
)

var maccPerms = map[string][]string{
authtypes.FeeCollectorName: nil,
distrtypes.ModuleName: nil,
icatypes.ModuleName: nil,
minttypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
liquiditytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
authtypes.FeeCollectorName: nil,
distrtypes.ModuleName: nil,
icatypes.ModuleName: nil,
minttypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
liquiditytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
providertypes.ConsumerRewardsPool: nil,
}

// ModuleBasics defines the module BasicManager is in charge of setting up basic,
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/cosmos/cosmos-sdk v0.45.16-ics
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/ibc-go/v4 v4.4.2
github.com/cosmos/interchain-security v1.1.1
github.com/cosmos/interchain-security v1.1.0-multiden
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.3
github.com/golangci/golangci-lint v1.52.2
Expand Down Expand Up @@ -56,7 +56,6 @@ require (
github.com/armon/go-metrics v0.4.1 // indirect
github.com/ashanbrown/forbidigo v1.5.1 // indirect
github.com/ashanbrown/makezero v1.1.1 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bkielbasa/cyclop v1.2.0 // indirect
Expand Down Expand Up @@ -213,7 +212,6 @@ require (
github.com/nishanths/exhaustive v0.9.5 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.9.0 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
Expand Down Expand Up @@ -263,6 +261,7 @@ require (
github.com/tdakkota/asciicheck v0.2.0 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tendermint/spm v0.1.9 // indirect
github.com/tetafro/godot v1.4.11 // indirect
github.com/tidwall/btree v1.5.0 // indirect
github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e // indirect
Expand All @@ -282,7 +281,6 @@ require (
gitlab.com/bosi/decorder v0.2.3 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
Expand Down
Loading

0 comments on commit 82b71bb

Please sign in to comment.