The Official Golang implementation of the FCH high performance, scalable, network protocol featuring our bespoke DxPoS Consensus Algorithm (Delegated Crosschain Proof-of-Stake).
- https://fch.network website
- RPC Gateway to Mainnet:
https://gateway.fch.network
- WSS Gateway to Mainnet:
wss://gateway.fch.network/wss
For optimal performance the FCH Engineering team recommend running your nodes with at least:
- Ubuntu 18.04.2 LTS (or any Debian based Dist)
- 120GB SSD
- 16 GB Ram or greater
- Golang >= 1.10.8
- AWS EC2 (to avoid sync issues/temporary blacklisting)
- You will need to install Golang and add it to your
$PATH
variable, We recommend running go version go1.10.8 or greater - Clone this repository
- then
cd
into it - Run
make all
this will create all the FCH binaries necessary to run FCH within the./build/bin
folder - It will be necessary to also add this path to your operating systems
$PATH
variable.
- then
- Next create a folder somewhere on your os and name it appropriately - it will be your data directory holding all the chains data including keystores for whatever accounts you generate. It will be used during genesis creation with the
--datadir
flag - Next up you will need to get the genesis file.
- Initialise the genesis using the following command:
fch --datadir /your/datadir init genesis.json
- (Optional) If you wish to create an account at this stage you can also do that using
fch --datadir /your/datadir account new
and typing your password when prompted - (Optional) FCH's infrastructure team also recommend another step which greatly helps P2P discovery of your node, place a file inside of the --datadir directory within the folder called
/your/datadir/fch
and call it calledstatic-nodes.json
which can be found here\
- The next step we will provide you with a startup script that will start a standard FCH node which can be used as a gateway with which you can connect to locally.
- (Optional) Another tip from the FCH Engineering team it is important to specify the correct external IP of your machine, to simplify this install the
dig
command line utility and use our script below it will automatically populate your external IP for you and vastly help with P2P Discovery.
- (Optional) Another tip from the FCH Engineering team it is important to specify the correct external IP of your machine, to simplify this install the
sudo apt update
sudo apt install dnsutils
#!/bin/bash
printf "\n============================> FCH Start script for MAINNET node <====================================\n\n"
IP="$(dig +short myip.opendns.com @resolver1.opendns.com)"
fch --datadir=/your/datadir\
--atmos.ethereum.endpoint "https://ethereum.fch.network"\
--txpool.releaselimit "3000" \
--miner.gastarget="126000000"\
--gasprice "1000000000"\
--ethstats="Your Name:RYTTC6sG9N6W6xuJ@stats.fch.network/api"\
--cache="2048"\
--syncmode 'full' \
--networkid "4040"\
--nat "extip:$IP"\
--nousb\
console
To setup delegate you will need to do next:
- You should have minimum 10M XF for masternode and 100M XF for validator
- Set allowance for
0xe2b151d2eF8d7D3058E44b6481B06F71d38253c9
address for amount of tokens you would like to bond into delegate - Execute next methods on governance contract
0xe2b151d2eF8d7D3058E44b6481B06F71d38253c9
Governance ABIcreateDelegate
create new delegate. You will have to specify next:- delegate name - can't be changed
- signer address - coinbase address of FCH.Network node which will be used for mining
- amount of tokens to bond (approved before)
getAllDelegatesAddresses()
- the last delegate return is your delegate address. You will need it for next step
- On delegate contract created above (with address obtained) call
launch()
method to start delegate Delegate ABI. - Start node and enable mining there with
miner.start()
. Your delegate will start mining in 20 minutes from launch.
The FCH library (i.e. all code outside of the cmd
directory) is licensed under the
GNU Lesser General Public License v3.0, also
included in our repository in the COPYING.LESSER
file.
The FCH binaries (i.e. all code inside of the cmd
directory) is licensed under the
GNU General Public License v3.0, also included
in our repository in the COPYING
file.
1.9.0-stable