Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JSHan94 committed Nov 30, 2023
1 parent 89c41da commit feedda7
Showing 1 changed file with 28 additions and 23 deletions.
51 changes: 28 additions & 23 deletions bots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,52 +43,57 @@ const msg = new MsgCreateBridge(executor.key.accAddress, bridgeConfig);
| OUTPUT_SUBMITTER_MNEMONIC | Mnemonic seed for output submitter | '' |
| CHALLENGER_MNEMONIC | Mnemonic seed for challenger | '' |

> In OPinit bots, we use [direnv](https://direnv.net) for managing environment variable for development. See [sample of .envrc](.envrc_sample)
> In OPinit bots, we use [direnv](https://direnv.net) for managing environment variable for development. See [sample of .envrc](.envrc_sample).
## Bridge Executor

Bridge executor is a bot that monitor L1, L2 node and execute bridge transaction. It will execute following steps.

1. Set bridge executor mnemonic on `.envrc`.
2. Set DB configurations using `ormconfig.json` or `.envrc`.
3. Run executor bot
- Execute L1, L2 monitor in bridge executor
```bash
npm run executor
```
```bash
export EXECUTOR_MNEMONIC="..."
```
2. Run executor bot
```bash
npm run executor
```

## Batch Submitter

Batch submitter is a background process that submits transaction batches to the BatchInbox module of L1.

1. Set batch submitter mnemonic on `.envrc`.
2. Set DB configurations using `ormconfig.json` or `.envrc`.
3. Run batch submitter bot
- Execute batch submitter
```bash
npm run batch
```
```bash
export BATCH_SUBMITTER_MNEMONIC="..."
```
2. Run batch submitter bot
```bash
npm run batch
```

## Output Submitter

Output submitter is the component to store the L2 output root for block finalization.
Output submitter will get the L2 output results from executor and submit it to L1.

1. Set output submitter mnemonic on `.envrc`.
```bash
export OUTPUT_SUBMITTER_MNEMONIC="..."
```
2. Run output submitter bot
- Execute output submitter
```bash
npm run output
```
```bash
npm run output
```

## Challenger

Challenger is an entity capable of deleting invalid output proposals from the output oracle.

1. Set challenger mnemonic on `.envrc`.
2. Set DB configurations using `ormconfig.json` or `.envrc`.
3. Run challenger bot
- Execute challenger
```bash
npm run challenger
```
```bash
export CHALLENGER_MNEMONIC="..."
```
2. Run challenger bot
```bash
npm run challenger
```

0 comments on commit feedda7

Please sign in to comment.