Quick Start for Beginner¶
Refer to Download page for binary releases of cpchain and console.
For ease of reading, we use
cpchain to represent all available cpchain versions.
The instructions below are demonstrated on Linux.
If you are using Windows platform, all commands below are also viable.
For 32-bit PC user, please select
And 64-bit PC users should download
For Mac user, please download
(Darwin forms the core of macOS)
All code starting with a
$ is meant to run in your terminal or cmd.
Do not copy
$, as it is not a part of a command.
Apply for a Wallet¶
cd command to enter the directory containing
cpchain binary file.
For Windows users, use the commands below in cmd.
$ mkdir datadir $ cpchain-windows-4.0-amd64.exe account new account --datadir ./datadir
if you are using on 32 bit operation system.
For Linux and Mac users, use the commands below in terminal:
$ mkdir datadir $ ./cpchain account new account --datadir ./datadir
The first command is to generate a keystore file
in which you can find the wallet address.
The second command create a new account, and return the wallet address.
Connect to Mainnet¶
The line with highlight requires you to modify VARIABLES which are capitalized according to your own settings.
Refer to FAQ if you encounter any problem.
Get Block Mined¶
This section is for users that are willing to propose new blocks.
Before mining a block, make sure that you the balance in your account is large enough (at least 200,000 cpc).
Windows user the command below.
(Here we use
amd64 version as demonstration.)
$ cpchain-windows-4.0-amd64.exe run --datadir ./datadir ^ --unlock WALLET_ADDRESS ^ --rpcaddr 127.0.0.1:8501 --port 30311 --mine ^ --rpcapi personal,eth,cpc,admission,net,web3,db,txpool,miner --linenumber
Linux and Mac users please use the following command:
$ ./cpchain run --datadir ./datadir \ --unlock WALLET_ADDRESS \ --rpcaddr 127.0.0.1:8501 --port 30311 --mine \ --rpcapi personal,eth,cpc,admission,net,web3,db,txpool,miner --linenumber
\ are splitters for long command for Windows and Linux (Mac), respectively.
You do not need to type them if you put the command in a single line.
Get Chain Synced¶
This section is for users that only want to sync with the Mainnet, review or sending transactions.
Windows users can utilize the command below:
$ cpchain-windows-4.0-amd64.exe run --rpcaddr 127.0.0.1:8501 --port 30311
Linux and Mac users please try this command:
$ ./cpchain run --rpcaddr 127.0.0.1:8501 --port 30311
Check Your Status¶
After you use
./cpchain run command, you have connected to Mainnet.
Use the commands below to check your status.
For Linux and Mac users:
$ echo YOUR_PASSWORD > datadir/password $ ./console status \ --keystore ./datadir/keystore/YOUR_ACCOUNT \ --password ./datadir/password
For Windows users:
$ echo|set /p="YOUR_PASSWORD"> datadir/password $ console.exe status ^ --keystore ./datadir/keystore/YOUR_ACCOUNT ^ --password ./datadir/password
The first command generates a file containing your password,
which are located in
The second command is to check your account status given the
as well as the
password file you just generate.