Skip to content
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

[Account Abstraction] feat(smart-accounts): main working branch for account abstraction #7005

Merged
merged 131 commits into from
Apr 18, 2024

Conversation

PaddyMc
Copy link
Contributor

@PaddyMc PaddyMc commented Dec 5, 2023

EPIC: #6075
Closes: #8063

What is the purpose of the change

This is the working branch for account abstraction feature.

PaddyMc and others added 30 commits August 31, 2023 11:36
* authenticator types

* changes from review
* feat(secp256k1 auth): implementing secpk256k1 authenticator

* chore: updating comments to be more concise

* fix: move simulate to SigVerificationData struct
* authenticator types

* added initial message scaffold

* experimemnt with collections

* implementation without collections

* added messages and keepers, improving interfaces

* skip tests until wired up

* updated tests

* cleaner ante handler
* feat(authenticator): wire authenticator module into node

* fix: use already initialized subspace in keeper test
* initial authenticator setup

* remove unnecessary params

* note about ibc test failures

* reset go.work

* getting the signature data for a single msg

* experimenting with tests using ibctesting

* fix: update integration tests to remove init app

* proper key rotation test

* table tests

* more tests

* keep registered authenticators in the app

* lints

* updated tests

* fix default case

* fixed keeper test

* propperly fix keeper tests

---------

Co-authored-by: PaddyMc <[email protected]>
* initial authenticator setup

* remove unnecessary params

* note about ibc test failures

* reset go.work

* getting the signature data for a single msg

* experimenting with tests using ibctesting

* fix: update integration tests to remove init app

* proper key rotation test

* table tests

* more tests

* keep registered authenticators in the app

* lints

* updated tests

* fix default case

* fixed keeper test

* propperly fix keeper tests

* feat(cli): adding query and tx command for authenticators

* feat(cli): parse message correctly by decoding base64 string

* feat(auth msg): validate bytes in message

* chore: fix linting error in query

---------

Co-authored-by: Nicolas Lara <[email protected]>
* added experimental test to for dealing with stateful authenticators

* added post habdler

* testing both success and failures

* cleanup

* added moved file

* fumpt

* remove unised key

* mockctx

* remove unused func

* removed test consume gas

* remove comment decided against
* feat(authenticator): move authenticators to their own package

* feat(authenticator): rename struct instance name
* proper handling of multi-msgs and notifying of failed txs

* renamed interface file

* lints

* refactor GetSignersAndSignatures

* fix lint
* added feepayer handling

* lint
* feat(authenticator): improved test cases for authenticator

* feat(authenticator): added table based tests to signature verification

* chore(comment): x/authenticator/authenticator/interface.go

Co-authored-by: Nicolas Lara <[email protected]>

* chore: update x/authenticator/authenticator/interface.go comments

Co-authored-by: Nicolas Lara <[email protected]>

* chore: update x/authenticator/authenticator/interface.go comment

Co-authored-by: Nicolas Lara <[email protected]>

* fix: change uint to int on testing authenticatior as we need to use negative numbers

* Update x/authenticator/authenticator/interface.go

setting msgIndex back to uint8

* fix: change uint to int on authenticator interface

---------

Co-authored-by: Nicolas Lara <[email protected]>
* added any_of authenticator

* allOf and composition

* restore stateful_authenticator

* integration test (tmp)

* added initial spend limit
* feat: test multisig transaction

* Update x/authenticator/authenticator/interface.go

* chore: fix linting errors

---------

Co-authored-by: Nicolas Lara <[email protected]>
* added any_of authenticator

* allOf and composition

* restore stateful_authenticator

* integration test (tmp)

* added initial spend limit

* initial interface changes

* pass account into call and rever all authenticator's context if the tx is not authenticated

* fix gas meter and return

* comment cleanup

* fix bad merge

* transient ctx

* lints and missing refactor

* Proper calling order
* feat: improve msg server. test aute handler

* fix: small updates to msg_server.go, improved comments

* Generated protofile changes

* Update x/authenticator/authenticator/interface.go

Co-authored-by: Nicolas Lara <[email protected]>

* Update x/authenticator/keeper/msg_server.go

Co-authored-by: Nicolas Lara <[email protected]>

* Update x/authenticator/ante/authenticator_test.go

Co-authored-by: Nicolas Lara <[email protected]>

* chore: move type definition from interface to concrete impl

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Nicolas Lara <[email protected]>
* initial implementation of selecting the authenticator with tx info

* better tests
nicolaslara and others added 12 commits March 13, 2024 08:46
…uthenticators (#7722)

* Signature verification no longer defaults to the accounts pubkey

* Authenticators should never default. Only allow explicitly selected authenticators

* spell check

* lint
* improve fee payer error

* wrap GenerateAuthenticationData error with context instead of replacing

* improve error for GetInitializedAuthenticatorForAccount

* wrape authenticate error

* log track error

* improve GetSelectedAuthenticators error

* fix tests

* improve pubkey ante err

* improve ante and post error

* improve error in msgserver and keeper

* remove spend_limit.go

* improve cosmwasm authenticator error

* improve composite authentcaitor error

* improve init error

* improve error for anyof

* add telemetry

* fix unguarded track error log

* fix lint
* Inlining the code for composite authenticators. Less DRY, but more KISS

* lint

* uncomment tests that should not have been commented out
* create set active state msg

* implement basic set activate state fn

* update test

* rename params

* add cicuit breaker controllers params

* authorize active state setter

* remove gas check in ante test

* Revert "remove gas check in ante test"

This reverts commit 70b640b.

* update measured gas for TestSpecificAuthenticator

* rename authenticator_active_state back to is_smart_account_active
* deduct fees after auth

* leaving at the beginning for classic
* added dinitial diagrams

* better text

* added manager and keeper
* pass fee grant & fee to authenticator request

* passing auth request to track

* fix failed cosmwasm test
* chore: rename authenticator module to smart-account

* chore: fix v24 upgrade test

* lint

---------

Co-authored-by: Nicolas Lara <[email protected]>
@mergify mergify bot mentioned this pull request Apr 15, 2024
6 tasks
* rename to smart account

* renames again

* lint

* lint
@PaddyMc PaddyMc marked this pull request as ready for review April 17, 2024 16:16
@nicolaslara nicolaslara merged commit 231aed1 into main Apr 18, 2024
1 check passed
@nicolaslara nicolaslara deleted the feat/smart-accounts branch April 18, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:app-wiring Changes to the app folder C:CLI C:docs Improvements or additions to documentation C:simulator Edits simulator or simulations V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge smart-accounts module into main
6 participants