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.
- Docker
- Docker Compose
Type this in a terminal to run the demo:
docker compose up -d
Type this to check the first operator's logs:
docker compose logs -f operator1
Of course you can specify operator2
and operator3
as well.
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.
These are services defined in docker-compose.yml.
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.
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.
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.
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.
This bot continuously deposits and withdraws tokens using the OP bridge. It's to create dummy tasks for the operators to process.
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.