Run A Local Test Network

This page guide you to run fakenet (private testing network) with N local nodes, primarily for testing/benchmarking purposes.

Download go-u2u

Please check out and clone go-u2u source code:
git clone


Scripts to run fakenet are located at demo folder, it contains these scripts:
  • start network: ./;
  • stop network: ./;
  • clean data and logs: ./;
You can specify number of genesis validators by setting N environment variable.

Balance transfer example

from demo/ dir
  • Start network:
N=3 ./
  • Attach js-console to running node0:
go run ../cmd/u2u attach http://localhost:4000
  • Check the balance to ensure that node0 has something to transfer (node0 js-console):
output shows the balance value:
  • Get node1 address:
go run ../cmd/u2u attach --exec "eth.accounts[0]" http://localhost:4001
output shows address:
  • Transfer some amount from node0 to node1 address as receiver (node0 js-console):
{from: eth.accounts[0], to: "0x02aff1d0a9ed566e644f06fcfe7efe00a3261d03", value: "1000000000"},
function(err, transactionHash) {
if (!err)
console.log(transactionHash + " success");
output shows unique hash of the outgoing transaction:
0x68a7c1daeee7e7ab5aedf0d0dba337dbf79ce0988387cf6d63ea73b98193adfd success
  • Check the transaction status by its unique hash (js-console):
output shows number of block, transaction was included in:
  • As soon as transaction is included into a block you will see new balance of both node addresses:
go run ../cmd/u2u attach --exec "eth.getBalance(eth.accounts[0])" http://localhost:4000
go run ../cmd/u2u attach --exec "eth.getBalance(eth.accounts[0])" http://localhost:4001