-
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.
Signed-off-by: Chen Kai <[email protected]>
- Loading branch information
Showing
5 changed files
with
132 additions
and
27 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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Op-Besu | ||
# Op-besu | ||
|
||
[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. | ||
|
||
[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/). |
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 |
---|---|---|
@@ -1,30 +1,82 @@ | ||
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; | ||
|
||
# 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). | ||
Download and install [Docker](https://docs.docker.com/get-started/get-docker/). | ||
|
||
## Pull docker image | ||
|
||
```shell | ||
docker pull docker pull ghcr.io/optimism-java/op-besu:latest | ||
docker pull ghcr.io/optimism-java/op-besu:latest | ||
``` | ||
|
||
## Create a JWT Secret | ||
|
||
You can check the [JWT secret creation tutorial](https://docs.optimism.io/builders/node-operators/tutorials/testnet#create-a-jwt-secret) | ||
to learn how to create a JWT secret. | ||
|
||
```shell | ||
openssl rand -hex 32 > jwt.txt | ||
``` | ||
|
||
## Prepare the data directory | ||
|
||
```bash | ||
mkdir datadir | ||
``` | ||
|
||
## Start a Op-Besu node | ||
|
||
<Tabs> | ||
<TabItem value="op sepolia" label="op sepolia" default> | ||
`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 ` | ||
|
||
```shell | ||
docker run -it -p 8545:8545 -p 8551:8551 -v ./jwt.txt:/jwt/jwtsecret \ | ||
-v ./datadir:/data/ \ | ||
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 | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="devnet or other" label="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 ` | ||
```shell | ||
docker run -it -p 8545:8545 -p 8551:8551 -v ./jwt.txt:/jwt/jwtsecret \ | ||
-v ./datadir:/data/ \ | ||
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 | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
:::danger Warning | ||
|
||
The following settings are a security risk in production environments: | ||
|
||
- 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. | ||
- Setting `--host-allowlist` to `"*"` allows JSON-RPC API access from any host. | ||
- Setting `--rpc-http-cors-origins` to `"all"` or `"*"` allows cross-origin resource sharing (CORS) access from any domain. | ||
|
||
::: |