Skip to content

Prove and surface why capability receipts lose the L1 fee - #932

Closed
DylanTinianov wants to merge 1 commit into
mainfrom
cre-settings-delivery-proof
Closed

DylanTinianov wants to merge 1 commit into
mainfrom
cre-settings-delivery-proof

Conversation

@DylanTinianov

Copy link
Copy Markdown
Contributor

What

  1. A test proving the root cause of the EVM capability metering gas without the L1 data fee: the loop wire's Receipt message has no l1_fee field, so ConvertReceiptToProto/ConvertReceiptFromProto cannot carry it across the loop boundary — the capability's copy of the receipt always carries a nil L1 fee, whatever the RPC returned and whatever the settings flag says. TestReceiptL1FeeDoesNotSurviveTheLoopWire pins the drop and the resulting fee (gasUsed × effectiveGasPrice, short by exactly the L1 fee).
  2. TestL1FeeFlagFollowsHostSettings / TestL1FeeFlagWithoutWorkflowTenant: the settings side works — a pushed FeatureEVMWriteReportL1FeeActivePeriod override reaches the capability's range limiter (built before settings arrive, in production order) and resolves; without a resolvable override it stays on the compiled-in default.
  3. libs/loopserver now logs an error when the host passes no CRESettings broadcaster — the silent case where every setting stays at its compiled-in default.

The fix this points at

Add l1_fee to the EVM Receipt message in chainlink-protos, regenerate chainlink-common's bindings, and map it in the loop conversions. The capability side already reads txReceipt.L1Fee once the field survives the wire; the module bump here aligns the evm module with the current common.

🤖 Generated with Claude Code

The loop wire's Receipt message has no l1_fee field, so the round trip
through ConvertReceiptToProto/FromProto drops it: the capability's copy
of the receipt always carries a nil L1 fee, whatever the RPC returned
and whatever the settings flag says. The test pins the drop and the
resulting fee: gasUsed × effectiveGasPrice, short by exactly the L1 fee
the customer paid.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

👋 DylanTinianov, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

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.

1 participant