Skip to content

TrieNodeIter seeks hashed cursor to the key that we just advanced to #15329

@shekhirin

Description

@shekhirin

Describe the feature

KeyVisit { visit_type: KeyVisitType::Next, visited_key: Some(account_15) },
// We should not seek to account 15, we're already at it.
KeyVisit {
visit_type: KeyVisitType::SeekNonExact(account_15),
visited_key: Some(account_15)
},

Relevant logs:

2025-03-27T12:14:09.484319Z TRACE trie::walker_metrics: Sought the trie table key=Nibbles(0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002) entry=Some((Nibbles(0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002), BranchNodeCompact { state_mask: TrieMask(0000000000000111), tree_mask: TrieMask(0000000000000000), hash_mask: TrieMask(0000000000000010), hashes: [0xd029498d69e20c4121be9f9e08e361e04400c7c067090b8c988e778da2fe7d02], root_hash: None })) exact=false
...
2025-03-27T12:14:09.485857Z TRACE trie::node_iter: seeking to the next hashed entry seek_from=0x0000000000000000000000000000000000000000000000000000000000000212 seek_to=Some(0x0000000000000000000000000000000000000000000000000000000000000220)
// No need to seek, because we just advanced to that key
2025-03-27T12:14:09.485865Z TRACE trie::node_iter: seeking to the next unprocessed hashed entry seek_key=0x0000000000000000000000000000000000000000000000000000000000000220 can_skip_current_node=false

Additional context

No response

Metadata

Metadata

Assignees

Labels

A-trieRelated to Merkle Patricia Trie implementationC-bugAn unexpected or incorrect behaviorC-perfA change motivated by improving speed, memory usage or disk footprint

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions