celestiaorg / celestiaorg/rsmt2d

api: cache imported roots for EDS

Open
#84 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
169
Forks
87
Avg merge
8h 9m
Merged PRs (30d)
7

Description

Currently, the EDS has a stateless design, meaning that each operation(repairing) with it recomputes and verifies the integrity of the data according to the given roots. Instead, we can cache the roots during import and stick to those during the whole lifespan of an EDS instance. This is especially useful for users who try to repair the same EDS multiple times over the same roots.

Proposed Changes:
* Remove roots params from `Repair` and cache them on EDS
* Don't reset roots in `setCell` together with #83. Resetting was initially introduced to prevent users from breaking eds when using public `setCell`(which was actually never made). However, #83 proposes another solution for proper encapsulation(setting only nil cell) which makes resetting obsolete.

Contributor guide

Open the contributing guide

Research direction

Start by tracing EDS import and the Repair entry point, then inspect setCell alongside the encapsulation change proposed in #83. Done means imported roots remain available across repairs for an EDS instance, Repair no longer receives roots, and setCell no longer resets them.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.