This repository contains the Go implementation of OPinit bots.
Before running OPinit bots, make sure you have the following prerequisites installed:
- Go 1.22.2+
To ensure compatibility with the node version, check the following versions:
L1 Node | MiniMove | MiniWasm | MiniEVM |
---|---|---|---|
v0.5.3+ | v0.5.3+ | v0.5.2+ | v0.5.2+ |
To build and configure the bots, follow these steps:
make install
opinitd init [bot-name]
Default config path is ~/.opinit/[bot-name].json
- Customize home dir with
--home ~/.opinit-custom-path
- Customize config name with
--config [bot-custom-name].json
Supported bot names
executor
challenger
opinitd keys add [chain-id] [key-name]
### with mnemonic file
opinitd keys add [chain-id] [key-name] --recover --source [mnemonic-file-path]
### with mnemonic input
opinitd keys add [chain-id] [key-name] --recover
### with bech32 prefix
opinitd keys add [chain-id] [key-name] --bech32=celestia
To start the bot, use the following command:
opinitd start [bot-name]
Options
--log-level
: log level can be set. Default log level isinfo
.--polling-interval
: polling interval can be set. Default polling interval is100ms
.--config
: config file name can be set. Default config file name is[bot-name].json
.--home
: home dir can be set. Default home dir is~/.opinit
.
To reset the bot database, use the following command:
opinitd reset-db [bot-name]
To reset bot's all height info to 0, use the following command:
opinitd reset-heights [bot-name]
To reset bot's specific node height info to 0 , use the following command:
opinitd reset-height [bot-name] [node-type]
Executor node types:
- host
- child
- batch
Challenger node types:
- host
- child