-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
chore(data-review): miscellaneous questions about current data #17
Comments
This was referenced Jun 14, 2023
Hey @mds1, Tuckson here, from OffchainLabs. I'll try to clarify your points about Arbitrum:
Hope that helps. Feel free to tag me for further questions, or open an issue in our repo. |
This is great, thanks so much @TucksonDev! |
Closing this issue as part of the move to automated data collection in #62 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mainnet
deprecated: true
? They are strictly worse than type 2 transactions because type 2 transactions provide a refund, so here it seems we should consider them deprecated.Optimism
deprecated: true
? (Though, arguably type 0 is better for users since it has less calldata—expand the block below for more info on the cost difference)Type 0 vs Type 2 cost analysis
Type 0 results in a bit less calldata to post on L1 since there's one less gas param and no prefix byte, so it should be cheaper. The refund for a type 2 transaction is priced in L2 gas, and the reduced calldata is priced in L1 gas which is ~10,000x more expensive. Therefore the reduced calldata of a type 0 tx should always outweigh the L2 refund, and maybe on L2 type 0 transactions are preferred? Perhaps something about the transaction serialization or compression makes this not true.
getL1Fee
of the optimism gas oracle.tx0 = utils.serializeTransaction({to: constants.AddressZero, gasPrice: 1, gasLimit: 21000, chainId: 10, type: 0}) = 0xdf800182520894000000000000000000000000000000000000000080800a8080
tx2 = utils.serializeTransaction({to: constants.AddressZero, maxPriorityFeePerGas: 1, maxFeePerGas: 1, gasLimit: 21000, chainId: 10, type: 2}) = 0x02df0a8001018252089400000000000000000000000000000000000000008080c0
31753508714978
for tx0 and34678476442615
for tx2, which meas tx 2 has an L1 fee that's2.924967727637e-6 ETH
more expensiveCOINBASE
opcode is undefined (sounds like that means it'd cause a revert), but by callinggetCurrentBlockCoinbase
(block.coinbase
) on the Multicall3 contract it seems the actual value returned is0x4200000000000000000000000000000000000011
(the sequencer fee vault)Arbitrum
0x67
(103) that was removed calledArbitrumWrappedTxType
. This is worth documenting asdeprecated: true
. I searched their issues/PRs/codebase for that name and number but didn't find itblock.number
in Solidity) will return a value close to (but not necessarily exactly) the L1 block number at which the Sequencer received the transaction." — are there any guarantees on the bounds of the returned number? Can it be greater than the most recent L1 block number? Is there a maximum bound on how much lower it is? In general this description is vague, how is the estimated block number derived?COINBASE
opcode returns zero, but by callinggetCurrentBlockCoinbase
(block.coinbase
) on the Multicall3 contract it seems the actual value returned is0xA4b000000000000000000073657175656e636572
.DIFFICULTY
(PREVRANDAO
) opcode returns 2500000000000000, but by callinggetCurrentBlockDifficulty
(block.difficulty
) on the Multicall3 contract it seems the actual value returned is 1The text was updated successfully, but these errors were encountered: