Recently we released information regarding the CertiK Security Oracle network. Additionally, we launched a promotion campaign for community members to test out how they could contribute to increasing smart contract security by becoming an Oracle Operator. Given that not everyone is tech-savvy, here is a detailed guide on installing and running an Operator.
You need to have an Internet-connected machine (like your laptop or any cloud instances) with the certikcli binary installed. Depending on your machine’s operating system, please download the corresponding file here and install it if needed. For this tutorial, we chose to use Ubuntu OS (and have downloaded the executable binary named certikcli at the home folder) to demonstrate the steps.
We need to create a config file for certikcli:
Fill in the file with the below content:
After saving the file, you should have access to the latest status of the blockchain testnet:
Note that --home <.certikcli-path> would be necessary if the config path has been set up before
With output like:
If you receive a similar response to the above, then you’ve completed the setup of certikcli! Feel free to run other commands like ./certikcli query oracle operators to get the current list of registered Operators.
In order to earn points for the Operator Game as well as the Shentu Games, a DeepWallet account is required. Once you’ve created a wallet, assure that you safely store the mnemonic words/private key (24 random generated words) as there is no way to recover a lost key. With certikcli you could import and unlock your wallet address with the below command:
YOUR_MNEMONIC_WORDS should be replaced with your secret words separated by an empty space: apple banana orange …. You should then see the address added by running the command ./certikcli keys list.
Since being an Operator is an important role in the oracle network, it is required to lock an amount of CTK as collateral in order to fulfill oracle tasks. Because this is a separately-running testnet compared to the Shentu Games’ one, you need to get some test CTK from the faucet (make sure you are on the shentu-oracle-testnet network which can be seen at the upper-right side of the page). Feel free to write an email to firstname.lastname@example.org to get a bit more test CTK later on. You can run this command to check your balance:
Run this command to register to be an Oracle Operator on CertiK Chain:codec
Switch certik1qqyq3dpcxfyjyv40htlagp9felss3tsg2g3gly with your own wallet address. You should then see your Operator information with the command ./certikcli query oracle operators.
After the successful creation of your Operator entity on-chain, it’s time to configure the Operator software. We’ve introduced many innovative ideas for each Operator to customize their own settings to complete security tasks, but to keep it simple, let’s just copy the sample config items:
Fill in the file with the below content. Note that weight for a Primitive means the ratio of a score responded by such a Primitive represents in the total weights. Total weight is simply the linear sum of different Primitives’ weights defined in the config file. Feel free to update the weight with some other numbers!
The primitive section on the config file basically means the security checks you choose to use. Each one is represented as a Primitive Contract on CertiK Chain that either gives the security score directly or responds back with an endpoint for you to call.
Lastly, we just need to have a long-running background job to maintain the Operator software that is built-in to certikcli:
You should see some printed log events with the command tail -f oo.log:
And…that’s it! We’ve scheduled task submitters to create oracle tasks frequently so you should be able to see some additional logs describing the fulfillment of security tasks. If you need any help, you are more than welcome to reach out via our discord channel!
Happy Oracle Operating!