X1 is a hybrid PoW/PoS blockchain that implements the DAG (Directed Acyclic Graph), the Argon2ID hashing algorithm, and Lachesis delegated consensus. This innovative type of blockchain, based on an elected subcommittee and an unlimited number of validator nodes and miners, is set to provide security, energy efficiency, and instant transaction finality. Here we describe how to create and run a validator node on the X1 testnet, while CPU and GPU mining are explained in this guide.
How to create a read-only node on the X1 testnet
You need a Linux-based dependency, like Ubuntu, to run a node. You also need git and golang installed.
# Install dependencies (ex: Ubuntu)
apt update -y
apt install -y golang wget git make
# Clone the X1 binary
git clone --branch x1 https://github.com/FairCrypto/go-x1
#Download and unpack the snapshot
wget --no-check-certificate https://xenblocks.io/snapshots/current.snapshot.tar
tar -xvf current.snapshot.tar
#Build the X1 binary
cd go-x1
make x1
cp build/x1 /usr/local/bin
# Run the node
x1 --testnet
#You can also run the node with Xenblocks reporting
x1 --testnet --xenblocks-endpoint ws://xenblocks.io:6668
#Run the node with RPC enabled
x1 --testnet --http --http.port 8545 --ws --ws.port 8546
Refer to the official GitHub for detailed instructions.
How to run a validator node on the X1 testnet
It’s mandatory to fully synchronize the read-only node before running the validator. Once it’s synchronized it needs to be stopped and the following instructions should be executed. A stake of 100,000 XN is required to create a validator. Join the X1 Validators Telegram group and send a request for testnet XN to Mr. Jack Levin.
#Create a new validator
x1 validator new
#Create and save the validator password
echo "MY_STRONG_PASSWORD" > ~/.x1/.password
chmod 600 ~/.x1/.password
#Go here to stake XN https://explorer.x1-testnet.xen.network/address/0xFC00FACE00000000000000000000000000000000/write-contract#address-tabs Connect your wallet, and in function 4 called "createValidator,” enter your validator public key (0xc004...) you created in the previous function and the amount of XN to stake. Click "Write" and confirm the transaction.
#To know your validator ID, go to the SFC Contract https://explorer.x1-testnet.xen.network/address/0xFC00FACE00000000000000000000000000000000/read-contract#address-tabs to the 18 function called “getValidatorID”. Paste your Ethereum wallet address and press the “Query” button.
#Run the validator with your ID and public key
x1 --testnet --validator.id XXX --validator.pubkey 0xc004XXXXXXXXXXXXXXXX --xenblocks-endpoint ws://xenblocks.io:6668 --gcmode full --syncmode full --validator.password ~/.x1/.password
View your validator on the X1 explorer https://pwa-explorer.x1-testnet.xen.network/staking