-
Notifications
You must be signed in to change notification settings - Fork 70
feat(hyperlane): integrate hyperlane-cosmos v1.1.0 bridge modules #301
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
base: main
Are you sure you want to change the base?
Changes from all commits
ba7c922
72315d0
9b246ba
bc637a7
6ef6074
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 |
|---|---|---|
|
|
@@ -44,6 +44,10 @@ import ( | |
| distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" | ||
| distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" | ||
|
|
||
| hyperlanekeeper "github.com/bcp-innovations/hyperlane-cosmos/x/core/keeper" | ||
| hyperlanetypes "github.com/bcp-innovations/hyperlane-cosmos/x/core/types" | ||
| warpkeeper "github.com/bcp-innovations/hyperlane-cosmos/x/warp/keeper" | ||
| warptypes "github.com/bcp-innovations/hyperlane-cosmos/x/warp/types" | ||
| cadencekeeper "github.com/bitsongofficial/go-bitsong/x/cadence/keeper" | ||
| cadencetypes "github.com/bitsongofficial/go-bitsong/x/cadence/types" | ||
| govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" | ||
|
|
@@ -116,6 +120,8 @@ var maccPerms = map[string][]string{ | |
| wasmtypes.ModuleName: {authtypes.Burner}, | ||
| protocolpooltypes.ModuleName: nil, | ||
| protocolpooltypes.ProtocolPoolEscrowAccount: nil, | ||
| hyperlanetypes.ModuleName: nil, | ||
| warptypes.ModuleName: {authtypes.Minter, authtypes.Burner}, | ||
|
Comment on lines
+123
to
+124
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Search for StoreUpgrades registrations for hyperlane and warp modules
rg -rn 'hyperlanetypes\.ModuleName\|warptypes\.ModuleName\|hyperlane.*StoreUpgrades\|StoreUpgrades.*hyperlane' \
--type go -g '!app/keepers/keepers.go'Repository: bitsongofficial/go-bitsong Length of output: 52 🏁 Script executed: # Also search for upgrade handlers and StoreUpgrades in general to understand the upgrade structure
fd -e go | xargs rg -l 'StoreUpgrades\|UpgradeStoreLoader' --type go | head -20Repository: bitsongofficial/go-bitsong Length of output: 52 🏁 Script executed: # Search for any upgrade-related files
fd -e go -i -E node_modules -E vendor | xargs rg -l 'upgradetypes\.' --type go | head -20Repository: bitsongofficial/go-bitsong Length of output: 386 🏁 Script executed: # Check the recent upgrade handler (v023) for StoreUpgrades pattern
cat app/upgrades/v023/upgrades.goRepository: bitsongofficial/go-bitsong Length of output: 2929 🏁 Script executed: # Check the context in keepers.go around lines 123-124
sed -n '115,135p' app/keepers/keepers.goRepository: bitsongofficial/go-bitsong Length of output: 1113 🏁 Script executed: # Search for hyperlane and warp module initialization in the codebase
rg -n 'hyperlane|warp' --type go | head -30Repository: bitsongofficial/go-bitsong Length of output: 2562 🏁 Script executed: # Check if there are any StoreUpgrades definitions in existing upgrade handlers
rg -A 5 'StoreUpgrades' --type go app/upgrades/Repository: bitsongofficial/go-bitsong Length of output: 1245 🏁 Script executed: # Check if hyperlane and warp modules appear in older upgrade versions
rg -n 'hyperlane|warp' app/upgrades/v021/ app/upgrades/v022/Repository: bitsongofficial/go-bitsong Length of output: 52 🏁 Script executed: # Check the v023 constants file to see the full StoreUpgrades definition
cat app/upgrades/v023/constants.goRepository: bitsongofficial/go-bitsong Length of output: 419 🏁 Script executed: # Check app.go to understand how StoreUpgrades are applied during chain initialization
rg -B5 -A5 'SetStoreLoader\|UpgradeStoreLoader' app/app.goRepository: bitsongofficial/go-bitsong Length of output: 52 🏁 Script executed: # Check how the upgrade is registered and applied in the app
cat app/app.go | head -100Repository: bitsongofficial/go-bitsong Length of output: 3931 🏁 Script executed: # Search for SetStoreLoader usage across the entire codebase
rg -rn 'SetStoreLoader' --type goRepository: bitsongofficial/go-bitsong Length of output: 90 🏁 Script executed: # Check the upgrade types to understand the expected structure
cat app/upgrades/types.goRepository: bitsongofficial/go-bitsong Length of output: 1439 🏁 Script executed: # Look at v021 upgrade handler to see how StoreUpgrades are typically used
cat app/upgrades/v021/upgrades.go | head -80Repository: bitsongofficial/go-bitsong Length of output: 3836 🏁 Script executed: # Check if hyperlane and warp modules are imported/registered in the app
cat app/modules.go | grep -A5 -B5 'hyperlane\|warp'Repository: bitsongofficial/go-bitsong Length of output: 3468 🏁 Script executed: # Check when hyperlane and warp were added - search git history or comments
rg -n 'hyperlane|warp' app/keepers/keys.go -B2 -A2Repository: bitsongofficial/go-bitsong Length of output: 748 🏁 Script executed: # Verify if there's a planned next upgrade version (v024, etc)
ls -la app/upgrades/Repository: bitsongofficial/go-bitsong Length of output: 459 🏁 Script executed: # Check how StoreUpgrades are actually applied during upgrade
rg -rn 'storeUpgrades\|StoreUpgrades' app/ --type go -A3 | head -50Repository: bitsongofficial/go-bitsong Length of output: 52 🏁 Script executed: # Check if hyperlane/warp appear in any of the historical upgrade handlers
rg -rn 'hyperlane\|warp' app/upgrades/v021 app/upgrades/v022Repository: bitsongofficial/go-bitsong Length of output: 52 🏁 Script executed: # Look at the full constants files for v021 and v022 to see the pattern
cat app/upgrades/v021/constants.go
cat app/upgrades/v022/constants.goRepository: bitsongofficial/go-bitsong Length of output: 3401 🏁 Script executed: # Verify if these modules need to be added to StoreUpgrades by checking the external library documentation expectations
rg -n 'SetStoreLoader\|UpgradeStoreLoader' app/Repository: bitsongofficial/go-bitsong Length of output: 52 Add The hyperlane and warp modules are now integrated in the codebase (keepers.go, keys.go, modules.go) but are missing from v023's Example StoreUpgrades update for v023StoreUpgrades: store.StoreUpgrades{
Added: []string{
hyperlanetypes.ModuleName,
warptypes.ModuleName,
},
Deleted: []string{},
}🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| type AppKeepers struct { | ||
|
|
@@ -160,6 +166,10 @@ type AppKeepers struct { | |
| AuthenticatorManager *authenticator.AuthenticatorManager | ||
| ProtocolPoolKeeper protocolpoolkeeper.Keeper | ||
|
|
||
| // Hyperlane keepers | ||
| HyperlaneKeeper *hyperlanekeeper.Keeper | ||
| WarpKeeper warpkeeper.Keeper | ||
|
|
||
| // Middleware wrapper | ||
| Ics20WasmHooks *ibchooks.WasmHooks | ||
| HooksICS4Wrapper ibchooks.ICS4Middleware | ||
|
|
@@ -245,6 +255,30 @@ func NewAppKeepers( | |
| govModAddress, bApp.Logger(), | ||
| ) | ||
|
|
||
| // Hyperlane Core Keeper | ||
| hyperlaneKeeper := hyperlanekeeper.NewKeeper( | ||
| appCodec, | ||
| appKeepers.AccountKeeper.AddressCodec(), | ||
| runtime.NewKVStoreService(keys[hyperlanetypes.ModuleName]), | ||
| govModAddress, | ||
| appKeepers.BankKeeper, | ||
| ) | ||
| appKeepers.HyperlaneKeeper = &hyperlaneKeeper | ||
|
|
||
| // Hyperlane Warp Keeper | ||
| appKeepers.WarpKeeper = warpkeeper.NewKeeper( | ||
| appCodec, | ||
| appKeepers.AccountKeeper.AddressCodec(), | ||
| runtime.NewKVStoreService(keys[warptypes.ModuleName]), | ||
| govModAddress, | ||
| appKeepers.BankKeeper, | ||
| appKeepers.HyperlaneKeeper, | ||
| []int32{ | ||
| int32(warptypes.HYP_TOKEN_TYPE_COLLATERAL), | ||
| int32(warptypes.HYP_TOKEN_TYPE_SYNTHETIC), | ||
| }, | ||
| ) | ||
|
|
||
| // Initialize authenticators | ||
| appKeepers.AuthenticatorManager = authenticator.NewAuthenticatorManager() | ||
| appKeepers.AuthenticatorManager.InitializeAuthenticators([]authenticator.Authenticator{ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ go 1.23.2 | |
|
|
||
| require ( | ||
| cosmossdk.io/api v0.9.2 | ||
| cosmossdk.io/client/v2 v2.0.0-beta.3 | ||
| cosmossdk.io/client/v2 v2.0.0-beta.8 | ||
| cosmossdk.io/collections v1.2.0 | ||
| cosmossdk.io/core v0.11.3 | ||
| cosmossdk.io/errors v1.0.2 | ||
|
|
@@ -17,6 +17,7 @@ require ( | |
| cosmossdk.io/x/upgrade v0.1.4 | ||
| github.com/CosmWasm/wasmd v0.53.3 | ||
| github.com/CosmWasm/wasmvm/v2 v2.1.6 | ||
| github.com/bcp-innovations/hyperlane-cosmos v1.1.0 | ||
| github.com/cometbft/cometbft v0.38.21 | ||
| github.com/cosmos/cosmos-db v1.1.1 | ||
| github.com/cosmos/cosmos-proto v1.0.0-beta.5 | ||
|
|
@@ -107,6 +108,7 @@ require ( | |
| github.com/emicklei/dot v1.6.4 // indirect | ||
| github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect | ||
| github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect | ||
| github.com/ethereum/go-ethereum v1.14.12 // indirect | ||
|
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. 🧩 Analysis chain🌐 Web query:
💡 Result: go-ethereum v1.14.12 is affected by GHSA-m6j8-rg6r-7mv8 / CVE-2026-26315 (ECIES / RLPx handshake).
Sources: Citations:
🌐 Web query:
💡 Result:
Notes (useful context):
Sources: [1] [2] [3] [4] [5] 🏁 Script executed: # Check the go.mod file to see the exact current state
cat -n go.mod | grep -A 2 -B 2 "go-ethereum"Repository: bitsongofficial/go-bitsong Length of output: 379 Indirect dependency This version is affected by improper ECIES public key validation in the RLPx handshake, allowing a remote peer to extract bits of the node's p2p private key. The vulnerability is fixed in go-ethereum v1.16.9+. Since v1.14.12 is an older branch, a backport security release (v1.14.13) is also available as of January 30, 2025. Upgrade to v1.14.13 (minimum security patch) or v1.16.7 (latest stable). After upgrading, rotate your node key (GitHub recommends deleting Since this is an indirect dependency pulled in by 🧰 Tools🪛 OSV Scanner (2.3.3)[HIGH] 111-111: github.com/ethereum/go-ethereum 1.14.12: Go Ethereum vulnerable to DoS via malicious p2p message in github.com/ethereum/go-ethereum (GO-2025-3436) [HIGH] 111-111: github.com/ethereum/go-ethereum 1.14.12: High CPU usage leading to DoS via malicious p2p message in github.com/ethereum/go-ethereum (GO-2026-4314) [HIGH] 111-111: github.com/ethereum/go-ethereum 1.14.12: DoS via malicious p2p message affecting a vulnerable node in github.com/ethereum/go-ethereum (GO-2026-4315) [HIGH] 111-111: github.com/ethereum/go-ethereum 1.14.12: Go Ethereum Improperly Validates the ECIES Public Key in RLPx Handshake [HIGH] 111-111: github.com/ethereum/go-ethereum 1.14.12: go-ethereum is vulnerable to high CPU usage leading to DoS via malicious p2p message [HIGH] 111-111: github.com/ethereum/go-ethereum 1.14.12: go-ethereum is vulnerable to DoS via malicious p2p message affecting a vulnerable node [HIGH] 111-111: github.com/ethereum/go-ethereum 1.14.12: Go Ethereum vulnerable to DoS via malicious p2p message 🤖 Prompt for AI Agents |
||
| github.com/fatih/color v1.18.0 // indirect | ||
| github.com/felixge/httpsnoop v1.0.4 // indirect | ||
| github.com/fsnotify/fsnotify v1.9.0 // indirect | ||
|
|
@@ -121,7 +123,7 @@ require ( | |
| github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect | ||
| github.com/gogo/googleapis v1.4.1 // indirect | ||
| github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect | ||
| github.com/golang/snappy v0.0.4 // indirect | ||
| github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect | ||
| github.com/google/btree v1.1.3 // indirect | ||
| github.com/google/flatbuffers v25.2.10+incompatible // indirect | ||
| github.com/google/go-cmp v0.7.0 // indirect | ||
|
|
@@ -146,6 +148,7 @@ require ( | |
| github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect | ||
| github.com/hashicorp/yamux v0.1.2 // indirect | ||
| github.com/hdevalence/ed25519consensus v0.2.0 // indirect | ||
| github.com/holiman/uint256 v1.3.1 // indirect | ||
| github.com/huandu/skiplist v1.2.1 // indirect | ||
| github.com/iancoleman/orderedmap v0.3.0 // indirect | ||
| github.com/iancoleman/strcase v0.3.0 // indirect | ||
|
|
||
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.
releaseandpush.tagstriggers can fire simultaneously for the same release.Creating a GitHub release pushes a tag, so both the
releaseandpush.tagstriggers will match, potentially producing two concurrent runs that build and push the same images. Consider keeping only one of the two triggers to avoid redundant builds and wasted CI minutes.🤖 Prompt for AI Agents