2

I have setup a private test network with geth 1.5.7 and am trying to create a new contract from my node.js app via sendRawTransaction(). I see the transaction created and txpool shows it as queued, but it never moves to pending list and silently disappears off of the queued list after a few blocks are processed. The same contract can be created just fine when I create it via the contract.new RPC approach.

I am pretty sure I am creating and signing the raw transaction correctly - in fact I believe it even worked a few times for one account but not another. Any ideas on how to debug this further? Thanks

3

Obvious things to look at would be:

  • Check that you are setting the nonce correctly. If it works for a new account that has never sent a transaction but fails for an account that has already transacted, the nonce is probably the culprit.
  • Check the gas price and maximum gas are the same as when you successfully send the transaction.

As for debugging, you should be able to get Geth to dump the transaction that you see briefly in its mempool, so try comparing that to the kind of transaction that goes through successfully.

  • I believe my nonce, gasLimit and gasPrice are set correctly. The transactions are identical other than the transaction digital signature. Any other ideas? – Chris Hafey Feb 1 '17 at 3:09
  • OK it actually was a nonce issue. Turns out you need to start at 0, not 1. Thanks! – Chris Hafey Feb 1 '17 at 3:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.