Giter VIP home page Giter VIP logo

qblockchain-tutorial's Introduction

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:[email protected]

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

qblockchain-tutorial's People

Contributors

wahyuda110 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.