-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix(x/crosschain): register MsgConfirm and MsgClaim to sdk.Msg Implementations #858
Conversation
WalkthroughThis pull request introduces several new message types for cross-chain operations in the gravity module. The changes primarily focus on expanding the interface registry, codec registrations, and test configurations to support new claim and confirmation message types. These additions enhance the cross-chain functionality by registering new message types related to bridge calls, token claims, oracle set updates, and external send operations. Changes
Sequence DiagramsequenceDiagram
participant Client
participant CrossChainModule
participant BridgeModule
Client->>CrossChainModule: Send Cross-Chain Message
CrossChainModule->>BridgeModule: Process Claim
BridgeModule-->>CrossChainModule: Validate and Confirm
CrossChainModule-->>Client: Return Result
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/app_test.go (1)
42-45
: Ensure test coverage for newly added confirmation messages.The newly added confirmation messages (
MsgConfirmBatch
,MsgOracleSetConfirm
, andMsgBridgeCallConfirm
) need dedicated tests if they don’t already exist. Confirm that each message’s handler is covered to safeguard against future regressions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/app_test.go
(1 hunks)app/interface_registry.json
(1 hunks)x/crosschain/types/codec.go
(1 hunks)
🔇 Additional comments (4)
app/app_test.go (1)
33-40
: Question about newly added claim messages in the deprecated map.These newly introduced message types (
MsgSendToExternalClaim
,MsgSendToFxClaim
,MsgBridgeCallClaim
,MsgBridgeTokenClaim
,MsgOracleSetUpdatedClaim
,MsgBridgeCallResultClaim
) are being added to thedeprecated
map, which might raise confusion regarding whether they are truly deprecated or considered transitional. Please confirm whether these are truly intended to be deprecated or if this map is merely serving another purpose (e.g., enumerating messages that use older-style handlers).x/crosschain/types/codec.go (2)
40-46
: Validate usage and correctness of newly registered claim messages.The new claim messages (
MsgSendToExternalClaim
,MsgSendToFxClaim
,MsgBridgeCallClaim
,MsgBridgeTokenClaim
,MsgOracleSetUpdatedClaim
,MsgBridgeCallResultClaim
) are registered for both thesdk.Msg
andExternalClaim
interfaces. Ensure the corresponding handlers or keepers correctly process them and that any off-chain expectations (e.g., signature verifications, event emissions) are accounted for.
48-50
: Double-check confirm messages’ flow.
MsgConfirmBatch
,MsgOracleSetConfirm
, andMsgBridgeCallConfirm
are each registered asConfirm
messages. Confirm they follow the same patterns of validation and workflow logic as their counterpart messages, especially if they require specific orchestrator checks or external verifications.app/interface_registry.json (1)
416-432
: Entries for new Msg types look consistent with the code changes.These new entries match the newly introduced message types in
x/crosschain/types/codec.go
. Confirm that the interface registry is in sync whenever further claims or confirms are added to avoid reference mismatches in future releases.
Summary by CodeRabbit
New Features
Chores