Skip to content

chore(beacon): drand protobuf and drand fake signer - #7747

Open
EclesioMeloJunior wants to merge 2 commits into
mainfrom
fetch-beacon-gossipsub-3-drand-protobuf
Open

EclesioMeloJunior wants to merge 2 commits into
mainfrom
fetch-beacon-gossipsub-3-drand-protobuf

Conversation

@EclesioMeloJunior

@EclesioMeloJunior EclesioMeloJunior commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary of changes

  • Includes the drand gossipsub proto definition
  • Includes the fake drand signer, required for generating valid signatures while testing the gossipsub message handling & validation

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • This pull request is based on an issue that a maintainer has accepted (see Before Opening a Pull Request).
  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Tests
    • Added coverage for decoding and verifying drand beacon entries across multiple rounds, including checks of response payloads. The tests also exercise beacon entry creation and signature validation using a simulated signer, helping confirm that valid entries are accepted across the tested rounds.

@EclesioMeloJunior
EclesioMeloJunior requested a review from a team as a code owner October 13, 2026 18:23
@EclesioMeloJunior
EclesioMeloJunior requested review from akaladarshi and sudo-shashank and removed request for a team October 13, 2026 18:23
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: fefd85aa-ec25-4534-ad2b-7be3f7a5abeb
📥 Commits

Reviewing files that changed from the base of the PR and between 5e0c737 and 67000a8.

📒 Files selected for processing: 5
  • proto/drand_pb.proto
  • src/beacon/mod.rs
  • src/beacon/signatures/mod.rs
  • src/beacon/tests/drand.rs
  • src/beacon/tests/fake_drand_signer.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

💤 Files with no reviewable changes: 1
  • src/beacon/mod.rs
🚧 Files skipped from review as they are similar to previous changes: 1
  • proto/drand_pb.proto

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

The changes add a test-only protobuf response type and a fake drand signer. A test encodes and decodes entries for rounds 1–5, then checks that the beacon verifies them.

Changes

Drand test support

Layer / File(s) Summary
Protobuf response and test wiring
proto/drand_pb.proto, src/beacon/drand_pb.rs, src/beacon/mod.rs, .gitattributes
The protobuf schema and Rust implementation define PublicRandResponse with round and signature fields. The module is compiled for tests, and the generated Rust file is marked as generated.
Fake signer and entry verification
src/beacon/signatures/mod.rs, src/beacon/tests/drand.rs, src/beacon/mod.rs, src/beacon/tests/fake_drand_signer.rs
CSUITE_G1 is visible within crate::beacon. The test-only fake signer configures an unchained Quicknet test chain, signs round messages, encodes and decodes responses, and tests verification for rounds 1–5. Beacon constructors use named Filecoin timing constants.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 67000

This change only adds test support for drand gossipsub validation and does not affect production behavior. It has no actionable merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 30.77% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 5 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the two main changes: adding the drand protobuf and the fake signer.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 30.77% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 5 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.54545% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.42%. Comparing base (3e69fed) to head (a129a48).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/beacon/drand_pb.rs 47.36% 6 Missing and 4 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/beacon/signatures/mod.rs 82.55% <100.00%> (+0.63%) ⬆️
src/beacon/drand_pb.rs 47.36% <47.36%> (ø)

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e69fed...a129a48. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@akaladarshi akaladarshi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@EclesioMeloJunior the PR title is not actually feat it should either test or chore, since changes are not adding any features.

Comment thread src/beacon/tests/fake_drand_signer.rs Outdated
Comment thread src/beacon/tests/fake_drand_signer.rs
Comment thread proto/drand_pb.proto
Comment thread src/beacon/signatures/mod.rs Outdated
Comment thread src/beacon/tests/fake_drand_signer.rs Outdated
Comment thread src/beacon/tests/fake_drand_signer.rs Outdated
Comment thread src/beacon/tests/fake_drand_signer.rs Outdated
Comment thread src/beacon/tests/fake_drand_signer.rs
Comment thread src/beacon/mod.rs Outdated
@EclesioMeloJunior EclesioMeloJunior changed the title feat(beacon): drand protobuf and drand fake signer chore(beacon): drand protobuf and drand fake signer Oct 15, 2026
@akaladarshi
akaladarshi marked this pull request as draft October 16, 2026 10:10
stacked auto-merge was automatically disabled October 16, 2026 10:10

Pull request was converted to draft

@EclesioMeloJunior
EclesioMeloJunior added this pull request to stack #7764 October 16, 2026 11:12
@EclesioMeloJunior
EclesioMeloJunior force-pushed the fetch-beacon-gossipsub-3-drand-protobuf branch from 67000a8 to a129a48 Compare October 16, 2026 12:36
@EclesioMeloJunior
EclesioMeloJunior marked this pull request as ready for review October 16, 2026 12:37

This branch has not been deployed

No deployments
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.

2 participants