Skip to content

fix(minibf): Add mainnet genesis block - #867

Merged
scarmuega merged 1 commit into
mainfrom
fix/add-mainnet-genesis-block
Feb 5, 2026
Merged

fix(minibf): Add mainnet genesis block#867
scarmuega merged 1 commit into
mainfrom
fix/add-mainnet-genesis-block

Conversation

@gonzalezzfelipe

@gonzalezzfelipe gonzalezzfelipe commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • New Features
    • Mainnet network support is now fully available with complete genesis configuration and blockchain initialization, enabling users to interact with the mainnet alongside existing preprod and preview networks.

@coderabbitai

coderabbitai Bot commented Feb 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request adds mainnet support to genesis block handling in the minibf crate by introducing a new constant for mainnet genesis hash and implementing a dedicated function to construct mainnet genesis blocks, extending existing domain-based genesis resolution logic.

Changes

Cohort / File(s) Summary
Mainnet Genesis Support
crates/minibf/src/hacks.rs
Added GENESIS_HASH_MAINNET constant; extended genesis_hash_for_domain to include mainnet network magic mapping; extended genesis_block_for_domain to delegate mainnet requests to new genesis_block_mainnet function; implemented genesis_block_mainnet to construct BlockContent with Byron/Shelley utxos, fixed timestamp, mainnet genesis hash, and next block reference.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • scarmuega

Poem

🐰 Mainnet joins the genesis fold,
With hash constants, bold and bright!
Preprod and preview now have kin,
Byron and Shelley dance in light,
The blockchain's story starts just right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding mainnet genesis block functionality to the minibf crate, which aligns with all modifications to hacks.rs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/add-mainnet-genesis-block

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@scarmuega
scarmuega merged commit ff6692f into main Feb 5, 2026
8 of 9 checks passed
@scarmuega
scarmuega deleted the fix/add-mainnet-genesis-block branch February 5, 2026 21:32
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