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

Make trie_nodes_recorded_for_key work for inline values #194

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Jun 2, 2023

trie_nodes_recorded_for_key was not working properly for inline values. It would always return RecordedForKey::None while we actually have accessed and recorded all the trie nodes for the value. The pr introduces TrieAccess::InlineValue to communicate this access to the recorder properly to make it then return RecordedForKey::Value.

`trie_nodes_recorded_for_key` was not working properly for inline values. It would always return `RecordedForKey::None`
while we actually have accessed and recorded all the trie nodes for the value. The pr introduces
`TrieAccess::InlineValue` to communicate this access to the recorder properly to make it then return
`RecordedForKey::Value`.
@bkchr bkchr requested a review from cheme June 2, 2023 18:36
trie-db/src/lookup.rs Show resolved Hide resolved
trie-db/src/lookup.rs Show resolved Hide resolved
@arkpar
Copy link
Member

arkpar commented Aug 13, 2023

@bkchr Is this still relevant? Why do we need to record inline nodes in the first place?

@bkchr
Copy link
Member Author

bkchr commented Sep 11, 2023

@bkchr Is this still relevane? Why do we need to record inline nodes in the first place?

This is just about telling the recorder that we have seen the value. This is required when we use the cache, to be able to fetch the value from the cache. When the recorder and cache are enabled, we only fetch a value from the cache if we have recorded all the trie nodes up to this value. To be able to know if we have recorded all the trie nodes, we need to tell the recorder, also for the inline values.

@bkchr bkchr requested a review from cheme September 11, 2023 21:50
@arkpar arkpar merged commit 61c21a5 into master Sep 12, 2023
4 checks passed
@arkpar arkpar deleted the bkchr-fix-recorded-for-keys branch September 12, 2023 07:54
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