Uh oh!
There was an error while loading. Please reload this page.
feat: remove fip-0115 feature flag - #6948
Conversation
WalkthroughThis PR removes environment-variable-controlled FIP-0115 (FireHorse) activation logic and replaces it with configuration-based network upgrade height. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
b91315c to
c6747dcComparec6747dc to
3fb1877CompareThere was a problem hiding this comment.
🧹 Nitpick comments (1)
src/chain/store/base_fee.rs (1)
219-221: Cover the post-FireHorse branch in this regression test.This assertion still only exercises the utilization path. Please add a second case with
epoch >= firehorse_heightso the premium-based path is also protected against bad-input panics.➕ Suggested test extension
#[test] fn compute_base_fee_shouldnt_panic_on_bad_input() { let blockstore = MemoryDB::default(); - let h0 = CachingBlockHeader::new(RawBlockHeader {- miner_address: Address::new_id(0),- ..Default::default()- });- let ts = Tipset::from(h0);+ let make_tipset = |epoch| {+ Tipset::from(CachingBlockHeader::new(RawBlockHeader {+ miner_address: Address::new_id(0),+ epoch,+ ..Default::default()+ }))+ }; let smoke_height = ChainConfig::default().epoch(Height::Smoke); let firehorse_height = ChainConfig::default().epoch(Height::FireHorse); - assert!(compute_base_fee(&blockstore, &ts, smoke_height, firehorse_height).is_err());+ assert!(+ compute_base_fee(+ &blockstore,+ &make_tipset(firehorse_height - 1),+ smoke_height,+ firehorse_height,+ )+ .is_err()+ );+ assert!(+ compute_base_fee(+ &blockstore,+ &make_tipset(firehorse_height),+ smoke_height,+ firehorse_height,+ )+ .is_err()+ ); }Based on learnings: In
src/chain/store/base_fee.rs, the FIP-0115 activation condition usests.epoch() >= next_upgrade_heightintentionally and matches the Lotus reference implementation inchain/store/basefee.go.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/chain/store/base_fee.rs` around lines 219 - 221, Add a second assertion in the test that calls compute_base_fee with an epoch at or beyond the FireHorse upgrade so the premium-based branch is exercised: create a timestamp/TipSet `ts` whose epoch is >= `firehorse_height` (use `ChainConfig::default().epoch(Height::FireHorse)` or increment it), then call `compute_base_fee(&blockstore, &ts, smoke_height, firehorse_height)` and assert it returns Err (or handles bad input without panicking). Ensure you reference the same `blockstore`, `ts`, `smoke_height`, `firehorse_height` variables and the `compute_base_fee` function to add this second case.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/chain/store/base_fee.rs`:
- Around line 219-221: Add a second assertion in the test that calls
compute_base_fee with an epoch at or beyond the FireHorse upgrade so the
premium-based branch is exercised: create a timestamp/TipSet `ts` whose epoch is
>= `firehorse_height` (use `ChainConfig::default().epoch(Height::FireHorse)` or
increment it), then call `compute_base_fee(&blockstore, &ts, smoke_height,
firehorse_height)` and assert it returns Err (or handles bad input without
panicking). Ensure you reference the same `blockstore`, `ts`, `smoke_height`,
`firehorse_height` variables and the `compute_base_fee` function to add this
second case.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d9e22f25-b578-4632-902a-e05c9a7cad1b
📒 Files selected for processing (7)
CHANGELOG.mdscripts/devnet/.envscripts/devnet/lotus.dockerfilesrc/chain/store/base_fee.rssrc/chain_sync/tipset_syncer.rssrc/message_pool/msgpool/provider.rssrc/rpc/methods/miner.rs
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary of changes
Changes introduced in this pull request:
fip0115feature flag, see https://github.com/filecoin-project/lotus/pull/13581/changesReference issue to close (if applicable)
Closes
Other information and links
Change checklist
Outside contributions
Summary by CodeRabbit
Chores
FOREST_FEES_FIP0115HEIGHTenvironment variable; FIP-0115 now automatically activates at FireHorse network upgradeDocumentation