Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 11 additions & 7 deletions docs/components/_clone-geth.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@
```bash [SSH]
git clone [email protected]:astriaorg/astria-geth.git
cd astria-geth
git checkout local-dev
just build
just clean
just -f dev/justfile build

# You can move the binary to a location in your PATH if you'd like
mv ./build/bin/astria-geth /usr/local/bin/
astria-geth version
```

```bash [HTTPS]
git clone https://github.com/astriaorg/astria-geth.git
git clone https://github.com/astriaorg/astria-cli-go.git
cd astria-geth
git checkout local-dev
just build
just clean
just -f dev/justfile build

# You can move the binary to a location in your PATH if you'd like
mv ./build/bin/astria-geth /usr/local/bin/
astria-geth version
```

:::
Expand Down
36 changes: 26 additions & 10 deletions docs/tutorials/run-local-rollup-and-sequencer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,32 @@ This guide will walk you through running a local Geth rollup against the Astria
sequencer, using the `astria-go` cli to run the required components of the
Astria stack locally on your machine.

## Setup a Geth Rollup
## Setup an `astria-geth` Rollup

Requires `Go`, `just`, and `Foundry`:
`astria-geth` is a fork of `go-ethereum` modified to work with
the Astria sequencing layer.

View the source code
[here](https://github.com/astriaorg/astria-geth).

Requires `Go`, `just`, `make`, and `Foundry`:

- [Go](https://go.dev/doc/install)
- [just](https://github.com/casey/just)
- [make](https://www.gnu.org/software/make/)
- [Foundry](https://book.getfoundry.sh/getting-started/installation)

Open a new terminal window and clone and build Geth:

<!--@include: ../../components/_clone-geth.md-->
<!--@include: ../components/_clone-geth.md-->

Create a new genesis account for your Geth rollup:

```bash
cast w new
```

Open the `geth-genesis-local.json` file in your Geth repo and update the
Open the `dev/geth-genesis-local.json` file in the `astria-geth` repo and update the
`"alloc"` account with the new address you just created, as well as updating the
`"chainId"` and `"astriaRollupName"` to something of your choosing:

Expand All @@ -49,22 +56,22 @@ In your Geth terminal window, run the following to initialize and run the Geth r

```bash
# in astria-geth dir
just init
just run
just -f dev/justfile init
just -f dev/justfile run
```

If you need to restart the rollup, you can stop the program with `Ctrl+C` and
restart with:

```bash
just run
just -f dev/justfile run
```

If you need to restart the rollup and want to also clear the state data, you can
use:

```bash
just clean-restart
just -f dev/justfile clean-restart
```

## Configure and Start the Local Astria Sequencer
Expand All @@ -80,8 +87,8 @@ you should find a `default` directory.

Open the `~/.astria/default/networks-config.toml` file and update the
`rollup_name` variable in the `[local]` sections using the same
`"astriaRollupName"` you used when [setting up your Geth
rollup](#setup-a-geth-rollup).
`"astriaRollupName"` you used when [setting up your astria-geth
rollup](#setup-an-astria-geth-rollup).

```toml{5}
[networks.local]
Expand All @@ -92,6 +99,15 @@ rollup_name = '<your rollup name>' # update this value
default_denom = 'ntia'
```

::: tip

```shell
export NEW_NAME="my-new-chain"
sed -i '' '/\[networks\.local\]/,/^$/{ s/rollup_name = .*/rollup_name = '\'''$NEW_NAME''\''/; }' ~/.astria/default/networks-config.toml
```

:::

Use the cli to run a local Astria Sequencer.

```bash
Expand Down