0

I have created a node with the following genesis block:

{                                                                                                     
  "config":{
       "chainId":9119,
       "homesteadBlock":0,
       "eip155Block":0,
       "eip158Block":0
  },
  "nonce": "0x0000000000000042",
  "timestamp": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "extraData": "0x",
  "gasLimit": "0x8000000",
  "difficulty": "0xfffff",
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x3333333333333333333333333333333333333333",
  "alloc": {
  }
}

I also have and account with no password and start the node with this options:

geth --allow-insecure-unlock --datadir=<path> --nodiscover --rpc --rpcaddr 0.0.0.0 --rpcport "8000" --rpccorsdomain "*" --gasprice 0 --maxpeers 32 --networkid 9119 --unlock 0 --password <(echo -n "") --mine --minerthreads 8

and send a transaction via json-rpc as follows:

curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0",  "method":"eth_sendTransaction",  "params": [{"from": "0x73c30a6b46203c20b6a7a0d7a9469b5a7d285451", "data": "0x6060604052610398806100126000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063693ec85e14610047578063e942b5161461010e57610042565b610002565b34610002576100a06004808035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506101b0565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156101005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610002576101ae6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506102aa565b005b6020604051908101604052806000815260200150600060005082604051808280519060200190808383829060006004602084601f0104600302600f01f15090500191505090815260200160405180910390206000508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102995780601f1061026e57610100808354040283529160200191610299565b820191906000526020600020905b81548152906001019060200180831161027c57829003601f168201915b505050505090506102a5565b919050565b80600060005083604051808280519060200190808383829060006004602084601f0104600302600f01f15090500191505090815260200160405180910390206000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061033557805160ff1916838001178555610366565b82800160010185558215610366579182015b82811115610365578251826000505591602001919060010190610347565b5b5090506103919190610373565b8082111561038d5760008181506000905550600101610373565b5090565b50505b505056"}],"id":1}' http://localhost:8000

the transactions is accepted and goes into the pending transactions but is never mined by my node.

this is the transaction:

> eth.pendingTransactions
[{
    blockHash: null,
    blockNumber: null,
    from: "0x73c30a6b46203c20b6a7a0d7a9469b5a7d285451",
    gas: 297018,
    gasPrice: 0,
    hash: "0xf311038d32174802b54d78184c04f19940a284b22a4361141d87d2296131e47c",
    input: "0x6060604052610398806100126000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063693ec85e14610047578063e942b5161461010e57610042565b610002565b34610002576100a06004808035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506101b0565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156101005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610002576101ae6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506102aa565b005b6020604051908101604052806000815260200150600060005082604051808280519060200190808383829060006004602084601f0104600302600f01f15090500191505090815260200160405180910390206000508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102995780601f1061026e57610100808354040283529160200191610299565b820191906000526020600020905b81548152906001019060200180831161027c57829003601f168201915b505050505090506102a5565b919050565b80600060005083604051808280519060200190808383829060006004602084601f0104600302600f01f15090500191505090815260200160405180910390206000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061033557805160ff1916838001178555610366565b82800160010185558215610366579182015b82811115610365578251826000505591602001919060010190610347565b5b5090506103919190610373565b8082111561038d5760008181506000905550600101610373565b5090565b50505b505056",
    nonce: 0,
    r: "0xe381eed0d400150a6c88d512d3d58a34724a6393e58da9ca7f1569a1bf9a1ad7",
    s: "0x46f7f14d5188e62304cf0d79829f0c9683ac495c0aef285a278aac4bd6fe9fd4",
    to: null,
    transactionIndex: null,
    v: "0x4762",
    value: 0
}]

I have no idea on how to make it work, any suggestions? Thanks in advance.

Note: im using --gasprice 0 option so account balance should not be relevant.

  • Does the account used have enough funds? – Ismael Sep 17 at 17:59
0

Check the inputs of the transactions. I had the same problem. I was giving wrong inputs to the 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.