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-x] stateless account update #523

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lightmark
Copy link
Contributor

stateless account aip for orderless txn.

Benefits:
- Gas Savings: By avoiding the upfront creation of account resources, this update reduces gas costs for accounts that do not require immediate resource usage.
- Efficiency: Stateless Accounts optimize resource usage for simple operations, minimizing the on-chain footprint for accounts that do not need complex functionality.
- mBackward Compatibility: The existing account model is fully preserved, and this update works seamlessly with existing accounts and applications.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- mBackward Compatibility: The existing account model is fully preserved, and this update works seamlessly with existing accounts and applications.
- Backward Compatibility: The existing account model is fully preserved, and this update works seamlessly with existing accounts and applications.

Comment on lines +36 to +37
- No Advanced Features Without Resource Creation: Stateless Accounts cannot perform actions like key rotation or use capability offers until the account resource is created.
- Default Behavior: Stateless Accounts will use default values, such as auth_key = account_address, until the account resource is created.
Copy link
Contributor

Choose a reason for hiding this comment

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

based on below, this doesn't seem like a limitation. i.e. rotation will not be rejected, it's just that account will be created at that time, and so the gas would need to be charged. maybe reprhase a bit?

  • Advanced Features will require account creation: When Stateless Accounts perform advanced actions like key rotation or use capability offers, account resource will need to be created, and it's associated storage costs paid.

```

### Sequence Number Considerations
While the sequence number is currently required for transaction ordering, the sequence number is not created unless the account resource exists. The future introduction of orderless_txn will remove the sequence number requirement entirely, enabling fully stateless transactions.
Copy link
Contributor

Choose a reason for hiding this comment

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

add that, call to get_sequence_number will return 0 for stateless accounts that only used orderless_txns thus far.

- While Stateless Accounts save gas by avoiding resource creation, users who require more advanced account features (such as key rotation) will still need to create an account resource, incurring gas costs at that time.

Ecosystem Impact
- No Capability Offers by Default: Stateless Accounts cannot issue capability offers until the account resource is created. Developers relying on this feature should ensure the resource is created when needed.
Copy link
Contributor

Choose a reason for hiding this comment

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

should capability offer just create the account at that time?

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.

3 participants