From e519df2afb7b60e195e61bda6085f4e183e5bc94 Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Wed, 21 Aug 2024 20:59:45 +0800 Subject: [PATCH 01/16] fix:refine op-besu doc Signed-off-by: Chen Kai <281165273grape@gmail.com> --- docs/hildr-docs/index.md | 8 ++- docs/hildr-docs/run-a-node/use_jar.md | 10 ++- docs/op-besu-docs/index.md | 5 +- docs/op-besu-docs/run-a-node/use_binaries.md | 68 ++++++++++++++++---- docs/op-besu-docs/run-a-node/use_docker.md | 68 +++++++++++++++++--- 5 files changed, 132 insertions(+), 27 deletions(-) diff --git a/docs/hildr-docs/index.md b/docs/hildr-docs/index.md index bf99fe9..db69df8 100644 --- a/docs/hildr-docs/index.md +++ b/docs/hildr-docs/index.md @@ -5,8 +5,10 @@ image: /img/socialCards/hildr.jpg # 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): +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. -[Magi](https://github.com/a16z/magi) +:::note -[Op-node](https://github.com/ethereum-optimism/optimism/tree/develop/op-node) +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. + +::: \ No newline at end of file diff --git a/docs/hildr-docs/run-a-node/use_jar.md b/docs/hildr-docs/run-a-node/use_jar.md index e77e107..a26c033 100644 --- a/docs/hildr-docs/run-a-node/use_jar.md +++ b/docs/hildr-docs/run-a-node/use_jar.md @@ -4,11 +4,15 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; ## Prerequisites -[Java JDK 21+](https://www.oracle.com/java/technologies/downloads/) +Download and install the [Java JDK 21+](https://www.oracle.com/java/technologies/downloads/). -## Download the Hildr jar +## Step1. Download the Hildr jar -Download the [Hildr jar](https://github.com/optimism-java/hildr/releases). +Download the [Hildr jar](https://github.com/optimism-java/hildr/releases) from Github. + +```shell +wget https://github.com/optimism-java/hildr/releases/download/v0.4.4/hildr-node.jar +``` ## Start a Hildr node diff --git a/docs/op-besu-docs/index.md b/docs/op-besu-docs/index.md index f75cf55..3932d5a 100644 --- a/docs/op-besu-docs/index.md +++ b/docs/op-besu-docs/index.md @@ -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/). diff --git a/docs/op-besu-docs/run-a-node/use_binaries.md b/docs/op-besu-docs/run-a-node/use_binaries.md index aa224c8..17f3297 100644 --- a/docs/op-besu-docs/run-a-node/use_binaries.md +++ b/docs/op-besu-docs/run-a-node/use_binaries.md @@ -2,32 +2,67 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # 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/) +Download and install the [Java JDK 21+](https://www.oracle.com/java/technologies/downloads/) ## Install from packaged binaries Download the Op Besu [packaged binaries](https://github.com/optimism-java/op-besu/releases). -Unpack the downloaded files and change into the `op-besu-` directory. +```shell +wget https://github.com/optimism-java/op-besu/releases/download/v0.1.0/op-besu-v0.1.0.tar.gz +``` +Unpack the downloaded file into the `op-besu-` directory. + +```shell +tar -xvf op-besu-v0.1.0.tar.gz +``` + +## 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 +``` + +## Navigate to your op-besu directory + +Find the directory where you built the `op-besu` binary. + +```shell +cd op-besu-v0.1.0 +``` + +## Copy in the JWT secret -## Run a Op-Besu node +Copy the JWT secret you generated in a previous step into the `op-besu` directory. + +```bash +cp /path/to/jwt.txt . +``` + +## Prepare the data directory + +```bash +mkdir datadir +``` + +## Run an op-besu node ```shell - cd op-besu- && \ ./bin/besu \ --network=OP_SEPOLIA \ --p2p-enabled=false \ --discovery-enabled=false \ - --data-path= \ + --data-path=datadir \ --engine-rpc-enabled \ - --engine-jwt-secret= \ + --engine-jwt-secret=./jwt.txt \ --rpc-http-enabled \ --host-allowlist=* \ --engine-host-allowlist=* \ @@ -38,16 +73,17 @@ Unpack the downloaded files and change into the `op-besu-` directory. +You can check how to generate a devnet genesis file [here](https://docs.optimism.io/builders/chain-operators/deploy/genesis). +Also you could use the [optimism devnet tool](https://github.com/ethpandaops/optimism-package). ```shell - cd op-besu- && \ ./bin/besu \ --genesis-file= \ --p2p-enabled=false \ --discovery-enabled=false \ - --data-path= \ + --data-path=datadir \ --engine-rpc-enabled \ - --engine-jwt-secret= \ + --engine-jwt-secret=./jwt.txt \ --rpc-http-enabled \ --host-allowlist=* \ --engine-host-allowlist=* \ @@ -58,3 +94,13 @@ Unpack the downloaded files and change into the `op-besu-` directory. + +:::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. + +::: \ No newline at end of file diff --git a/docs/op-besu-docs/run-a-node/use_docker.md b/docs/op-besu-docs/run-a-node/use_docker.md index be76385..a4cd90e 100644 --- a/docs/op-besu-docs/run-a-node/use_docker.md +++ b/docs/op-besu-docs/run-a-node/use_docker.md @@ -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 -`shell docker run -it -p 8545:8545 -p 8551:8551 -v :/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 +``` -`shell docker run -it -p 8545:8545 -p 8551:8551 -v :/jwt/jwtsecret \ ghcr.io/optimism-java/op-besu:latest -- \ --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= \ +--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 +``` + +:::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. + +::: \ No newline at end of file From 9aa01e42d5d6abe77af501ece5eb3cba7667560f Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Wed, 21 Aug 2024 21:45:45 +0800 Subject: [PATCH 02/16] fix:fix besu doc Signed-off-by: Chen Kai <281165273grape@gmail.com> --- docs/index.md | 2 +- docs/op-besu-docs/run-a-node/index.mdx | 2 +- docs/op-besu-docs/run-a-node/use_docker.md | 6 +++++- docusaurus.config.js | 6 +++--- sidebars.js | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/index.md b/docs/index.md index cb75670..0b025e5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,7 +6,7 @@ We have currently developed two important components of Optimism: [Hildr](https://github.com/optimism-java/hildr) is an optimism rollup client written in Java. -[Op-Besu](https://github.com/optimism-java/op-besu) is an optimism execution client written in Java, a fork of [Besu](https://github.com/hyperledger/besu). +[Op-besu](https://github.com/optimism-java/op-besu) is an optimism execution client written in Java, a fork of [Besu](https://github.com/hyperledger/besu). ## Our Vision diff --git a/docs/op-besu-docs/run-a-node/index.mdx b/docs/op-besu-docs/run-a-node/index.mdx index ecf7857..f21aa55 100644 --- a/docs/op-besu-docs/run-a-node/index.mdx +++ b/docs/op-besu-docs/run-a-node/index.mdx @@ -1,4 +1,4 @@ -# Run a Op-Besu node +# Run a Op-besu node import DocCardList from "@theme/DocCardList"; diff --git a/docs/op-besu-docs/run-a-node/use_docker.md b/docs/op-besu-docs/run-a-node/use_docker.md index a4cd90e..9378580 100644 --- a/docs/op-besu-docs/run-a-node/use_docker.md +++ b/docs/op-besu-docs/run-a-node/use_docker.md @@ -1,5 +1,9 @@ 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) as an Optimism EL node on the testnets. + ## Prerequisites Download and install [Docker](https://docs.docker.com/get-started/get-docker/). @@ -25,7 +29,7 @@ openssl rand -hex 32 > jwt.txt mkdir datadir ``` -## Start a Op-Besu node +## Start a Op-besu node diff --git a/docusaurus.config.js b/docusaurus.config.js index d431315..ac5db22 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -106,7 +106,7 @@ const config = { type: "doc", docId: "op-besu-docs/index", position: "left", - label: "Op-Besu", + label: "Op-besu", }, { type: "doc", @@ -115,7 +115,7 @@ const config = { label: "Super-proof", }, { - href: "https://discord.gg/qHK3Vj4j", + href: "https://discord.gg/YC34UKyc2Y", className: "header-discord-link", position: "right", }, @@ -151,7 +151,7 @@ const config = { items: [ { label: "Join our Discord", - href: "https://discord.gg/qHK3Vj4j", + href: "https://discord.gg/YC34UKyc2Y", }, ], }, diff --git a/sidebars.js b/sidebars.js index cb36314..8212cba 100644 --- a/sidebars.js +++ b/sidebars.js @@ -22,7 +22,7 @@ const sidebars = { { type: "category", collapsed: true, - label: "Run a Op-Besu node", + label: "Run an Op-besu node", link: { type: "doc", id: "op-besu-docs/run-a-node/index", From 7cf4e2e3f09eac07bc360f3727fa5a169d9fcbe5 Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Wed, 21 Aug 2024 22:03:59 +0800 Subject: [PATCH 03/16] feat:fix super proof Signed-off-by: Chen Kai <281165273grape@gmail.com> --- docs/index.md | 21 +++++++++------- docs/super-proof-docs/index.md | 3 --- .../introduction/installation.md | 24 ------------------- .../deployment/index.mdx | 0 .../deployment/use_docker.md | 2 +- docs/superproof-docs/index.md | 3 +++ .../introduction/features.md | 0 .../introduction/index.mdx | 0 .../introduction/installation.md | 24 +++++++++++++++++++ docusaurus.config.js | 4 ++-- sidebars.js | 12 +++++----- 11 files changed, 49 insertions(+), 44 deletions(-) delete mode 100644 docs/super-proof-docs/index.md delete mode 100644 docs/super-proof-docs/introduction/installation.md rename docs/{super-proof-docs => superproof-docs}/deployment/index.mdx (100%) rename docs/{super-proof-docs => superproof-docs}/deployment/use_docker.md (99%) create mode 100644 docs/superproof-docs/index.md rename docs/{super-proof-docs => superproof-docs}/introduction/features.md (100%) rename docs/{super-proof-docs => superproof-docs}/introduction/index.mdx (100%) create mode 100644 docs/superproof-docs/introduction/installation.md diff --git a/docs/index.md b/docs/index.md index 0b025e5..eb8f46b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,16 +1,21 @@ # Introduction -We continue to contribute public goods to help the Ethereum and Optimism community get better and better. +We continue to build open source public goods to help the Ethereum and Optimism community get better and better. ## Our Works -We have currently developed two important components of Optimism: +We have currently developed two important components of core OP Stack protocol: -[Hildr](https://github.com/optimism-java/hildr) is an optimism rollup client written in Java. +- [Hildr](https://github.com/optimism-java/hildr) is an optimism rollup node written in Java. -[Op-besu](https://github.com/optimism-java/op-besu) is an optimism execution client written in Java, a fork of [Besu](https://github.com/hyperledger/besu). +- [Op-besu](https://github.com/optimism-java/op-besu) is an optimism execution client written in Java, a fork of [Besu](https://github.com/hyperledger/besu). +In addition, we have also developed OP Stack related tools. -## Our Vision -We hope that through our efforts, Ethereum and the Optimism chain will become more accessible and user-friendly, promoting the widespread adoption of blockchain technology. +- [Blob-archiver-rs](https://github.com/optimism-java/blob-archiver-rs) is a service to archive and allow querying of all historical blobs from the beacon chain written in Rust. -## Contract Us -If you have any questions or suggestions, please feel free to contact us on [github](https://github.com/optimism-java). We look forward to working with you to advance blockchain technology! \ No newline at end of file +- [Superproof](https://github.com/optimism-java/dispute-explorer-frontend) is a fault proof explorer to visualize dispute game progress and statistics. + +Meanwhile, we also contributed in other community projects. + +- [Shisui](https://github.com/optimism-java/shisui) is an ethereum portal network client written in Go. + +- [Mev-share-java](https://github.com/optimism-java/mev-share-java) is a Java client library for Flashbots MEV-share Matchmaker. \ No newline at end of file diff --git a/docs/super-proof-docs/index.md b/docs/super-proof-docs/index.md deleted file mode 100644 index 4850bb1..0000000 --- a/docs/super-proof-docs/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# Super-proof - -[Super-proof](https://github.com/optimism-java/dispute-explorer) This is a Super-proof backend for collecting dispute games information who use [OP stack](https://stack.optimism.io/) diff --git a/docs/super-proof-docs/introduction/installation.md b/docs/super-proof-docs/introduction/installation.md deleted file mode 100644 index d902795..0000000 --- a/docs/super-proof-docs/introduction/installation.md +++ /dev/null @@ -1,24 +0,0 @@ -import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; - -# Installation - -Super-proof is open source and you can run your own instance either locally or publicly exposed on the Internet. - -# Requirements - -In order to run Super-proof you need a virtual machine with these minimum specs: - -* 2 vCPU -* 4 GB RAM -* 100 GB Hard disk - -Additionally you need to connect to an Ethereum node. - -# Use docker to launch a backend node - -You can refer to Super-proof [README.md](https://github.com/optimism-java/dispute-explorer/blob/main/README.md) - - - - - diff --git a/docs/super-proof-docs/deployment/index.mdx b/docs/superproof-docs/deployment/index.mdx similarity index 100% rename from docs/super-proof-docs/deployment/index.mdx rename to docs/superproof-docs/deployment/index.mdx diff --git a/docs/super-proof-docs/deployment/use_docker.md b/docs/superproof-docs/deployment/use_docker.md similarity index 99% rename from docs/super-proof-docs/deployment/use_docker.md rename to docs/superproof-docs/deployment/use_docker.md index b616e3e..45b773d 100644 --- a/docs/super-proof-docs/deployment/use_docker.md +++ b/docs/superproof-docs/deployment/use_docker.md @@ -8,7 +8,7 @@ You can use Docker to run dispute explorer backend service [Dispute-explorer](ht Download and install [Docker](https://www.docker.com/products/docker-desktop). -# Run Super-proof backend Step-by-Step +# Run Superproof backend Step-by-Step # Step 1. Config Environment file diff --git a/docs/superproof-docs/index.md b/docs/superproof-docs/index.md new file mode 100644 index 0000000..53414c8 --- /dev/null +++ b/docs/superproof-docs/index.md @@ -0,0 +1,3 @@ +# Superproof + +[Superproof](https://github.com/optimism-java/dispute-explorer) This is a Superproof backend for collecting dispute games information who use [OP stack](https://stack.optimism.io/) diff --git a/docs/super-proof-docs/introduction/features.md b/docs/superproof-docs/introduction/features.md similarity index 100% rename from docs/super-proof-docs/introduction/features.md rename to docs/superproof-docs/introduction/features.md diff --git a/docs/super-proof-docs/introduction/index.mdx b/docs/superproof-docs/introduction/index.mdx similarity index 100% rename from docs/super-proof-docs/introduction/index.mdx rename to docs/superproof-docs/introduction/index.mdx diff --git a/docs/superproof-docs/introduction/installation.md b/docs/superproof-docs/introduction/installation.md new file mode 100644 index 0000000..7d10b42 --- /dev/null +++ b/docs/superproof-docs/introduction/installation.md @@ -0,0 +1,24 @@ +import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; + +# Installation + +Superproof is open source and you can run your own instance either locally or publicly exposed on the Internet. + +# Requirements + +In order to run Superproof you need a virtual machine with these minimum specs: + +* 2 vCPU +* 4 GB RAM +* 100 GB Hard disk + +Additionally you need to connect to an Ethereum node. + +# Use docker to launch a backend node + +You can refer to Superproof [README.md](https://github.com/optimism-java/dispute-explorer/blob/main/README.md) + + + + + diff --git a/docusaurus.config.js b/docusaurus.config.js index ac5db22..eb0f021 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -110,9 +110,9 @@ const config = { }, { type: "doc", - docId: "super-proof-docs/index", + docId: "superproof-docs/index", position: "left", - label: "Super-proof", + label: "Superproof", }, { href: "https://discord.gg/YC34UKyc2Y", diff --git a/sidebars.js b/sidebars.js index 8212cba..edba587 100644 --- a/sidebars.js +++ b/sidebars.js @@ -35,18 +35,18 @@ const sidebars = { }, ], superProofSidebar: [ - "super-proof-docs/index", + "superproof-docs/index", { type: "category", collapsed: true, label: "Introduction", link: { type: "doc", - id: "super-proof-docs/introduction/index", + id: "superproof-docs/introduction/index", }, items: [ - "super-proof-docs/introduction/features", - "super-proof-docs/introduction/installation", + "superproof-docs/introduction/features", + "superproof-docs/introduction/installation", ], }, { @@ -55,10 +55,10 @@ const sidebars = { label: "deployment", link: { type: "doc", - id: "super-proof-docs/deployment/index", + id: "superproof-docs/deployment/index", }, items: [ - "super-proof-docs/deployment/use_docker", + "superproof-docs/deployment/use_docker", ], }, ], From 6c31855325fa2d206d002ec0f0178f657a7748db Mon Sep 17 00:00:00 2001 From: fearlessfe <505380967@qq.com> Date: Wed, 21 Aug 2024 22:37:58 +0800 Subject: [PATCH 04/16] feat: add x icon --- docusaurus.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index eb0f021..63a920c 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -119,6 +119,11 @@ const config = { className: "header-discord-link", position: "right", }, + { + href: "https://x.com/optimism_java", + className: "header-twitter-link", + position: "right", + }, { href: "https://github.com/optimism-java", className: "header-github-link", From 133a2f232f96235415658b25a958266af54573ec Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Thu, 22 Aug 2024 21:55:13 +0800 Subject: [PATCH 05/16] feat: fix hildr doc Signed-off-by: Chen Kai <281165273grape@gmail.com> --- docs/hildr-docs/run-a-node/use_docker.md | 10 +++++++++- docs/hildr-docs/run-a-node/use_jar.md | 14 +++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/hildr-docs/run-a-node/use_docker.md b/docs/hildr-docs/run-a-node/use_docker.md index d226439..f331f7e 100644 --- a/docs/hildr-docs/run-a-node/use_docker.md +++ b/docs/hildr-docs/run-a-node/use_docker.md @@ -2,7 +2,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Use docker -You can use Docker to run [Hildr](https://github.com/optimism-java/hildr) as an Optimism CL node. +You can use Docker to run [Hildr](https://github.com/optimism-java/hildr) as an Optimism rollup node. ## Pull docker image @@ -10,6 +10,14 @@ You can use Docker to run [Hildr](https://github.com/optimism-java/hildr) as an docker pull ghcr.io/optimism-java/hildr:latest ``` +## Copy in the JWT secret + +Copy the JWT secret you generated when start execution client. + +```bash +cp /path/to/jwt.txt . +``` + ## Start a Hildr node diff --git a/docs/hildr-docs/run-a-node/use_jar.md b/docs/hildr-docs/run-a-node/use_jar.md index a26c033..12eeff7 100644 --- a/docs/hildr-docs/run-a-node/use_jar.md +++ b/docs/hildr-docs/run-a-node/use_jar.md @@ -6,7 +6,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; Download and install the [Java JDK 21+](https://www.oracle.com/java/technologies/downloads/). -## Step1. Download the Hildr jar +## Download the Hildr jar Download the [Hildr jar](https://github.com/optimism-java/hildr/releases) from Github. @@ -14,6 +14,14 @@ Download the [Hildr jar](https://github.com/optimism-java/hildr/releases) from G wget https://github.com/optimism-java/hildr/releases/download/v0.4.4/hildr-node.jar ``` +## Copy in the JWT secret + +Copy the JWT secret you generated when start execution client. + +```bash +cp /path/to/jwt.txt . +``` + ## Start a Hildr node @@ -23,7 +31,7 @@ wget https://github.com/optimism-java/hildr/releases/download/v0.4.4/hildr-node. java --enable-preview \ -cp io.optimism.Hildr \ --network optimism-sepolia \ - --jwt-secret ./jwt.hex \ + --jwt-file ./jwt.txt \ --l1-rpc-url http://localhost:9545 \ --l1-ws-rpc-url ws://localhost:9546 \ --l1-beacon-url http://localhost:4000 \ @@ -43,7 +51,7 @@ wget https://github.com/optimism-java/hildr/releases/download/v0.4.4/hildr-node. -cp io.optimism.Hildr \ --devnet \ --network \ - --jwt-secret ./jwt.hex \ + --jwt-file ./jwt.txt \ --l1-rpc-url http://localhost:9545 \ --l1-ws-rpc-url ws://localhost:9546 \ --l1-beacon-url http://localhost:4000 \ From c4f9e3e69646a150b8480f0082b7a3b3c1eb045a Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Sat, 24 Aug 2024 22:27:30 +0800 Subject: [PATCH 06/16] add blob-archiver-rs doc --- .cspell.json | 3 +++ docs/blob-archiver-rs-docs/index.md | 24 ++++++++++++++++++++++++ docusaurus.config.js | 12 ++++++++++++ sidebars.js | 3 +++ 4 files changed, 42 insertions(+) create mode 100644 docs/blob-archiver-rs-docs/index.md diff --git a/.cspell.json b/.cspell.json index 9d6abbf..600fa69 100644 --- a/.cspell.json +++ b/.cspell.json @@ -67,6 +67,9 @@ ], "ignoreWords": [ "Hildr", + "Superproof", + "Shisui", + "Flashbots", "meili", "Linea" ] diff --git a/docs/blob-archiver-rs-docs/index.md b/docs/blob-archiver-rs-docs/index.md new file mode 100644 index 0000000..36d3b5c --- /dev/null +++ b/docs/blob-archiver-rs-docs/index.md @@ -0,0 +1,24 @@ +# blob-archiver-rs +This is a Rust implementation of +the [Beacon Chain blob archiver](https://github.com/base-org/blob-archiver) + +### Development +```sh +# Run the tests +cargo test --workspace --all-features --all-targets --locked + +# Lint the project +cargo clippy --workspace --all-targets --all-features -- -D warnings + +# Build the project +cargo build --workspace --all-targets --all-features + +``` + +#### Run Locally +To run the project locally, you should first copy `.env.template` to `.env` and then modify the environment variables +to your beacon client and storage backend of choice. Then you can run the project with: + +```sh +docker compose up +``` \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index 63a920c..4d6c319 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -114,6 +114,18 @@ const config = { position: "left", label: "Superproof", }, + { + type: "doc", + docId: "blob-archiver-rs-docs/index", + position: "left", + label: "Blob-arhiver-rs", + }, + { + type: "doc", + docId: "blob-archiver-rs-docs/index", + position: "left", + label: "Blob-arhiver-rs", + }, { href: "https://discord.gg/YC34UKyc2Y", className: "header-discord-link", diff --git a/sidebars.js b/sidebars.js index edba587..b7727ee 100644 --- a/sidebars.js +++ b/sidebars.js @@ -62,6 +62,9 @@ const sidebars = { ], }, ], + blobArchiverRs: [ + "blob-archiver-rs-docs/index", + ], }; module.exports = sidebars; From 6e910c346d5e4283284c97b110a356de9d33f46a Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Sun, 25 Aug 2024 10:38:13 +0800 Subject: [PATCH 07/16] fix tabs --- docusaurus.config.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 4d6c319..e92ffb4 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -120,12 +120,6 @@ const config = { position: "left", label: "Blob-arhiver-rs", }, - { - type: "doc", - docId: "blob-archiver-rs-docs/index", - position: "left", - label: "Blob-arhiver-rs", - }, { href: "https://discord.gg/YC34UKyc2Y", className: "header-discord-link", From 2c67214d42bed843991cacb2f7d898f9494905ca Mon Sep 17 00:00:00 2001 From: zhouop0 <11733741+zhouop0@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:02:15 +0800 Subject: [PATCH 08/16] update superproof info --- docs/superproof-docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/superproof-docs/index.md b/docs/superproof-docs/index.md index 53414c8..faaecd8 100644 --- a/docs/superproof-docs/index.md +++ b/docs/superproof-docs/index.md @@ -1,3 +1,3 @@ # Superproof -[Superproof](https://github.com/optimism-java/dispute-explorer) This is a Superproof backend for collecting dispute games information who use [OP stack](https://stack.optimism.io/) +[Superproof](https://github.com/optimism-java/dispute-explorer) is a fault game explorer for collecting dispute games information which use [OP stack](https://stack.optimism.io/) From 52eb59561bb511fc5c0a27a6ae7ef88ba22de5c2 Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Thu, 27 Feb 2025 20:35:24 +0800 Subject: [PATCH 09/16] Update index.md --- docs/blob-archiver-rs-docs/index.md | 304 +++++++++++++++++++++++++++- 1 file changed, 302 insertions(+), 2 deletions(-) diff --git a/docs/blob-archiver-rs-docs/index.md b/docs/blob-archiver-rs-docs/index.md index 36d3b5c..094d9ee 100644 --- a/docs/blob-archiver-rs-docs/index.md +++ b/docs/blob-archiver-rs-docs/index.md @@ -1,6 +1,24 @@ # blob-archiver-rs This is a Rust implementation of -the [Beacon Chain blob archiver](https://github.com/base-org/blob-archiver) +the [Beacon Chain blob archiver](https://github.com/base/blob-archiver) + +The Blob Archiver is a service to archive and allow querying of all historical blobs from the beacon chain. It consists +of two components: + +* **Archiver** - Tracks the beacon chain and writes blobs to a storage backend +* **API** - Implements the blob sidecars [API](https://ethereum.github.io/beacon-APIs/#/Beacon/getBlobSidecars), which + allows clients to retrieve blobs from the storage backend + +### Storage +There are currently two supported storage options: + +* On-disk storage - Blobs are written to disk in a directory +* S3 storage - Blobs are written to an S3 bucket (or compatible service) + +You can control which storage backend is used by setting the `STORAGE_TYPE` to +either `file` or `s3`. + +The `s3` backend will also work with (for example) Google Cloud Storage buckets (instructions [here](https://medium.com/google-cloud/using-google-cloud-storage-with-minio-object-storage-c994fe4aab6b)). ### Development ```sh @@ -21,4 +39,286 @@ to your beacon client and storage backend of choice. Then you can run the projec ```sh docker compose up -``` \ No newline at end of file +``` + +## Options + +### `verbose` + + + + + ```shell + --verbose= + ``` + + + + + + ```shell + --verbose=2 + ``` + + + + +### `log_dir` + + + + + ```shell + --log_dir= + ``` + + + + + + ```shell + --log_dir=/var/log/blob-archiver + ``` + + + + +### `log_rotation` + + + + + ```shell + --log_rotation= + ``` + + + + + + ```shell + --log_rotation=DAILY + ``` + + + + +### `beacon_endpoint` + + + + + ```shell + --beacon_endpoint= + ``` + + + + + + ```shell + --beacon_endpoint=http://localhost:5052 + ``` + + + + +### `beacon_client_timeout` + + + + + ```shell + --beacon_client_timeout= + ``` + + + + + + ```shell + --beacon_client_timeout=10 + ``` + + + + +### `poll_interval` + + + + + ```shell + --poll_interval= + ``` + + + + + + ```shell + --poll_interval=6 + ``` + + + + +### `listen_addr` + + + + + ```shell + --listen_addr= + ``` + + + + + + ```shell + --listen_addr=0.0.0.0:8000 + ``` + + + + +### `origin_block` + + + + + ```shell + --origin_block= + ``` + + + + + + ```shell + --origin_block="0x0" + ``` + + + + +### `storage_type` + + + + + ```shell + --storage_type= + ``` + + + + + + ```shell + --storage_type="s3" + ``` + + + + +### `s3_endpoint` + + + + + ```shell + --s3_endpoint= + ``` + + + + + + ```shell + --s3_endpoint="http://localhost:9000" + ``` + + + + +### `s3_bucket` + + + + + ```shell + --s3_bucket= + ``` + + + + + + ```shell + --s3_bucket="blobs" + ``` + + + + +### `s3_path` + + + + + ```shell + --s3_path= + ``` + + + + + + ```shell + --s3_path=/blobs + ``` + + + + +### `s3_compress` + + + + + ```shell + --s3_compress= + ``` + + + + + + ```shell + --s3_compress=false + ``` + + + + +### `fs_dir` + + + + + ```shell + --fs_dir= + ``` + + + + + + ```shell + --fs_dir=/blobs + ``` + + + From 817eb50d1af6a21489a711b7313a039c826dd96e Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Thu, 27 Feb 2025 20:39:28 +0800 Subject: [PATCH 10/16] Update index.md --- docs/blob-archiver-rs-docs/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/blob-archiver-rs-docs/index.md b/docs/blob-archiver-rs-docs/index.md index 094d9ee..935f2e2 100644 --- a/docs/blob-archiver-rs-docs/index.md +++ b/docs/blob-archiver-rs-docs/index.md @@ -1,3 +1,4 @@ +import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # blob-archiver-rs This is a Rust implementation of the [Beacon Chain blob archiver](https://github.com/base/blob-archiver) From a265392f596fddd7848475d4c76372d7748c90e4 Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Thu, 27 Feb 2025 21:28:18 +0800 Subject: [PATCH 11/16] Update and rename index.md to index.mdx --- docs/blob-archiver-rs-docs/{index.md => index.mdx} | 1 + 1 file changed, 1 insertion(+) rename docs/blob-archiver-rs-docs/{index.md => index.mdx} (99%) diff --git a/docs/blob-archiver-rs-docs/index.md b/docs/blob-archiver-rs-docs/index.mdx similarity index 99% rename from docs/blob-archiver-rs-docs/index.md rename to docs/blob-archiver-rs-docs/index.mdx index 935f2e2..b586488 100644 --- a/docs/blob-archiver-rs-docs/index.md +++ b/docs/blob-archiver-rs-docs/index.mdx @@ -1,3 +1,4 @@ +import DocCardList from "@theme/DocCardList"; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # blob-archiver-rs This is a Rust implementation of From 45179822515887304a206b39bb87cc6f805db3bb Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Thu, 27 Feb 2025 21:30:29 +0800 Subject: [PATCH 12/16] Update index.mdx --- docs/blob-archiver-rs-docs/index.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/blob-archiver-rs-docs/index.mdx b/docs/blob-archiver-rs-docs/index.mdx index b586488..78dd472 100644 --- a/docs/blob-archiver-rs-docs/index.mdx +++ b/docs/blob-archiver-rs-docs/index.mdx @@ -1,4 +1,5 @@ import DocCardList from "@theme/DocCardList"; + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # blob-archiver-rs This is a Rust implementation of From 633558d0eaa80027cd24c7da601e481dfff47c00 Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Thu, 27 Feb 2025 21:37:59 +0800 Subject: [PATCH 13/16] Update and rename index.mdx to index.md --- docs/blob-archiver-rs-docs/index.md | 171 ++++++++++++++ docs/blob-archiver-rs-docs/index.mdx | 327 --------------------------- 2 files changed, 171 insertions(+), 327 deletions(-) create mode 100644 docs/blob-archiver-rs-docs/index.md delete mode 100644 docs/blob-archiver-rs-docs/index.mdx diff --git a/docs/blob-archiver-rs-docs/index.md b/docs/blob-archiver-rs-docs/index.md new file mode 100644 index 0000000..244be98 --- /dev/null +++ b/docs/blob-archiver-rs-docs/index.md @@ -0,0 +1,171 @@ +# blob-archiver-rs +This is a Rust implementation of +the [Beacon Chain blob archiver](https://github.com/base/blob-archiver) + +The Blob Archiver is a service to archive and allow querying of all historical blobs from the beacon chain. It consists +of two components: + +* **Archiver** - Tracks the beacon chain and writes blobs to a storage backend +* **API** - Implements the blob sidecars [API](https://ethereum.github.io/beacon-APIs/#/Beacon/getBlobSidecars), which + allows clients to retrieve blobs from the storage backend + +### Storage +There are currently two supported storage options: + +* On-disk storage - Blobs are written to disk in a directory +* S3 storage - Blobs are written to an S3 bucket (or compatible service) + +You can control which storage backend is used by setting the `STORAGE_TYPE` to +either `file` or `s3`. + +The `s3` backend will also work with (for example) Google Cloud Storage buckets (instructions [here](https://medium.com/google-cloud/using-google-cloud-storage-with-minio-object-storage-c994fe4aab6b)). + +### Development +```sh +# Run the tests +cargo test --workspace --all-features --all-targets --locked + +# Lint the project +cargo clippy --workspace --all-targets --all-features -- -D warnings + +# Build the project +cargo build --workspace --all-targets --all-features + +``` + +#### Run Locally +To run the project locally, you should first copy `.env.template` to `.env` and then modify the environment variables +to your beacon client and storage backend of choice. Then you can run the project with: + +```sh +docker compose up +``` + +## Options + +### `verbose` + + +```shell +--verbose= +``` + +```shell +--verbose=2 +``` + +### `log_dir` + +```shell +--log_dir= +``` +```shell +--log_dir=/var/log/blob-archiver +``` + +### `log_rotation` + +```shell +--log_rotation= +``` +```shell +--log_rotation=DAILY +``` +### `beacon_endpoint` + +```shell +--beacon_endpoint= +``` +```shell +--beacon_endpoint=http://localhost:5052 +``` + +### `beacon_client_timeout` + +```shell +--beacon_client_timeout= +``` +```shell +--beacon_client_timeout=10 +``` + +### `poll_interval` + +```shell +--poll_interval= +``` +```shell +--poll_interval=6 +``` + +### `listen_addr` + +```shell +--listen_addr= +``` +```shell +--listen_addr=0.0.0.0:8000 +``` + +### `origin_block` + +```shell +--origin_block= +``` +```shell +--origin_block="0x0" +``` + +### `storage_type` + +```shell +--storage_type= +``` +```shell +--storage_type="s3" +``` + +### `s3_endpoint` + +```shell +--s3_endpoint= +``` +```shell +--s3_endpoint="http://localhost:9000" +``` + +### `s3_bucket` +```shell +--s3_bucket= +``` +```shell +--s3_bucket="blobs" +``` + +### `s3_path` + +```shell +--s3_path= +``` +```shell +--s3_path=/blobs +``` + +### `s3_compress` + +```shell +--s3_compress= +``` +```shell +--s3_compress=false +``` + +### `fs_dir` + +```shell +--fs_dir= +``` +```shell +--fs_dir=/blobs +``` + diff --git a/docs/blob-archiver-rs-docs/index.mdx b/docs/blob-archiver-rs-docs/index.mdx deleted file mode 100644 index 78dd472..0000000 --- a/docs/blob-archiver-rs-docs/index.mdx +++ /dev/null @@ -1,327 +0,0 @@ -import DocCardList from "@theme/DocCardList"; - -import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# blob-archiver-rs -This is a Rust implementation of -the [Beacon Chain blob archiver](https://github.com/base/blob-archiver) - -The Blob Archiver is a service to archive and allow querying of all historical blobs from the beacon chain. It consists -of two components: - -* **Archiver** - Tracks the beacon chain and writes blobs to a storage backend -* **API** - Implements the blob sidecars [API](https://ethereum.github.io/beacon-APIs/#/Beacon/getBlobSidecars), which - allows clients to retrieve blobs from the storage backend - -### Storage -There are currently two supported storage options: - -* On-disk storage - Blobs are written to disk in a directory -* S3 storage - Blobs are written to an S3 bucket (or compatible service) - -You can control which storage backend is used by setting the `STORAGE_TYPE` to -either `file` or `s3`. - -The `s3` backend will also work with (for example) Google Cloud Storage buckets (instructions [here](https://medium.com/google-cloud/using-google-cloud-storage-with-minio-object-storage-c994fe4aab6b)). - -### Development -```sh -# Run the tests -cargo test --workspace --all-features --all-targets --locked - -# Lint the project -cargo clippy --workspace --all-targets --all-features -- -D warnings - -# Build the project -cargo build --workspace --all-targets --all-features - -``` - -#### Run Locally -To run the project locally, you should first copy `.env.template` to `.env` and then modify the environment variables -to your beacon client and storage backend of choice. Then you can run the project with: - -```sh -docker compose up -``` - -## Options - -### `verbose` - - - - - ```shell - --verbose= - ``` - - - - - - ```shell - --verbose=2 - ``` - - - - -### `log_dir` - - - - - ```shell - --log_dir= - ``` - - - - - - ```shell - --log_dir=/var/log/blob-archiver - ``` - - - - -### `log_rotation` - - - - - ```shell - --log_rotation= - ``` - - - - - - ```shell - --log_rotation=DAILY - ``` - - - - -### `beacon_endpoint` - - - - - ```shell - --beacon_endpoint= - ``` - - - - - - ```shell - --beacon_endpoint=http://localhost:5052 - ``` - - - - -### `beacon_client_timeout` - - - - - ```shell - --beacon_client_timeout= - ``` - - - - - - ```shell - --beacon_client_timeout=10 - ``` - - - - -### `poll_interval` - - - - - ```shell - --poll_interval= - ``` - - - - - - ```shell - --poll_interval=6 - ``` - - - - -### `listen_addr` - - - - - ```shell - --listen_addr= - ``` - - - - - - ```shell - --listen_addr=0.0.0.0:8000 - ``` - - - - -### `origin_block` - - - - - ```shell - --origin_block= - ``` - - - - - - ```shell - --origin_block="0x0" - ``` - - - - -### `storage_type` - - - - - ```shell - --storage_type= - ``` - - - - - - ```shell - --storage_type="s3" - ``` - - - - -### `s3_endpoint` - - - - - ```shell - --s3_endpoint= - ``` - - - - - - ```shell - --s3_endpoint="http://localhost:9000" - ``` - - - - -### `s3_bucket` - - - - - ```shell - --s3_bucket= - ``` - - - - - - ```shell - --s3_bucket="blobs" - ``` - - - - -### `s3_path` - - - - - ```shell - --s3_path= - ``` - - - - - - ```shell - --s3_path=/blobs - ``` - - - - -### `s3_compress` - - - - - ```shell - --s3_compress= - ``` - - - - - - ```shell - --s3_compress=false - ``` - - - - -### `fs_dir` - - - - - ```shell - --fs_dir= - ``` - - - - - - ```shell - --fs_dir=/blobs - ``` - - - From 69ac0bd889bf003aeefb0597c39e69493b9d78a6 Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Tue, 4 Mar 2025 21:34:03 +0800 Subject: [PATCH 14/16] Update index.md --- docs/blob-archiver-rs-docs/index.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/blob-archiver-rs-docs/index.md b/docs/blob-archiver-rs-docs/index.md index 244be98..cbc2d40 100644 --- a/docs/blob-archiver-rs-docs/index.md +++ b/docs/blob-archiver-rs-docs/index.md @@ -41,6 +41,27 @@ to your beacon client and storage backend of choice. Then you can run the projec docker compose up ``` +#### Get blobs +After successfully starting the service, you can use the following command to obtain the blob: + +- get blob by block id from api service: +```shell +# also there is support other type of block id, like: finalized,justified. +curl -X 'GET' 'http://localhost:8000/eth/v1/beacon/blob_sidecars/head' -H 'accept: application/json' +``` + +- get blob by slot number from api service: +```shell +curl -X 'GET' 'http://localhost:8000/eth/v1/beacon/blob_sidecars/7111008' -H 'accept: application/json' +``` + +#### Storage Dashboard +MinIO has started the dashboard, allowing you to view the status of blob storage. +By default, you can access it directly at: +```http +http://localhost:9999 +``` + ## Options ### `verbose` From f448f6c2c6b788578313cced48d79d65adb9ba81 Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Thu, 20 Mar 2025 12:19:47 +0800 Subject: [PATCH 15/16] add comments --- docs/hildr-docs/run-a-node/use_docker.md | 4 +- docs/op-besu-docs/run-a-node/use_binaries.md | 2 + docs/op-besu-docs/run-a-node/use_docker.md | 58 ++++++++++++++++++-- 3 files changed, 58 insertions(+), 6 deletions(-) diff --git a/docs/hildr-docs/run-a-node/use_docker.md b/docs/hildr-docs/run-a-node/use_docker.md index f331f7e..3cd452a 100644 --- a/docs/hildr-docs/run-a-node/use_docker.md +++ b/docs/hildr-docs/run-a-node/use_docker.md @@ -25,7 +25,7 @@ cp /path/to/jwt.txt . ```shell docker run -it -p 11545:11545 \ -v :/jwt/jwt.hex \ - ghcr.io/optimism-java/op-besu:latest -- \ + ghcr.io/optimism-java/hildr:latest \ --network optimism-sepolia \ # can be either: "optimism","base","base-sepolia" --jwt-file /jwt/jwt.hex \ --l1-rpc-url http://localhost:9545 \ @@ -44,7 +44,7 @@ cp /path/to/jwt.txt . docker run -it -p 11545:11545 \ -v :/jwt/jwt.hex \ -v :/network-configs/rollup.json - ghcr.io/optimism-java/op-besu:latest -- \ + ghcr.io/optimism-java/hildr:latest \ --devnet \ --network=/network-configs/rollup.json \ --jwt-file /jwt/jwt.hex \ diff --git a/docs/op-besu-docs/run-a-node/use_binaries.md b/docs/op-besu-docs/run-a-node/use_binaries.md index 17f3297..045eb19 100644 --- a/docs/op-besu-docs/run-a-node/use_binaries.md +++ b/docs/op-besu-docs/run-a-node/use_binaries.md @@ -58,6 +58,7 @@ mkdir datadir ```shell ./bin/besu \ --network=OP_SEPOLIA \ + --sync-mode=FULL \ --p2p-enabled=false \ --discovery-enabled=false \ --data-path=datadir \ @@ -79,6 +80,7 @@ Also you could use the [optimism devnet tool](https://github.com/ethpandaops/opt ```shell ./bin/besu \ --genesis-file= \ + --network-id= --p2p-enabled=false \ --discovery-enabled=false \ --data-path=datadir \ diff --git a/docs/op-besu-docs/run-a-node/use_docker.md b/docs/op-besu-docs/run-a-node/use_docker.md index 9378580..f07f090 100644 --- a/docs/op-besu-docs/run-a-node/use_docker.md +++ b/docs/op-besu-docs/run-a-node/use_docker.md @@ -26,7 +26,8 @@ openssl rand -hex 32 > jwt.txt ## Prepare the data directory ```bash -mkdir datadir +mkdir datadir +chmod 777 datadir ``` ## Start a Op-besu node @@ -35,10 +36,11 @@ mkdir datadir ```shell -docker run -it -p 8545:8545 -p 8551:8551 -v ./jwt.txt:/jwt/jwtsecret \ +docker run -it --name op-besu -p 8545:8545 -p 8551:8551 -v ./jwt.txt:/jwt/jwtsecret \ -v ./datadir:/data/ \ ghcr.io/optimism-java/op-besu:latest \ --network=OP_SEPOLIA \ +--sync-mode=FULL \ --p2p-enabled=false \ --discovery-enabled=false \ --data-path="/data/" \ @@ -56,10 +58,12 @@ ghcr.io/optimism-java/op-besu:latest \ ```shell -docker run -it -p 8545:8545 -p 8551:8551 -v ./jwt.txt:/jwt/jwtsecret \ +docker run -it --name op-besu-devnet -p 8545:8545 -p 8551:8551 -v ./jwt.txt:/jwt/jwtsecret \ -v ./datadir:/data/ \ ghcr.io/optimism-java/op-besu:latest \ --genesis-file= \ +--network-id= \ +--sync-mode=FULL \ --p2p-enabled=false \ --discovery-enabled=false \ --data-path="/data/" \ @@ -83,4 +87,50 @@ The following settings are a security risk in production environments: - 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. -::: \ No newline at end of file +::: + +## Start Hildr node to sync L2 state + +After starting the Op-Besu node, you can start the Hildr node to sync state. + +Pull docker image of hildr: + +```shell +docker pull ghcr.io/optimism-java/hildr:latest +``` + +Get IP of the op-besu container, and hildr container will use it to connect to op-besu via the docker bridge: + +```shell +docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' op-besu +``` + +Start Hildr node: + +```shell +docker run -d -it --name hildr -p 11545:11545 \ +-v ./jwt.txt:/jwt/jwtsecret \ +ghcr.io/optimism-java/hildr:latest \ +--network optimism-sepolia \ +--jwt-file /jwt/jwtsecret \ +--l1-rpc-url \ +--l1-ws-rpc-url \ +--l1-beacon-url \ +--l2-rpc-url \ +--l2-engine-url \ +--rpc-port 11545 \ +--log-level INFO \ +--sync-mode full +``` + +The synchronization needs to handle empty messages at the beginning, and the actual block synchronization will take place about 10 minutes later. + +For example, use curl get block data from op-besu: + +```bash +curl --request POST 'https://localhost:8545' \ +--header 'Content-Type: application/json' \ +--data-raw '{"id":2, "jsonrpc":"2.0", "method": "eth_getBlockByNumber", "params":["0xe", true]}' +``` + +You can confirm whether the block and transaction information is correct through the [Sepolia network's blockchain explorer](https://sepolia-optimism.etherscan.io/). \ No newline at end of file From d6ab2bbf64f9576509de29471ed265fc9e54ea60 Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Fri, 21 Mar 2025 14:41:32 +0800 Subject: [PATCH 16/16] use op-node to sync L2 state --- docs/op-besu-docs/run-a-node/use_docker.md | 39 +++++++++++----------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/docs/op-besu-docs/run-a-node/use_docker.md b/docs/op-besu-docs/run-a-node/use_docker.md index f07f090..4a6a63d 100644 --- a/docs/op-besu-docs/run-a-node/use_docker.md +++ b/docs/op-besu-docs/run-a-node/use_docker.md @@ -89,41 +89,42 @@ The following settings are a security risk in production environments: ::: -## Start Hildr node to sync L2 state +## Start op-node to sync L2 state -After starting the Op-Besu node, you can start the Hildr node to sync state. +After starting the Op-Besu node, you can start the op-node to sync state. Pull docker image of hildr: ```shell -docker pull ghcr.io/optimism-java/hildr:latest +docker pull us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.12.2 ``` -Get IP of the op-besu container, and hildr container will use it to connect to op-besu via the docker bridge: +Get IP of the op-besu container, and op-node container will use it to connect to op-besu via the docker bridge: ```shell docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' op-besu ``` -Start Hildr node: +Start op-node node: ```shell -docker run -d -it --name hildr -p 11545:11545 \ --v ./jwt.txt:/jwt/jwtsecret \ -ghcr.io/optimism-java/hildr:latest \ ---network optimism-sepolia \ ---jwt-file /jwt/jwtsecret \ ---l1-rpc-url \ ---l1-ws-rpc-url \ ---l1-beacon-url \ ---l2-rpc-url \ ---l2-engine-url \ ---rpc-port 11545 \ ---log-level INFO \ ---sync-mode full +docker run -d -it --name op-node -p 11545:11545 \ +-v ./jwt.txt:/jwt/jwt.txt \ +--entrypoint op-node \ +us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.12.2 \ +--network op-sepolia \ +--l1.rpckind=basic \ +--l1= \ +--l2= \ +--rpc.addr=0.0.0.0 \ +--rpc.port=11545 \ +--l2.jwt-secret=/jwt/jwt.txt \ +--l1.trustrpc \ +--l1.beacon= \ +--syncmode=consensus-layer ``` -The synchronization needs to handle empty messages at the beginning, and the actual block synchronization will take place about 10 minutes later. +The synchronization needs to handle empty messages at the beginning, and the actual block synchronization will take place about 15 minutes later. For example, use curl get block data from op-besu: