-
Notifications
You must be signed in to change notification settings - Fork 887
Remove feegrant module #3958
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
Open
masih
wants to merge
3
commits into
main
Choose a base branch
from
masih/feegrant-be-gone
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Remove feegrant module #3958
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,9 +73,6 @@ import ( | |
| "github.com/sei-protocol/sei-chain/sei-cosmos/x/evidence" | ||
| evidencekeeper "github.com/sei-protocol/sei-chain/sei-cosmos/x/evidence/keeper" | ||
| evidencetypes "github.com/sei-protocol/sei-chain/sei-cosmos/x/evidence/types" | ||
| "github.com/sei-protocol/sei-chain/sei-cosmos/x/feegrant" | ||
| feegrantkeeper "github.com/sei-protocol/sei-chain/sei-cosmos/x/feegrant/keeper" | ||
| feegrantmodule "github.com/sei-protocol/sei-chain/sei-cosmos/x/feegrant/module" | ||
| "github.com/sei-protocol/sei-chain/sei-cosmos/x/genutil" | ||
| genutiltypes "github.com/sei-protocol/sei-chain/sei-cosmos/x/genutil/types" | ||
| "github.com/sei-protocol/sei-chain/sei-cosmos/x/gov" | ||
|
|
@@ -225,7 +222,6 @@ var ( | |
| gov.NewAppModuleBasic(getGovProposalHandlers()...), | ||
| params.AppModuleBasic{}, | ||
| slashing.AppModuleBasic{}, | ||
| feegrantmodule.AppModuleBasic{}, | ||
| ibc.AppModuleBasic{}, | ||
| upgrade.AppModuleBasic{}, | ||
| evidence.AppModuleBasic{}, | ||
|
|
@@ -268,7 +264,7 @@ var ( | |
| kvStoreKeyNames = []string{ | ||
| authtypes.StoreKey, authzkeeper.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, | ||
| minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, | ||
| govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, | ||
| govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, | ||
| evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, oracletypes.StoreKey, | ||
| evmtypes.StoreKey, wasm.StoreKey, | ||
| epochmoduletypes.StoreKey, | ||
|
|
@@ -304,7 +300,8 @@ var ( | |
| ) | ||
|
|
||
| const ( | ||
| MinGasEVMTx = 21000 | ||
| MinGasEVMTx = 21000 | ||
| feegrantModuleName = "feegrant" | ||
|
|
||
| // NewHeadsNotifierCapacity bounds the in-process eth_newHeads | ||
| // notifier buffer. Capacity 1 pairs with the notifier's | ||
|
|
@@ -404,7 +401,6 @@ type App struct { | |
| IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly | ||
| EvidenceKeeper evidencekeeper.Keeper | ||
| TransferKeeper ibctransferkeeper.Keeper | ||
| FeeGrantKeeper feegrantkeeper.Keeper | ||
| WasmKeeper wasm.Keeper | ||
| OracleKeeper oraclekeeper.Keeper | ||
| EvmKeeper evmkeeper.Keeper | ||
|
|
@@ -599,7 +595,6 @@ func New( | |
| appCodec, keys[slashingtypes.StoreKey], &stakingKeeper, app.GetSubspace(slashingtypes.ModuleName), | ||
| ) | ||
|
|
||
| app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) | ||
| app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp) | ||
|
|
||
| // register the staking hooks | ||
|
|
@@ -880,7 +875,6 @@ func New( | |
| vesting.NewAppModule(app.AccountKeeper, app.BankKeeper, app.UpgradeKeeper), | ||
| bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), | ||
| capability.NewAppModule(appCodec, *app.CapabilityKeeper), | ||
| feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), | ||
| gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), | ||
| mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), | ||
| slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), | ||
|
|
@@ -918,23 +912,21 @@ func New( | |
| EvmKeeper: &app.EvmKeeper, | ||
| } | ||
| app.CheckTxKeepers = legacyabci.CheckTxKeepers{ | ||
| AccountKeeper: app.AccountKeeper, | ||
| BankKeeper: app.BankKeeper, | ||
| FeeGrantKeeper: &app.FeeGrantKeeper, | ||
| IBCKeeper: app.IBCKeeper, | ||
| OracleKeeper: app.OracleKeeper, | ||
| EvmKeeper: &app.EvmKeeper, | ||
| ParamsKeeper: app.ParamsKeeper, | ||
| UpgradeKeeper: &app.UpgradeKeeper, | ||
| AccountKeeper: app.AccountKeeper, | ||
| BankKeeper: app.BankKeeper, | ||
| IBCKeeper: app.IBCKeeper, | ||
| OracleKeeper: app.OracleKeeper, | ||
| EvmKeeper: &app.EvmKeeper, | ||
| ParamsKeeper: app.ParamsKeeper, | ||
| UpgradeKeeper: &app.UpgradeKeeper, | ||
| } | ||
| app.DeliverTxKeepers = legacyabci.DeliverTxKeepers{ | ||
| AccountKeeper: app.AccountKeeper, | ||
| BankKeeper: app.BankKeeper, | ||
| FeeGrantKeeper: &app.FeeGrantKeeper, | ||
| OracleKeeper: app.OracleKeeper, | ||
| EvmKeeper: &app.EvmKeeper, | ||
| ParamsKeeper: app.ParamsKeeper, | ||
| UpgradeKeeper: &app.UpgradeKeeper, | ||
| AccountKeeper: app.AccountKeeper, | ||
| BankKeeper: app.BankKeeper, | ||
| OracleKeeper: app.OracleKeeper, | ||
| EvmKeeper: &app.EvmKeeper, | ||
| ParamsKeeper: app.ParamsKeeper, | ||
| UpgradeKeeper: &app.UpgradeKeeper, | ||
| } | ||
|
|
||
| app.mm.SetOrderMidBlockers( | ||
|
|
@@ -963,7 +955,6 @@ func New( | |
| evidencetypes.ModuleName, | ||
| ibctransfertypes.ModuleName, | ||
| authz.ModuleName, | ||
| feegrant.ModuleName, | ||
| oracletypes.ModuleName, | ||
| tokenfactorytypes.ModuleName, | ||
| epochmoduletypes.ModuleName, | ||
|
|
@@ -981,7 +972,6 @@ func New( | |
| auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), | ||
| bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), | ||
| capability.NewAppModule(appCodec, *app.CapabilityKeeper), | ||
| feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), | ||
| gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), | ||
| mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), | ||
| staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), | ||
|
|
@@ -1020,7 +1010,6 @@ func New( | |
| HandlerOptions: ante.HandlerOptions{ | ||
| AccountKeeper: app.AccountKeeper, | ||
| BankKeeper: app.BankKeeper, | ||
| FeegrantKeeper: app.FeeGrantKeeper, | ||
| ParamsKeeper: app.ParamsKeeper, | ||
| SignModeHandler: signModeHandler, | ||
| SigGasConsumer: ante.DefaultSigVerificationGasConsumer, | ||
|
|
@@ -1224,6 +1213,15 @@ func (app *App) SetStoreUpgradeHandlers() { | |
| // configure store loader that checks if version == upgradeHeight and applies store upgrades | ||
| app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) | ||
| } | ||
|
|
||
| if upgradeInfo.Name == "v6.7" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { | ||
| storeUpgrades := storetypes.StoreUpgrades{ | ||
| Deleted: []string{feegrantModuleName}, | ||
|
Comment on lines
+1217
to
+1219
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| // configure store loader that checks if version == upgradeHeight and applies store upgrades | ||
| app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) | ||
| } | ||
| } | ||
|
|
||
| // AppName returns the name of the App | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[suggestion]
CompositeCommitStore.ApplyUpgrades(sei-db/state_db/sc/composite/store.go:751) forwards only to memIAVL — its doc comment states "Data in flatKV is not affected by this method" — and returns early whencs.memIAVL == nil. Under the memIAVL-backed modes this deletion works as intended, but for write modes where non-EVM stores have moved to flatkv (MigrateAllButBank,AllMigratedButBank,FlatKVOnly), the feegrant keys survive the upgrade and keep contributing to the flatkv lattice hash.This is the first store deletion since flatkv landed (the
dex/accesscontrolprecedents predate it), so it's worth confirming which write modes will be live at the v6.7 height, and whether orphaned feegrant data in flatkv is acceptable or needs an explicit cleanup.