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

Consider saving complete StateChanges to disk #8632

Open
Longarithm opened this issue Feb 23, 2023 · 1 comment
Open

Consider saving complete StateChanges to disk #8632

Longarithm opened this issue Feb 23, 2023 · 1 comment
Labels
A-storage Area: storage and databases C-housekeeping Category: Refactoring, cleanups, code quality

Comments

@Longarithm
Copy link
Member

This is some annoying issue we had for a long time. We don't save complete StateChanges on disk, instead we filter certain trie key types because of #2563:

match &change_with_trie_key.trie_key {
                TrieKey::Account { .. }
                | TrieKey::ContractCode { .. }
                | TrieKey::AccessKey { .. }
                | TrieKey::ContractData { .. } => {}
                _ => continue,
            };

But it makes more sense to filter by NON_DELAYED_RECEIPT_COLUMNS instead. I don't think that extra columns would occupy too much disk space. We could even consider adding delayed receipt columns for completeness.

Current logic complicates our code in certain cases. What is more, other people make reasonable assumptions that StateChanges are complete and then their experiments with storage crash because some trie node is missing.

@Longarithm Longarithm added C-housekeeping Category: Refactoring, cleanups, code quality T-storage labels Feb 23, 2023
@Longarithm
Copy link
Member Author

Relevant workaround #8628

@walnut-the-cat walnut-the-cat added A-storage Area: storage and databases and removed T-storage labels Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-storage Area: storage and databases C-housekeeping Category: Refactoring, cleanups, code quality
Projects
None yet
Development

No branches or pull requests

2 participants