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

Return DecodedMultiProof from multiproof threads #14312

Open
Tracked by #11169
Rjected opened this issue Feb 7, 2025 · 0 comments
Open
Tracked by #11169

Return DecodedMultiProof from multiproof threads #14312

Rjected opened this issue Feb 7, 2025 · 0 comments
Assignees
Labels
A-trie Related to Merkle Patricia Trie implementation C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint

Comments

@Rjected
Copy link
Member

Rjected commented Feb 7, 2025

Right now we return a MultiProof from multiproof threads:

multiproof: proof,

This contains ProofNodes which then needs to be decoded in reveal_multiproof. This can take up to 8-10% of time in the critical path.

Image

This 8.6% is this line:

let node = TrieNode::decode(&mut &bytes[..])?;

Instead, we should do this before returning a multiproof response. This involves creating a new struct DecodedProofNodes, creating Decoded versions of proof structs, and using them in the sparse trie instead of the non-decoded versions we have right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trie Related to Merkle Patricia Trie implementation C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
Status: Todo
Development

No branches or pull requests

1 participant