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

Each account storage has indirection which requires extra read, register (8 bytes), and node (96 bytes) #2867

Closed
fxamacker opened this issue Oct 12, 2023 · 2 comments

Comments

@fxamacker
Copy link
Member

fxamacker commented Oct 12, 2023

Issue to be solved

Each account storage (e.g. "private", "public", "storage") has 8-byte register which is used to construct a new register path that leads to actual StorageMap.

This indirection requires an extra read, extra register (8 bytes), and mtrie node (96 bytes) for every account storage.

Suggested Solution

We can directly store the StorageMap for each account storage and remove the extra 8-byte register and 96-byte node for each account storage.

Although this solution does not require migration, it would be cleaner to do it in migration.

@fxamacker fxamacker changed the title Each account storage has indirection which requires extra read and extra register Each account storage has indirection which requires extra read, register (8 bytes), and node (96 bytes) Oct 13, 2023
@fxamacker
Copy link
Member Author

More info based on devnet51 root checkpoint and migrated mainnet data on Sep. 2, 2024:

  • 20,290,032 domain registers on devnet
  • 150,086,959 domain registers on mainnet

@fxamacker
Copy link
Member Author

Closed by newer issue #3584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant