-
Notifications
You must be signed in to change notification settings - Fork 29
chore(rollup): add e2e and unit tests for sparse pub randomness #592
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
chore(rollup): add e2e and unit tests for sparse pub randomness #592
Conversation
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.
Pull Request Overview
This PR adds comprehensive unit tests for the sparse public randomness functionality in the rollup randomness committer. The tests verify the ShouldCommit function's decision logic across various scenarios including first commits, coverage validation, gap handling, and edge cases.
- Adds 493 lines of test code covering 35+ test scenarios for the
RollupRandomnessCommitter.ShouldCommitfunction - Updates the CHANGELOG.md to document this testing enhancement
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| finality-provider/service/rollup_rand_committer_test.go | New comprehensive test suite for rollup randomness committer covering first commits, coverage scenarios, gap handling, and various edge cases |
| CHANGELOG.md | Adds entry for the new unit tests and reformats existing entries for better readability |
|
|
||
| // QueryFirstPubRandCommit returns the first public randomness commitment | ||
| // It is fetched from the state of a CosmWasm contract OP finality gadget. | ||
| func (cc *RollupBSNController) QueryFirstPubRandCommit(ctx context.Context, fpPk *btcec.PublicKey) (*RollupPubRandCommit, error) { |
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.
bugbot run
🚨 Bugbot Trial ExpiredYour Bugbot trial has expired. Please purchase a license in the Cursor dashboard to continue using Bugbot. |
SebastianElvis
left a comment
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.
This is super tight unit test 👍
No description provided.