From 31ddaf4a7f65b03e3cafc7f7c6dc2e0812ec9897 Mon Sep 17 00:00:00 2001 From: Qi Zhou Date: Fri, 6 Dec 2024 02:12:00 +0800 Subject: [PATCH 1/3] Update guide-devnet.md --- ethstorage/archiver/guide-devnet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethstorage/archiver/guide-devnet.md b/ethstorage/archiver/guide-devnet.md index 2a1019dd..882ac089 100644 --- a/ethstorage/archiver/guide-devnet.md +++ b/ethstorage/archiver/guide-devnet.md @@ -122,7 +122,7 @@ Begin by cloning the EthStorage contract repository and install the dependencies git clone https://github.com/ethstorage/storage-contracts-v1.git cd storage-contracts-v1 git checkout op-devnet -npm install +npm run install:all ``` Create a `.env` file and populate it with the following content: @@ -369,4 +369,4 @@ cast block 3000 -f hash -r http://127.0.0.1:5545 ## Conclusion -By following the instructions above, you will successfully configure and deploy each component of the OP Stack rollup with the EthStorage archive service as its long-term data availability solution. Additionally, you will verify that the EthStorage archive service functions accurately providing correct blob data after the blobs from the Beacon chain have expired. \ No newline at end of file +By following the instructions above, you will successfully configure and deploy each component of the OP Stack rollup with the EthStorage archive service as its long-term data availability solution. Additionally, you will verify that the EthStorage archive service functions accurately providing correct blob data after the blobs from the Beacon chain have expired. From 03607651fc853c421efd3cc93fa38bdafcb695b5 Mon Sep 17 00:00:00 2001 From: Qi Zhou Date: Fri, 6 Dec 2024 02:13:14 +0800 Subject: [PATCH 2/3] Update guide-devnet.md --- ethstorage/archiver/guide-devnet.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ethstorage/archiver/guide-devnet.md b/ethstorage/archiver/guide-devnet.md index 2a1019dd..af3f719f 100644 --- a/ethstorage/archiver/guide-devnet.md +++ b/ethstorage/archiver/guide-devnet.md @@ -29,7 +29,7 @@ This guide provides detailed steps for setting up a self-contained test environm The test framework is based on the Bedrock devnet but allows for separate control of Layer 1 (L1) and Layer 2 (L2). The document explains how to configure and start all necessary components, including: - L1 that serves as RPC endpoint and Beacon API, - Rollup services such as op-geth, sequencer, batcher, proposer, etc., plus an extra rollup node in validator mode on L2, -- The deployment of EthStorage contracts and BatchInbox contract that help to store batch data into EthStorage. +- The deployment of EthStorage contracts and the BatchInbox contract that help to store batch data into EthStorage. - Launch an EthStorage node (es-node) in archiver mode. ## Preparations @@ -50,7 +50,7 @@ The test framework is based on the Bedrock devnet but allows for separate contro ### Get the Correct Code Branch -First clone the Optimism monorepo and check out the branch `long-term-da`: +First, clone the Optimism monorepo and check out the branch `long-term-da`: ```bash git clone https://github.com/ethstorage/optimism.git @@ -195,13 +195,13 @@ curl -s http://localhost:5052/eth/v1/beacon/genesis | jq -r '.data.genesis_time' export GENESIS_TIME=1732529739 // replace with the actual timestamp ``` -The following commands start a proxy to Beacon API with a shorter blobs retension period: +The following commands start a proxy to Beacon API with a shorter blobs retention period: ```bash git clone https://github.com/ethstorage/beacon-api-wrapper.git cd beacon-api-wrapper go run cmd/main.go -b http://localhost:5052 -p 3602 -g $GENESIS_TIME -r 1200 ``` -This setup allows you to test archive service effectively. +This setup allows you to test the archive service effectively. For blob requests, if the request is within the latest 1200 seconds or 100 slots, the proxy will retrieve blobs from `http://localhost:5052`. For requests older than that, it will return an empty list. ## Running EthStorage Node @@ -209,7 +209,7 @@ For blob requests, if the request is within the latest 1200 seconds or 100 slots ### Installation -To set up the es-node, first clone the repository and build it: +To set up the es-node, first, clone the repository and build it: ```bash git clone https://github.com/ethstorage/es-node.git cd es-node @@ -244,7 +244,7 @@ Finally, run the es-node: --archiver.enabled ``` -Shortly after the es-node starts, it will listen for the storage contract, download all blobs managed by the contract, and store them locally. In this instance, it collects all the blobs received by the BatchInbox contract. The es-node also serve blob queries in the format `/eth/v1/beacon/blob_sidecars/{slot}` on port 6678, similar to the Beacon API. +Shortly after the es-node starts, it will listen for the storage contract, download all blobs managed by the contract, and store them locally. In this instance, it collects all the blobs received by the BatchInbox contract. The es-node also serves blob queries in the format `/eth/v1/beacon/blob_sidecars/{slot}` on port 6678, similar to the Beacon API. Please note that this is a simplified version of the es-node designed solely for data access. In a standard EthStorage network, a p2p network is formed by storage providers who secure the data using a sophisticated proof-of-storage algorithm. For detailed information, please refer to [the documentation](docs.ethstorage.io). @@ -360,7 +360,7 @@ Additionally, you can verify the correctness of the expired blob data by ensurin For example: ``` -# query block from the sequancer +# query block from the sequencer cast block 3000 -f hash -r http://127.0.0.1:9545 # query block from the validator @@ -369,4 +369,4 @@ cast block 3000 -f hash -r http://127.0.0.1:5545 ## Conclusion -By following the instructions above, you will successfully configure and deploy each component of the OP Stack rollup with the EthStorage archive service as its long-term data availability solution. Additionally, you will verify that the EthStorage archive service functions accurately providing correct blob data after the blobs from the Beacon chain have expired. \ No newline at end of file +By following the instructions above, you will successfully configure and deploy each component of the OP Stack rollup with the EthStorage archive service as its long-term data availability solution. Additionally, you will verify that the EthStorage archive service functions accurately providing correct blob data after the blobs from the Beacon chain have expired. From ed54958ff3bd4291186430b2303e08f8c8d11f09 Mon Sep 17 00:00:00 2001 From: Qi Zhou Date: Fri, 6 Dec 2024 07:41:22 +0800 Subject: [PATCH 3/3] Update guide-devnet.md --- ethstorage/archiver/guide-devnet.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ethstorage/archiver/guide-devnet.md b/ethstorage/archiver/guide-devnet.md index e37e3bbd..4437e5ce 100644 --- a/ethstorage/archiver/guide-devnet.md +++ b/ethstorage/archiver/guide-devnet.md @@ -153,10 +153,14 @@ cd es-op-batchinbox Deploy the BatchInbox contract: ```bash forge create src/BatchInbox.sol:BatchInbox \ ---constructor-args $ES_CONTRACT \ +--broadcast \ --private-key $PRIVATE_KEY \ ---rpc-url http://localhost:8545 +--rpc-url http://localhost:8545 \ +--constructor-args $ES_CONTRACT +``` +It should output like +```bash Deployer: 0xDe3829A23DF1479438622a08a116E8Eb3f620BB5 Deployed to: 0xb860F42DAeD06Cf3dC9C3b4B8A287523BbdB2B1e Transaction hash: 0x99f6788e90004a68e67fa2848e47f7592ffb38aaff31b1738bcc163d806a00a5 @@ -186,13 +190,13 @@ Now, navigate to the parent directory in preparation for the next steps. For the convenience of testing, you will start a proxy for the Beacon API with a shorter blob retention period. -First retrieve the beacon genesis time for later use: +First, retrieve the beacon genesis time for later use: ```bash curl -s http://localhost:5052/eth/v1/beacon/genesis | jq -r '.data.genesis_time' 1732529739 -export GENESIS_TIME=1732529739 // replace with the actual timestamp +export GENESIS_TIME=1732529739 # replace with the actual timestamp ``` The following commands start a proxy to Beacon API with a shorter blobs retention period: