Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider EDS helper Roots #249

Closed
rootulp opened this issue Jul 12, 2023 · 3 comments · Fixed by #270
Closed

Consider EDS helper Roots #249

rootulp opened this issue Jul 12, 2023 · 3 comments · Fixed by #270
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rootulp
Copy link
Collaborator

rootulp commented Jul 12, 2023

Context

https://github.com/celestiaorg/celestia-node/pull/2458/files#diff-c33387bdad1a81ed3928f505eadee22744b6fca98b897cacbcb918402843a4cbR246

Proposal

Consider adding a Roots() helper to EDS. Something like:

// Roots returns a byte slice with this eds's RowRoots and ColRoots
// concatenated.
func (eds *ExtendedDataSquare) Roots() (roots [][]byte, err error) {
	rowRoots, err := eds.RowRoots()
	if err != nil {
		return nil, err
	}
	colRoots, err := eds.ColRoots()
	if err != nil {
		return nil, err
	}

	roots = make([][]byte, 0, len(rowRoots)+len(colRoots))
	roots = append(roots, rowRoots...)
	roots = append(roots, colRoots...)
	return roots, nil
}
@bao1029p
Copy link
Contributor

Hi guys, can we work on this ?

@rootulp
Copy link
Collaborator Author

rootulp commented Oct 31, 2023

Sure go for it 👍

@bao1029p
Copy link
Contributor

@rootulp hey i created a PR can you give approval for the CI to run

rootulp added a commit that referenced this issue Oct 31, 2023
<!--
Please read and fill out this form before submitting your PR.

Please make sure you have reviewed our contributors guide before
submitting your
first PR.
-->

## Overview

close [#249](#249)

## Changes

 Add helper function and unit test for new function

---------

Co-authored-by: Rootul Patel <rootulp@gmail.com>
0xchainlover pushed a commit to celestia-org/rsmt2d that referenced this issue Aug 1, 2024
<!--
Please read and fill out this form before submitting your PR.

Please make sure you have reviewed our contributors guide before
submitting your
first PR.
-->

## Overview

close [#249](celestiaorg/rsmt2d#249)

## Changes

 Add helper function and unit test for new function

---------

Co-authored-by: Rootul Patel <rootulp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants