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

Implement chunk nodes cache for TrieRecordingStorage #6316

Closed
Longarithm opened this issue Feb 17, 2022 · 5 comments
Closed

Implement chunk nodes cache for TrieRecordingStorage #6316

Longarithm opened this issue Feb 17, 2022 · 5 comments
Assignees
Labels
A-stateless-validation Area: stateless validation A-storage Area: storage and databases T-core Team: issues relevant to the core team

Comments

@Longarithm
Copy link
Member

Longarithm commented Feb 17, 2022

When we enable challenges, fn apply will need to work with both TrieCachingStorage and TrieRecordingStorage, so we need to maintain correct nodes accounting in both of them.

IMO it's a good idea to postpone it because the current architecture around TrieStorage is not optimal, but it is also easy to forget about.

@Longarithm Longarithm added the T-core Team: issues relevant to the core team label Feb 17, 2022
@Longarithm Longarithm self-assigned this Feb 17, 2022
@bowenwang1996 bowenwang1996 added the A-storage Area: storage and databases label Feb 21, 2022
@stale
Copy link

stale bot commented May 23, 2022

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label May 23, 2022
@akhi3030 akhi3030 removed the S-stale label Jul 8, 2022
@robin-near
Copy link
Contributor

@Longarithm Could you elaborate on what you mean by:

the current architecture around TrieStorage is not optimal, but it is also easy to forget about.

For context, I need to implement this now to enable storage proof for stateless validation. Thanks!

@Longarithm
Copy link
Member Author

The issue was that TrieRecordingStorage::get_trie_nodes_count is not implemented.

Recently I made a change which allows calling TrieRecordingStorage::storage.get_trie_nodes_count() and I think it will just work correctly.

@Longarithm
Copy link
Member Author

Longarithm commented Jul 18, 2023

I think #8997 (part about removing as_caching_storage, etc.) and #9004 cover what I was unhappy about.

@Longarithm
Copy link
Member Author

Done in #9350 in other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stateless-validation Area: stateless validation A-storage Area: storage and databases T-core Team: issues relevant to the core team
Projects
None yet
Development

No branches or pull requests

5 participants