Skip to content

verify_compact_trie_proof: avoid per-iteration partial_key allocation #3275

Description

@x3c41a

Follow-up from #3263 (discussion).

compact_proof_compute_merkle in lib/src/trie/proof_decode.rs allocates a Vec<Nibble> per descend iteration via decoded.partial_key.clone().collect(). Avoiding it requires adding a lifetime to CompactFrame so partial_key can borrow from node_bytes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions