-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor(auth): decouple auth from x/accounts account abstraction types #20875
Conversation
WalkthroughWalkthroughThe changes primarily involve the removal of the dependency on Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
participant Keeper
Client->>Server: sendTx
Server->>Keeper: AuthenticateAccount
Keeper->>Server: Return Auth result
Server->>Client: Return Tx result
Possibly related issues
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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
Outside diff range and nitpick comments (2)
x/accounts/keeper_account_abstraction.go (1)
41-48
: Ensure comprehensive error handling.The function appears well-implemented, but consider logging the error before returning it for better traceability.
if err != nil { log.Errorf("Authentication failed for signer %s: %v", signer, err) return fmt.Errorf("%w: %w", ErrAuthentication, err) }x/auth/ante/sigverify.go (1)
436-450
: Ensure comprehensive error handling.The function appears well-implemented, but consider logging the error before returning it for better traceability.
if err != nil { log.Errorf("Failed to authenticate abstracted account for signer %s: %v", signer, err) return err }
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files ignored due to path filters (1)
tests/go.sum
is excluded by!**/*.sum
Files selected for processing (24)
- client/v2/go.mod (1 hunks)
- go.mod (1 hunks)
- server/v2/cometbft/go.mod (1 hunks)
- tests/e2e/accounts/base_account_test.go (1 hunks)
- tests/go.mod (1 hunks)
- x/accounts/keeper_account_abstraction.go (2 hunks)
- x/auth/ante/sigverify.go (3 hunks)
- x/auth/go.mod (1 hunks)
- x/authz/go.mod (1 hunks)
- x/bank/go.mod (1 hunks)
- x/circuit/go.mod (1 hunks)
- x/consensus/go.mod (1 hunks)
- x/distribution/go.mod (1 hunks)
- x/epochs/go.mod (1 hunks)
- x/evidence/go.mod (1 hunks)
- x/feegrant/go.mod (1 hunks)
- x/gov/go.mod (1 hunks)
- x/mint/go.mod (1 hunks)
- x/nft/go.mod (1 hunks)
- x/params/go.mod (1 hunks)
- x/protocolpool/go.mod (1 hunks)
- x/slashing/go.mod (1 hunks)
- x/staking/go.mod (1 hunks)
- x/upgrade/go.mod (1 hunks)
Files skipped from review due to trivial changes (22)
- client/v2/go.mod
- go.mod
- server/v2/cometbft/go.mod
- tests/e2e/accounts/base_account_test.go
- tests/go.mod
- x/auth/go.mod
- x/authz/go.mod
- x/bank/go.mod
- x/circuit/go.mod
- x/consensus/go.mod
- x/distribution/go.mod
- x/epochs/go.mod
- x/evidence/go.mod
- x/feegrant/go.mod
- x/gov/go.mod
- x/mint/go.mod
- x/nft/go.mod
- x/params/go.mod
- x/protocolpool/go.mod
- x/slashing/go.mod
- x/staking/go.mod
- x/upgrade/go.mod
Additional context used
Path-based instructions (2)
x/accounts/keeper_account_abstraction.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/ante/sigverify.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (1)
x/auth/ante/sigverify.go (1)
54-54
: LGTM! Ensure consistency withx/accounts/keeper_account_abstraction.go
.The method signature change is consistent with the implementation in
x/accounts/keeper_account_abstraction.go
.
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.
LGTM
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
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- x/accounts/keeper_account_abstraction.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/accounts/keeper_account_abstraction.go
Description
This PR decouples the x/auth module from the x/accounts types
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit
New Features
Dependency Updates
cosmossdk.io/x/accounts
across multiple modules.cosmossdk.io/x/bank
andcosmossdk.io/x/staking
.Testing Improvements
TestBaseAccount
by refining thesendTx
function.