-
Notifications
You must be signed in to change notification settings - Fork 609
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: add ledger signing to smart account module #8581
Conversation
WalkthroughThe recent update enhances the smart account module by incorporating ledger signing functionality, thereby improving secure transaction capabilities. Additionally, the update restructures and renames message types for better clarity and maintainability. These changes collectively enhance the security and usability of smart accounts on the Osmosis platform, aligning with ongoing efforts to improve overall user experience. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SmartAccount
participant Ledger
participant Keeper
User->>SmartAccount: Request to add authenticator
SmartAccount->>Keeper: AddAuthenticator(AuthType)
Keeper-->>SmartAccount: Confirmation
SmartAccount->>Ledger: Sign transaction
Ledger-->>SmartAccount: Signed transaction
SmartAccount->>User: Confirmation
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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 Configuration File (
|
@@ -34,7 +34,7 @@ message MsgAddAuthenticatorResponse { bool success = 1; } | |||
// MsgRemoveAuthenticatorRequest defines the Msg/RemoveAuthenticator request | |||
// type. | |||
message MsgRemoveAuthenticator { | |||
option (amino.name) = "osmosis/MsgRemoveAuthenticator"; | |||
option (amino.name) = "osmosis/smartaccount/remove-authenticator"; |
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.
did we verify name length on this? sometimes ledger can only handle certain lengths
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.
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.
I signed with a ledger to make sure this works as well => https://osmosis-network.slack.com/archives/C027ELA290B/p1722618905776139?thread_ts=1722618892.008519&cid=C027ELA290B
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.
High level ACK, we of course should test on v26 testnet prior to gov prop. Very excited for this!
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.
Nice
Lets test that the character count for each of these names is sub-40 chars (IIRC thats the limit) |
I signed with a ledger to make sure this works as well => https://osmosis-network.slack.com/archives/C027ELA290B/p1722618905776139?thread_ts=1722618892.008519&cid=C027ELA290B |
What is the purpose of the change
The smart account
AddAuthenticator
andRemoveAuthenticator
messages were missing the correct functions to satisfy the legacy message interface, thus ledger signing couldn't be used.Also some weirdness around having a Type for the message and also needed to define a Type() function so I need to change that.
Sister PR here => osmosis-labs/osmosis-frontend#3656
Testing and Verifying
cd x/smart-account
go test ./...