Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Sep 5, 2024
1 parent 53de394 commit 9ab55bb
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
3 changes: 2 additions & 1 deletion book/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
- [L2 Output Oracle](./getting-started/l2-output-oracle.md)
- [Proposer](./getting-started/proposer.md)
- [Configuration](./getting-started/configuration.md)
- [Cost Estimator CLI Tool](./cost-estimator.md)
- [Cost Estimator CLI Tool](./cost-estimator.md)
- [L2 Node Setup](./node-setup.md)
2 changes: 1 addition & 1 deletion book/getting-started/l2-output-oracle.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# L2 Output Oracle
# Deploy L2 Output Oracle

The first step in deploying OP Succinct is to deploy a Solidity smart contract that will verify ZKPs of OP derivation (OP's name for their state transition function) and contain the latest state root of your rollup.

Expand Down
9 changes: 9 additions & 0 deletions book/getting-started/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ You must have the following installed:
- [Foundry](https://book.getfoundry.sh/getting-started/installation)
- [Docker](https://docs.docker.com/get-started/)

You must have the following RPCs available:
- L1 Archive Node
- L1 Consensus (Beacon) Node
- L2 Archive Node
- L2 Rollup Node

If you do not have an L2 OP Geth node + rollup node running for your rollup, you can follow the [node setup instructions](../node-setup.md) to get started.


## OP Stack Chain

The rest of this section will assume you have an existing OP Stack Chain running. If you do not have one, there are two ways you can get started:
Expand Down
33 changes: 33 additions & 0 deletions book/node-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# L2 Node Setup

## Setup Instructions

1. Clone [ops-anton](https://github.com/anton-rs/ops-anton) and follow the instructions in the README to set up your rollup.
2. Go to [op-node.sh](https://github.com/anton-rs/ops-anton/blob/main/L2/op-mainnet/op-node/op-node.sh#L4-L6) and set the `L2_RPC` to your rollup RPC. Modify the `l1` and `l1.beacon` to your L1 and L1 Beacon RPCs. Note: Your L1 node should be an archive node.
3. If you are starting a node for a different chain, you will need to modify `op-network` in `op-geth.sh` [here](https://github.com/anton-rs/ops-anton/blob/main/L2/op-mainnet/op-geth/op-geth.sh#L18) and `network` in `op-node.sh` [here](https://github.com/anton-rs/ops-anton/blob/main/L2/op-mainnet/op-node/op-node.sh#L10).
4. In `/L2/op-mainnet` (or the directory you chose):
1. Generate a JWT secret `./generate_jwt.sh`
2. `docker network create anton-net` (Creates a Docker network for the nodes to communicate on).
3. `just up` (Starts all the services).

Your `op-geth` endpoint will be available at the RPC port chosen [here](https://github.com/anton-rs/ops-anton/blob/main/L2/op-mainnet/op-geth/op-geth.sh#L7), which in this case is `8547` (e.g. `http://localhost:8547`).

Your `op-node` endpoint (rollup node) will be available at the RPC port chosen [here](https://github.com/anton-rs/ops-anton/blob/main/L2/op-mainnet/op-node/op-node.sh#L13), which in this case is `5058` (e.g. `http://localhost:5058`).

## Checking Sync Status

After a few hours, your node should be fully synced and you can use it to begin generating ZKPs.

To check your node's sync status, you can run the following commands:

**op-geth:**

```bash
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8547
```

**op-node:**

```bash
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"optimism_syncStatus","params":[],"id":1}' http://localhost:5058
```

0 comments on commit 9ab55bb

Please sign in to comment.