forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ethereum-optimism#132 from ethereum-optimism/impl-…
…node ref impl: main node process (connect with RPC, start drivers, handle shutdown)
- Loading branch information
Showing
4 changed files
with
281 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# opnode | ||
|
||
This is the reference implementation of the [rollup-node spec](../specs/rollup-node.md). | ||
|
||
## Compiling | ||
|
||
```shell | ||
go build -o op ./opnode/cmd | ||
``` | ||
|
||
## Running | ||
|
||
Options can be reviewed with: | ||
|
||
```shell | ||
./op run --help | ||
``` | ||
|
||
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/reference-optimistic-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 | ||
|
||
```shell | ||
# websockets or IPC preferred for event notifications to improve sync, http RPC works with adaptive polling. | ||
op node run \ | ||
--l1=ws://localhost:8546 --l2=ws//localhost:9001 \ | ||
--genesis.l1-num=.... --genesis.l1-hash=..... --genesis.l2-hash=.... | ||
``` |
Oops, something went wrong.