i am trying to get the transaction trace (similar to the one found as Geth trace_2 on etherscan) and to do so i try to use the debug_traceTransaction but each time with any transaction hash i am trying i get the error :

{"code":-32000,"message":"transaction <hash> failed: nonce too high: address <address>, tx: 11489 state: 0"}

the hash and address are related to other transactions in the same block as my transaction. I know that debug_traceTransaction tries to replay the same transactions that happened before my transaction (only from the smae block, i presume) but getting nonce too high here seems to be counterintuitive since the nonce on any adddress only goes up.

how can i use debug_traceTransaction without triggiring this kind of errors.

  • you should set nonce to the amount of transactions that already have been sent with the account, it is the consecutive number of now many transactions you are sending
    – Nulik
    Jul 3 at 22:25
  • i am not launching those transactions, i am trying to get the debug of my transaction and the other txs are just in the same block Jul 4 at 10:16
  • well it is obvious that you are debugging your own transaction, but apparently you don't understand that you are setting a wrong Nonce on it
    – Nulik
    Jul 5 at 3:49
  • @Nulik i am not setting nonce at all. and the transaction in the error is not my transaction and the same for the address. the error transaction happens to be in the same block as my own transaction. i am a bit confused here really. Jul 5 at 9:15
  • this is not true. debug.traceTransaction() does not replay transactions of others, only your transaction is replayed. you can check this in eth/tracers/api.go line number 717 : msg, vmctx, statedb, err := api.backend.StateAtTransaction(ctx, block, int(index), reexec) , it fetches intermediate Root from transaction that was executed just before yours
    – Nulik
    Jul 5 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.