Skip to content

Fix expose-multi-gas when using a live tracer#4383

Merged
eljobe merged 1 commit intomasterfrom
gligneul/nit-4339
Feb 13, 2026
Merged

Fix expose-multi-gas when using a live tracer#4383
eljobe merged 1 commit intomasterfrom
gligneul/nit-4339

Conversation

@gligneul
Copy link
Contributor

@gligneul gligneul commented Feb 13, 2026

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.

  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

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
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.77%. Comparing base (e15a401) to head (7f6d359).
⚠️ Report is 9 commits behind head on master.

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     

Copy link
Contributor

@bragaigor bragaigor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eljobe eljobe enabled auto-merge February 13, 2026 19:16
@eljobe eljobe added this pull request to the merge queue Feb 13, 2026
@github-actions
Copy link
Contributor

❌ 7 Tests Failed:

Tests completed Failed Passed Skipped
4195 7 4188 0
View the top 3 failed tests by shortest run time
TestEndToEnd_TwoEvilValidators
Stack Traces | -0.000s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
created by github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast in goroutine 66752
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:106 +0x10a

goroutine 2138127 [select]:
github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast.func1()
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:107 +0xd9
created by github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast in goroutine 66755
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:106 +0x10a

goroutine 2137977 [select]:
github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast.func1()
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:107 +0xd9
created by github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast in goroutine 66749
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:106 +0x10a

goroutine 2137166 [select]:
github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast.func1()
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:107 +0xd9
created by github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast in goroutine 66755
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:106 +0x10a
TestEndToEnd_TwoEvilValidators/honest_essential_edges_confirmed_by_challenge_win
Stack Traces | -0.000s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
created by github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast in goroutine 66752
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:106 +0x10a

goroutine 2138127 [select]:
github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast.func1()
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:107 +0xd9
created by github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast in goroutine 66755
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:106 +0x10a

goroutine 2137977 [select]:
github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast.func1()
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:107 +0xd9
created by github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast in goroutine 66749
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:106 +0x10a

goroutine 2137166 [select]:
github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast.func1()
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:107 +0xd9
created by github.com/offchainlabs/nitro/bold/containers/events.(*Producer[...]).Broadcast in goroutine 66755
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:106 +0x10a
TestDataStreaming_PositiveScenario/Many_senders,_long_messages
Stack Traces | 0.060s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        github.com/offchainlabs/nitro/daprovider/data_streaming.testBasic.func1()
        	/home/runner/work/nitro/nitro/daprovider/data_streaming/protocol_test.go:230 +0x19b
        created by github.com/offchainlabs/nitro/daprovider/data_streaming.testBasic in goroutine 157
        	/home/runner/work/nitro/nitro/daprovider/data_streaming/protocol_test.go:223 +0x85
        
    protocol_test.go:230: �[31;1m [] too much time has elapsed since request was signed �[0;0m
WARN [02-13|18:03:15.035] Served datastreaming_start               conn=127.0.0.1:52744 reqid=4 duration=41.743644ms err="too much time has elapsed since request was signed"
INFO [02-13|18:03:15.043] rpc response                             method=datastreaming_start logId=4  err="too much time has elapsed since request was signed" result={} attempt=0 args="[\"0x698f6762\", \"0x2a\", \"0xd9\", \"0x2392\", \"0xa\", \"0x34959c2940b97fa56344f58eca3b9e4e69751518d3689f336aeb2b5e73584a72117d0daca6dfac62515bed714cf43aa2d6df649dd8fec86203367393adfcf34901\"]" errorData=null
    protocol_test.go:230: goroutine 263 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x161f990, 0xc000326fc0}, {0x16061e0, 0xc000ed3080}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x9f
        github.com/offchainlabs/nitro/daprovider/data_streaming.testBasic.func1()
        	/home/runner/work/nitro/nitro/daprovider/data_streaming/protocol_test.go:230 +0x19b
        created by github.com/offchainlabs/nitro/daprovider/data_streaming.testBasic in goroutine 157
        	/home/runner/work/nitro/nitro/daprovider/data_streaming/protocol_test.go:223 +0x85
        
    protocol_test.go:230: �[31;1m [] too much time has elapsed since request was signed �[0;0m
--- FAIL: TestDataStreaming_PositiveScenario/Many_senders,_long_messages (0.06s)

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

Merged via the queue into master with commit c2493c1 Feb 13, 2026
27 of 28 checks passed
@eljobe eljobe deleted the gligneul/nit-4339 branch February 13, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants