lambdaclass / lambdaclass/libssz

Improve `hash_tree_root` implementation devX

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
10
Forks
4
PR merge metrics
No merged PRs in 30d

Description

From the examples, the hash_tree_root function is implemented as multiple calls to merkleize and pack. We should simplify the way this is done, maybe using an interface similar to Encoder/Decoder.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the examples that show hash_tree_root calling merkleize and pack. Then inspect the existing hash_tree_root implementation and the Encoder/Decoder interfaces to determine whether a shared interface can simplify those calls. Done means the implementation is simpler while preserving the behavior demonstrated by the examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.