celestiaorg / celestiaorg/nmt

Use precomputed hashes for certain padding shares as an optimization

Open
#208 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
122
Forks
53
Avg merge
1d 15h
Merged PRs (30d)
5

Description

As a celestia-oriented optimization, the following padding shares with

- TxNamespace
- PFBNamespace
- TailPaddingNamespace

Could have the sha256 precomputed. In the `HashLeaf` method, we could simply identify if it is a padding share and if it has one of those namespaces and use the precomputed hash instead. Furthermore we could extend it to the `HashNode` method in the case that there are 2, 4, 8, 16 etc padding shares in a row.

Contributor guide

Open the contributing guide

Research direction

Locate the HashLeaf and HashNode methods and trace how padding shares and the TxNamespace, PFBNamespace, and TailPaddingNamespace are identified. Determine how the existing hash behavior can cover single padding shares and runs of 2, 4, 8, or 16 shares, then verify that the resulting hashes remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cryptography, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.