You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the function for op-reth, the base_fee_params is not parsing the elasticity/denominator from the extraData, but just fetches from chainspec.
the value from chainspec(genesis file) for devnet would be, elasticity: 6, denominator: 250
the value from extradata is 0x00000000fa0000003c, which is elasticity: 60, denominator: 250
the calculation for the baseFee itself is identical for reth and geth and is as follows: baseFee - ((baseFee * ((gasLimit/elasticity) - gasUsed) / ((gasLimit/elasticity) * denominator)
when the elasticity is 6: the value is 1.0053850352
when the elasticity is 60: the value is 0.909850352
Because op-geth(BigInt) and op-reth(saturating_sub) truncates the division result to a whole number, the value is 1 for elasticity 6, and 0 for elasticity 60.
Thus, the baseFee calculation mismatches the geth version.
I wanted to do some fix for this, but it seemed like the rust crate for eip1559 was separated and is generalized from the details like holocene.
And the chain_spec.base_fee_params_at_timestamp only takes timestamp as a parameter, so it cannot derive the holocene parameterse from extraData.
Please let me know if my understanding of the reth codebase or how the baseFee calculation works is incorrect, or if you need any more detail. :)
I have another reth node running on the same network, but that one didn't err out on this block, but on the later one. I'm not yet sure why the reth nodes would have different results in the same block.
Describe the bug
Hey team, I encountered another issue as I was syncing op-reth on devnet.
"Invalid block error on new payload" invalid_hash=0x95cb046404c2c833b4640791483e2140e98c2604ed80e0f4ef0ac6db3c1c18df invalid_number=12777315 validation_err="block base fee mismatch: got 254, expected 253
op-reth split from the chain because it was seeing different block base fee and was not syncing further. Here's a debugging I did:
base_fee_params
is not parsing the elasticity/denominator from the extraData, but just fetches from chainspec.0x00000000fa0000003c
, which is elasticity: 60, denominator: 250baseFee - ((baseFee * ((gasLimit/elasticity) - gasUsed) / ((gasLimit/elasticity) * denominator)
0xC2F1E6
,((0xfe * ((0x1c9c380/elasticity) - 0xcc0f) / ((0x1c9c380/elasticity) * 250)
1.0053850352
0.909850352
I wanted to do some fix for this, but it seemed like the rust crate for eip1559 was separated and is generalized from the details like holocene.
And the
chain_spec.base_fee_params_at_timestamp
only takes timestamp as a parameter, so it cannot derive the holocene parameterse from extraData.Please let me know if my understanding of the reth codebase or how the baseFee calculation works is incorrect, or if you need any more detail. :)
I have another reth node running on the same network, but that one didn't err out on this block, but on the later one. I'm not yet sure why the reth nodes would have different results in the same block.
Steps to reproduce
Example block data:
where the eip1559 parameters are:
Node logs
Platform(s)
Mac (Intel), Mac (Apple Silicon)
What version/commit are you on?
v1.1.2
What database version are you on?
not known
Which chain / network are you on?
Optimism sepolia devnet: 11155421
What type of node are you running?
Full via --full flag
What prune config do you use, if any?
None
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: