Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: multisig + distribution fix #2474

Merged
merged 4 commits into from
May 8, 2023
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
7 changes: 3 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"
ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/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 @@ -304,10 +305,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 @@ -284,6 +284,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
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/cosmos/cosmos-sdk v0.45.15-ics
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/ibc-go/v4 v4.2.0
github.com/cosmos/interchain-security v1.1.1
github.com/cosmos/interchain-security v1.1.0
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/golangci/golangci-lint v1.50.1
Expand Down Expand Up @@ -60,7 +60,6 @@ require (
github.com/armon/go-metrics v0.4.1 // indirect
github.com/ashanbrown/forbidigo v1.3.0 // 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 @@ -128,7 +127,6 @@ require (
github.com/go-toolsmith/typep v1.0.2 // indirect
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gobwas/ws v1.1.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/gateway v1.1.0 // indirect
Expand Down Expand Up @@ -215,7 +213,6 @@ require (
github.com/nishanths/exhaustive v0.8.3 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/opencontainers/runc v1.1.3 // indirect
Expand Down Expand Up @@ -263,6 +260,7 @@ require (
github.com/tdakkota/asciicheck v0.1.1 // 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-20210704033933-f49887972144 // indirect
Expand All @@ -282,7 +280,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.23.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
Expand Down Expand Up @@ -321,6 +318,9 @@ replace (
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.15-ics
github.com/cosmos/ibc-go/v4 => github.com/cosmos/ibc-go/v4 v4.2.0

// replace ICS with multisig and distribution fix
github.com/cosmos/interchain-security => github.com/cosmos/interchain-security v1.1.0-multiden

// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
Expand Down
Loading