Skip to content

Conversation

@GarmashAlex
Copy link
Contributor

Previously, TrieInput built from blocks ignored prefix_sets entirely and extend_with_blocks always appended cached refs. This contradicted the docs and caused incomplete traversal when computing state root from nodes. Now, if a block has no trie updates, we extend prefix_sets from its state (append_ref); otherwise we only append cached nodes/state (append_cached_ref). The same logic is applied to from_blocks_sorted. This aligns behavior with the documented contract and ensures correct walker coverage during state root and proof generation.

@mediocregopher
Copy link
Collaborator

Hi @GarmashAlex , you are correct that the docstring from extend_with_blocks is no longer accurate, I've submitted a fix for it here.

In general we do not want to make this change, as an empty trie_updates is not the same as a missing one. If you want to add separate methods which deal with missing trie updates I would be open to that.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants