From 1d88f877bdae91495ed340e40763c305ba3ee5e8 Mon Sep 17 00:00:00 2001 From: opfocus Date: Sat, 17 Aug 2024 02:33:14 +0800 Subject: [PATCH 1/6] update devnet --- pages/chain/testing/dev-node.mdx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/pages/chain/testing/dev-node.mdx b/pages/chain/testing/dev-node.mdx index 23f70ed69..717d2ee03 100644 --- a/pages/chain/testing/dev-node.mdx +++ b/pages/chain/testing/dev-node.mdx @@ -40,10 +40,13 @@ Note that the command line directions were verified under Ubuntu 22.04 LTS. Other OSes or versions may use different tools. - ### Install the command line utilities `make` and `jq` + ### Install the command line utilities `make`, `jq`, and `just`. For Docker installation, please refer to the instructions [here](https://docs.docker.com/engine/install/ubuntu/). ```sh sudo apt install -y make jq + wget https://github.com/casey/just/releases/download/1.34.0/just-1.34.0-x86_64-unknown-linux-musl.tar.gz + tar xvzf just-1.34.0-x86_64-unknown-linux-musl.tar.gz + sudo cp just /usr/bin/just ``` ### Install [Go programming language](https://go.dev/) @@ -54,6 +57,7 @@ Other OSes or versions may use different tools. tar xvzf go1.21.5.linux-amd64.tar.gz sudo cp go/bin/go /usr/bin/go sudo mv go /usr/lib + echo export PATH=$PATH:/root/go/bin >> ~/.bashrc echo export GOROOT=/usr/lib/go >> ~/.bashrc . ~/.bashrc ``` @@ -64,31 +68,25 @@ Other OSes or versions may use different tools. git clone https://github.com/ethereum-optimism/optimism.git cd optimism ``` - - ### Install dependencies - - ```sh - pnpm install - ``` ### Install Foundry using monorepo tooling - The following command will install Foundry if you don't already have it on your system. + The following command will install Foundry if it is not already installed on your system. If an error occurs during execution, please run `source /root/.bashrc` and try again. ```sh - pnpm install:foundry + just install-foundry ``` If you do already have Foundry installed, make sure to run the following to verify your installed version will work with the monorepo tooling as expected. ```sh - pnpm check:foundry + just check-foundry ``` If you need to, you can run the following to update Foundry to the expected version. ```sh - pnpm update:foundry + just update-foundry ``` @@ -112,7 +110,7 @@ Other OSes or versions may use different tools. | ----------------------------------- | ---------: | ------: | | L1 chain ID | 1 | 900 | | L2 chain ID | 10 | 901 | - | Time between L1 blocks (in seconds) | 12 | 3 | + | Time between L1 blocks (in seconds) | 12 | 6 | * Pre-Funded Dev Accounts From 9cbcfd3b239e5ca9163ab2a595273678f712ba44 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Thu, 22 Aug 2024 16:29:14 +0100 Subject: [PATCH 2/6] Update dev-node guide --- pages/chain/testing/dev-node.mdx | 71 ++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/pages/chain/testing/dev-node.mdx b/pages/chain/testing/dev-node.mdx index 717d2ee03..48dd99f80 100644 --- a/pages/chain/testing/dev-node.mdx +++ b/pages/chain/testing/dev-node.mdx @@ -4,8 +4,7 @@ lang: en-US description: Learn how to setup and run a local development environment of the entire OP Mainnet system. --- -import { Steps } from 'nextra/components' -import { Callout } from 'nextra/components' +import { Steps, Callout, Tabs } from 'nextra/components' # Running a Local Development Environment @@ -35,32 +34,50 @@ Someone nice will help you out! ## Installation -First, make sure these components are installed. -Note that the command line directions were verified under Ubuntu 22.04 LTS. -Other OSes or versions may use different tools. +Before you begin, ensure you have the following components installed on your system. The instructions below cover Ubuntu and Mac installations. - ### Install the command line utilities `make`, `jq`, and `just`. For Docker installation, please refer to the instructions [here](https://docs.docker.com/engine/install/ubuntu/). + + + ### Ubuntu Installation - ```sh - sudo apt install -y make jq - wget https://github.com/casey/just/releases/download/1.34.0/just-1.34.0-x86_64-unknown-linux-musl.tar.gz - tar xvzf just-1.34.0-x86_64-unknown-linux-musl.tar.gz - sudo cp just /usr/bin/just - ``` + These instructions were verified on Ubuntu 22.04 LTS. Other versions may require slight modifications. - ### Install [Go programming language](https://go.dev/) + 1. Install the command line utilities `make` and `jq`: - ```sh - sudo apt update - wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz - tar xvzf go1.21.5.linux-amd64.tar.gz - sudo cp go/bin/go /usr/bin/go - sudo mv go /usr/lib - echo export PATH=$PATH:/root/go/bin >> ~/.bashrc - echo export GOROOT=/usr/lib/go >> ~/.bashrc - . ~/.bashrc - ``` + ```sh + sudo apt install -y make jq + ``` + + 2. Install `just`: + + ```sh + wget https://github.com/casey/just/releases/latest/download/just-x86_64-unknown-linux-musl.tar.gz + tar xvzf just-*-x86_64-unknown-linux-musl.tar.gz + sudo mv just /usr/local/bin + ``` + + 3. [Install Docker](https://docs.docker.com/engine/install/ubuntu/) + + + + ### Mac Installation + + * Install Homebrew (if not already installed): + + ```sh + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + ``` + + * Install the required utilities: + + ```sh + brew install make jq just + ``` + + * [Install Docker](https://docs.docker.com/desktop/install/mac-install/) + + ### Clone the Optimism monorepo @@ -68,7 +85,7 @@ Other OSes or versions may use different tools. git clone https://github.com/ethereum-optimism/optimism.git cd optimism ``` - + ### Install Foundry using monorepo tooling The following command will install Foundry if it is not already installed on your system. If an error occurs during execution, please run `source /root/.bashrc` and try again. @@ -117,11 +134,11 @@ Other OSes or versions may use different tools. By default, the same 10 dev accounts that are pre-funded using Anvil or HardHat are also pre-funded on both L1 and L2: - These private keys are common knowledge, you should **not** use them on any network other than this dev network. - Using these private keys on mainnet, or even a testnet, will most likely result **in a loss of funds**. + These private keys are common knowledge, you should **not** use them on any network other than this dev network. + Using these private keys on mainnet, or even a testnet, will most likely result **in a loss of funds**. - | Address | Private Key | Balance | + | Address | Private Key | Balance | | ------------------------------------------ | -----------------------------------------------------------------: | ---------: | | 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 | 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | 10,000 ETH | | 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 | 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d | 10,000 ETH | From a73d3a5e629b9ef1fc76d423ae8ad54ba78320d2 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Thu, 22 Aug 2024 17:03:32 +0100 Subject: [PATCH 3/6] update docs --- pages/chain/testing/dev-node.mdx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pages/chain/testing/dev-node.mdx b/pages/chain/testing/dev-node.mdx index 48dd99f80..de8763b25 100644 --- a/pages/chain/testing/dev-node.mdx +++ b/pages/chain/testing/dev-node.mdx @@ -49,13 +49,7 @@ Before you begin, ensure you have the following components installed on your sys sudo apt install -y make jq ``` - 2. Install `just`: - - ```sh - wget https://github.com/casey/just/releases/latest/download/just-x86_64-unknown-linux-musl.tar.gz - tar xvzf just-*-x86_64-unknown-linux-musl.tar.gz - sudo mv just /usr/local/bin - ``` + 2. [Install just](https://github.com/casey/just): 3. [Install Docker](https://docs.docker.com/engine/install/ubuntu/) @@ -79,6 +73,16 @@ Before you begin, ensure you have the following components installed on your sys + ### Installing Go + +Install Go on your system by following the official [Go installation instructions](https://golang.org/doc/install). Be sure to install the latest stable version. + +After installation, you can verify Go is correctly installed by running: + + ```sh + go version + ``` + ### Clone the Optimism monorepo ```sh From 738719fcf52dad46a99ce7e4ec5bf72f8a2368f6 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Thu, 22 Aug 2024 17:04:49 +0100 Subject: [PATCH 4/6] fix lint issues --- pages/chain/testing/dev-node.mdx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pages/chain/testing/dev-node.mdx b/pages/chain/testing/dev-node.mdx index de8763b25..e2911d59a 100644 --- a/pages/chain/testing/dev-node.mdx +++ b/pages/chain/testing/dev-node.mdx @@ -43,33 +43,30 @@ Before you begin, ensure you have the following components installed on your sys These instructions were verified on Ubuntu 22.04 LTS. Other versions may require slight modifications. - 1. Install the command line utilities `make` and `jq`: + * Install the command line utilities `make` and `jq`: ```sh sudo apt install -y make jq ``` - 2. [Install just](https://github.com/casey/just): + * [Install just](https://github.com/casey/just): - 3. [Install Docker](https://docs.docker.com/engine/install/ubuntu/) ### Mac Installation - * Install Homebrew (if not already installed): + * Install Homebrew (if not already installed): ```sh /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` - * Install the required utilities: + * Install the required utilities: ```sh brew install make jq just ``` - - * [Install Docker](https://docs.docker.com/desktop/install/mac-install/) From 93bd80d0c7d2bfbcdbe684beaf09acf3b2b2d720 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Thu, 22 Aug 2024 17:13:08 +0100 Subject: [PATCH 5/6] fix lint issues --- pages/chain/testing/dev-node.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/chain/testing/dev-node.mdx b/pages/chain/testing/dev-node.mdx index e2911d59a..7a46079e7 100644 --- a/pages/chain/testing/dev-node.mdx +++ b/pages/chain/testing/dev-node.mdx @@ -43,26 +43,26 @@ Before you begin, ensure you have the following components installed on your sys These instructions were verified on Ubuntu 22.04 LTS. Other versions may require slight modifications. - * Install the command line utilities `make` and `jq`: + * Install the command line utilities `make` and `jq`: ```sh sudo apt install -y make jq ``` - * [Install just](https://github.com/casey/just): + * [Install just](https://github.com/casey/just): ### Mac Installation - * Install Homebrew (if not already installed): + * Install Homebrew (if not already installed): ```sh /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` - * Install the required utilities: + * Install the required utilities: ```sh brew install make jq just From 78cecf72e07bfef11547367987de9785bb028b8d Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Thu, 22 Aug 2024 17:48:06 +0100 Subject: [PATCH 6/6] resolve comments --- pages/chain/testing/dev-node.mdx | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/pages/chain/testing/dev-node.mdx b/pages/chain/testing/dev-node.mdx index 7a46079e7..233bb1e18 100644 --- a/pages/chain/testing/dev-node.mdx +++ b/pages/chain/testing/dev-node.mdx @@ -43,30 +43,26 @@ Before you begin, ensure you have the following components installed on your sys These instructions were verified on Ubuntu 22.04 LTS. Other versions may require slight modifications. - * Install the command line utilities `make` and `jq`: + * [Install just](https://github.com/casey/just): - ```sh - sudo apt install -y make jq - ``` + * Install the command line utilities `make` and `jq`: - * [Install just](https://github.com/casey/just): + ```sh + sudo apt install -y make jq + ``` ### Mac Installation - * Install Homebrew (if not already installed): - - ```sh - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - ``` + * [Install Homebrew]( https://brew.sh/) (if not already installed): * Install the required utilities: - ```sh - brew install make jq just - ``` + ```sh + brew install make jq just + ```