Skip to content

Conversation

turuslan
Copy link

@turuslan turuslan commented Oct 2, 2025

- partial prefix for attached value was not appended
- support for child trie root prefix
Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide some test for these changes.

- decode compact proof to prefixed db, trie read failed
@turuslan turuslan requested a review from bkchr October 2, 2025 16:44
) {
// Reconstruct the partial DB from the compact encoding.
let mut db = MemoryDB::<L>::default();
let mut db = PrefixedMemoryDB::<L>::default();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can not just change an existing test if you introduce new code. We for sure want to ensure that both still work.

Also you don't use your newly introduced function.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made new function decode_compact_from_iter_with_prefix to avoid breaking interface (new root_prefix arg).
Old decode_compact_from_iter just calls decode_compact_from_iter_with_prefix with empty prefix.

This test with PrefixedMemoryDB panics on master, so this branch fixes existing functionality.

- test both MemoryDB and PrefixedMemoryDB
@turuslan turuslan requested a review from bkchr October 3, 2025 05:59
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.

2 participants