-
Notifications
You must be signed in to change notification settings - Fork 56
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
v5 Upgrade #569
v5 Upgrade #569
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,11 +94,12 @@ import ( | |
icaexported "github.com/cosmos/ibc-go/v7/modules/core/exported" | ||
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" | ||
"github.com/gorilla/mux" | ||
gravityparams "github.com/peggyjv/gravity-bridge/module/v4/app/params" | ||
"github.com/peggyjv/gravity-bridge/module/v4/x/gravity" | ||
gravityclient "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/client" | ||
"github.com/peggyjv/gravity-bridge/module/v4/x/gravity/keeper" | ||
gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" | ||
gravityparams "github.com/peggyjv/gravity-bridge/module/v5/app/params" | ||
v5 "github.com/peggyjv/gravity-bridge/module/v5/app/upgrades/v5" | ||
"github.com/peggyjv/gravity-bridge/module/v5/x/gravity" | ||
gravityclient "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/client" | ||
"github.com/peggyjv/gravity-bridge/module/v5/x/gravity/keeper" | ||
gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" | ||
Comment on lines
+97
to
+102
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. 💡 Codebase verification Remaining v4 Import Paths Detected Multiple files still reference
🔗 Analysis chainEnsure all import paths are updated from v4 to v5 The import statements have been updated to point to v5 of the Gravity module. Please verify that there are no remaining references to v4 in import paths throughout the codebase. Run the following script to verify that no import paths still reference v4: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify that all Gravity module import paths are updated to v5
# Expected result: No output means all imports have been updated to v5
rg --type go 'github.com/peggyjv/gravity-bridge/module/v4'
Length of output: 8190 |
||
"github.com/rakyll/statik/fs" | ||
"github.com/spf13/cast" | ||
|
||
|
@@ -922,5 +923,11 @@ func (app *Gravity) setupUpgradeStoreLoaders() { | |
} | ||
|
||
func (app *Gravity) setupUpgradeHandlers() { | ||
|
||
app.upgradeKeeper.SetUpgradeHandler( | ||
v5.UpgradeName, | ||
v5.CreateUpgradeHandler( | ||
app.mm, | ||
app.configurator, | ||
), | ||
) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# v5 upgrade | ||
|
||
This upgrade simply fixes the bug in the `SubmitEthereumTxConfirmation` message handler where `CompletedOutgoingTx`s were not checked and therefore could not be signed by orchestrators that failed to sign before the transaction was completed, resulting in jailing and slashing. Because this is a state breaking change, we bump the consensus version of the module. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package v5 | ||
|
||
// UpgradeName defines the on-chain upgrade name for the Gravity v5 upgrade | ||
const UpgradeName = "v5" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package v5 | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
) | ||
|
||
func CreateUpgradeHandler( | ||
mm *module.Manager, | ||
configurator module.Configurator, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { | ||
ctx.Logger().Info("v5 upgrade: entering handler") | ||
|
||
return mm.RunMigrations(ctx, configurator, fromVM) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module github.com/peggyjv/gravity-bridge/module/v4 | ||
module github.com/peggyjv/gravity-bridge/module/v5 | ||
|
||
go 1.22 | ||
|
||
|
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.
💡 Codebase verification
Potential Issues Detected with Test Files
The shell script results indicate that while there are no remaining v4 imports or usage of the
gravitytypes
package in test files, theapp
package is still being utilized in several test files. This may lead to inconsistencies or compatibility issues due to the Gravity Bridge module upgrade from v4 to v5.Affected Files:
module/x/gravity/types/msgs_test.go
module/x/gravity/handler_test.go
module/x/gravity/cosmos_originated_test.go
Please review these test files to ensure that the usage of the
app
package is compatible with the v5 upgrade or update them accordingly.🔗 Analysis chain
LGTM. Verify impact of Gravity Bridge module upgrade.
The import statements have been correctly updated to use v5 of the Gravity Bridge module. This change looks good, but please ensure the following:
To help verify the impact of this change, you can run the following script:
This script will help identify any remaining v4 imports and show the usage of the updated packages, allowing you to verify if any changes are needed in the code using these imports.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 49315