Skip to content

Generalized Merkle Proof (GMP) Meta Tracking Issue #15598

@fernantho

Description

@fernantho

Note

This issue aims at providing a concrete task lists for Generalized Merkle Proof generation inSSZ-QL in Prysm. This meta issue replaces the prior (Merkle Proofs of everything#15344)
This document follows the structure of the Github issue for the previous EPF project (Light Client Support #12991).

Note

The development done in this issue heavily depends on the SSZ-QL.

Must have

Implement hash tree root recursive computation

  • Implement func hash_tree_root(info *sszquery.Info, data []bytes) which for a given sszInfo object/instance and a marshaled bytes slice computes its hash tree root as per SSZ spec Merkleization:
    • Entry point + dispatcher: HashTreeRootFromBytes + hashTreeRootFromBytes (switch on info.Type()).
    • create a computeHashTreeRoot{Type}(info *sszquery.Info, data[]bytes) where {Type} are the different data types.
  • Integrate parallel chunk-hasher optimizations such as parallelize hasing for validator entries in beacon state. SSZ-QL MUST be as efficient as it is already.
  • Benchmark recursive hash_tree_root against existing ones.

Merkle Proofs

  • Generalized Indices (GI) of interest:
    • computeGeneralizedIndices(leaves...) compute the GI of the requested fields.
    • computePathAndHelperIndices(...) based on the leaves GI, compute the path and helper/sibling indices.
  • Adapt the recursive hash_tree_root computation to feed the fastssz multiproof type MerkleProof struct:
  • verifyMerkleProofs(...) function that checks if a given Multiproof verifies against a given root
  • Benchmarking.

Nice to have

  • Efficiency improvements. Research state of the art efficient hashing libraries and apply optimizations to GMP.
  • Coverage tests for Merkle proofs in the upcoming ProgressiveLists.
  • Visualization tool.

Fixes

TBD

Cosmetic

TBD

Other

References

Specification

Write-ups

TBD

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions