doc: explain const FINALITY_CHAIN_EXTRA_EPOCHS#6867
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
... and 21 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughAdded inline documentation in ChainGetTipSetFinalityStatus::get_ec_finality_threshold_depth_and_tipset introducing Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/rpc/methods/chain.rs`:
- Around line 1199-1209: Update the doc comment for FINALITY_CHAIN_EXTRA_EPOCHS
to remove the incorrect claim that find_threshold_depth probes up to
chain_finality and instead state that the chain sample is built with
chain_finality + FINALITY_CHAIN_EXTRA_EPOCHS to provide a buffer for null
rounds, while the actual bisect probe depth is capped by BISECT_HIGH (450
epochs); reference find_threshold_depth, FINALITY_CHAIN_EXTRA_EPOCHS,
BISECT_HIGH and chain_finality in the revised text so readers understand the
sample sizing vs. the bisect probe limit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 17ac952e-cd03-4470-83e6-e0e381fa2a33
📒 Files selected for processing (1)
src/rpc/methods/chain.rs
Co-authored-by: Hubert <hubert@chainsafe.io>
Summary of changes
Adds doc on
FINALITY_CHAIN_EXTRA_EPOCHSwith help from Claude Code.(The original code has limited comment explaining this constant: https://github.com/filecoin-project/lotus/blob/master/chain/ecfinality/cache.go#L51)
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes #6866
Other information and links
Change checklist
Outside contributions
Summary by CodeRabbit