Private network of the NEO blockchain, with 100M NEO and lots of GAS to play with (and neoscan*)
10K+
The version numbers relate to the respective neo-cli release.
2.10.2, latest2.10.12.9.12.8.02.7.62.7.42.7.32.7.1Docker base image from neo-privatenet-docker.
dotnet neo-cli.dll --rpc)Pull the latest image from Docker hub: docker pull cityofzion/neo-privatenet
You can start the container with this command: docker run --rm -d --name neo-privatenet -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp cityofzion/neo-privatenet
To open a bash in the container, use docker exec -it neo-privatenet /bin/bash
Protip: You can force-stop and delete this container with docker rm -f neo-privatenet, and all your Docker containers (running and stopped) with this command: docker rm -f $(docker ps -aq) (careful!).
You can use the keypair with the initial NEO and GAS by importing the WIF key.
KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnrAK2nJJpJr6o664CWJKi1QRXjqeic2zRp8yb'#\xba\'\x03\xc52c\xe8\xd6\xe5"\xdc2 39\xdc\xd8\xee\xe9'neo-pythonrm -rf Chains/privnetpython prompt.py -pNow you can just download the ready-to-use wallet file:
coz). This wallet file uses the new encryption (with this bugfix), if you are using an older neo-python version you'll need the old wallet from here.open wallet neo-privnet.walletwallet rebuildOr you can create a new wallet and import the WIF key:
create wallet privnet1import wif <wif-key>Finally, make sure the wallet is fully synced by triggering a rebuild:
wallet rebuildAfter the rebuild, you'll see the synced balances when you enter the command wallet.
protocol.json file and config.json file in the project root.peers.datdocker exec -it neo-privatenet /bin/bash
Once inside the container, check the running screens:
screen -ls
screen -d -r node1
The container exposes the port 30333 for JSON-RPC calls:
curl -X POST \
http://localhost:30333 \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc": "2.0", "id": 5, "method": "getversion", "params": [] }'
{"jsonrpc":"2.0","id":5,"result":{"port":20333,"nonce":1616105457,"useragent":"\/NEO:2.7.1\/"}}
Once the Docker container is running, you should see it with docker ps. You should also be able to open a TCP connection to port 20333 with telnet:
$ telnet localhost 20333
Trying ::1...
Connected to localhost.
Escape character is '^]'.
��version'3�$�� ZmO�z�
/NEO:2.7.1//
If that works, make sure new blocks are being generated. The easiest way is to refer to the documentation above about "Getting shell access to the container". Open a shell and attach to the node1 screen: screen -d -r node1. There you should see new blocks being generated roughly all 15 seconds.
If you need light wallet functionality, you have two choices: NeonDB (legacy) or neoscan. If you're using neon-js, for example, you'll probably want one of these.
To setup neoscan with this private network container:
$ wget https://raw.githubusercontent.com/slipo/neo-scan-docker/master/docker-compose.yml -O docker-compose-neoscan.yml
$ docker-compose -f docker-compose-neoscan.yml up
See here for more information.
Content type
Image
Digest
Size
764.5 MB
Last updated
over 7 years ago
docker pull cityofzion/neo-privatenet