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

[AIP] Lite Account (Account v2) #467

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lightmark
Copy link
Contributor

Lite Account, aka Account V2 AIP.

aips/aip-lite-account.md Outdated Show resolved Hide resolved

## Risks and Drawbacks

Since this AIP proposes a compatible solution, if the ecosystem still rely on account.move heavily and do not adopt the features of the lite account, the benefits would be greatly deprecated.
Copy link
Contributor

@alinush alinush Jul 10, 2024

Choose a reason for hiding this comment

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

What about:

  1. Performance penalties of this approach?
  2. Addressing who pays the gas costs?
  3. How will the full migration impact keyless accounts? What about passkey accounts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please refer to the updated version.

  1. discussed.
  2. No AA.
  3. keyless/passkey are orthogonal.

aips/aip-lite-account.md Outdated Show resolved Hide resolved
aips/aip-lite-account.md Outdated Show resolved Hide resolved

Since this AIP proposes a compatible solution, if the ecosystem still rely on account.move heavily and do not adopt the features of the lite account, the benefits would be greatly deprecated.

The migration plan would be two steps:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why migrate? Why not let old accounts be & introduce a new type of account?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think migration is better, we would have less things to support?

Copy link

@DiegoJohnson DiegoJohnson Jul 11, 2024

Choose a reason for hiding this comment

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

Why migrate? Why not let old accounts be & introduce a new type of account?

Many users are farming the airdrop, they would like to keep their old account rather than creating a new account, but then they can't enjoy the benefits of account_v2. Maybe migration is a good choice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't want to mess up with 2 always... We will support both but the new account will always have new features. We don't guarantee this for old account.

## High-level Overview

Lite Account will have all account related resources into a single resource group, `0x1::lite_account::LiteAccountGroup`. The potential resources are:
- `Account`: It has one field, `sequence_number: u64`. If `squence_number == 0`, this resource does not exist.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: squence_number == 0 --> sequence_number == 0. Also, what does it mean it does not exist? The resource does exist, this reads confusing to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the statement. it means if it does not exist, the it is equal to sequence = 0.

aips/aip-lite-account.md Outdated Show resolved Hide resolved
aips/aip-lite-account.md Outdated Show resolved Hide resolved

Since this AIP proposes a compatible solution, if the ecosystem still rely on account.move heavily and do not adopt the features of the lite account, the benefits would be greatly deprecated.

The migration plan would be two steps:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think migration is better, we would have less things to support?

@lightmark lightmark force-pushed the account_v2 branch 2 times, most recently from e4174f6 to e7dfe2f Compare July 30, 2024 00:06

Lite Account will have all account related resources into the same `PrimaryFungibleStore`(PFS) object group at the PFS object address.
The new struct will be in `account.move`, previously fields in account v1. The optionality of a resource is determined by its existence. To be compatible with account v1, some fields will be converted to the counterpart in lite account if the lite account is migrated from v1.
The potential resources are:

Choose a reason for hiding this comment

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

Could we add another type called lock or resource_lock (programmable permissions that are either valid for a specified time or throughout the lifecycle of an intent)?

This would align well with the Aptos Intents Framework AIP. @lightmark

Copy link
Contributor

Choose a reason for hiding this comment

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

@ch4r10t33r take a look at #510

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.

6 participants