Skip to content

feat: remove fip-0115 feature flag#6948

Merged
LesnyRumcajs merged 1 commit intomainfrom
revert-fip0115-feature-flag
Apr 21, 2026
Merged

feat: remove fip-0115 feature flag#6948
LesnyRumcajs merged 1 commit intomainfrom
revert-fip0115-feature-flag

Conversation

@LesnyRumcajs
Copy link
Copy Markdown
Member

@LesnyRumcajs LesnyRumcajs commented Apr 21, 2026

Summary of changes

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

  • 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

  • Chores

    • Updated devnet infrastructure with latest Lotus release
    • Removed FOREST_FEES_FIP0115HEIGHT environment variable; FIP-0115 now automatically activates at FireHorse network upgrade
  • Documentation

    • Updated changelog to reflect FIP-0115 automatic activation behavior

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Walkthrough

This PR removes environment-variable-controlled FIP-0115 (FireHorse) activation logic and replaces it with configuration-based network upgrade height. The compute_base_fee function signature is updated to accept a firehorse_height parameter, and all call sites are updated to supply this height from chain configuration. Docker image and Lotus source commit pins are also updated.

Changes

Cohort / File(s) Summary
Configuration & Deployment
CHANGELOG.md, scripts/devnet/.env, scripts/devnet/lotus.dockerfile
Documentation updated to reflect removal of FOREST_FEES_FIP0115HEIGHT env variable; Lotus devnet image and source commit pins bumped to newer versions.
Base Fee Computation Core
src/chain/store/base_fee.rs
Removed env-driven FIP0115_HEIGHT toggle and static; added firehorse_height parameter to compute_base_fee function; refactored branching logic to select between utilization-based (pre-FireHorse) and premium-based (post-FireHorse) fee computation based on epoch comparison.
Call Sites
src/chain_sync/tipset_syncer.rs, src/message_pool/msgpool/provider.rs, src/rpc/methods/miner.rs
Updated all calls to compute_base_fee to pass both smoke_height and firehorse_height parameters sourced from chain configuration instead of env variables.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • chore: replace placeholder name for NV28 with FireHorse #6942: Introduces Height::FireHorse variant and updates network height mappings, providing the underlying network configuration infrastructure that this PR's code changes consume.
  • chore: nv28 skeleton #6706: Adds NV28 skeleton with new upgrade height and wiring into ChainConfig, establishing the configuration layer that sources the firehorse_height values used in this PR's updated call sites.
  • feat: impl basefee change from FIP-0115 #6702: Directly parallels this PR's modifications to compute_base_fee signature and call-site updates across tipset_syncer, msgpool provider, and miner, suggesting closely coordinated changes.

Suggested reviewers

  • sudo-shashank
  • akaladarshi
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main objective: removing the fip-0115 feature flag, which is reflected across all modified files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-fip0115-feature-flag
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch revert-fip0115-feature-flag

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

@LesnyRumcajs LesnyRumcajs force-pushed the revert-fip0115-feature-flag branch 2 times, most recently from b91315c to c6747dc Compare April 21, 2026 07:56
@LesnyRumcajs LesnyRumcajs force-pushed the revert-fip0115-feature-flag branch from c6747dc to 3fb1877 Compare April 21, 2026 07:58
@LesnyRumcajs LesnyRumcajs marked this pull request as ready for review April 21, 2026 07:59
@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner April 21, 2026 07:59
@LesnyRumcajs LesnyRumcajs requested review from akaladarshi and hanabi1224 and removed request for a team April 21, 2026 07:59
@LesnyRumcajs LesnyRumcajs enabled auto-merge April 21, 2026 07:59
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 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_height so 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 uses ts.epoch() >= next_upgrade_height intentionally and matches the Lotus reference implementation in chain/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

📥 Commits

Reviewing files that changed from the base of the PR and between 462e824 and 3fb1877.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • scripts/devnet/.env
  • scripts/devnet/lotus.dockerfile
  • src/chain/store/base_fee.rs
  • src/chain_sync/tipset_syncer.rs
  • src/message_pool/msgpool/provider.rs
  • src/rpc/methods/miner.rs

@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Apr 21, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 59.09091% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.93%. Comparing base (462e824) to head (3fb1877).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/rpc/methods/miner.rs 0.00% 5 Missing ⚠️
src/chain_sync/tipset_syncer.rs 66.66% 2 Missing and 1 partial ⚠️
src/chain/store/base_fee.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/message_pool/msgpool/provider.rs 57.14% <100.00%> (+2.97%) ⬆️
src/chain/store/base_fee.rs 86.19% <83.33%> (ø)
src/chain_sync/tipset_syncer.rs 63.19% <66.66%> (+0.60%) ⬆️
src/rpc/methods/miner.rs 7.53% <0.00%> (-0.16%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 462e824...3fb1877. 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.

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 21, 2026
@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit 3577446 Apr 21, 2026
73 of 74 checks passed
@LesnyRumcajs LesnyRumcajs deleted the revert-fip0115-feature-flag branch April 21, 2026 09:28
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