-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
op-reth: Incorrect and missing fields in eth_getTransactionReceipt #6547
Comments
Looks like a typo This should fix the issue with the missing l1Fee and l1GasUsed fields --- a/crates/rpc/rpc/src/eth/api/transactions.rs
+++ b/crates/rpc/rpc/src/eth/api/transactions.rs
@@ -1115,7 +1115,7 @@ where
let mut envelope_buf = bytes::BytesMut::new();
tx.encode_enveloped(&mut envelope_buf);
- let (l1_fee, l1_data_gas) = if tx.is_deposit() {
+ let (l1_fee, l1_data_gas) = if !tx.is_deposit() {
let inner_l1_fee = l1_block_info
.l1_tx_data_fee(
&self.inner.provider.chain_spec(), |
l1FeeScalar is convertedd to Float in op-geth feeScalar := big.NewFloat(float64(scalar.Uint64() / 1e6)) in op-reth it's U256. That's why 684_000 / 1_000_000 = 0 op_fields.l1_fee_scalar = Some(l1_block_info.l1_base_fee_scalar.div(U256::from(1_000_000))); |
nice finds, ty! do you want to submit the fixes? |
yes, i'll do it! |
Hmm to fix the feeScalar issue, the best way IMO involves changing the OptimismTransactionReceiptFields struct, which is in the alloy-rpc-types crate. - pub l1_fee_scalar: Option<U256>,
+ pub l1_fee_scalar: Option<f64>, Should I also create a PR there ? |
yeah looks like this is a stringified float we need to change the so please open a PR there |
I was thinking of fixing the bug about the missing "depositReceiptVersion" field in #6575, but you guys are super fast 🙂 I'll open new PR for it. |
Describe the bug
When calling eth_getTransactionReceipt against a non deposit transaction, l1Fee, l1GasUsed fields are missing and l1FeeScalar is always 0
When calling eth_getTransactionReceipt against a deposit transaction, depositReceiptVersion field is missing
Steps to reproduce
Node logs
No response
Platform(s)
Linux (x86)
What version/commit are you on?
0.1.0-alpha.17
What database version are you on?
Current database version: 1
Local database version: 1
What type of node are you running?
Archive (default)
What prune config do you use, if any?
No response
If you've built Reth from source, provide the full command you used
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: