ODIN Protocol
Search…
Oracle Validators
configuring yoda and your Lambda function executor instance
While validators do not need to become oracles, each oracle validator will need to have it's own AWS lambda or GCP run function instance. Yoda is the oracle daemon. It is already included in the container, but will need to be configured. Before following the yoda configuration instructions below, visit the appropriate subpage for instructions on setting up your executor on the function platform of preference.
First, yoda will need to be configured;
1
yoda config chain-id $CHAIN
2
yoda config node http://localhost:26657
3
yoda config validator $VALIDATOR
4
yoda config broadcast-timeout "5m"
5
yoda config rpc-poll-interval "1s"
6
yoda config max-try 5
Copied!
Add several keys with the following;
1
yoda keys add REPORTER_01
2
yoda keys add REPORTER_02
3
yoda keys add REPORTER_03
4
yoda keys add REPORTER_04
5
yoda keys add REPORTER_05
Copied!
This is because yoda works with multiple reporter addresses to allow it to submit multiple transactions concurrently.
The next step in yoda configuration is to set you function executor configuration parameter;
1
yoda config executor "rest:<your_aws_lambda_endpoint>?timeout=7s"
Copied!
Your reporter addresses, along with some loki, must be supplied to the blockchain to trigger account creation.
1
odin tx multi-send 1loki $(yoda keys list -a) \
2
--from $ADDRESS \
3
--chain-id $CHAIN
Copied!
Next you will add the reporter addresses to your validator;
1
odin tx oracle add-reporters $(yoda keys list -a) \
2
--from $ADDRESS \
3
--chain-id $CHAIN
Copied!
Now we will activate our validator as an oracle on the blockchain;
1
odin tx oracle activate \
2
--from $ADDRESS \
3
--chain-id $CHAIN
Copied!
We will want to verify our oracle is functioning;
1
odin query oracle validator $VALIDATOR
Copied!
If everything is working as it should be, the output should include the parameter "is_active", and the value should be "true".
Copy link