Conversation
|
@MSilb7 given our recent discussions about this, is this PR still relevant? |
|
cc @MSilb7 @sebastianst should we still consider this PR? |
|
|
||
| Conceptually what the above function captures is the formula below, where `compressedTxSize = | ||
| (zeroes*4 + ones*16) / 16` can be thought of as a rough approximation of how many bytes the | ||
| (zeroes*4 + ones*16 + 68*16) / 16` can be thought of as a rough approximation of how many bytes the |
There was a problem hiding this comment.
where did 68 come from? seems like magic number
There was a problem hiding this comment.
I think that's an estimate of the overhead data of a tx, mostly coming from its signature?
There was a problem hiding this comment.
In some places the 68 is hardcoded, to estimate cost before signing. But after the tx has been signed and encoded there's no need to add the 68. So it completely depends on context whether or not it's a necessary addition.
it has been merged to impl, so it seems we must https://github.com/ethereum-optimism/optimism/blob/6d9d43cb6f2721c9638be9fe11d261c0602beb54/packages/contracts-bedrock/src/L2/GasPriceOracle.sol#L236-L250 |
Add buffer in
compressed tx sizefor extra data, per: https://github.com/ethereum-optimism/optimism/blob/dad21c03834a3164ae7fbba2850dfd29b5e4dea7/packages/contracts-bedrock/src/L2/GasPriceOracle.sol#L159cc @K-Ho