Commit bcb317e4 authored by Diederik Loerakker's avatar Diederik Loerakker Committed by GitHub

op-node: update readme (#3282)

Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent ccba4b10
# opnode
# op-node
This is the reference implementation of the [rollup-node spec](../specs/rollup-node.md).
## Compiling
From the repository root:
Compile a binary:
```shell
cd op-node
go build -o bin/op-node ./cmd
```
## Testing
Run op-node unit tests:
```shell
go build -o op ./op-node/cmd
go test ./op-node/...
cd op-node
go test ./...
```
Run end-to-end tests:
```shell
cd op-e2e
go test ./...
```
## Running
......@@ -16,7 +29,7 @@ go test ./op-node/...
Options can be reviewed with:
```shell
./op --help
./bin/op-node --help
```
To start syncing the rollup:
......@@ -24,18 +37,13 @@ To start syncing the rollup:
Connect to at least one L1 RPC and L2 execution engine:
- L1: use any L1 node / RPC (websocket connection path may differ)
- L2: run the Optimism fork of geth: <https://github.com/ethereum-optimism/op-geth>
Initialize the L2 chain with a `genesis.json` chain spec like L1, with the Merge fork activated from genesis.
Specify genesis details:
- L1 number / hash: starting-point of L2 chain inputs
- L2 genesis hash: to confirm we are building on the correct L2 genesis
- L2: run the Optimism fork of geth: [`op-geth`](https://github.com/ethereum-optimism/op-geth)
```shell
# websockets or IPC preferred for event notifications to improve sync, http RPC works with adaptive polling.
op \
--l1=ws://localhost:8546 --l2=ws//localhost:9001 \
--genesis.l1-num=.... --genesis.l1-hash=..... --genesis.l2-hash=....
--rollup.config=./path-to-network-config/rollup.json \
--rpc.addr=127.0.0.1 \
--rpc.port=7000
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment