can't send transactions on private test net

I've created a private test net: geth --networkid 777 --genesis genesis.json --datadir ./experiment console

Then I've created 2 accounts and I've had both of them mine a bit of ether.

Now, I try to send some ether: var tx = eth.sendTransaction({from: eth.accounts[1], to: eth.accounts[0], value: 9999, gas:500000})

I've tried with and without the gas field, not sure what I should be setting it to. The ether never transfers, the balances never change, and I get this:
> eth.getTransaction(tx)
  blockHash: Error: Cannot access member 'constructor' of null,
  blockNumber: Error: Cannot access member 'constructor' of null,
  from: '0x6a77adcd4804007b89050ccb0d830c484fcabae2',
  gas: 500000,
  gasPrice: '57935965411',
  hash: '0xeb9b9a78877c0e14562300626d42b2b34c3eaa45f14caab27252839f71c1e749',
  input: '0x',
  nonce: 0,
  to: '0xe6b374deccf7fffe5de5d3a80e0a6902560bc640',
  transactionIndex: Error: Cannot access member 'constructor' of null,
  value: '9999'
Any pointers would be appreciated. Thanks!


  • mdjmdj Member Posts: 14
    I'm seeing the same sort of behavior. In my case I'm trying to do the "Greeter" transaction with a private test net. The test net is up and running and mining blocks to an address. When I submit a transaction it asks for my password, I see it get sent, but I get no confirmation. The only indication something started to happen is the following log line, then nothing:

    eth_sendTransaction [{"data":"0x60606040526040516102b43803806102b48339016040526060805160600190602001505b5b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b806001600050908051906020019082805482825590600052602060002090601f01602090048101928215609e579182015b82811115609d5782518260005055916020019190600101906081565b5b50905060c5919060a9565b8082111560c1576000818150600090555060010160a9565b5090565b50505b506101dc806100d86000396000f30060606040526000357c01000000000000000000000000000000000000000000000000000000009004806341c0e1b514610044578063cfae32171461005157610042565b005b61004f6004506100ca565b005b61005c60045061015e565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156100bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561015b57600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b5b565b60206040519081016040528060008152602001506001600050805480601f016020809104026020016040519081016040528092919081815260200182805480156101cd57820191906000526020600020905b8154815290600101906020018083116101b057829003601f168201915b505050505090506101d9565b90560000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000c48656c6c6f20576f726c64210000000000000000000000000000000000000000","from":"0xa8108b925399f6c596fc4902bea9106306f61dcd","gas":"0xf4240"}]
  • daboozdabooz Member Posts: 17
    I was seeing the same behavior as stratospark. Stopped and started the miner a few times, got frustrated and went to grab some food. When I came back the Tx had been mined. The getTransaction API returned a valid json structure and the ether had transferred (including some to the miner account). Took about 7 mins total, guess I need to learn patience.
  • stratosparkstratospark Member Posts: 2
    Thanks so much @dabooz. I totally forgot I had to be mining to commit transactions to the blockchain!!! What a noob ;)
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    @dabooz - you don't have to - when you create a private testnet just use a custom genesis block with a very low difficulty - see fast mining on testnet
  • mdjmdj Member Posts: 14
    Update: for anyone reading this thread based on my comment above (which was a slightly different issue than the main topic), it appears my problem has been resolved by simply increasing the gas limit in the genesis block on my private test net. I'm new here, so this information might be redundant for experienced users, but other people might be new here as well so I thought I'd add my fix to this thread.
  • daboozdabooz Member Posts: 17
    @mdj I ran into your problem also. At the time I hit this, I was running with verbosity 4 (not the default). An out of gas message appeared in the log. I have not confirmed that this message only appears with verbosity 4, but it might be something you can check.
  • mdjmdj Member Posts: 14
    @dabooz thanks for highlighting that. I didn't check the logs at all. Newb here. :)
Sign In or Register to comment.