-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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(runtime/v2): store loader on simappv2 #21704
Merged
Merged
Changes from 53 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
ebf5006
add state export
tac0turtle 268c034
minor
tac0turtle babf339
Merge branch 'main' into marko/state_export
tac0turtle 6780043
comment out export zero height
tac0turtle 61c0343
Merge branch 'main' into marko/state_export
randygrok b8ac0e5
add logic for export app state and bootstrap simapp tests
randygrok a1b0a5f
fix bug with export genesis nil pointer
randygrok 71d0027
some additions to continue the test
randygrok cadccd4
add context with value
randygrok 7bc73f0
remove commented code
randygrok 728313a
go mod tidy all
randygrok e97fda6
add version on export
randygrok 57c9751
include export validators
randygrok a32d778
add validators into status
randygrok 4bcf345
include new types mode
randygrok 7006da5
go mod tidy all
randygrok 91570fb
temp commit, include logic for zeroheight
randygrok de93866
remove zero height part
randygrok 9fc2546
add export
randygrok 7a1fa60
apply into simapp v2
randygrok 6b32d53
Merge remote-tracking branch 'origin/main' into randy/export-genesis
randygrok db542cf
remove option to export certain modules only
randygrok 70f1090
remove modules to export feature
randygrok ea0193d
remove modules to export feature part 2
randygrok c552beb
remove debug entry in manager
randygrok f67770e
delete commented code
randygrok 2948e09
rename RunWithCtx
randygrok a0ffd0a
race condition not fixed yet
randygrok 519d6b7
remove concurrent export
randygrok f199f06
include issue number
randygrok 11ec8d2
fix lint
randygrok a634633
fix lint, last
randygrok e0093cf
move ExportedApp to genutil
randygrok 5ab7c1a
Merge branch 'main' into randy/export-genesis
randygrok da07a4a
lint
randygrok 264434e
Merge branch 'randy/export-genesis' of github.com-randy:cosmos/cosmos…
randygrok aedc7b0
remove duplicated package on import
randygrok 8f97b21
lint
randygrok 9156b86
linter
randygrok 858af16
pass linter
randygrok a789413
remove unsafe message
randygrok dee4c3b
remove command
randygrok 5051c67
review changes
randygrok 73e839b
Revert "remove option to export certain modules only"
randygrok 98b4397
remove comment
randygrok 4324f42
Merge branch 'main' into randy/export-genesis
randygrok 3ea6367
bring back viper sets
randygrok 1874e0c
Merge branch 'randy/export-genesis' of github.com-randy:cosmos/cosmos…
randygrok 64eb9a4
temp commit with only store changes
randygrok 8035440
Merge remote-tracking branch 'origin/main' into feat/store-loader
randygrok 1aeda3a
add upgrade handler
randygrok 346e715
bring back version
randygrok 7586ee2
move UpgradeStoreLoader to runtime mod
randygrok 4ecf936
fix from review
randygrok c732286
Merge branch 'main' into feat/store-loader
randygrok b2082c8
add changelog
randygrok 8c23aa5
lint upgrades
randygrok 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
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ import ( | |
"github.com/spf13/viper" | ||
"github.com/stretchr/testify/require" | ||
|
||
app2 "cosmossdk.io/core/app" | ||
"cosmossdk.io/core/comet" | ||
context2 "cosmossdk.io/core/context" | ||
"cosmossdk.io/core/server" | ||
|
@@ -21,6 +22,7 @@ import ( | |
serverv2 "cosmossdk.io/server/v2" | ||
comettypes "cosmossdk.io/server/v2/cometbft/types" | ||
"cosmossdk.io/store/v2/db" | ||
authtypes "cosmossdk.io/x/auth/types" | ||
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. ? 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. probably from some of my tests, will remove |
||
banktypes "cosmossdk.io/x/bank/types" | ||
|
||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" | ||
|
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 |
---|---|---|
@@ -1,28 +1,6 @@ | ||
package types | ||
|
||
import ( | ||
corestore "cosmossdk.io/core/store" | ||
storetypes "cosmossdk.io/store/types" | ||
import "github.com/cosmos/cosmos-sdk/runtime" | ||
|
||
"github.com/cosmos/cosmos-sdk/baseapp" | ||
) | ||
|
||
// UpgradeStoreLoader is used to prepare baseapp with a fixed StoreLoader | ||
// pattern. This is useful for custom upgrade loading logic. | ||
func UpgradeStoreLoader(upgradeHeight int64, storeUpgrades *corestore.StoreUpgrades) baseapp.StoreLoader { | ||
return func(ms storetypes.CommitMultiStore) error { | ||
if upgradeHeight == ms.LastCommitID().Version+1 { | ||
// Check if the current commit version and upgrade height matches | ||
if len(storeUpgrades.Deleted) > 0 || len(storeUpgrades.Added) > 0 { | ||
stup := &storetypes.StoreUpgrades{ | ||
Added: storeUpgrades.Added, | ||
Deleted: storeUpgrades.Deleted, | ||
} | ||
return ms.LoadLatestVersionAndUpgrade(stup) | ||
} | ||
} | ||
|
||
// Otherwise load default store loader | ||
return baseapp.DefaultStoreLoader(ms) | ||
} | ||
} | ||
// UpgradeStoreLoader moved to runtime package, keeping this for backwards compatibility | ||
var UpgradeStoreLoader = runtime.UpgradeStoreLoader |
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.
?