Skip to content

Conversation

@akobrin1
Copy link
Contributor

  • Added app_pubkey field handling and ICA-specific validation/signature verification for MsgRequestAction, including reuse of creator account info.
  • Ensured MsgApproveAction response includes action_id/status as needed and adjusted error handling (invalid address vs signature).
    Added unit coverage for ICA/non-ICA validation and cache-aware signature paths.

@roomote
Copy link

roomote bot commented Dec 18, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

This PR adds ICA (Interchain Account) support for MsgRequestAction with proper validation and signature verification. The implementation is well-structured:

  • Added app_pubkey field to MsgRequestAction for ICA creators to provide an application-level public key
  • ICA accounts require app_pubkey (since they have no auth module pubkey)
  • Non-ICA accounts must leave app_pubkey empty to avoid ambiguity
  • Signature verification correctly uses the cached creator account info
  • MsgApproveActionResponse now includes action_id and status fields
  • Unit tests cover ICA/non-ICA validation and cache-aware signature paths

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds comprehensive support for Interchain Account (ICA) message handling in the action module, specifically for MsgRequestAction operations. The implementation includes validation logic to ensure ICA accounts provide an application-level public key for signature verification, while preventing non-ICA accounts from supplying this field to avoid ambiguity.

Key Changes

  • Added app_pubkey field to MsgRequestAction proto definition with corresponding validation that enforces ICA accounts must provide it and non-ICA accounts must not
  • Enhanced MsgApproveActionResponse to include action_id and status fields for better response tracking
  • Implemented context-based caching of creator account information to optimize account lookups and enable ICA-aware signature verification

Reviewed changes

Copilot reviewed 21 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
proto/lumera/action/v1/tx.proto Added app_pubkey field to MsgRequestAction and action_id/status to MsgApproveActionResponse
x/action/v1/types/tx.pb.go Auto-generated protobuf code for new fields with marshaling/unmarshaling support
x/action/v1/types/errors.go Added ErrInvalidAppPubKey error for validation failures
x/action/v1/keeper/msg_request_action_validation.go New validation logic for ICA vs non-ICA creator accounts and app_pubkey handling
x/action/v1/keeper/msg_request_action_validation_test.go Unit tests covering ICA and non-ICA validation scenarios
x/action/v1/keeper/msg_server_request_action.go Integrated account info caching and validation at message handler entry point
x/action/v1/keeper/msg_server_approve_action.go Updated response to populate action_id and status fields
x/action/v1/keeper/crypto.go Enhanced signature verification to use cached account info and support ICA app-level signatures
x/action/v1/keeper/crypto_cache_test.go Tests verifying cache-based signature verification for both ICA and non-ICA accounts
x/action/v1/keeper/msg_server_test.go Added test for response field population and updated existing assertions
tests/integration/action/action_integration_test.go Updated integration test to verify response fields
x/action/v1/keeper/action_cascade.go Minor formatting fixes (import reordering and whitespace)
x/action/v1/keeper/action.go Changed error type from ErrInvalidSignature to ErrInvalidAddress for address parsing
app/ibc.go Added helper functions for ICA account type checking
app/ibc_test.go Unit tests for ICA helper functions
tests/system/wasm/ica_test.go Enhanced test documentation with clearer flow comments
Makefile Removed clean-cache dependency from build-proto and added GOPROXY configuration
go.mod, go.sum Updated dependencies including protoc-gen-validate and various minor version bumps
.github/workflows/*.yml Updated to use consistent checkout and setup-go actions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@a-ok123 a-ok123 merged commit 9cf41e6 into master Dec 19, 2025
14 checks passed
@mateeullahmalik mateeullahmalik deleted the ica-request-action branch December 19, 2025 11:06
@mateeullahmalik mateeullahmalik restored the ica-request-action branch December 19, 2025 11:07
@mateeullahmalik mateeullahmalik deleted the ica-request-action branch December 20, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants