How to run full node
Fullnodes Functions
Stores the full blockchain history on disk and can answer the data request from the network.
Receives and validates the new blocks and transactions.
Verifies the states of every account.
Supported Platforms
We support running a full node on Linux.
Hardware Recommendation
Directly facing internet
16 cores CPU
32GB of RAM
SSD storage
Steps to Run a Fullnode
Prepare junca client software
Build from source code¶
Create new directory for the project
mkdir -p $GOPATH/src/github.com/juncachain/
cd $GOPATH/src/github.com/juncachain/Download source code and build
git clone https://github.com/juncachain/juncachain.git juncachain
cd juncachainCheckout the latest version (e.g v0.2.0)
git pull origin --tags
git checkout v0.2.0Build the project
make allBinary file should be generated in build folder
$GOPATH/src/github.com/juncachain/juncachain/build/bin
alias junca=$GOPATH/src/github.com/juncachain/juncachain/build/bin/juncaDownload JuncaChain binary from Github release page
Download junca binary from our releases page (e.g v0.2.0)
tar xf junca-linux-amd64-v0.2.0.tar.gz
alias junca=build/bin/juncaDownload genesis block
$GENESIS_PATH : location of genesis file you would like to put
export GENESIS_PATH=path/to/genesis.jsonTestnet
curl -L https://raw.githubusercontent.com/juncachain/juncachain/master/genesis/testnet.json -o $GENESIS_PATHMainnet
curl -L https://raw.githubusercontent.com/juncachain/juncachain/master/genesis/mainnet.json -o $GENESIS_PATHCreate datadir
create a folder to store juncachain data on your machine
export DATA_DIR=/path/to/your/data/folder
mkdir -p $DATA_DIR/juncaInitialize the chain from genesis
junca init $GENESIS_PATH --datadir $DATA_DIRInitialize / Import accounts for the nodes's keystore
If you already had an existing account, import it. Otherwise, please initialize new accounts
export KEYSTORE_DIR=path/to/keystoreInitialize new accounts
junca account new \
--password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT] \
--keystore $KEYSTORE_DIRImport accounts
junca account import [PRIVATE_KEY_FILE_OF_YOUR_ACCOUNT] \
--keystore $KEYSTORE_DIR \
--password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT]List all available accounts in keystore folder
junca account list --datadir $DATA_DIR --keystore $KEYSTORE_DIRStart a node
Environment variables
$IDENTITY: the name of your node
$PASSWORD: the password file to unlock your account
$YOUR_COINBASE_ADDRESS: address of your account which generated in the previous step
$NETWORK_ID: the networkId. Mainnet: 668. Testnet: 669
Let's start a node
junca --syncmode "full" \
--datadir $DATA_DIR --networkid $NETWORK_ID --port 30303 \
--keystore $KEYSTORE_DIR --password $PASSWORD \
--identity $IDENTITY \
--mine --miner.gasprice 250000000 --miner.etherbase $YOUR_COINBASE_ADDRESS \
--bootnodes $BOOTNODESIf you are a dapp developer, you should open RPC and WS apis:
junca --syncmode "full" \
--datadir $DATA_DIR --networkid $NETWORK_ID --port 30303 \
--keystore $KEYSTORE_DIR --password $PASSWORD \
--identity $IDENTITY \
--mine --miner.gasprice 250000000 --miner.etherbase $YOUR_COINBASE_ADDRESS \
--http --http.port=8545 \
--ws --ws.port=8546 \
--bootnodes $BOOTNODESLast updated