Fix expose-multi-gas when using a live tracer#4383
Merged
Conversation
When using --execution.expose-multi-gas and --execution.vmtrace, Nitro
wouldn't generate the used multi-gas in the transaction receipts. This
PR fixes this problem.
Since these is a small conflict between two experimental features,
I don't think it is worth adding a system test.
I manually tested this using the dev node, by running the commands in
the following section.
1. Start-up Nitro node with expose multi-gas and a live tracer.
go run ./cmd/nitro --dev --http.addr 0.0.0.0 --http.api=net,web3,eth,debug \
--execution.expose-multi-gas \
--execution.vmtrace.tracer-name=supply \
--execution.vmtrace.json-config='{"path": "/tmp/supply-traces", "maxSize": 50}'
2. Set variables and send a dummy transaction.
export RPC=http://localhost:8547
export KEY=0xb6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659
export ADDR=0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E
export TX=$(cast send -r $RPC --private-key $KEY --value 1 $ADDR | grep transactionHash | cut -f2 -w)
3. Get the transaction receipt.
curl $RPC -X POST -H "Content-Type: application/json" --data \
'{"method":"eth_getTransactionReceipt","params":["'$TX'"],"id":1,"jsonrpc":"2.0"}' | jq
4. Check the receipt has the following field.
"result": {
...
"multiGasUsed": {
"unknown": "0x0",
"computation": "0x5208",
"historyGrowth": "0x0",
"storageAccess": "0x0",
"storageGrowth": "0x0",
"l1Calldata": "0xdcb40",
"l2Calldata": "0x0",
"wasmComputation": "0x0",
"refund": "0x0",
"total": "0xe1d48"
},
Close NIT-4339
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4383 +/- ##
==========================================
- Coverage 32.98% 32.77% -0.21%
==========================================
Files 489 489
Lines 58019 58064 +45
==========================================
- Hits 19137 19032 -105
- Misses 35542 35691 +149
- Partials 3340 3341 +1 |
eljobe
approved these changes
Feb 13, 2026
Contributor
❌ 7 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using --execution.expose-multi-gas and --execution.vmtrace, Nitro wouldn't generate the used multi-gas in the transaction receipts. This PR fixes this problem.
Since this is a small conflict between two experimental features, I don't think it is worth adding a system test.
I manually tested this using the dev node, by running the commands in the following section.
Start-up Nitro node with expose multi-gas and a live tracer.
go run ./cmd/nitro --dev --http.addr 0.0.0.0 --http.api=net,web3,eth,debug
--execution.expose-multi-gas
--execution.vmtrace.tracer-name=supply
--execution.vmtrace.json-config='{"path": "/tmp/supply-traces", "maxSize": 50}'
Set variables and send a dummy transaction.
export RPC=http://localhost:8547
export KEY=0xb6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659
export ADDR=0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E
export TX=$(cast send -r $RPC --private-key $KEY --value 1 $ADDR | grep transactionHash | cut -f2 -w)
Get the transaction receipt.
curl $RPC -X POST -H "Content-Type: application/json" --data
'{"method":"eth_getTransactionReceipt","params":["'$TX'"],"id":1,"jsonrpc":"2.0"}' | jq
Check the receipt has the following field.
"result": {
...
"multiGasUsed": {
"unknown": "0x0",
"computation": "0x5208",
"historyGrowth": "0x0",
"storageAccess": "0x0",
"storageGrowth": "0x0",
"l1Calldata": "0xdcb40",
"l2Calldata": "0x0",
"wasmComputation": "0x0",
"refund": "0x0",
"total": "0xe1d48"
},
Close NIT-4339