Skip to content

unstop15/Q-Blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Q-Blockchain Testnet

Official Links

Explorer

Minimum Requirements

NOT SPECIFIED

NOTE : Run as root user

Set vars

PASSWORD=YOUR_PASSWORD

Change YOUR_PASSWORD to secure password

Export the variable

echo "export PASSWORD=$PASSWORD" $HOME/.bash_profile
source $HOME/.bash_profile

Update

sudo apt update && \
sudo apt upgrade

Install Docker

sudo apt-get update && sudo apt install jq && sudo apt install apt-transport-https ca-certificates curl software-properties-common -y && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" && sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin && sudo apt-get install docker-compose-plugin

y

Download Binary and set Password file

git clone https://gitlab.com/q-dev/testnet-public-tools.git
cd testnet-public-tools/testnet-validator/
mkdir keystore
cd keystore/
echo "$PASSWORD" >> pwd.txt

Generate Wallet

cd ..
docker run --entrypoint="" --rm -v $PWD:/data -it qblockchain/q-client:testnet geth account new --datadir=/data --password=/data/keystore/pwd.txt

SAVE THE OUTPUT!!!

Fund your Wallet

Fund your wallet Q Faucet

Configure

cp .env.example .env
nano .env

Add Address without 0x and your Public IP and save settings CTRL+X y and ENTER

Example :

Configure config.json

nano config.json

Add Address without 0x and your Password from the beginning and save CTRL+X y and ENTER

Stake to the contract

docker run --rm -v $PWD:/data -v $PWD/config.json:/build/config.json qblockchain/js-interface:testnet validators.js

Export your private key to Metamask

cd testnet-public-tools
chmod +x run-js-tools-in-docker.sh
./run-js-tools-in-docker.sh
npm install
chmod +x extract-geth-private-key.js
node extract-geth-private-key <WALLET_ADDRESS> ../testnet-validator/ $PASSWORD

Change <WALLET_ADDRESS> To your Wallet address

After saving your private key exit the container exit

Registering Validator

In order to register your node you have to register in the Form : Register Form

Register your validator according to your validator info

After successfully register your validator you will receive your validator name

Configure docker-compose.yaml

cd testnet-validator
nano docker-compose.yaml

Then add --ethstats=ITN-testname-ecd07:qstats-testnet@stats.qtestnet.org

Example :

Then Run the Validator :

docker compose up -d

Check logs ( You have to be in the compose directory! )

docker compose logs -f

CTRL+C to exit logs

Check your validator

Run OmniBride (OPTIONAL) For learning purposes

Configure Omnibride Oracle

cd $HOME
cd testnet-public-tools/omnibridge-oracle
cp .env.testnet .env
nano .env

Change this 3 Value

ORACLE_VALIDATOR_ADDRESS : Provide your Q validator address. Example: 0xac8e5047d122f801...

ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY : Provide your Q validator private key. Example: a385db8296ceb9a....

COMMON_HOME_RPC_URL : You can keep the default, use https://rpc.qtestnet.org or use the RPC endpoint of our own full node if you are operating one.

COMMON_FOREIGN_RPC_URL : Provide an RPC endpoint of a client of the blockchain on the other side of the bridge. Q testnet bridged to the Ethereum Rinkeby network. You can use your own ethereum client, a public endpoint or create an infura account for free to get a personal Ethereum Rinkeby access point (e.g. https://rinkeby.infura.io/v3/1673abc....).

Run your docker-compose

docker compose up -d
docker compose logs -f

To check logs You have to be in the compose directory!

CTRL+C to exit logs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published