Skip to content

Add support for the Filecoin.EthSendRawTransactionUntrusted#6524

Merged
sudo-shashank merged 16 commits intomainfrom
shashank/EthSendRawTransactionUntrusted
Feb 11, 2026
Merged

Add support for the Filecoin.EthSendRawTransactionUntrusted#6524
sudo-shashank merged 16 commits intomainfrom
shashank/EthSendRawTransactionUntrusted

Conversation

@sudo-shashank
Copy link
Contributor

@sudo-shashank sudo-shashank commented Feb 4, 2026

Summary of changes

Changes introduced in this pull request:

  • Impl Filecoin.EthSendRawTransactionUntrusted V1 & V2.
  • Fixed Filecoin.MpoolPushUntrusted: Use mpool push_untrusted instead of push method.

Reference issue to close (if applicable)

Closes #6305

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

  • New Features

    • Added Filecoin.EthSendRawTransactionUntrusted RPC (API v2) to submit raw Ethereum transactions via an untrusted path.
    • Message pool now supports distinct trusted vs untrusted message handling with public endpoints to submit untrusted messages.
  • Chores

    • Added changelog entry and updated API snapshots/tests to include the new untrusted RPC.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds an untrusted message path: new Filecoin.EthSendRawTransactionUntrusted RPC (v2) that routes to mpool.push_untrusted, threads an untrusted: bool flag through message-pool add flows, updates mpool push APIs, and updates changelog and API snapshot.

Changes

Cohort / File(s) Summary
Changelog
CHANGELOG.md
Added unreleased entry for Filecoin.EthSendRawTransactionUntrusted.
Message pool core
src/message_pool/msgpool/msg_pool.rs, src/message_pool/msgpool/mod.rs
Introduced push_internal(msg, untrusted), push, push_untrusted; added untrusted: bool parameter to add_tipset/add_helper and propagated through helpers and tests.
RPC: eth & mpool
src/rpc/methods/eth.rs, src/rpc/methods/mpool.rs
Added EthSendRawTransactionUntrusted RPC (v2) that parses raw tx and calls mpool.push_untrusted; updated MpoolPushUntrusted::handle to call push_untrusted directly.
RPC registry
src/rpc/mod.rs
Registered EthSendRawTransactionUntrusted in the RPC method list.
API snapshot
src/tool/subcommands/api_cmd/test_snapshots_ignored.txt
Added Filecoin.EthSendRawTransactionUntrusted to ignored API snapshots.

Sequence Diagram(s)

sequenceDiagram
  participant Client as Client
  participant RPC as RPC v2 (eth)
  participant MPool as MPool
  participant MsgPool as MessagePool
  participant MsgSet as MsgSet

  Client->>RPC: EthSendRawTransactionUntrusted(rawTx)
  RPC->>MPool: build SignedMessage, call mpool.push_untrusted(smsg)
  MPool->>MsgPool: push_untrusted(smsg)
  MsgPool->>MsgPool: push_internal(smsg, untrusted=true)
  MsgPool->>MsgSet: add_tipset/add_helper(..., untrusted=true)
  MsgSet->>MsgSet: add_untrusted validation & publish path
  MsgSet-->>MsgPool: return Cid/result
  MsgPool-->>MPool: propagate result
  MPool-->>RPC: return Cid / EthHash
  RPC-->>Client: RPC response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • LesnyRumcajs
  • akaladarshi
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes additional out-of-scope changes: infrastructure refactoring of message pool untrusted handling and a fix to MpoolPushUntrusted not directly required for the stated objective. Consider separating infrastructure changes (message pool refactoring) and MpoolPushUntrusted fix into separate PRs to keep changes focused on implementing EthSendRawTransactionUntrusted.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding support for a new RPC method.
Linked Issues check ✅ Passed The PR implements Filecoin.EthSendRawTransactionUntrusted for RPC v2 as required by issue #6305, with supporting infrastructure changes to message pool untrusted handling.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch shashank/EthSendRawTransactionUntrusted

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

@sudo-shashank sudo-shashank added the RPC requires calibnet RPC checks to run on CI label Feb 4, 2026
@sudo-shashank sudo-shashank marked this pull request as ready for review February 5, 2026 09:38
@sudo-shashank sudo-shashank requested a review from a team as a code owner February 5, 2026 09:38
@sudo-shashank sudo-shashank requested review from LesnyRumcajs and hanabi1224 and removed request for a team February 5, 2026 09:38
Copy link
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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@CHANGELOG.md`:
- Line 52: Replace the PR link entry in CHANGELOG.md that currently reads
"[`#6524`](https://github.com/ChainSafe/forest/pull/6524): Implemented
`Filecoin.EthSendRawTransactionUntrusted` for API v2." with an issue-based entry
referencing issue `#6305` using the changelog convention:
"[`#6305`](https://github.com/ChainSafe/forest/issues/6305): Implemented
`Filecoin.EthSendRawTransactionUntrusted` for API v2." — i.e., swap the
pull-request URL/number for the issue URL/number and keep the same description.
🧹 Nitpick comments (1)
src/message_pool/msgpool/msg_pool.rs (1)

218-246: LGTM with minor nit.

The refactoring to introduce push_internal with an untrusted flag and expose push and push_untrusted as public wrappers is clean and correctly routes messages through the appropriate trust paths.

Minor grammar nit on line 238: "an trusted" should be "a trusted".

,

📝 Suggested fix for the doc comment
-    /// Push a signed message to the `MessagePool` from an trusted source.
+    /// Push a signed message to the `MessagePool` from a trusted source.

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 69.09091% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.35%. Comparing base (7e6ce47) to head (6a8e180).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/rpc/methods/eth.rs 0.00% 9 Missing ⚠️
src/message_pool/msgpool/msg_pool.rs 86.11% 4 Missing and 1 partial ⚠️
src/rpc/methods/mpool.rs 0.00% 2 Missing ⚠️
src/message_pool/msgpool/mod.rs 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/rpc/mod.rs 88.37% <ø> (ø)
src/message_pool/msgpool/mod.rs 91.86% <87.50%> (+0.51%) ⬆️
src/rpc/methods/mpool.rs 4.65% <0.00%> (-0.04%) ⬇️
src/message_pool/msgpool/msg_pool.rs 78.93% <86.11%> (+0.81%) ⬆️
src/rpc/methods/eth.rs 69.66% <0.00%> (-0.24%) ⬇️

... 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 7e6ce47...6a8e180. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sudo-shashank sudo-shashank marked this pull request as draft February 6, 2026 05:42
@sudo-shashank sudo-shashank marked this pull request as ready for review February 9, 2026 12:24
Copy link
Contributor

@hanabi1224 hanabi1224 left a comment

Choose a reason for hiding this comment

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

Please move the changelog entry to the new unreleased section

@sudo-shashank sudo-shashank added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit 1ca70e0 Feb 11, 2026
44 of 45 checks passed
@sudo-shashank sudo-shashank deleted the shashank/EthSendRawTransactionUntrusted branch February 11, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RPC requires calibnet RPC checks to run on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RPC v2] Filecoin.EthSendRawTransactionUntrusted

2 participants