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

Update docs for custom trees #294

Closed
rootulp opened this issue Feb 3, 2024 · 1 comment
Closed

Update docs for custom trees #294

rootulp opened this issue Feb 3, 2024 · 1 comment
Assignees

Comments

@rootulp
Copy link
Collaborator

rootulp commented Feb 3, 2024

Context

#287

Problem

  1. The Go docs for ComputeExtendedDataSquare and ImportExtendedDataSquare don't say anything about the requirements of treeName. I think they should be updated to state that treeName must be registered prior to use.
  2. The Go doc for RegisterTree is misleading because RegisterTree can be called by downstream dependencies at any time. There is no hard requirement that RegisterTree must be invoked in an init() function.

rsmt2d/tree.go

Lines 28 to 29 in 5a03c15

// RegisterTree must be called in the init function
func RegisterTree(treeName string, treeConstructor TreeConstructorFn) error {

Proposal

Update the Go docs. Ideally before the v0.12.0 release.

@rootulp rootulp self-assigned this Feb 3, 2024
@rootulp
Copy link
Collaborator Author

rootulp commented Feb 3, 2024

We don't need to do this if we revert the changes. See #295

@rootulp rootulp closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant