Skip to content

Commit

Permalink
refactor: update comments on globalfee, genutil module init order (#2494
Browse files Browse the repository at this point in the history
)

* docs: update comments on globalfee, genutil module init order

* rename GlobalMinFee GlobalMinFeeParamSource in FeeDecorator

* fix: deadlink
  • Loading branch information
yaruwangway authored and sainoe committed Jun 23, 2023
1 parent dde523b commit 4e35a08
Show file tree
Hide file tree
Showing 3 changed files with 250 additions and 270 deletions.
21 changes: 9 additions & 12 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,16 @@ import (
)

var maccPerms = map[string][]string{
<<<<<<< HEAD
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},
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},
// liquiditytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
providertypes.ConsumerRewardsPool: nil,
>>>>>>> 82b71bb65 (fix!: revert to ICS v1.1.0-multiden (#2559))
}

// ModuleBasics defines the module BasicManager is in charge of setting up basic,
Expand Down Expand Up @@ -299,6 +288,14 @@ func orderInitBlockers() []string {
paramstypes.ModuleName,
upgradetypes.ModuleName,
vestingtypes.ModuleName,
// The globalfee module should ideally be initialized before the genutil module in theory:
// The globalfee antehandler performs checks in DeliverTx, which is called by gentx.
// When the global fee > 0, gentx needs to pay the fee. However, this is not expected,
// (in our case, the global fee is initialized with an empty value, which might not be a problem
// if the globalfee in genesis is not changed.)
// To resolve this issue, we should initialize the globalfee module after genutil, ensuring that the global
// min fee is empty when gentx is called.
// For more details, please refer to the following link: https://github.com/cosmos/gaia/issues/2489
// globalfee.ModuleName,
providertypes.ModuleName,
consensusparamtypes.ModuleName,
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/cosmos/interchain-security v1.0.1-0.20230522154154-1bb8d39e691a
cosmossdk.io/math v1.0.1
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/interchain-security v1.1.1
github.com/cosmos/interchain-security v1.1.1-multiden
github.com/golang/protobuf v1.5.3
github.com/golangci/golangci-lint v1.52.2
github.com/gorilla/mux v1.8.0
Expand Down Expand Up @@ -259,6 +259,7 @@ require (
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
github.com/tdakkota/asciicheck v0.2.0 // 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.6.0 // indirect
github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e // indirect
Expand All @@ -277,7 +278,6 @@ require (
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // 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 4e35a08

Please sign in to comment.