-
Notifications
You must be signed in to change notification settings - Fork 349
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: add benchmarks and share commitment test #1726
Conversation
Co-authored-by: Rootul P <[email protected]>
Co-authored-by: Rootul P <[email protected]>
Co-authored-by: Rootul P <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1726 +/- ##
==========================================
- Coverage 52.05% 51.95% -0.11%
==========================================
Files 93 93
Lines 6049 6065 +16
==========================================
+ Hits 3149 3151 +2
- Misses 2576 2586 +10
- Partials 324 328 +4
|
pkg/square/square_test.go
Outdated
dah := da.NewDataAvailabilityHeader(eds) | ||
decoder := encoding.MakeConfig(app.ModuleEncodingRegisters...).TxConfig.TxDecoder() | ||
|
||
for pfbIndex := 0; pfbIndex < 10; pfbIndex++ { |
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.
[nit] it may help to extract 10
to a variable in this function so that the test doesn't break if line 370 is modified without a corresponding update on this line and the line below
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.
weird that github is showing the total diff before #1690
beyond the typical confict stuff I think this LGTM! its difficult to be certain because of the whole diff issues, but only TestSquareShareCommitments
and the new benchmark are added here, correct?
pkg/square/square_test.go
Outdated
} | ||
|
||
func TestSquareShareCommitments(t *testing.T) { | ||
txs := generateOrderedTxs(10, 10, 5) |
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.
in the past, we've found edge case bugs in the share splitting process by running this same test over every square, effectively fuzzing it. Since this property is critical to celestia functioning as intended, I think it would be valuable to expand on the inputs to this test either here or in the future. I'm also happy to take this on, as not all follow ups to #1690 have to be handled immediatly or in this PR
9831bdc
to
a2ecb34
Compare
Ok I think I've fixed the merge conflicts here. It is annoying that it can't resolve the diff properly. I think that might be because I made changes to the dependent branch before merging it to main so it doesn't see the common commit |
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.
thanks for following up on this!
Closes: #1717