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

wget -P ~
cd ~
tar -zxf testnet_config.tar.gz
mkdir -p ~/pchain-testnet/.pchain/child_0 ~/pchain-testnet/bin/
cp ~/testnet_config/pchain ~/pchain-testnet/bin/
cp ~/testnet_config/*.json ~/pchain-testnet/.pchain/child_0/
cd ~/pchain-testnet
./bin/pchain --datadir .pchain  init .pchain/child_0/eth_genesis.json child_0

Initialize testnet child_0

cd ~/pchain-testnet
./bin/pchain --datadir=.pchain --testnet --childChain=child_0

Run pchain testnet

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

Attach to child_0's console

./bin/pchain attach .pchain/child_0/pchain.ipc