Custom Validators
Last updated
Last updated
An MSB (Main Settlement Bus) is needed for any contract to operate that executes smart contract transactions. MSBs have to be populated (whitelisted) with validators. Each validator runs an instance of the MSB and awaits transactions from contracts (or better: contract peers).
A project in Release 1 of the Trac Network should therefore provide incentives for validators to actually validiate their contract network. Hypermall does this for example by letting validators earn 50% of the trading fee.
If you want to roll your own validator network, then check out below how to do this. The current validator community in our might be interested in your project help validating.
While the MSB supports native node-js, it is encouraged to use Pear:
Deploy Bootstrap (admin):
Choose option 1)
Copy and backup the seedphrase
Copy the "MSB Writer" address
With a text editor, open the file msb.mjs in document root
Replace the bootstrap address with the copied writer address
Choose a channel name (exactly 32 characters)
Run again: pear run . store1
After the options appear, type /add_admin and hit enter
Your instance is now the Bootstrap and admin peer, required to control validators
Keep your bootstrap node running
Strongly recommended: add a couple of nodes as writers
Running indexers (admin)
Install on different machines than the Bootstrap's (ideally different data centers)
Follow the "Running as validator" and then "Adding validators" procedures below
Copy the MSB Writer address from your writer screen
In your Bootstrap screen, add activate the new writers:
/add_indexer <MSB Writer address (not the MSB address!)>
You should see a success confirmation
Usually 2 indexers on different locations are enough, we recommend 2 to max. 4 in addition to the Bootstrap
Running as validator (first run):
Choose option 1)
Copy and backup the seedphrase
Copy the "MSB Address" after the screen fully loaded
Hand your "MSB Address" over to the MSB admin for whitelisting
Wait for the admin to announce the whitelist event
In the screen type /add_writer
After a few seconds you should see your validator being added as a writer
Adding validators (admin):
Open the file /Whitelist/pubkeys.csv with a text editor
Add as man Trac Network addresses as you wish
In the MSB screen, enter /add_whitelist
Wait for the listto be fully processed
Inform your validator community being whitelisted