Skip to content

Return DecodedMultiProof from multiproof threads #14312

Open
@Rjected

Description

@Rjected

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.

Metadata

Metadata

Assignees

Labels

A-trieRelated to Merkle Patricia Trie implementationC-enhancementNew feature or requestC-perfA change motivated by improving speed, memory usage or disk footprint

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions