OffchainLabs / arbitrum-classic

Powers fast, private, decentralized applications
https://offchainlabs.com/
Apache License 2.0
1.98k stars 1.39k forks source link

Something wrong with eth_trace and amount of gas used #2598

Closed unordered-set closed 1 year ago

unordered-set commented 1 year ago

This is a transaction of interest: https://arbiscan.io/tx/0x640d0052b19bbc5c1c478e7f33ecb3e15c0152453ea604efd8b99f78537583d2

$ cast t --rpc-url https://endpoints.omniatech.io/v1/arbitrum/one/public 0x640d0052b19bbc5c1c478e7f33ecb3e15c0152453ea604efd8b99f78537583d2

...
gas                  450000
...

Same in explorer. But transaction failed for no reason.

But when you show it in trace: https://arbiscan.io/vmtrace?txhash=0x640d0052b19bbc5c1c478e7f33ecb3e15c0152453ea604efd8b99f78537583d2 - gas countdown starts with 24433. trace_2 also shows same

tsahee commented 1 year ago

Hello!

Gas in the transaction is used to pay for both L1 and L2 fees. See: https://developer.arbitrum.io/arbos/gas In arbiscan (or the receipt) you can see Gas Used for L1, which is in this case 403923 Intrinsic gas is calculated like ethereum, in this case: 21644

Trace begins with correct gas value: 450000 - 403923 - 21644 = 24433