Skip to content

Commit

Permalink
modify struct
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkAfCod committed Aug 6, 2024
1 parent a35b5ce commit 766532c
Show file tree
Hide file tree
Showing 9 changed files with 227 additions and 147 deletions.
10 changes: 10 additions & 0 deletions docs/hildr/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Hildr
Hildr is an OP Stack rollup client written in Java 21. And follow the [spec](https://github.com/ethereum-optimism/optimism/blob/develop/specs/rollup-node.md):

[Magi](https://github.com/a16z/magi)

[Op-node](https://github.com/ethereum-optimism/optimism/tree/develop/op-node)




47 changes: 47 additions & 0 deletions docs/hildr/use_docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Use docker

You can use Docker to run [Hildr](https://github.com/optimism-java/hildr) as an Optimism CL node.

## Pull docker image

```shell
docker pull ghcr.io/optimism-java/hildr:latest
```

## Start a Hildr node

=== "op sepolia"
```shell
docker run -it -p 11545:11545 \
-v <you jwt secret>:/jwt/jwt.hex \
ghcr.io/optimism-java/op-besu:latest -- \
--network optimism-sepolia \ # can be either: "optimism","base","base-sepolia"
--jwt-file /jwt/jwt.hex \
--l1-rpc-url http://localhost:9545 \
--l1-ws-rpc-url ws://localhost:9546 \
--l1-beacon-url http://localhost:4000 \
--l2-rpc-url http://localhost:8545 \
--l2-engine-url http://localhost:8551 \
--rpc-port 11545 \
--log-level INFO \ # can be either: "DEBUG","TRACE","WARN","ERROR"
--sync-mode full
```

=== "devnet or other"
```shell
docker run -it -p 11545:11545 \
-v <your jwt secret>:/jwt/jwt.hex \
-v <your rollup.json file>:/network-configs/rollup.json
ghcr.io/optimism-java/op-besu:latest -- \
--devnet \
--network=/network-configs/rollup.json \
--jwt-file /jwt/jwt.hex \
--l1-rpc-url http://localhost:9545 \
--l1-ws-rpc-url ws://localhost:9546 \
--l1-beacon-url http://localhost:4000 \
--l2-rpc-url http://localhost:8545 \
--l2-engine-url http://localhost:8551 \
--rpc-port 11545 \
--log-level INFO \ # can be either: "DEBUG","TRACE","WARN","ERROR"
--sync-mode full
```
47 changes: 47 additions & 0 deletions docs/hildr/use_jar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Use the Hildr jar

## Prerequisites


[Java JDK 21+](https://www.oracle.com/java/technologies/downloads/)

## Download the Hildr jar

Download the [Hildr jar](https://github.com/optimism-java/hildr/releases).

## Start a Hildr node

=== "op sepolia"

```shell
java --enable-preview \
-cp <the Hildr jar file> io.optimism.Hildr \
--network optimism-sepolia \
--jwt-secret ./jwt.hex \
--l1-rpc-url http://localhost:9545 \
--l1-ws-rpc-url ws://localhost:9546 \
--l1-beacon-url http://localhost:4000 \
--l2-rpc-url http://localhost:8545 \
--l2-engine-url http://localhost:8551 \
--rpc-port 11545 \
--log-level INFO \ # can be either: "DEBUG","TRACE","WARN","ERROR"
--sync-mode full >l2-hildr-node.log 2>&1 &
```

=== "devnet or other"

```shell
java --enable-preview \
-cp <the Hildr jar file> io.optimism.Hildr \
--devnet \
--network <rollup.json file> \
--jwt-secret ./jwt.hex \
--l1-rpc-url http://localhost:9545 \
--l1-ws-rpc-url ws://localhost:9546 \
--l1-beacon-url http://localhost:4000 \
--l2-rpc-url http://localhost:8545 \
--l2-engine-url http://localhost:8551 \
--rpc-port 11545 \
--log-level INFO \ # can be either: "DEBUG","TRACE","WARN","ERROR"
--sync-mode full >l2-hildr-node.log 2>&1 &
```
3 changes: 3 additions & 0 deletions docs/op-besu/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Op-Besu

[Op-Besu](https://github.com/optimism-java/op-besu) is a fork of [Besu](https://github.com/hyperledger/besu) that supports the [execution engine](https://github.com/ethereum-optimism/specs/blob/main/specs/fjord/exec-engine.md) of [OP stack](https://stack.optimism.io/).
51 changes: 51 additions & 0 deletions docs/op-besu/use_binaries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Use the packaged binaries

You can install the Op-besu or Op-geth client to run a Optimism EL node from a binary distribution.

## Prerequisites

[Java JDK 21+](https://www.oracle.com/java/technologies/downloads/)

## Install from packaged binaries

Download the Op Besu [packaged binaires](https://github.com/optimism-java/op-besu/releases).

Unpack the downloaded files and change into the `op-besu-<release>` directory.

## Run a Op-Besu node

=== "op sepolia"

```shell
cd op-besu-<release> && \
./bin/besu \
--network=OP_SEPOLIA \
--p2p-enabled=false \
--discovery-enabled=false \
--data-path=<your data dir> \
--engine-rpc-enabled \
--engine-jwt-secret=<jwt secret file> \
--rpc-http-enabled \
--host-allowlist=* \
--engine-host-allowlist=* \
--logging=INFO \
--version-compatibility-protection=false
```

=== "devnet or other"

```shell
cd op-besu-<release> && \
./bin/besu \
--genesis-file=<devnet genesis file> \
--p2p-enabled=false \
--discovery-enabled=false \
--data-path=<your data dir> \
--engine-rpc-enabled \
--engine-jwt-secret=<jwt secret file> \
--rpc-http-enabled \
--host-allowlist=* \
--engine-host-allowlist=* \
--logging=INFO \
--version-compatibility-protection=false
```
50 changes: 50 additions & 0 deletions docs/op-besu/use_docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Use docker

You can use Docker to run [Op-Besu](https://github.com/optimism-java/op-besu) or [Op-Geth](https://github.com/ethereum-optimism/op-geth) as a Optimism EL node on the testnets.

## Prerequisites

Download and install [Docker](https://www.docker.com/products/docker-desktop).

## Pull docker image

```shell
docker pull docker pull ghcr.io/optimism-java/op-besu:latest
```

## Start a Op-Besu node

=== "op sepolia"
```shell
docker run -it -p 8545:8545 -p 8551:8551 -v <you jwt secret>:/jwt/jwtsecret \
ghcr.io/optimism-java/op-besu:latest -- \
--network=OP_SEPOLIA \
--p2p-enabled=false \
--discovery-enabled=false \
--data-path="/data/" \
--engine-rpc-enabled \
--engine-jwt-secret="/jwt/jwtsecret" \
--rpc-http-enabled \
--host-allowlist="*" \
--engine-host-allowlist="*" \
--logging=INFO \
--version-compatibility-protection=false
```

=== "devnet or other"
```shell
docker run -it -p 8545:8545 -p 8551:8551 -v <you jwt secret>:/jwt/jwtsecret \
ghcr.io/optimism-java/op-besu:latest -- \
--genesis-file=<devnet genesis file> \
--p2p-enabled=false \
--discovery-enabled=false \
--data-path="/data/" \
--engine-rpc-enabled \
--engine-jwt-secret="/jwt/jwtsecret" \
--rpc-http-enabled \
--host-allowlist="*" \
--engine-host-allowlist="*" \
--logging=INFO \
--version-compatibility-protection=false
```

67 changes: 0 additions & 67 deletions docs/start_hildr.md

This file was deleted.

77 changes: 0 additions & 77 deletions docs/start_op_besu.md

This file was deleted.

22 changes: 19 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,29 @@ theme:
palette:
primary: red
features:
- announce.dismiss
- content.code.copy
- navigation.indexes
- navigation.tabs
icon:
repo: fontawesome/brands/github

# Extensions
markdown_extensions:
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true

# Page tree
nav:
- Home: index.md
- Getting started:
- Run Hildr: start_hildr.md
- Run Op-Besu: start_op_besu.md
- Hildr:
- hildr/index.md
- Run a Hildr node:
- Use the jar: hildr/use_jar.md
- Use docker: hildr/use_docker.md
- Op-Besu:
- op-besu/index.md
- Run a Op-Besu node:
- Use the packaged bianries: op-besu/use_binaries.md
- Use Docker: op-besu/use_docker.md

0 comments on commit 766532c

Please sign in to comment.