Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle Isthmus operator fee params #14243

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

leruaa
Copy link
Contributor

@leruaa leruaa commented Feb 5, 2025

For Isthmus we added 2 new fields in the L1Block: operatorFeeScalar and operatorFeeConstant.

This PR handle them.

Currently build fails because L1BlockInfo from op-alloy-rpc-types doesn't have these 2 fields. So I think we need to switch to maili with this.

Comment on lines 88 to 91
/// The current operator fee scalar.
pub operator_fee_scalar: Option<u128>,
/// The current operator fee constant.
pub operator_fee_constant: Option<u128>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

will those be added to the rpc receipt?

of not we can ignore those here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes they are added

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mattsse
Copy link
Collaborator

mattsse commented Feb 5, 2025

Currently build fails because L1BlockInfo from op-alloy-rpc-types

unclear here,

because this file uses the revm l1blockinfo type

use revm::{
primitives::{Bytecode, HashMap, SpecId},
DatabaseCommit, L1BlockInfo,
};

@mattsse mattsse added the A-op-reth Related to Optimism and op-reth label Feb 5, 2025
@leruaa
Copy link
Contributor Author

leruaa commented Feb 5, 2025

@mattsse the place where L1BlockInfo from op-alloy-rpc-types is used is here:

use op_alloy_rpc_types::{L1BlockInfo, OpTransactionReceipt, OpTransactionReceiptFields};

crates/optimism/evm/src/l1.rs Outdated Show resolved Hide resolved
Comment on lines 88 to 91
/// The current operator fee scalar.
pub operator_fee_scalar: Option<u128>,
/// The current operator fee constant.
pub operator_fee_constant: Option<u128>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

@leruaa
Copy link
Contributor Author

leruaa commented Feb 6, 2025

@mattsse I was thinking the same, but the PR doing that has been closed with this comment:

Replaced by op-rs/maili#10

So I guess we need to move away from op-alloy-rpc-types to maili? Happy to work on it if so.

cc @refcell

@mattsse
Copy link
Collaborator

mattsse commented Feb 6, 2025

So I guess we need to move away from op-alloy-rpc-types to maili?

no we need these additional fields on the rpc type if these should be included in the rpc receipt response:

https://github.com/alloy-rs/op-alloy/blob/d5e41e51d96857635eff251aea69156a32809c92/crates/rpc-types/src/receipt.rs#L141-L143

we don't need any maili here

@leruaa leruaa force-pushed the handle-operator-fee-params branch from a3de220 to 702afcf Compare February 6, 2025 10:11
@leruaa leruaa marked this pull request as ready for review February 6, 2025 10:26
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm,

we can do the rpc fields separately

}
})?;

let mut l1block = L1BlockInfo::default();
Copy link
Collaborator

Choose a reason for hiding this comment

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

btw would

L1BlockInfo {
l1_base_fee,...
..Default::default()
}

also work here,
this type is a bit strange because it has a single private field for some reason -.-

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My best bet would be a mistake during a conflict resolution

@mattsse mattsse added this pull request to the merge queue Feb 6, 2025
Merged via the queue into paradigmxyz:main with commit 97ad6df Feb 6, 2025
44 checks passed
github-merge-queue bot pushed a commit to alloy-rs/op-alloy that referenced this pull request Feb 6, 2025
<!--
Thank you for your Pull Request. Please provide a description above and
review
the requirements below.

Bug fixes and new features should include tests.

Contributors guide:
https://github.com/alloy-rs/core/blob/main/CONTRIBUTING.md

The contributors guide includes instructions for running rustfmt and
building the
documentation.
-->

<!-- ** Please select "Allow edits from maintainers" in the PR Options
** -->

## Motivation

We need to show operator fee new params in RPC receipts.

Close #419
Ref paradigmxyz/reth#14243

<!--
Explain the context and why you're making that change. What is the
problem
you're trying to solve? In some cases there is not a problem and this
can be
thought of as being the motivation for your change.
-->

## Solution

<!--
Summarize the solution and provide any necessary context needed to
understand
the code change.
-->

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants