这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@gusin13
Copy link
Contributor

@gusin13 gusin13 commented Aug 6, 2025

No description provided.

@gusin13 gusin13 linked an issue Aug 6, 2025 that may be closed by this pull request
@gusin13 gusin13 marked this pull request as ready for review August 6, 2025 20:09
Copilot AI review requested due to automatic review settings August 6, 2025 20:09
Copy link
Contributor

Copilot AI left a 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.ShouldCommit function
  • 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

@gusin13 gusin13 changed the title chore(rollup): add unit tests for sparse pub randomness chore(rollup): add e2e and unit tests for sparse pub randomness Aug 6, 2025

// 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) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bugbot run

@cursor
Copy link

cursor bot commented Aug 6, 2025

🚨 Bugbot Trial Expired

Your Bugbot trial has expired. Please purchase a license in the Cursor dashboard to continue using Bugbot.

Copy link
Member

@SebastianElvis SebastianElvis left a 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 👍

@SebastianElvis SebastianElvis merged commit 7be544d into main Aug 7, 2025
18 checks passed
@SebastianElvis SebastianElvis deleted the 591-rollup-add-more-e2e-to-cover-edge-cases-for-sparse-pub-rand-generation branch August 7, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rollup: add more e2e to cover edge cases for sparse pub rand generation

3 participants