Skip to content

milkyway-labs/multiple-sequencers-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Multiple Sequencers Demo

This demo highlights how Minitias can achieve redundancy and decentralization of sequencers by using the MilkyWay restaking platform.

In this demo, we have three chains running: MilkyWay, Initia and Minitia. First, Minitia's admin instantiates a CosmWasm smart contract on the MilkyWay chain in order to create a new AVS(Actively Validated Service). MilkyWay operators then join the service to perform sequencing actions, which include output and batch submissions, finalizing token deposits and updating price oracle. The smart contract handles random operator selection for each epoch.

Running the demo

Prerequisites

  • Docker
  • Docker Compose

Start the demo

Type this in a terminal to run the demo:

docker compose up -d

Check the logs

Type this to check the first operator's logs:

docker compose logs -f operator1

Of course you can specify operator2 and operator3 as well.

Reset data

This demo uses Docker volumes to persist data. If you encounter any problems during the demo and want a clean restart, please run:

docker compose down -v

And then rerun the demo.

Services

These are services defined in docker-compose.yml.

initia

The Initia chain. Inside its entrypoint, the Minitia's output submitter and batch submitter grant permissions to the MilkyWay operators for executing MsgProposeOutput and MsgRecordBatch on behalf of them.

milkyway

The MilkyWay chain. Inside its entrypoint, the smart contract is stored and instantiated by the Minitia's admin. Upon its instantiation, the smart contract creates a new AVS. Then, the MilkyWay operators joins the this newly created AVS.

minitia

The Minitia chain. Inside its entrypoint, the Minitia's bridge executor grants permissions to the MilkyWay operators for executing MsgFinalizeTokenDeposit and MsgUpdateOracle on behalf of it.

operator1, operator2, operator3

These are the MilkyWay operators. An operator uses the modified version of opinit-bots binary which queries the smart contract on the MilkyWay chain to check if it's their turn.

Visit http://localhost:13000/status, http://localhost:23000/status and http://localhost:33000/status for their statuses.

bridgebot

This bot continuously deposits and withdraws tokens using the OP bridge. It's to create dummy tasks for the operators to process.

challenger

This service runs the plain opinit-bots program and checks if there was any misbehavior by operators.

Visit http://localhost:43000/status to check the challenger's status.

About

πŸ‘¨πŸ»β€πŸ’» Multiple Sequencers Demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published