0

I've been trying to create an Ethereum Transaction but keep getting the 320000 invalid sender error. From other questions I've seen, this may be caused by errors in signing, sender address or chainID, yet after working with these I still get an error. I'm not supplying any code because I'm not looking for someone to fix my code, but rather wondering if there is any code/documentation I can look at provided by Ethereum for exactly this error. Thanks!

Edit: I have found https://github.com/ethereum/go-ethereum/blob/86e77900c53ebce3309099a39cbca38eb4d62fdf/core/tx_pool.go , does this work?

1

Yeah this is a broad error message and hard to determine what exactly is wrong.

// ErrInvalidSender is returned if the transaction contains an invalid signature.

So, as you stated, this could mean it's improperly formatted, it's not signed properly, or another piece of information is incorrect, malformed, unparsable, etc.

Basically, it's the error geth throws when it has no idea what to do what the string / data you provided.

To debug, console log everything and check it against a valid unsigned and signed transaction and see what's causing the difference. If I had to guess, it's likely somewhere in the conversion from 1 eth to 0x0de0b6b3a7640000 or 21000 gas to 0x5208 or something like that. Check all your eth, wei, buffers, blobs, numbers, hex, hex prefixes, strings, unicorns etc. 😉

The legacy version of MyCrypto displays both the unsigned and signed transaction when you click "generate transaction", which may help with debugging. I would strongly encourage you to NOT use an account with real ETH. Grab some testnet ETH and use a new private key.

1

Error message seems to be misleading. I don't know about documentation, but this comment suggests that you have wrong chainID/networkID in your transaction.

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.