> For the complete documentation index, see [llms.txt](https://docs.indonode.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.indonode.net/mainnet/band/yoda.md).

# Yoda Configuration

<figure><img src="https://pbs.twimg.com/profile_images/1404775608798699522/ohhSUimj_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id      | Wasm    |
| ------- | ------------- | ------- |
| v2.5.3  | laozi-mainnet | ENABLED |

## Set AWS Lambda Executor

### Create Lambda Function

Go to [AWS Lambda](https://ap-southeast-1.console.aws.amazon.com/lambda/home?region=ap-southeast-1#/functions), and click "Create Function"

<figure><img src="https://1191375740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFjRVAAvDXpeV009Yknel%2Fuploads%2FCDW8TGaYbUoI7LI6Gf9y%2Fimage.png?alt=media&#x26;token=3553e230-2c53-49b3-9dbe-1a3a53d648d2" alt=""><figcaption></figcaption></figure>

Select :

* Select Author from Scratch.
* Create Function Name.
* Runtime Python 3.7.
* Create new user in the Permission Tab. Click Create Function

You will see this page

![Alt text](/files/ThjbP9Tk85ZTtj3fLi3X)

Scroll down until you see Function Code Panel click Actions - Upload .ZIP file.

You can get the [.zip here](https://github.com/bandprotocol/data-source-runtime/releases/download/v2.0.0/lambda-yoda.zip)

![Alt text](/files/ZhHVJn2OyL9P5RTUO7QG)

![Alt text](/files/UNtsT9MUykOlsg7NXBi6)

Go to Configuration - Environment variabeles - Edit

Environment variables section and add 2 environment variables: MAX\_EXECUTABLE to 8192 (8 MB) and MAX\_DATA\_SIZE to 256.

![Alt text](/files/vXe5ZqnQBQKHTsHVtM77)

Go to Configuration - General Configuration - Edit Basic Settings and update the runtime configurations.

512MB RAM and 12 seconds timeout is Recommended.

![Alt text](/files/S7zloRZwxbN21JohY0m1)

### Create Trigger

Click Add Trigger - API Gateway

Then Follow like the image below

![Alt text](/files/m59FofH1toelKtJhzKMM)

![Alt text](/files/BpypNzYImZ20HoecNqu7)

![Alt text](/files/WnfcR01vaX93ZGAXHH8p)

Click "Add", And your Trigger for Lambda Executor is Ready.

## Yoda Executor Configuration

```sh
# clear old yoda config, Optional
rm -rf ~/.yoda
```

```sh
yoda config chain-id laozi-mainnet
yoda config node http://localhost:26657 #Your Node Port
yoda config broadcast-timeout "5m"
yoda config rpc-poll-interval "1s"
yoda config max-try 5
yoda config validator $(bandd keys show wallet -a --bech val)
```

Add 5 REPORTER wallet

```sh
yoda keys add REPORTER_1
yoda keys add REPORTER_2
yoda keys add REPORTER_3
yoda keys add REPORTER_4
yoda keys add REPORTER_5
```

You can recover existing wallet with this command , and so on

```sh
yoda keys add REPORTER_1 --recover
```

Fund your Reporter wallet

```sh
bandd tx multi-send 1uband $(yoda keys list -a) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from mywallet --chain-id laozi-mainnet -y
```

Set the Executor Variable

Replace \<EXECUTOR\_URL> to yours

```sh
export EXECUTOR_URL=<EXECUTOR_URL>
```

If you wondering where is the Executor URL

![Alt text](/files/QP4wxlcIFKeKJL2vWzpp)

Set Config Executor

```sh
yoda config executor "rest:${EXECUTOR_URL}?timeout=10s"
```

Start Yoda using systemctl

```sh
sudo tee /etc/systemd/system/yoda.service > /dev/null << EOF
[Unit]
Description=Yoda Daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$USER/go/bin/yoda run
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF
```

Start Yoda

```sh
sudo systemctl daemon-reload
sudo systemctl enable yoda
sudo systemctl start yoda
```

Check the logs using journalctl

```sh
journalctl -fu yoda -o cat
```

Logs Should look like this

```sh
... systemd[...]: Started Yoda Daemon.
... yoda[...]: I[...] ⭐  Creating HTTP client with node URI: tcp://localhost:26657
... yoda[...]: I[...] 🚀  Starting WebSocket subscriber
... yoda[...]: I[...] 👂  Subscribing to events with query: tm.event = 'Tx'...
```

Wait for the Band Node to be synced , After Band node is synced you can add and activate your reporter Oracle with this simple command

Add Reporter wallet to Oracle

```sh
bandd tx oracle add-reporters $(yoda keys list -a) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from wallet --chain-id laozi-mainnet
```

Activate Oracle

```sh
bandd tx oracle activate --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from wallet --chain-id laozi-mainnet
```

## Useful Commands

Multi Send Band to Reporter wallet

```sh
bandd tx multi-send 1uband $(yoda keys list -a) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from mywallet --chain-id laozi-mainnet -y
```

Add Reporter wallet to Oracle

```sh
bandd tx oracle add-reporters $(yoda keys list -a) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from wallet --chain-id laozi-mainnet
```

Activate Oracle

```sh
bandd tx oracle activate --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.5 --from wallet --chain-id laozi-mainnet
```

Check Oracle Status

```sh
bandd query oracle validator $(bandd keys show -a wallet --bech val) --chain-id laozi-mainnet
```

Output :

![Alt text](/files/wk7ivKa6HdRGt49EtcUB)
