Skip to content

Conversation

@erwin-wee
Copy link
Collaborator

@erwin-wee erwin-wee commented Nov 4, 2025

Description

  • Added logic to handle start-block and end-block passed in from command line args, and to use first available block as start block and latest block as end block if not specified in command line args.

Issues Resolved

  • Running Solana profile would encounter an error if --use-latest-blocks is not used, due to start and end block not being set properly.

Summary by CodeRabbit

  • New Features
    • Added support for explicitly specifying block ranges in Solana test data generation.
    • Block ranges now automatically fall back to computed values when not explicitly provided.
    • Improved safeguards ensure block ranges remain within available bounds.

@erwin-wee erwin-wee self-assigned this Nov 4, 2025
@erwin-wee erwin-wee added the bug Something isn't working label Nov 4, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 4, 2025

Walkthrough

Added explicit handling of start_block and end_block parameters in Solana test data generation. When provided, these values override computed defaults; otherwise, the earliest available and latest block numbers are used. Existing safeguards and behavior with use_latest_blocks flag are preserved.

Changes

Cohort / File(s) Summary
Solana test data block range configuration
chainbench/test_data/solana.py
Added conditional logic to accept explicit start_block and end_block parameters from parsed options, falling back to computed block numbers when not provided

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single file modification with additive conditional logic
  • Block range parameter handling follows a consistent if-else pattern
  • Safeguards and existing behavior are preserved unchanged

Poem

🐰 A rabbit hops through blocks so fine,
Start and end now yours to define!
No more defaults set in stone,
Your test ranges, fully your own!
Solana's chains, now under your reign. ✨

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main bug fix: handling the Solana profile when --use-latest-blocks flag is not used, which aligns with the file changes and PR objectives.
Description check ✅ Passed The pull request description follows the required template with both Description and Issues Resolved sections clearly filled out.
✨ 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/solana-test-data-error

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.

@erwin-wee erwin-wee merged commit 7199be1 into main Nov 5, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants