-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There were some API-breaking changes in this update, and we needed a new patch to handle root store closing correctly. We are presumably calling Close on the root store more than once, so that newest patch should be removable with some care.
- Loading branch information
1 parent
83814dc
commit 40b18d3
Showing
8 changed files
with
64 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This file may contain any number of comments (lines containing a # symbol) | ||
# and must otherwise contain exactly ONE line with a cosmos-sdk commit to check out | ||
# when the user calls the scripts/sync_sdk.bash script. | ||
bf8c0da179c692935996695005160d8f2d701ab4 | ||
78b5cd4dbd08ae9adddf926dbdbf54129423445d |
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,7 @@ | ||
From 6c19c8bd34f5b742aa2207f2b4e52867ff745a4a Mon Sep 17 00:00:00 2001 | ||
From 7b41d5b9894c41f90be0709a774595fa7a77ebbc Mon Sep 17 00:00:00 2001 | ||
From: Mark Rushakoff <[email protected]> | ||
Date: Fri, 25 Oct 2024 15:35:39 -0400 | ||
Subject: [PATCH 1/4] chore: use replaces for cosmossdk.io/log/slog | ||
Subject: [PATCH 1/5] chore: use replaces for cosmossdk.io/log/slog | ||
|
||
We will have to try removing these in the future, but they shouldn't | ||
hurt for now. | ||
|
@@ -11,7 +11,7 @@ hurt for now. | |
2 files changed, 2 insertions(+) | ||
|
||
diff --git a/server/v2/go.mod b/server/v2/go.mod | ||
index 1e2e763424..ad92f6dd06 100644 | ||
index 94631d1bc3..ed2b129a6e 100644 | ||
--- a/server/v2/go.mod | ||
+++ b/server/v2/go.mod | ||
@@ -4,6 +4,7 @@ go 1.23 | ||
|
@@ -23,7 +23,7 @@ index 1e2e763424..ad92f6dd06 100644 | |
cosmossdk.io/server/v2/stf => ./stf | ||
cosmossdk.io/store/v2 => ../../store/v2 | ||
diff --git a/simapp/v2/go.mod b/simapp/v2/go.mod | ||
index 0e803ed0f8..49a516519b 100644 | ||
index 7c9beaf117..f3320f7dfe 100644 | ||
--- a/simapp/v2/go.mod | ||
+++ b/simapp/v2/go.mod | ||
@@ -250,6 +250,7 @@ require ( | ||
|
4 changes: 2 additions & 2 deletions
4
_cosmosvendor/patches/0002-fix-allow-customizing-query-and-tx-flags.patch
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,7 @@ | ||
From 5b87319ad4b16cedc122e4f84da7de903806f594 Mon Sep 17 00:00:00 2001 | ||
From f7ccdda96cbe6d7c6879c81b7319c0edee853ad9 Mon Sep 17 00:00:00 2001 | ||
From: Andrew Gouin <[email protected]> | ||
Date: Fri, 25 Oct 2024 16:25:31 -0600 | ||
Subject: [PATCH 2/4] fix: allow customizing query and tx flags | ||
Subject: [PATCH 2/5] fix: allow customizing query and tx flags | ||
|
||
--- | ||
client/flags/flags.go | 90 ++++++++++++++++++++++++++++++++++++++++--- | ||
|
4 changes: 2 additions & 2 deletions
4
_cosmosvendor/patches/0003-hack-to-fix-height-not-passing-through-sdk-client-co.patch
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,7 @@ | ||
From 377b560898e5c2a536187b20207dec08f7526187 Mon Sep 17 00:00:00 2001 | ||
From c838e8410df8e110491a3ae3dd9fd84f7094392b Mon Sep 17 00:00:00 2001 | ||
From: Andrew Gouin <[email protected]> | ||
Date: Sat, 26 Oct 2024 11:18:57 -0600 | ||
Subject: [PATCH 3/4] hack to fix height not passing through sdk client context | ||
Subject: [PATCH 3/5] hack to fix height not passing through sdk client context | ||
|
||
--- | ||
x/auth/types/account_retriever.go | 8 +++++++- | ||
|
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,7 @@ | ||
From 5524d63cfd1bb4e0aa2c48c75a6be9723fa31aa1 Mon Sep 17 00:00:00 2001 | ||
From 3628bbde49acdb13b28a7e7f60c0d485f77bf5be Mon Sep 17 00:00:00 2001 | ||
From: Mark Rushakoff <[email protected]> | ||
Date: Wed, 30 Oct 2024 11:24:17 -0400 | ||
Subject: [PATCH 4/4] hack: force respecting home flag | ||
Subject: [PATCH 4/5] hack: force respecting home flag | ||
|
||
For some unclear reason, the wiring with gcosmos is not allowing the | ||
flags to be respected in at least these three commands, and they try to | ||
|
@@ -20,7 +20,7 @@ index 10d9db0cdc..9e8b3a0672 100644 | |
@@ -24,6 +24,14 @@ func CollectGenTxsCmd(validator func([]transaction.Msg) error) *cobra.Command { | ||
RunE: func(cmd *cobra.Command, _ []string) error { | ||
config := client.GetConfigFromCmd(cmd) | ||
|
||
+ if config.RootDir == "" { | ||
+ var err error | ||
+ config.RootDir, err = cmd.Flags().GetString("home") | ||
|
@@ -31,15 +31,15 @@ index 10d9db0cdc..9e8b3a0672 100644 | |
+ | ||
clientCtx := client.GetClientContextFromCmd(cmd) | ||
cdc := clientCtx.Codec | ||
|
||
diff --git a/x/genutil/client/cli/genaccount.go b/x/genutil/client/cli/genaccount.go | ||
index 938e711b3a..300ba9e207 100644 | ||
--- a/x/genutil/client/cli/genaccount.go | ||
+++ b/x/genutil/client/cli/genaccount.go | ||
@@ -39,6 +39,14 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa | ||
clientCtx := client.GetClientContextFromCmd(cmd) | ||
config := client.GetConfigFromCmd(cmd) | ||
|
||
+ if config.RootDir == "" { | ||
+ var err error | ||
+ config.RootDir, err = cmd.Flags().GetString("home") | ||
|
@@ -71,6 +71,6 @@ index c56c772afc..8958c74d48 100644 | |
clientCtx, err := client.GetClientTxContext(cmd) | ||
if err != nil { | ||
return err | ||
-- | ||
-- | ||
2.47.0 | ||
|
34 changes: 34 additions & 0 deletions
34
_cosmosvendor/patches/0005-chore-make-root-store-Close-idempotent.patch
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,34 @@ | ||
From 2e9d9df5993e2f4b48815b9e5af67fb7964080b8 Mon Sep 17 00:00:00 2001 | ||
From: Mark Rushakoff <[email protected]> | ||
Date: Fri, 8 Nov 2024 11:29:19 -0500 | ||
Subject: [PATCH 5/5] chore: make root store Close idempotent | ||
|
||
We will see about removing this later, but currently is it necessary to | ||
get gcosmos to shut down properly. | ||
--- | ||
store/v2/root/store.go | 9 +++++++-- | ||
1 file changed, 7 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/store/v2/root/store.go b/store/v2/root/store.go | ||
index 59363e2fb3..bc7139a8d7 100644 | ||
--- a/store/v2/root/store.go | ||
+++ b/store/v2/root/store.go | ||
@@ -88,8 +88,13 @@ func New( | ||
// Close closes the store and resets all internal fields. Note, Close() is NOT | ||
// idempotent and should only be called once. | ||
func (s *Store) Close() (err error) { | ||
- err = errors.Join(err, s.stateStorage.Close()) | ||
- err = errors.Join(err, s.stateCommitment.Close()) | ||
+ if s.stateStorage != nil { | ||
+ err = errors.Join(err, s.stateStorage.Close()) | ||
+ } | ||
+ if s.stateCommitment != nil { | ||
+ err = errors.Join(err, s.stateCommitment.Close()) | ||
+ } | ||
+ | ||
err = errors.Join(err, s.dbCloser.Close()) | ||
|
||
s.stateStorage = nil | ||
-- | ||
2.47.0 | ||
|
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