NethermindEth / juno

Starknet client implementation.
https://juno.nethermind.io
Apache License 2.0
400 stars 170 forks source link

Juno traces - revert reason #2143

Closed rianhughes closed 2 weeks ago

rianhughes commented 1 month ago

The revert reason that traces return can be different than those present in the receipt (although quite similar).

{
    "jsonrpc": "2.0",
    "method": "starknet_traceTransaction",
    "params": {
        "transaction_hash": "0x4da177346e3714431c4f44589aa86529675cddf6c5c684121ed31581ff1874b"
    },
    "id": 1
}

The revert reason contains (see the \n\n2: Error in a library call (contract address: 0x02ee099d4e8f46d556f7e355145e5041951c4487df5ba2e796dd3899256e0835, part of the message):

\nError message: Invalid chain id

Which isn't present in the receipt


{
    "jsonrpc":"2.0",
    "method":"starknet_getTransactionReceipt",
    "params" : {"transaction_hash":"0x4da177346e3714431c4f44589aa86529675cddf6c5c684121ed31581ff1874b"},
    "id":1
}

This breaks re-execution (since the revert reason is needed compute the receipt commitment). It also doesn't seem to be present in Pathfinders response (although I may be running pathfinder with blockifier-rc2)

rianhughes commented 1 month ago

Likely culprit:

blockifier rc 2

vs

blockifier rc 3

Transaction 0x4da177346e3714431c4f44589aa86529675cddf6c5c684121ed31581ff1874b was in a 0.13.2 block, but seems to be executed with blockifier-rc2.

rianhughes commented 2 weeks ago

Closed. This issue is fixed in the shadow sequencer stream of work