Open mds1 opened 11 months ago
This would be so, so helpful.
There are several configuration parameters in Sablier that depend on (i) the block gas limit and (ii) the EVM execution costs.
We are currently relying on several heuristics to estimate the proper config values for L2s, one of which is to assume that the block gas limit is lower than what it actually is.
The 21,000 intrinsic gas cost
Any thoughts on referring to this as the Minimum Transaction Gas?
Sharing some relevant documentation sites:
And some relevant findings:
Related:
More references from the Sablier code base:
Notes:
eth_estimateGas
calls for common, simple transactions and compare the resulting gas costs. I suspect most chains support state overrides so we should be able to use those to inform the results.bun fetch-data
is run. We will need to add handling for this expected difference to avoid the hourly CI checks from constantly reporting diffs.From #4:
1559 data is tracked as part of https://github.com/mds1/evm-diff/issues/31, unsure yet if its feasible to detect parameter values automatically.
While I suspect that 1559 parameters are hard to detect automatically, it would be relatively easy to check that some given parameters are correct, right? We can fetch the last n blocks ans assert that the sequence of basefees behave as expected.
That's true. I plan to refactor things a bit so each chain has an input file, and 1559 parameters could be an input. But then the question becomes: What to report when the check fails? These parameters are not always well documented, so manually finding and updating them might be hard.
Actually, maybe the 1559 params can be backed out by looking at the last n blocks by rearranging the equation used to compute the next basefee? Some chains like arbitrum and polygon PoS behave a differently though, so we might need to use the chain input files to describe their deviations
When I was writing about gas diffs on evm I was thinking about models - how gas is calculated and passed into transactions.
There are currently two models:
Additionally some of the L2s uses two dimension gas prices
At Redstone we are currently maintaining list of fee models per evm network (not all, but many). You can find it here: https://github.com/redstone-finance/redstone-oracles-monorepo/blob/4bcf002f7fd907e596b2bb1fe327710dfdd3bd6e/packages/rpc-providers/src/chains-configs/index.ts#L42 (there is already PR which will convert it to json format)
Two variables that should be interesting are:
However, there are many edge cases like arbitrum is supporting eip1559 but the priority fee, in reality, is constant 0.1gwei. Nevertheless, displaying in the table would be super helpful for projects integrating them. We will be for sure mainating our list so you can use info from there.
Love your work!
Data to include
There's a lot here, so consider splitting this into multiple PRs for simplicity. There also might be some duplicate data from #35 so consider how to reuse the data
Between #35, #37, and the existing opcode data, I think this PR will add little new data and simply reformat existing data