Bridge Executor

The bridge executor is the core component in minitia rollup, which is charge of following operations via L2 Bridge Module:

  • Finalize L1 deposit transaction to L2.

  • Construct withdraw tx storage Merkle Tree.

  • Compute L2 output root.

  • Provide the withdrawal proofs (Merkle Proofs) to users.

The executor bot monitors both L1 and L2 nodes to execute bridge transactions efficiently.

Step 2: Set Bridge Executor Config on .env.executor

Configure the .env.executor file created in Setting Up OPinit Bots with the following information.

  • TYPEORM_DATABASE should be the name of the database previously created

  • L2_CHAIN_ID and EXECUTOR_MNEMONIC are your minitia's chain ID and bridge executor menmonic found in $HOME/.minitia/artifacts/config.json

  • BRIDGE_ID can be found in $HOME/.minitia/artifacts/artifacts.json

.env.executor
TYPEORM_CONNECTION=postgres               # database connection (currently only support `postgres`)
TYPEORM_HOST=localhost                    # database host
TYPEORM_USERNAME=username                 # database username
TYPEORM_PASSWORD=password                 # database password
TYPEORM_DATABASE=rollup                   # database name
TYPEORM_PORT=5432                         # database port
TYPEORM_SYNCHRONIZE=true                  # synchronize database schema
TYPEORM_LOGGING=false                     # enable logging
TYPEORM_ENTITIES=dist/orm/*Entity.js      # entity path

L1_CHAIN_ID=initiation-1
L2_CHAIN_ID=local-minitia
L1_LCD_URI=https://lcd.initiation-1.initia.xyz
L1_RPC_URI=https://rpc.initiation-1.initia.xyz
L2_LCD_URI=http://127.0.0.1:1317
L2_RPC_URI=http://127.0.0.1:26657
BRIDGE_ID=1                                # need to be same as in $HOME/.minitia/artifacts/artifacts.json

EXECUTOR_PORT=5000
ENABLE_ORACLE=true
EXECUTOR_MNEMONIC='tent apple ...'         # need to be same as in $HOME/.minitia/artifacts/artifacts.json

# optional config
# EXECUTOR_L1_MONITOR_HEIGHT=0
# EXECUTOR_L2_MONITOR_HEIGHT=0
# SLACK_WEB_HOOK=''
NameDescriptionDefault

L1_LCD_URI

L1 node LCD URI

L1_RPC_URI

L1 node RPC URI

L2_LCD_URI

L2 node LCD URI

L2_RPC_URI

L2 node RPC URI

BRIDGE_ID

Bridge ID

''

EXECUTOR_PORT

Executor port

5000

EXECUTOR_MNEMONIC

Mnemonic seed for executor

''

SLACK_WEB_HOOK

Slack web hook for notification (optional)

''

BATCH_SUBMITTER_ADDR

Batch submitter address

''

EXECUTOR_L1_MONITOR_HEIGHT

L1 monitor start height (optional)

0

EXECUTOR_L2_MONITOR_HEIGHT

L2 monitor start height (optional)

0

ENABLE_API_ONLY

Enable API only mode (optional)

false

ENABLE_ORACLE

Enable Oracle (optional)

false

L1_CLIENT_ID

L1 client id for Oracle (optional)

''

Step 3: Run the Executor Bot

npm run prod:executor

Last updated

Logo

© 2024 Initia Foundation, All rights reserved.