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

Slim accounts #2

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

Slim accounts #2

wants to merge 6 commits into from

Conversation

quocle108
Copy link

@quocle108 quocle108 commented Mar 20, 2024

Change Description

This MR introduces a significant optimization in RAM usage by implementing a new account structure. The changes are designed to enhance efficiency and reduce the memory. The key modifications include:

  • Restructure account_object and account_metadata_object. The account_object is now universal for all account types, while the account_metadata_object is specifically applied for smart contract accounts
  • Merge Object: resource_limits_object and resource_usage_object into resource_object, permission_object and permission_usage_object into permission_object
  • Introduction of Slim Accounts:: To further economize RAM usage, the concept of 'Slim accounts' is introduced. These accounts are smaller, containing only the account_object, resource_object, and one ACTIVE permission. Unlike regular accounts, Slim accounts don't have the OWNER permission by default. A Slim account uses up to 54% less RAM than a regular account.

API Changes

  • API Changes
    New actions: eosio:: newslimacc

Documentation Additions

  • Documentation Additions
    Documentation can be found here

Note

There are a couple of unresolved issues:

  • State History Issue: When creating an account, the permissions returned do not match the expected permissions in state history unit-test.

@quocle108 quocle108 mentioned this pull request Mar 20, 2024
5 tasks
@quocle108 quocle108 self-assigned this Mar 21, 2024
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.

1 participant