Plian
Chinese
Chinese
  • Overview
  • Links
  • Downloads
  • FAQ
    • Node Status
    • Full Balance
    • Flow and FAQ on Becoming a Validator
    • Delegation
    • Staking Rewards
    • Monitor
    • PIScan
    • PIWallet
    • Cross-Chain Transactions
    • DApps
  • About The Blockchain
    • Multichain Framework
    • PDBFT 2.0 Consensus Algorithm
    • Validator Nodes
    • Building with Plian
  • Using The Blockchain
    • Overview
    • Delegating or Staking PI
    • Validator Node Guides
      • Express Node Setup Guide
      • Setting Up a Validator Node
      • Registering Your Node as Validator
      • Submitting Your Vote as Validator
      • Revealing Your Vote
      • Removing Your Node From the Candidate List
      • Alternate Installation Instructions
        • Building From the Source
        • Running Pchain in Docker
        • Installation Instructions for Ubuntu
        • Installation Instructions for Mac OS X
        • Installation Instructions for Windows 10
      • What is FullBalance
    • Token Swaps
    • Plian Javascript Console
    • PIwallet
      • Web
      • Desktop Wallet
        • Light Wallet Mode
        • Local Node Mode
      • Mobile Wallets
      • How to Deploy a Smart Contract
    • PMetamask
    • Advanced Features
      • Command Line Options
      • Management APIs
      • JSON RPC API
      • How to Sync and Run Testnet
  • For Developers
    • How to connect Metamask to Plian
    • How to deploy smart contract on Plian via Metamask + Remix
    • PWeb3 Javascript API
    • How to Create Your Own Subchain
    • Writing Smart Contracts With Solidity
      • Introduction to Smart Contracts
      • Installing the Solidity Compiler
      • Solidity by Example
      • Solidity in Depth
        • Layout of a Solidity Source File
        • Structure of a Contract
        • Types
        • Units and Globally Available Variables
        • Expressions and Control Structures
        • Contracts
        • Solidity Assembly
        • Miscellaneous
      • Security Considerations
      • Resources
      • Using the compiler
      • Contract Metadata
      • Contract ABI Specification
      • Yul
      • Style Guide
      • Common Patterns
      • List of Known Bugs
      • Contributing
      • Frequently Asked Questions
      • LLL
      • Index
Powered by GitBook
On this page
  • Download Pchain's testnet release
  • Initialize testnet child_0
  • Run pchain testnet
  • Attach to child_0's console

Was this helpful?

  1. Using The Blockchain
  2. Advanced Features

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 https://github.com/pchain-org/pchain/releases/download/v1.0.01/testnet_config.tar.gz -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=0.0.0.0 --childChain=child_0 > /dev/null &

Attach to child_0's console

./bin/pchain attach .pchain/child_0/pchain.ipc
PreviousJSON RPC APINextFor Developers

Last updated 4 years ago

Was this helpful?