I have a geth node, and using truffle-hd-wallet. I am trying to create a transaction between coinbase and the account created by hd-wallet.Created a raw transaction and signed it with privatekey of coinbase. The transaction is stuck in txpool in pending state. Transaction object created as:

        'from': <coinbase account>,
        'to': <acc created by hdwallet>,
        'chainId': <net.getId()>,
        'gasPrice': <eth.getGasPrice>,
        'gasLimit': 2000000

Signed with, web3I.eth.accounts.signTransaction(tx, privateKey)

web3.txpool.content shows below,

  pending: {
    0x0C0Df324C081fAF1c9fE6BF98379e0614181d254: {
      0: {
        blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
        blockNumber: null,
        from: "0x0c0df324c081faf1c9fe6bf98379e0614181d254",
        gas: "0x1e8480",
        gasPrice: "0x430e23400",
        hash: "0x6c525ad1ed8b128ba04e12e990e762697d9ac093c5342d7a4835318e74bb518f",
        input: "0x",
        nonce: "0x0",
        r: "0x346c40bd758c67f5082976d9e5523f0b171b397d53b30ff6183d31e3314b7ff1",
        s: "0x68bd289133fcf966f71d51fdbe282c176a6b7739f8532d347471183e056352e8",
        to: "0x74f59f7f123fa71a8d0b71d792a6d040bbdd2fdd",
        transactionIndex: "0x0",
        v: "0x9c7",
        value: "0x5"
  queued: {}

I have tried even including nonce, increasing gasPrice, also using ethereumjs-tx, but same result

  • Are you on a private network? What client are you using? ie geth, ganache, parity or other?
    – Ismael
    Jun 16 '18 at 13:49
  • its a single node geth client...
    – karts
    Jun 16 '18 at 14:06
  • You need to mine transactions: miner.start(1) will start mining and miner.stop() to stop.
    – Ismael
    Jun 16 '18 at 15:30
  • the node is mining, i have used --mine option to start geth
    – karts
    Jun 16 '18 at 16:09
  • Do you have enough balance in the sender to pay for the transaction?
    – Ismael
    Jun 16 '18 at 16:30

solved it by removing 'chainId': , from the tx object. Not sure exactly why 'chainId' puts tx in pending state.

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.