Skip to content

Commit e519df2

Browse files
committed
fix:refine op-besu doc
Signed-off-by: Chen Kai <[email protected]>
1 parent 434220c commit e519df2

File tree

5 files changed

+132
-27
lines changed

5 files changed

+132
-27
lines changed

Diff for: docs/hildr-docs/index.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ image: /img/socialCards/hildr.jpg
55

66
# Hildr
77

8-
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):
8+
Hildr is an OP Stack Rollup Node written in Java 21. You can check out the [architecture](https://docs.optimism.io/builders/node-operators/architecture) of OP Stack, hildr is the equivalent of op-node.
99

10-
[Magi](https://github.com/a16z/magi)
10+
:::note
1111

12-
[Op-node](https://github.com/ethereum-optimism/optimism/tree/develop/op-node)
12+
Running a sequencer node is currently not possible and there is no option to vote on blocks as part of the consensus mechanism or fork-choice like on Ethereum.
13+
14+
:::

Diff for: docs/hildr-docs/run-a-node/use_jar.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
44

55
## Prerequisites
66

7-
[Java JDK 21+](https://www.oracle.com/java/technologies/downloads/)
7+
Download and install the [Java JDK 21+](https://www.oracle.com/java/technologies/downloads/).
88

9-
## Download the Hildr jar
9+
## Step1. Download the Hildr jar
1010

11-
Download the [Hildr jar](https://github.com/optimism-java/hildr/releases).
11+
Download the [Hildr jar](https://github.com/optimism-java/hildr/releases) from Github.
12+
13+
```shell
14+
wget https://github.com/optimism-java/hildr/releases/download/v0.4.4/hildr-node.jar
15+
```
1216

1317
## Start a Hildr node
1418

Diff for: docs/op-besu-docs/index.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# Op-Besu
1+
# Op-besu
2+
3+
[Op-besu](https://github.com/optimism-java/op-besu) is a fork of [Besu](https://github.com/hyperledger/besu) that implement the [execution engine](https://github.com/ethereum-optimism/specs/blob/main/specs/fjord/exec-engine.md) of [OP stack](https://stack.optimism.io/). You can check out the [architecture](https://docs.optimism.io/builders/node-operators/architecture) of OP Stack, op-besu is the equivalent of op-geth.
24

3-
[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/).

Diff for: docs/op-besu-docs/run-a-node/use_binaries.md

+57-11
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,67 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
22

33
# Use the packaged binaries
44

5-
You can install the Op-besu or Op-geth client to run a Optimism EL node from a binary distribution.
6-
75
## Prerequisites
86

9-
[Java JDK 21+](https://www.oracle.com/java/technologies/downloads/)
7+
Download and install the [Java JDK 21+](https://www.oracle.com/java/technologies/downloads/)
108

119
## Install from packaged binaries
1210

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

15-
Unpack the downloaded files and change into the `op-besu-<release>` directory.
13+
```shell
14+
wget https://github.com/optimism-java/op-besu/releases/download/v0.1.0/op-besu-v0.1.0.tar.gz
15+
```
16+
Unpack the downloaded file into the `op-besu-<release>` directory.
17+
18+
```shell
19+
tar -xvf op-besu-v0.1.0.tar.gz
20+
```
21+
22+
## Create a JWT Secret
23+
24+
You can check the [JWT secret creation tutorial](https://docs.optimism.io/builders/node-operators/tutorials/testnet#create-a-jwt-secret)
25+
to learn how to create a JWT secret.
26+
27+
```shell
28+
openssl rand -hex 32 > jwt.txt
29+
```
30+
31+
## Navigate to your op-besu directory
32+
33+
Find the directory where you built the `op-besu` binary.
34+
35+
```shell
36+
cd op-besu-v0.1.0
37+
```
38+
39+
## Copy in the JWT secret
1640

17-
## Run a Op-Besu node
41+
Copy the JWT secret you generated in a previous step into the `op-besu` directory.
42+
43+
```bash
44+
cp /path/to/jwt.txt .
45+
```
46+
47+
## Prepare the data directory
48+
49+
```bash
50+
mkdir datadir
51+
```
52+
53+
## Run an op-besu node
1854

1955
<Tabs>
2056
<TabItem value="op sepolia" label="op sepolia" default>
2157

2258
```shell
23-
cd op-besu-<release> && \
2459
./bin/besu \
2560
--network=OP_SEPOLIA \
2661
--p2p-enabled=false \
2762
--discovery-enabled=false \
28-
--data-path=<your data dir> \
63+
--data-path=datadir \
2964
--engine-rpc-enabled \
30-
--engine-jwt-secret=<jwt secret file> \
65+
--engine-jwt-secret=./jwt.txt \
3166
--rpc-http-enabled \
3267
--host-allowlist=* \
3368
--engine-host-allowlist=* \
@@ -38,16 +73,17 @@ Unpack the downloaded files and change into the `op-besu-<release>` directory.
3873
</TabItem>
3974

4075
<TabItem value="devnet or other" label="devnet or other">
76+
You can check how to generate a devnet genesis file [here](https://docs.optimism.io/builders/chain-operators/deploy/genesis).
77+
Also you could use the [optimism devnet tool](https://github.com/ethpandaops/optimism-package).
4178

4279
```shell
43-
cd op-besu-<release> && \
4480
./bin/besu \
4581
--genesis-file=<devnet genesis file> \
4682
--p2p-enabled=false \
4783
--discovery-enabled=false \
48-
--data-path=<your data dir> \
84+
--data-path=datadir \
4985
--engine-rpc-enabled \
50-
--engine-jwt-secret=<jwt secret file> \
86+
--engine-jwt-secret=./jwt.txt \
5187
--rpc-http-enabled \
5288
--host-allowlist=* \
5389
--engine-host-allowlist=* \
@@ -58,3 +94,13 @@ Unpack the downloaded files and change into the `op-besu-<release>` directory.
5894
</TabItem>
5995

6096
</Tabs>
97+
98+
:::danger Warning
99+
100+
The following settings are a security risk in production environments:
101+
102+
- Enabling the HTTP JSON-RPC service (`--rpc-http-enabled`) and setting `--rpc-http-host` to 0.0.0.0 exposes the RPC connection on your node to any remote connection.
103+
- Setting `--host-allowlist` to `"*"` allows JSON-RPC API access from any host.
104+
- Setting `--rpc-http-cors-origins` to `"all"` or `"*"` allows cross-origin resource sharing (CORS) access from any domain.
105+
106+
:::

Diff for: docs/op-besu-docs/run-a-node/use_docker.md

+60-8
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,82 @@
11
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
22

3-
# Use docker
4-
5-
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.
6-
73
## Prerequisites
84

9-
Download and install [Docker](https://www.docker.com/products/docker-desktop).
5+
Download and install [Docker](https://docs.docker.com/get-started/get-docker/).
106

117
## Pull docker image
128

139
```shell
14-
docker pull docker pull ghcr.io/optimism-java/op-besu:latest
10+
docker pull ghcr.io/optimism-java/op-besu:latest
11+
```
12+
13+
## Create a JWT Secret
14+
15+
You can check the [JWT secret creation tutorial](https://docs.optimism.io/builders/node-operators/tutorials/testnet#create-a-jwt-secret)
16+
to learn how to create a JWT secret.
17+
18+
```shell
19+
openssl rand -hex 32 > jwt.txt
20+
```
21+
22+
## Prepare the data directory
23+
24+
```bash
25+
mkdir datadir
1526
```
1627

1728
## Start a Op-Besu node
1829

1930
<Tabs>
2031
<TabItem value="op sepolia" label="op sepolia" default>
21-
`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 `
32+
33+
```shell
34+
docker run -it -p 8545:8545 -p 8551:8551 -v ./jwt.txt:/jwt/jwtsecret \
35+
-v ./datadir:/data/ \
36+
ghcr.io/optimism-java/op-besu:latest \
37+
--network=OP_SEPOLIA \
38+
--p2p-enabled=false \
39+
--discovery-enabled=false \
40+
--data-path="/data/" \
41+
--engine-rpc-enabled \
42+
--engine-jwt-secret="/jwt/jwtsecret" \
43+
--rpc-http-enabled \
44+
--host-allowlist="*" \
45+
--engine-host-allowlist="*" \
46+
--logging=INFO \
47+
--version-compatibility-protection=false
48+
```
2249

2350
</TabItem>
2451

2552
<TabItem value="devnet or other" label="devnet or other">
2653

27-
`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 `
54+
```shell
55+
docker run -it -p 8545:8545 -p 8551:8551 -v ./jwt.txt:/jwt/jwtsecret \
56+
-v ./datadir:/data/ \
57+
ghcr.io/optimism-java/op-besu:latest \
58+
--genesis-file=<devnet genesis file> \
59+
--p2p-enabled=false \
60+
--discovery-enabled=false \
61+
--data-path="/data/" \
62+
--engine-rpc-enabled \
63+
--engine-jwt-secret="/jwt/jwtsecret" \
64+
--rpc-http-enabled \
65+
--host-allowlist="*" \
66+
--engine-host-allowlist="*" \
67+
--logging=INFO \
68+
--version-compatibility-protection=false
69+
```
2870

2971
</TabItem>
3072
</Tabs>
73+
74+
:::danger Warning
75+
76+
The following settings are a security risk in production environments:
77+
78+
- Enabling the HTTP JSON-RPC service (`--rpc-http-enabled`) and setting `--rpc-http-host` to 0.0.0.0 exposes the RPC connection on your node to any remote connection.
79+
- Setting `--host-allowlist` to `"*"` allows JSON-RPC API access from any host.
80+
- Setting `--rpc-http-cors-origins` to `"all"` or `"*"` allows cross-origin resource sharing (CORS) access from any domain.
81+
82+
:::

0 commit comments

Comments
 (0)