-
Notifications
You must be signed in to change notification settings - Fork 352
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
feat(delayedack): paginate rollapp packets when deleting them #972
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4411241
Paginate rollapp packets when deleting them
zale144 12cc9c9
Refactor upgrade handlers, add upgrades and changelog entry
zale144 5a5b126
Upgrade version fix
zale144 d565784
PR fix
zale144 ee5bfce
Set hard limit on packets deleted per epoch, maintain batch size as a…
zale144 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 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 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 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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
package keepers | ||
|
||
import ( | ||
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" | ||
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" | ||
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" | ||
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" | ||
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" | ||
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" | ||
evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" | ||
feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" | ||
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" | ||
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" | ||
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" | ||
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" | ||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" | ||
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" | ||
packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v6/packetforward/keeper" | ||
ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" | ||
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" | ||
evmkeeper "github.com/evmos/ethermint/x/evm/keeper" | ||
feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" | ||
epochskeeper "github.com/osmosis-labs/osmosis/v15/x/epochs/keeper" | ||
gammkeeper "github.com/osmosis-labs/osmosis/v15/x/gamm/keeper" | ||
incentiveskeeper "github.com/osmosis-labs/osmosis/v15/x/incentives/keeper" | ||
lockupkeeper "github.com/osmosis-labs/osmosis/v15/x/lockup/keeper" | ||
poolmanagerkeeper "github.com/osmosis-labs/osmosis/v15/x/poolmanager/keeper" | ||
txfeeskeeper "github.com/osmosis-labs/osmosis/v15/x/txfees/keeper" | ||
|
||
delayedackkeeper "github.com/dymensionxyz/dymension/v3/x/delayedack/keeper" | ||
denommetadatamodulekeeper "github.com/dymensionxyz/dymension/v3/x/denommetadata/keeper" | ||
eibckeeper "github.com/dymensionxyz/dymension/v3/x/eibc/keeper" | ||
rollappmodulekeeper "github.com/dymensionxyz/dymension/v3/x/rollapp/keeper" | ||
sequencermodulekeeper "github.com/dymensionxyz/dymension/v3/x/sequencer/keeper" | ||
streamermodulekeeper "github.com/dymensionxyz/dymension/v3/x/streamer/keeper" | ||
) | ||
|
||
type AppKeepers struct { | ||
// keepers | ||
AccountKeeper authkeeper.AccountKeeper | ||
zale144 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
AuthzKeeper authzkeeper.Keeper | ||
BankKeeper bankkeeper.Keeper | ||
CapabilityKeeper *capabilitykeeper.Keeper | ||
StakingKeeper stakingkeeper.Keeper | ||
SlashingKeeper slashingkeeper.Keeper | ||
MintKeeper mintkeeper.Keeper | ||
DistrKeeper distrkeeper.Keeper | ||
GovKeeper govkeeper.Keeper | ||
CrisisKeeper crisiskeeper.Keeper | ||
UpgradeKeeper upgradekeeper.Keeper | ||
ParamsKeeper paramskeeper.Keeper | ||
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 | ||
PacketForwardMiddlewareKeeper *packetforwardkeeper.Keeper | ||
|
||
// Ethermint keepers | ||
EvmKeeper *evmkeeper.Keeper | ||
FeeMarketKeeper feemarketkeeper.Keeper | ||
|
||
// Osmosis keepers | ||
GAMMKeeper *gammkeeper.Keeper | ||
PoolManagerKeeper *poolmanagerkeeper.Keeper | ||
LockupKeeper *lockupkeeper.Keeper | ||
EpochsKeeper *epochskeeper.Keeper | ||
IncentivesKeeper *incentiveskeeper.Keeper | ||
TxFeesKeeper *txfeeskeeper.Keeper | ||
|
||
// make scoped keepers public for test purposes | ||
ScopedIBCKeeper capabilitykeeper.ScopedKeeper | ||
ScopedTransferKeeper capabilitykeeper.ScopedKeeper | ||
|
||
RollappKeeper rollappmodulekeeper.Keeper | ||
SequencerKeeper sequencermodulekeeper.Keeper | ||
StreamerKeeper streamermodulekeeper.Keeper | ||
EIBCKeeper eibckeeper.Keeper | ||
|
||
// this line is used by starport scaffolding # stargate/app/keeperDeclaration | ||
DelayedAckKeeper delayedackkeeper.Keeper | ||
DenomMetadataKeeper *denommetadatamodulekeeper.Keeper | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package upgrades | ||
|
||
import ( | ||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
abci "github.com/tendermint/tendermint/abci/types" | ||
|
||
"github.com/dymensionxyz/dymension/v3/app/keepers" | ||
) | ||
|
||
// BaseAppParamManager defines an interface that BaseApp is expected to fulfill | ||
// that allows upgrade handlers to modify BaseApp parameters. | ||
type BaseAppParamManager interface { | ||
GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams | ||
StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusParams) | ||
} | ||
|
||
// Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal | ||
// must have written, in order for the state migration to go smoothly. | ||
// An upgrade must implement this struct, and then set it in the app.go. | ||
// The app.go will then define the handler. | ||
Comment on lines
+20
to
+23
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. obviously it defines a struct, dont need to say that |
||
type Upgrade struct { | ||
// Upgrade version name, for the upgrade handler, e.g. `v4` | ||
UpgradeName string | ||
zale144 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// CreateUpgradeHandler defines the function that creates an upgrade handler | ||
CreateUpgradeHandler func(*module.Manager, module.Configurator, BaseAppParamManager, *keepers.AppKeepers) upgradetypes.UpgradeHandler | ||
zale144 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// Store upgrades, should be used for any new modules introduced, new modules deleted, or store names renamed. | ||
StoreUpgrades storetypes.StoreUpgrades | ||
} |
This file contains 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 |
---|---|---|
@@ -1,5 +1,20 @@ | ||
package v3 | ||
|
||
import ( | ||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
|
||
"github.com/dymensionxyz/dymension/v3/app/upgrades" | ||
eibctypes "github.com/dymensionxyz/dymension/v3/x/eibc/types" | ||
) | ||
|
||
const ( | ||
UpgradeName = "v3" | ||
) | ||
|
||
var Upgrade = upgrades.Upgrade{ | ||
UpgradeName: UpgradeName, | ||
CreateUpgradeHandler: CreateUpgradeHandler, | ||
StoreUpgrades: storetypes.StoreUpgrades{ | ||
Added: []string{eibctypes.ModuleName}, | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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 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
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.
this seperator is misplaced