-
Notifications
You must be signed in to change notification settings - Fork 80
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
test: extends computeRoots benchmark to cover larger square sizes and nmt tree #304
Conversation
Results obtained are as follows, for a 512MB block size (ODS) the computeRoots takes roughly 1 seconds.
|
Hmm, this benchmark uses the default tree, while profiles on the issue are based on NMT |
I updated the tree to
Up to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The benchmark in the PR comments LGTM. Left a few comments about readability.
datasquare_test.go
Outdated
i*i*shareSize/(1024*1024), | ||
2*i*2*i*shareSize/(1024*1024)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm kind of lost in the math here. Would it help readability to extract variables with names for these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added more vars and clarifying comments in 9b26deb
// calculate the data root. It creates that tree using the | ||
// erasuredNamespacedMerkleTree. | ||
func newConstructor(squareSize uint64, opts ...nmt.Option) TreeConstructorFn { | ||
func newErasuredNamespacedMerkleTreeConstructor(squareSize uint64, opts ...nmt.Option) TreeConstructorFn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit unrelated to this PR, but do we have the wrapper in both places, here and in app? https://github.com/celestiaorg/celestia-app/tree/main/pkg/wrapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! Yes, we have, I did it in the past (inside the nmtwrapper_test
file) to conduct some tests in the rsmt2d side without making circular dependency to the app.
PS: There is also an open issue #248 about moving the wrapper completely to the rsmt2d repo.
Closes #303