Skip to content

Commit

Permalink
updates to work with astria-geth dev/ dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jbowen93 committed Nov 15, 2024
1 parent d5985b5 commit b0cbfd7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 15 deletions.
20 changes: 13 additions & 7 deletions docs/components/_clone-geth.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@
```bash [SSH]
git clone [email protected]:astriaorg/astria-geth.git
cd astria-geth
git checkout local-dev
just build
just clean
git checkout tags/v1.0.0
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
git checkout tags/v1.0.0
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
30 changes: 22 additions & 8 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 Down Expand Up @@ -92,6 +99,13 @@ rollup_name = '<your rollup name>' # update this value
default_denom = 'ntia'
```

::: tip
```
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

0 comments on commit b0cbfd7

Please sign in to comment.