Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update devnet #834

Merged
merged 6 commits into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 45 additions & 33 deletions pages/chain/testing/dev-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -35,28 +34,47 @@ 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.

<Steps>
### Install the command line utilities `make` and `jq`
<Tabs items={['Ubuntu', 'Mac']}>
<Tabs.Tab>
### Ubuntu Installation

```sh
sudo apt install -y make jq
```
These instructions were verified on Ubuntu 22.04 LTS. Other versions may require slight modifications.

### Install [Go programming language](https://go.dev/)
* [Install just](https://github.com/casey/just):

```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 GOROOT=/usr/lib/go >> ~/.bashrc
. ~/.bashrc
```
* Install the command line utilities `make` and `jq`:

```sh
sudo apt install -y make jq
```

</Tabs.Tab>

<Tabs.Tab>
### Mac Installation

* [Install Homebrew]( https://brew.sh/) (if not already installed):

* Install the required utilities:

```sh
brew install make jq just
```
</Tabs.Tab>
</Tabs>

### 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

Expand All @@ -65,30 +83,24 @@ Other OSes or versions may use different tools.
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
bradleycamacho marked this conversation as resolved.
Show resolved Hide resolved
```

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
```
</Steps>

Expand All @@ -112,18 +124,18 @@ 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

By default, the same 10 dev accounts that are pre-funded using Anvil or HardHat are also pre-funded on both L1 and L2:

<Callout>
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**.
</Callout>

| Address | Private Key | Balance |
| Address | Private Key | Balance |
| ------------------------------------------ | -----------------------------------------------------------------: | ---------: |
| 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 | 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | 10,000 ETH |
| 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 | 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d | 10,000 ETH |
Expand Down
Loading