forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(runtime,runtime/v2): skip store for specified modules (cosmos#20409
- Loading branch information
1 parent
fe6361b
commit 190b20c
Showing
13 changed files
with
537 additions
and
102 deletions.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
go 1.22.2 | ||
|
||
toolchain go1.22.2 | ||
|
||
use ( | ||
. | ||
./api | ||
|
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 |
---|---|---|
|
@@ -38,6 +38,11 @@ message Module { | |
// to be used in keeper construction. | ||
repeated StoreKeyConfig override_store_keys = 6; | ||
|
||
// skip_store_keys is an optional list of store keys to skip when constructing the | ||
// module's keeper. This is useful when a module does not have a store key. | ||
// NOTE: the provided environment variable will have a fake store service. | ||
repeated string skip_store_keys = 11; | ||
|
||
// order_migrations defines the order in which module migrations are performed. | ||
// If this is left empty, it uses the default migration order. | ||
// https://pkg.go.dev/github.com/cosmos/[email protected]/types/module#DefaultMigrationsOrder | ||
|
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package runtime | ||
|
||
import ( | ||
"context" | ||
|
||
"cosmossdk.io/core/store" | ||
) | ||
|
||
type failingStoreService struct{} | ||
|
||
func (failingStoreService) OpenKVStore(ctx context.Context) store.KVStore { | ||
panic("kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") | ||
} | ||
|
||
func (failingStoreService) OpenMemoryStore(ctx context.Context) store.KVStore { | ||
panic("memory kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") | ||
} | ||
|
||
func (failingStoreService) OpenTransientStore(ctx context.Context) store.KVStore { | ||
panic("transient kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") | ||
} |
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,50 @@ | ||
<!-- | ||
Guiding Principles: | ||
Changelogs are for humans, not machines. | ||
There should be an entry for every single version. | ||
The same types of changes should be grouped. | ||
Versions and sections should be linkable. | ||
The latest version comes first. | ||
The release date of each version is displayed. | ||
Mention whether you follow Semantic Versioning. | ||
Usage: | ||
Change log entries are to be added to the Unreleased section under the | ||
appropriate stanza (see below). Each entry should ideally include a tag and | ||
the Github issue reference in the following format: | ||
* (<tag>) [#<issue-number>] Changelog message. | ||
Types of changes (Stanzas): | ||
"Features" for new features. | ||
"Improvements" for changes in existing functionality. | ||
"Deprecated" for soon-to-be removed features. | ||
"Bug Fixes" for any bug fixes. | ||
"API Breaking" for breaking exported APIs used by developers building on SDK. | ||
Ref: https://keepachangelog.com/en/1.0.0/ | ||
--> | ||
|
||
# Changelog | ||
|
||
`SimApp` is an application built using the Cosmos SDK for testing and educational purposes. | ||
It won't be tagged or intented to be imported in an application. | ||
This changelog is aimed to help developers understand the wiring changes between SDK versions. | ||
It is an exautive list of changes that completes the SimApp section in the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#simapp) | ||
|
||
## v0.50 to v0.51 | ||
|
||
Always refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md) to understand the changes. | ||
|
||
* [#20409](https://github.com/cosmos/cosmos-sdk/pull/20409) Add `tx` as `SkipStoreKeys` in `app_config.go`. | ||
|
||
<!-- TODO: move changelog.md elements to here --> | ||
|
||
## v0.47 to v0.50 | ||
|
||
No changelog is provided for this migration. Please refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#v050x) | ||
|
||
## v0.46 to v0.47 | ||
|
||
No changelog is provided for this migration. Please refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#v047x) | ||
|
||
## v0.45 to v0.46 | ||
|
||
No changelog is provided for this migration. Please refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#v046x) | ||
|
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