The codebase is currently not public. We will be sharing more details about the validator's role and functionality soon. We appreciate your patience and interest. Thank you for your understanding and continued support.
Note: Thanks to your contributions, cycle I of our TestNet Phase 3 journey has officially wrapped up! Now we're one step closer to onboarding the world to Bitcoin. Stay tuned for the next steps!
By following these steps, you should be able to successfully set up and start a Nubit Validator. If you encounter any issues, please provide detailed information, and further assistance will be provided.
Set up the Validator
Install the Validator
Download the Necessary Repositories
First, download the required repositories from the RiemaLabs GitHub.
Note: The git clone command above already specifies the nubit-alphatestnet-1 branch of the nubit-validator repository, which includes the latest version of the code.
When using git clone, you may need to temporarily comment out the UseKeychain fields in your ~/.ssh/config file. Specifically, comment out # IgnoreUnknown UseKeychain and # UseKeychain yes .
Install the nubit-validator CLI
In the cloned repository directory, run the following command to install the nubit-validator CLI:
makeinstall
Set up the Environment
Set Network and Custom Variables
Customize the VALIDATOR_NAME as desired, and then replace BTCRPC with your own Bitcoin RPC endpoint if you have one.
The BTCRPC is used for accessing Bitcoin network data, which is crucial for the validator to function correctly. Ensure the BTCRPC you use can process transactions and produce blocks normally. If you don't have your own, you can use the provided default public RPC (https://bitcoin-mainnet.public.blastapi.io).
Set up the other environment variables using the following commands:
export NUBIT_VALIDATOR_HOME="$HOME/.nubit-validator"export VALIDATOR_NAME=your_desired_validator_name # Replace VALIDATOR_NAME with your desired oneexport CHAIN_ID=nubit-alphatestnet-1export BTCRPC=https://bitcoin-mainnet.public.blastapi.io # This is a default public BTCRPC, but we recommend using your own.
export PERSISTENT_PEERS=900a00a618f20a2e4867b26585b15108c728b523@validator-1.nubit-alphatestnet-1.com:26656,e0cf2c93177eae5cf0bb360710725aee34a44732@validator-2.nubit-alphatestnet-1.com:26656
Clear Existing Data
Use the following command to remove any previous data:
rm-rf $NUBIT_VALIDATOR_HOME
Initialize the Validator
Initiate the validator with the following command, which will create the necessary configuration files and directories:
Note: A new nubit address named my_wallet will be automatically created along with its MNEMONIC. Please make sure to save the MNEMONIC as it will only appear once securely.
List All Keys
List all keys using:
nubit-validatordkeyslist
Synchronize with the Latest Block
To quickly sync to the latest block, a snapshot is provided and updated every 12 hours. Follow these steps:
Remove Old Data Directory
rm-rf $NUBIT_VALIDATOR_HOME/data
Download the Snapshot
Download the snapshot using wget. Ensure you have enough disk space (approximately 44.2GB):
This will update your node to a recent state. Keep it running to ensure it syncs to the latest block. For the most current block information, please visit the chain explorer at explorer.nubit.org.
This response indicates that the validator is running successfully. It shows the continuous process of validating and committing blocks, minting coins, and processing transactions.
The synchronization completion signal is found in the SyncInfo section under the catching_up field. When this field is false, it indicates that the node is fully synchronized.
For example, when catching_up shows false:
"SyncInfo":{..."catching_up":false}
This means the validator node is fully synced with the latest blocks, and you can proceed with delegating stake.
Delegate Stake to the validator
After your validator has synced with the latest blocks, you can delegate stake to it. Follow these steps to complete the process:
List All Local Keys
First, check all your local keys with the following command:
Before staking, you need to know the nubitvaloper address of the validator. Run the following command to get it, replacing <your-address> with your actual address:
Use the following command to create your validator. Replace <your-amount> with the amount you want to stake, <your-moniker> with your chosen validator name, and <your-address> with your actual address:
You will receive an output like this, including a transaction hash which you can use to check the transaction result at Nubit Alpha Testnet Explorer (https://explorer.nubit.org):
Now you can delegate tokens to your validator. Use the following command, replacing <your-validator-address>, <amount>, and <your-address> with the appropriate values:
Input y to send the delegating transaction. Wait some time for the transaction to be confirmed on the chain. You can check the status of your validator on the official explorer: https://explorer.nubit.org/validators.