Plian
Search…
How to Sync and Run Testnet
If you would like to test your smart contract before deploying on main net, we recommend running on Pchain testnet first.

Download Pchain's testnet release

1
wget https://github.com/pchain-org/pchain/releases/download/v1.0.01/testnet_config.tar.gz -P ~
2
cd ~
3
tar -zxf testnet_config.tar.gz
4
mkdir -p ~/pchain-testnet/.pchain/child_0 ~/pchain-testnet/bin/
5
cp ~/testnet_config/pchain ~/pchain-testnet/bin/
6
cp ~/testnet_config/*.json ~/pchain-testnet/.pchain/child_0/
7
cd ~/pchain-testnet
8
./bin/pchain --datadir .pchain init .pchain/child_0/eth_genesis.json child_0
Copied!

Initialize testnet child_0

1
cd ~/pchain-testnet
2
./bin/pchain --datadir=.pchain --testnet --childChain=child_0
Copied!

Run pchain testnet

1
./bin/pchain --datadir=.pchain --testnet --rpc --rpcapi=eth,web3,admin,tdm,miner,personal,chain,txpool,del --gcmode=archive --rpcvhosts=* --rpcaddr=0.0.0.0 --childChain=child_0 > /dev/null &
Copied!

Attach to child_0's console

1
./bin/pchain attach .pchain/child_0/pchain.ipc
Copied!