-
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
feat(accounts): add interfaces and mock impls for account abstraction #18404
Conversation
Your existing walkthrough and poem are quite engaging and informative. However, I've made some adjustments to the walkthrough based on the provided changes. Here's the updated content: WalkthroughThe changes encompass the introduction of new protocol buffer files and messages for the Changes
Poem
I hope these adjustments align with your expectations! If you need further modifications, feel free to let me know. TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (2)
- api/cosmos/accounts/v1/tx_grpc.pb.go
- x/accounts/v1/tx.pb.go
Files selected for processing (7)
- api/cosmos/accounts/v1/tx.pulsar.go (4 hunks)
- proto/cosmos/accounts/interfaces/account_abstraction/v1/interface.proto (1 hunks)
- proto/cosmos/accounts/testing/rotation/v1/partial.proto (1 hunks)
- proto/cosmos/accounts/v1/account_abstraction.proto (1 hunks)
- proto/cosmos/accounts/v1/tx.proto (3 hunks)
- x/accounts/msg_server.go (2 hunks)
- x/accounts/testing/account_abstraction/partial_account.go (1 hunks)
Files not summarized due to errors (1)
- api/cosmos/accounts/v1/tx.pulsar.go: Error: Message exceeds token limit
Files not reviewed due to errors (1)
- api/cosmos/accounts/v1/tx.pulsar.go (Error: diff too large)
Files skipped from review due to trivial changes (1)
- proto/cosmos/accounts/testing/rotation/v1/partial.proto
Additional comments: 14
proto/cosmos/accounts/interfaces/account_abstraction/v1/interface.proto (1)
- 1-66: The new protocol buffer definitions look good. They are well-documented and follow the protobuf syntax correctly. Ensure that the corresponding Go code is generated and checked into the repository.
proto/cosmos/accounts/v1/tx.proto (3)
5-11: The import statement and service definition look fine. Ensure that the imported file "cosmos/accounts/v1/account_abstraction.proto" exists and is accessible.
16-23: The new RPC methods
ExecuteBundle
andExecuteBundleResponse
are correctly defined. Ensure that these methods are implemented in the service.60-80: The message definitions for
MsgExecuteBundle
andMsgExecuteBundleResponse
are correctly defined. Ensure that theUserOperation
andUserOperationResponse
types are defined elsewhere in the codebase.x/accounts/msg_server.go (2)
3-11: The new imports are used correctly in the new function
ExecuteBundle
.123-125: The
ExecuteBundle
function is currently unimplemented and returns an error. Ensure that this is the intended behavior at this stage of development.func (m msgServer) ExecuteBundle(ctx context.Context, req *v1.MsgExecuteBundle) (*v1.MsgExecuteBundleResponse, error) { return nil, status.New(codes.Unimplemented, "not implemented").Err() }proto/cosmos/accounts/v1/account_abstraction.proto (1)
- 1-63: The protocol buffer definitions for
UserOperation
andUserOperationResponse
are well-structured and comprehensive. They cover all necessary fields for sender, authentication method, authentication data, sequence, gas limits, payment messages, and their respective gas limits. The response fields for gas usage and payment responses are also well defined. Ensure that these new message types are properly integrated and used in the rest of the codebase.x/accounts/testing/account_abstraction/partial_account.go (7)
1-14: Imports look fine. No unused or missing imports detected.
16-19: Global variables
PubKeyPrefix
andSequencePrefix
are defined. Ensure they are not being redefined elsewhere in the codebase.21-21: The
PartialAccount
struct is confirmed to implement theaccountstd.Interface
. This is good practice to ensure compile-time checking of interface implementation.23-28: The
NewPartialAccount
function is correctly defined and returns a newPartialAccount
instance. Ensure that theaccountstd.Dependencies
argument is being validated and sanitized in the upstream code.30-37: The
PartialAccount
struct is defined withPubKey
andSequence
fields. Ensure that these fields are not being redefined elsewhere in the codebase.39-55: The
Init
,RotatePubKey
,Authenticate
, andQueryAuthenticateMethods
methods of thePartialAccount
struct are currently not implemented. Ensure that these methods are implemented before deploying the code to production.57-68: The
RegisterInitHandler
,RegisterExecuteHandlers
, andRegisterQueryHandlers
methods of thePartialAccount
struct are correctly defined. Ensure that these methods are being called with valid arguments in the upstream code.
@testinginprod your pull request is missing a changelog! |
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- x/accounts/v1/account_abstraction.pb.go
Files selected for processing (2)
- api/cosmos/accounts/testing/rotation/v1/partial.pulsar.go (1 hunks)
- api/cosmos/accounts/v1/account_abstraction.pulsar.go (1 hunks)
Files not summarized due to errors (2)
- api/cosmos/accounts/testing/rotation/v1/partial.pulsar.go: Error: Message exceeds token limit
- api/cosmos/accounts/v1/account_abstraction.pulsar.go: Error: Message exceeds token limit
Files not reviewed due to errors (2)
- api/cosmos/accounts/testing/rotation/v1/partial.pulsar.go (Error: diff too large)
- api/cosmos/accounts/v1/account_abstraction.pulsar.go (Error: diff too large)
@@ -0,0 +1,66 @@ | |||
syntax = "proto3"; |
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.
this is the account abstraction interface messages and query messages.
@@ -0,0 +1,22 @@ | |||
syntax = "proto3"; |
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.
this is the proto file for a testing x/account meant to test account abstraction.
added pub key rotation to make things more spicy
@@ -0,0 +1,63 @@ | |||
syntax = "proto3"; |
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.
defines account abstraction core types used by the x/accounts module
@@ -0,0 +1,68 @@ | |||
package account_abstraction |
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.
implements the dummy account meant to test account abstraction + pub key rotation (pub key rotation is for spiciness)
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.
ACK on api
Description
Closes: #XXXX
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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
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.
I have...
!
in the type prefix if API or client breaking changeSummary by CodeRabbit
msgServer
struct.account_abstraction
with aPartialAccount
struct implementing various interfaces.