3: How to Become a Block Producer (Run a TUSC witness Node) : Running a witness Node

How to run a witness node (Block Producer)

At this point you should have an account with 400K TUSC on it

To be a block producer, you have to upgrade the user to lifetime member, and you have to make that account a witness.

Let's Run a wallet again.

Running TUSC Wallet_Cli using Docker

Skip this if you are running compiled wallet (built from GitHub).

Saving a wallet and docker container is very important, since we are using Docker, we have to save the docker container (This is must).

Until you exit the wallet, every command that is executed will be the wallet command 

This command will show the local stored docker images

sudo docker images

Run the local saved Docker image

sudo docker run -it -P localtuscwallet:1

Run compiled wallet

Skip this if you are running ducker.

If you have compiled your wallet from source code, then you need to find the wallet in tusc-core folder

cd tusc-core/programs/cli_wallet


No matter how you run the wallet, you will see this message.

Please use the set_password method to initialize a new wallet before continuing

new >>>

Unlock the wallet.

To be a block producer, you have to upgrade the user to lifetime member. It will cost you 300K TUSC

Upgrade the account

unlocked >>> upgrade_account <acount_name> true

unlocked >>> upgrade_account rabtaitest true

Make that user a Block Producer. It will cast you 100K TUSC

unlocked >>> create_witness <account_name> <“http://<url-to-proposal>" true

unlocked >>> create_witness rabtaitest "http://rabtaibp.club>” true

This will return a long string, but the value we need is Block_signing_key

"block_signing_key": "<PUBLIC KEY>" >> save that somewhere

We need to find the the private key that is associated with Block_signing_key of the witness

unlocked >>> dump_private_keys

In that list, find the private key that matches your block_signing_key and save it.

Get the witness ID

unlocked >>> get_witness <witness_name>

unlocked >>> get_witness rabtaitest

It will return witness info including ID, id": "1.6.32"

You can check how many witness are running

unlocked >>> get_global_properties

Time to vote for your witness. You can vote for yourself, and other people.

unlocked >>> vote_for_witness <voting accountname> < vote for accountname> true true

vote for rabtaitest

unlocked >>> vote_for_witness rabtai rabtaitest true true 

 Vote for yourself  

unlocked >>> vote_for_witness rabtaitest rabtaitest true true

Voting happens in an time interval, you can check when is the next voting

unlocked >>>get_dynamic_global_properties

Time to start a witness Node (Block producer)

Exit the cli wallet

unlocked >>> quit

If you will be using docker then you need to run the docker container to get to the witness Folder

Run the witness docker container

docker run -it -P bendubois/witness-docker

Following process are same for Docker container and Compiled system

You need witness ID and key pair (the one you grabbed it from dump_private_keys)

Go to witness data folder, it is usually under tusc-core

cd witness_node_data_dir

vim config.ini

Press i

somewhere in the middle you will see 

# ID of witness controlled by this node (e.g. "1.6.5", quotes are required, may specify multiple times)

witness-id = "1.6.12" >> replace that ID with your ID

# Tuple of [PublicKey, WIF private key] (may specify multiple times)

private-key = ["TUSC5fvj4hSgDdHuhemTDjgXdjdt56ykJCtRWH7ixoKmMchkRVKAui","5J1ysdz9Pdszp3c5hQDFetKycnBKS5P4SeJEGPd6hUkKJedrugv"]

Replace the public key, Private key

Save the file

cd ..

Run the Witness Node.


Congratulation you are officially a Block Producer.

Sign In or Register to comment.