This doc introduces how to build all components from source code.
For the overall architecture, please refer to mach-avs#architecture
The following components is required
-
Run as an operator
- mach-operator-node
- mach-operator-verifier
-
Run whole system in local testnet
- mach-operator-node
- mach-operator-verifier
- mach-operator-aggregator
- mach-avs-contracts
Comming soon
-
mach-avs: https://github.com/alt-research/mach-avs
In this repo, we have following components:
-
mach-operator-node
-
mach-operator-aggregator
Notice:
mach-operator-aggregator
will migrate to other respository soon. -
mach-avs-contracts
-
-
mach-avs
For mach-avs, it is mainly written in
solidity
andgo
.For the steps to compile this repo, please check mach-avs#build-and-run
Supported technology stack:
Opstack(Optimism) | Orbit(arbitrum) | |
---|---|---|
BLS Signature Aggregation Mode | supported | comming soon |
ZK Proof Mode | comming soon | not supported |
For OP Stack based rollup, user needs to prepare the genesis.json
file and the endpoint of this rollup.
-
genesis.json
:-
If this chain is an "op superchain", and has existed in superchain-registry, you can use the latest to
op-geth
(op-geth/releases) to get thegenesis.json
file../geth dumpgenesis --op-network=<network name, e.g. op-mainnet> > genesis.json
-
If this rollup is not part of OP Superchain or cannot be located in superchain-registry, please ask the project team for help to get the
genesis.json
file -
For
op-mach
, thisgenesis.json
does not need to fieldalloc
, thus, if the field is empty in this file is also ok.
-
-
endpoint of this rollup:
-
The chain id from this endpoint must need to match the chain id in the
genesis.json
. i.e., This endpoint must belong to this rollup. -
We highly recommend that you run
op-mach
and this rollup fullnode within the same network as it reduces network latency, especially when you setsafe
orstrict
in theconfig.toml
file forop-mach
. (refer to mach#configuration)
-
- mach-operator-node:
mach-operator
can be found in themach-avs
repo.
-
Run
mach-operator-verifier
-
To prepare the
config.toml
, please refer to mach#configurationPlease notice the
url
must be pointing to the RPC endpoint of this rollup. -
Run
mach-operator-verifier
please refer to the docker-compose file inethereum/mach-avs/optimism/docker-compose.yml
.
-
-
Run
mach-operator-node
Please refer to the doc: RunOperator
For the setup of operator, It is the same process as "Run as Operator"
Before you run the operator, you need to deploy the contract and run tthe aggregator.
-
Deploy the contracts in local network:
-
Run the aggregator:
-
Run
mach-operator-verifier
is same as above -
Run
mach-operator-node
Please set the corrent the aggregator endpoint and related info from
1
step.