> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-roethke-local-devnet-guide.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Run a Local Devnet

> Start a disposable local Base devnet with L1, L2 sequencer, RPC nodes, and batcher from the base/base repo, then send a test transaction.

The local devnet runs a complete Base stack on your machine with Docker: an L1 (Reth + Lighthouse), a Base sequencer, two RPC nodes, and a batcher. It also runs a shadow batcher and shadow validator used to test the Rust batcher. Use it to test node, protocol, and hardfork behavior without a public network.

<Note>
  To build against new Base features without running infrastructure, use the hosted [Vibenet](/build-on-base/test-on-vibenet) instead.
</Note>

<Warning>
  The devnet is disposable. `just devnet up`, `just devnet up-single`, and `just devnet down` delete all chain data in `.devnet/`. It publishes ports on all interfaces, so run it on an isolated development machine.
</Warning>

## Prerequisites

* [Docker](https://docs.docker.com/get-docker/) with Compose v2 and Buildx. The first build compiles the Rust services, so allocate generous memory to Docker.
* [`just`](https://github.com/casey/just) `1.51.0` or newer
* [Foundry](https://getfoundry.sh) (`cast`) to send transactions
* [`jq`](https://jqlang.org), used by `just devnet status` and `just devnet checks`
* A clone of [base/base](https://github.com/base/base)

## Start the Devnet

From the root of the base/base repo:

```bash Terminal theme={null}
just devnet up-single
```

This stops any running devnet, clears its data, builds the images, and starts a single-sequencer stack. The first run compiles the Rust services and takes several minutes.

| Command | Starts |
| - | - |
| `just devnet up-single` | One sequencer. The fastest option for most testing. |
| `just devnet up` | A 3-node high-availability sequencer cluster with conductor. |

Check that blocks are advancing:

```bash Terminal theme={null}
just devnet status
```

## Send a Test Transaction

The devnet prefunds the standard Foundry/Anvil test accounts, listed in `etc/docker/devnet-env`. Send ETH through the sequencer:

```bash Terminal theme={null}
source etc/docker/devnet-env
cast send "$ANVIL_ACCOUNT_2_ADDR" --value 0.001ether \
  --private-key "$ANVIL_ACCOUNT_1_KEY" \
  --rpc-url http://127.0.0.1:7545
```

A receipt with `status 1` confirms the sequencer included the transaction. To run the built-in L1 and L2 checks instead, use `just devnet checks`.

<Warning>
  The test account keys are public. Never use them on Mainnet or Sepolia.
</Warning>

## Endpoints

| Service | URL | Chain ID |
| - | - | - |
| L2 sequencer (builder) RPC | `http://127.0.0.1:7545` | `84538453` |
| L2 RPC node | `http://127.0.0.1:8545` | `84538453` |
| L2 RPC node (`base-rpc`) | `http://127.0.0.1:8645` | `84538453` |
| L1 RPC | `http://127.0.0.1:4545` | `1337` |
| Grafana | [localhost:3000](http://localhost:3000/d/devnet-overview) | |

Ports are set in `etc/docker/devnet-env`.

## Hardfork Activation

The devnet schedules Azul at L2 block 20, Beryl at 21, Cobalt at 22, and Denim at 25, so a fresh devnet crosses each activation within its first few blocks. At Denim, the sequencer switches to 200ms blocks.

| Command | Also activates |
| - | - |
| `just devnet up-single everest` | Everest (EIP-8130 transactions) at block 100 |
| `just devnet up-single zenith` | Everest and Zenith at block 100 |

<Warning>
  The devnet's canonical batcher (`op-batcher`) cannot decode EIP-8130 transactions (type `0x79`). After the first block that contains one, it stops advancing and the canonical safe head stalls. The shadow `base-batcher` keeps deriving past those blocks. See the [devnet README](https://github.com/base/base/blob/main/etc/docker/README.md) for details.
</Warning>

To move an activation, set `L2_BASE_DENIM_BLOCK` (or the matching `L2_BASE_<HARDFORK>_BLOCK` variable) before `up` or `up-single`. Set it to an empty value to leave that hardfork unscheduled.

## Common Commands

| Command | Does |
| - | - |
| `just devnet accounts` | Lists funded test accounts with balances and nonces |
| `just devnet logs [container]` | Streams logs, optionally for one container |
| `just devnet ps` | Shows container status |
| `just devnet flashblocks` | Streams Flashblocks from the builder. Requires Go on first use to install the client. |
| `just devnet down` | Stops the devnet and deletes its data |

Run `just devnet` with no arguments for the full list.

## Learn More

The base/base repo is the source of truth for the devnet:

* [Devnet README](https://github.com/base/base/blob/main/etc/docker/README.md): stack topology, batcher setup, the Anvil + Nitro proving variant, and upgrade-signal testing
* [`etc/docker/Justfile`](https://github.com/base/base/blob/main/etc/docker/Justfile): every devnet command
* [Testing guide](https://github.com/base/base/blob/main/docs/guides/TESTING.md): system tests against the devnet (`just devnet tests`)
* [Standalone proving guide](https://github.com/base/base/blob/main/docs/guides/STANDALONE_PROVING.md): run the prover stack, which the devnet does not include. ZK proving against a local devnet requires disabling Beryl and Cobalt.
