Issue with EVM Base Fee Calculation in Sei #2120
Replies: 1 comment
-
I've created an Issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m trying to integrate Sei’s EVM base fee calculation into my project and have extracted the function from this code.
For most blocks, my implementation gives the expected result, but for some, I see a discrepancy of -1, and for others, the difference is much larger. I’m using the mainnet parameters retrieved from
seid
.Could someone provide an example of how the calculation should be done step by step, or help me verify if I’m using the correct parameters?
Here are some example blocks where I noticed a larger difference in calculations:
Here are all of the results ~600 blocks: results.txt
And here is the script:
maxGas=10000000
used insdkContext
Updated to"max_gas": "10000000",
from https://rpc.pacific-1.sei.io/consensus_params[Using parameters]
maxGas: 50000000
priorityNormalizer: 1.0
baseFeePerGas: 0.0
maxDynamicBaseFeeUpwardAdjustment: 0.0075
maxDynamicBaseFeeDownwardAdjustment: 0.0039
minimumFeePerGas: 1000000000.0
deliverTxHookWasmGasLimit: 300000
targetGasUsedPerBlock: 850000
maximumFeePerGas: 1000000000000.0
Block | Parent Base Fee | Calculated Fee | Actual Fee | Diff (Wei) | Parent Gas Limit | Diff (%) | Gas Price
140797306 | 1000000000 | 1000000000 | 1000000000 | 0 | 10000000 | 0.0000000000% | 1100000000
140797307 | 1000000000 | 1000000000 | 1000000000 | 0 | 10000000 | 0.0000000000% | 1100000000
140797308 | 1000000000 | 1000000000 | 1000000000 | 0 | 10000000 | 0.0000000000% | 1100000000
140797309 | 1000000000 | 1000008428 | 1000000000 | 8428 | 10000000 | 0.0008428000% | 1100036488
140797310 | 1000000000 | 1000000000 | 1000000000 | 0 | 10000000 | 0.0000000000% | 1100000000
140797311 | 1000000000 | 1000000000 | 1000000000 | 0 | 10000000 | 0.0000000000% | 1100000000
140797312 | 1000000000 | 1000000000 | 1000000000 | 0 | 10000000 | 0.0000000000% | 1100000000
140797313 | 1000000000 | 1000000000 | 1000000000 | 0 | 10000000 | 0.0000000000% | 1100000000
Beta Was this translation helpful? Give feedback.
All reactions