diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index ae031cdf..a386f4c2 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -99,7 +99,7 @@ function sidebar() { items: [ {text: 'Installation', link: '/developer/references/astria-go/cli-installation.md'}, {text: 'Commands', link: '/developer/references/astria-go/cli-commands.md'}, - {text: 'Networks Configuration', link: '/developer/references/astria-go/cli-networks-configuration.md'}, + {text: 'CLI Configuration', link: '/developer/references/astria-go/cli-config.md'}, ] } ] diff --git a/docs/astria-evm/overview.md b/docs/astria-evm/overview.md index c3cac280..6e4434a2 100644 --- a/docs/astria-evm/overview.md +++ b/docs/astria-evm/overview.md @@ -4,13 +4,13 @@ | Property | Value | |-----|-----| -| Network Name | dusk-8 | -| RPC URL | [https://rpc.evm.dusk-8.devnet.astria.org](https://rpc.evm.dusk-8.devnet.astria.org) | +| Network Name | dusk-10 | +| RPC URL | [https://rpc.evm.dusk-10.devnet.astria.org](https://rpc.evm.dusk-10.devnet.astria.org) | | Chain ID | 912559 | -| Currency Symbol | RIA | +| Currency Symbol | TIA | | Dora | [https://www.ondora.xyz/network/astria-devnet](https://www.ondora.xyz/network/astria-devnet) | -| Faucet | [https://faucet.evm.dusk-8.devnet.astria.org](https://faucet.evm.dusk-8.devnet.astria.org) | -| Block Scout | [https://explorer.evm.dusk-8.devnet.astria.org/](https://explorer.evm.dusk-8.devnet.astria.org/) | +| EVM Faucet | [https://faucet.evm.dusk-10.devnet.astria.org](https://faucet.evm.dusk-10.devnet.astria.org) | +| Block Scout | [https://explorer.evm.dusk-10.devnet.astria.org/](https://explorer.evm.dusk-10.devnet.astria.org/) | ## Adding to Metamask @@ -18,10 +18,10 @@ Follow Metamask's official documentation to [manually add a custom network.](htt Your settings should be the following: -* Network Name: `dusk-8` -* New RPC URL: `https://rpc.evm.dusk-8.devnet.astria.org` +* Network Name: `dusk-10` +* New RPC URL: `https://rpc.evm.dusk-10.devnet.astria.org` * Chain ID: `912559` -* Currency symbol: `RIA` +* Currency symbol: `TIA` * Block Explorer URL: `` ## Using Cast @@ -29,7 +29,7 @@ Your settings should be the following: Set your `ETH_RPC_URL`: ```bash -export ETH_RPC_URL=https://rpc.evm.dusk-8.devnet.astria.org +export ETH_RPC_URL=https://rpc.evm.dusk-10.devnet.astria.org ``` ```bash diff --git a/docs/components/_astria-go-cli-build-from-source.md b/docs/components/_astria-go-cli-build-from-source.md index 3ff54297..73568cd8 100644 --- a/docs/components/_astria-go-cli-build-from-source.md +++ b/docs/components/_astria-go-cli-build-from-source.md @@ -1,9 +1,7 @@ -This requires `Go` and `just` to be installed on your system. -- Go: -- just: +::: code-group -```bash +```bash [SSH] git clone git@github.com:astriaorg/astria-cli-go.git cd astria-cli-go just build-cli @@ -15,3 +13,23 @@ just run version mv ./bin/astria-go /usr/local/bin/ astria-go version ``` + +```bash [HTTPS] +git clone https://github.com/astriaorg/astria-cli-go.git +cd astria-cli-go +just build-cli + +# run the cli in the repo directory +just run version + +# OR you can move the binary to a location in your PATH if you'd like +mv ./bin/astria-go /usr/local/bin/ +astria-go version +``` + +::: + + diff --git a/docs/components/_astria-go-cli-install.md b/docs/components/_astria-go-cli-install.md index 4a1202fb..fcc2ad86 100644 --- a/docs/components/_astria-go-cli-install.md +++ b/docs/components/_astria-go-cli-install.md @@ -1,22 +1,21 @@ - ::: code-group ```bash [ARM Mac] - curl -L https://github.com/astriaorg/astria-cli-go/releases/download/v0.11.0/astria-go-v0.9.0-darwin-arm64.tar.gz > astria-cli.tar.gz + curl -L https://github.com/astriaorg/astria-cli-go/releases/download/v0.15.0/astria-go-v0.15.0-darwin-arm64.tar.gz > astria-cli.tar.gz tar -xvzf astria-cli.tar.gz mv astria-go /usr/local/bin/ astria-go version ``` ```bash [X86_64 Mac] - curl -L https://github.com/astriaorg/astria-cli-go/releases/download/v0.11.0/astria-go-v0.9.0-darwin-amd64.tar.gz > astria-cli.tar.gz + curl -L https://github.com/astriaorg/astria-cli-go/releases/download/v0.15.0/astria-go-v0.15.0-darwin-amd64.tar.gz > astria-cli.tar.gz tar -xvzf astria-cli.tar.gz mv astria-go /usr/local/bin/ astria-go version ``` ```bash [x86_64 Linux] - curl -L https://github.com/astriaorg/astria-cli-go/releases/download/v0.11.0/astria-go-v0.9.0-linux-amd64.tar.gz > astria-cli.tar.gz + curl -L https://github.com/astriaorg/astria-cli-go/releases/download/v0.15.0/astria-go-v0.15.0-linux-amd64.tar.gz > astria-cli.tar.gz tar -xvzf astria-cli.tar.gz mv astria-go /usr/local/bin/ astria-go version diff --git a/docs/components/_astria-rust-cli-install.md b/docs/components/_astria-rust-cli-install.md index 1e5411d9..2ddba032 100644 --- a/docs/components/_astria-rust-cli-install.md +++ b/docs/components/_astria-rust-cli-install.md @@ -1,25 +1,25 @@ ::: code-group ```bash [ARM Mac] - curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.3.1/astria-cli-aarch64-apple-darwin.tar.gz > astria-cli.tar.gz + curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.4.0/astria-cli-aarch64-apple-darwin.tar.gz > astria-cli.tar.gz tar -xvzf astria-cli.tar.gz mv astria-cli /usr/local/bin/ ``` ```bash [X86_64 Mac] - curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.3.1/astria-cli-x86_64-apple-darwin.tar.gz > astria-cli.tar.gz + curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.4.0/astria-cli-x86_64-apple-darwin.tar.gz > astria-cli.tar.gz tar -xvzf astria-cli.tar.gz mv astria-cli /usr/local/bin/ ``` ```bash [x86_64 Linux] - curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.3.1/astria-cli-x86_64-unknown-linux-gnu.tar.gz > astria-cli.tar.gz + curl -L https://github.com/astriaorg/astria/releases/download/cli-v0.4.0/astria-cli-x86_64-unknown-linux-gnu.tar.gz > astria-cli.tar.gz tar -xvzf astria-cli.tar.gz mv astria-cli /usr/local/bin/ ``` ```bash [From Source] - cargo install astria-cli --git=https://github.com/astriaorg/astria --tag=cli-v0.3.1 --locked + cargo install astria-cli --git=https://github.com/astriaorg/astria --tag=cli-v0.4.0 --locked ``` ::: diff --git a/docs/components/_clone-geth.md b/docs/components/_clone-geth.md new file mode 100644 index 00000000..87f034f8 --- /dev/null +++ b/docs/components/_clone-geth.md @@ -0,0 +1,25 @@ + +::: code-group + +```bash [SSH] +git clone git@github.com:astriaorg/astria-geth.git +cd astria-geth +git checkout local-dev +just build +just clean +``` + +```bash [HTTPS] +git clone https://github.com/astriaorg/astria-geth.git +cd astria-geth +git checkout local-dev +just build +just clean +``` + +::: + + diff --git a/docs/components/_dusk-service-versions.md b/docs/components/_dusk-service-versions.md new file mode 100644 index 00000000..44854dc5 --- /dev/null +++ b/docs/components/_dusk-service-versions.md @@ -0,0 +1,8 @@ +Service Versions: + +- [Astria Conductor v0.20.0](https://github.com/astriaorg/astria/releases/tag/conductor-v0.20.0) +- [Astria Composer v0.8.2](https://github.com/astriaorg/astria/releases/tag/composer-v0.8.2) +- [Astria Sequencer-relayer v0.16.1](https://github.com/astriaorg/astria/releases/tag/sequencer-relayer-v0.16.1) +- [Astria Sequencer v0.16.0](https://github.com/astriaorg/astria/releases/tag/sequencer-v0.16.0) +- [Astria-Geth EVM v0.14.0](https://github.com/astriaorg/astria-geth/releases/tag/v0.14.0) +- [CometBFT v0.38.8](https://github.com/cometbft/cometbft/releases/tag/v0.38.8) diff --git a/docs/components/_git-clone-and-build-spamooor.md b/docs/components/_git-clone-and-build-spamooor.md new file mode 100644 index 00000000..00020abd --- /dev/null +++ b/docs/components/_git-clone-and-build-spamooor.md @@ -0,0 +1,22 @@ +::: code-group + + ```bash [SSH] + git clone git@github.com:astriaorg/spamooor.git + cd spamooor/ + go build ./cmd/spamooor + ./spamooor -h + ``` + + ```bash [HTTPS] + git clone https://github.com/astriaorg/spamooor.git + cd spamooor/ + go build ./cmd/spamooor + ./spamooor -h + ``` + +::: + + diff --git a/docs/components/_remote-dawn-endpoints.md b/docs/components/_remote-dawn-endpoints.md new file mode 100644 index 00000000..d87c3e28 --- /dev/null +++ b/docs/components/_remote-dawn-endpoints.md @@ -0,0 +1,8 @@ +| Name | Endpoint | +|---|---| +| EVM JSON RPC | [https://rpc.evm.dawn-0.testnet.astria.org](https://rpc.evm.dawn-0.testnet.astria.org) | +| EVM Block Explorer | [https://explorer.evm.dawn-0.testnet.astria.org](https://explorer.evm.dawn-0.testnet.astria.org) | +| EVM Faucet | [https://faucet.evm.dawn-0.testnet.astria.org](https://faucet.evm.dawn-0.testnet.astria.org) | +| Sequencer RPC | [https://rpc.sequencer.dawn-0.testnet.astria.org](https://rpc.sequencer.dawn-0.testnet.astria.org) | +| Sequencer gRPC | [https://grpc.sequencer.dawn-0.testnet.astria.org](https://grpc.sequencer.dawn-0.testnet.astria.org) | +| Sequencer Faucet | [https://faucet.sequencer.dawn-0.testnet.astria.org](https://faucet.sequencer.dawn-0.testnet.astria.org) | diff --git a/docs/components/_remote-dusk-endpoints.md b/docs/components/_remote-dusk-endpoints.md new file mode 100644 index 00000000..8116fe96 --- /dev/null +++ b/docs/components/_remote-dusk-endpoints.md @@ -0,0 +1,11 @@ +| Name | Endpoint | +|---|---| +| EVM JSON RPC | [https://rpc.evm.dusk-10.devnet.astria.org](https://rpc.evm.dusk-10.devnet.astria.org) | +| EVM Block Explorer | [https://explorer.evm.dusk-10.devnet.astria.org](https://explorer.evm.dusk-10.devnet.astria.org) | +| EVM Faucet | [https://faucet.evm.dusk-10.devnet.astria.org](https://faucet.evm.dusk-10.devnet.astria.org) | +| Celestia EVM Rollup Namespace | [000000000000000000000000000000000000f3c2910d77141de9bc7c](https://mocha.celenium.io/namespace/000000000000000000000000000000000000f3c2910d77141de9bc7c?tab=Blobs) | +| Sequencer RPC | [https://rpc.sequencer.dusk-10.devnet.astria.org](https://rpc.sequencer.dusk-10.devnet.astria.org) | +| Sequencer gRPC | [https://grpc.sequencer.dusk-10.devnet.astria.org](https://grpc.sequencer.dusk-10.devnet.astria.org) | +| Sequencer Faucet | [https://faucet.sequencer.dusk-10.devnet.astria.org](https://faucet.sequencer.dusk-10.devnet.astria.org) | +| Celestia Sequencer Namespace | [00000000000000000000000000000000000031a3172717024ab8f1db](https://mocha.celenium.io/namespace/00000000000000000000000000000000000031a3172717024ab8f1db?tab=Blobs) | +| Mocha Posting Account | [celestia1qnyk26e49syzzng8sxzxwqd4mg7y4c9erlcnfm](https://mocha.celenium.io/address/celestia1qnyk26e49syzzng8sxzxwqd4mg7y4c9erlcnfm?tab=transactions) | diff --git a/docs/components/_remote-endpoints.md b/docs/components/_remote-endpoints.md deleted file mode 100644 index 9ec60cf2..00000000 --- a/docs/components/_remote-endpoints.md +++ /dev/null @@ -1,8 +0,0 @@ -| Name | Endpoint | -|---|---| -| EVM JSON RPC | [https://rpc.evm.dusk-8.devnet.astria.org](https://rpc.evm.dusk-8.devnet.astria.org) | -| EVM Block Explorer | [https://explorer.evm.dusk-8.devnet.astria.org](https://explorer.evm.dusk-8.devnet.astria.org) | -| EVM Faucet | [https://faucet.evm.dusk-8.devnet.astria.org](https://faucet.evm.dusk-8.devnet.astria.org) | -| Sequencer RPC | [https://rpc.sequencer.dusk-8.devnet.astria.org](https://rpc.sequencer.dusk-8.devnet.astria.org) | -| Sequencer gRPC | [https://grpc.sequencer.dusk-8.devnet.astria.org](https://grpc.sequencer.dusk-8.devnet.astria.org) | -| Sequencer Faucet | [https://faucet.sequencer.dusk-8.devnet.astria.org](https://faucet.sequencer.dusk-8.devnet.astria.org) | diff --git a/docs/developer/references/astria-go/cli-commands.md b/docs/developer/references/astria-go/cli-commands.md index aaa5540b..d34413a6 100644 --- a/docs/developer/references/astria-go/cli-commands.md +++ b/docs/developer/references/astria-go/cli-commands.md @@ -88,6 +88,12 @@ astria-go dev purge all [flags] |---|---|---|---| | `--instance` | string | `ASTRIA_GO_INSTANCE` | Choose the target instance. (default "default") | +### Flags + +| Flag | Arg Type | Override Env Var | Description | +|---|---|---|---| +| `--instance` | string | `ASTRIA_GO_INSTANCE` | Choose the target instance. (default "default") | + ## `dev purge binaries` Delete all downloaded binaries for a given instance. `astria-go dev init` must be run before `astria-go dev run` @@ -105,6 +111,17 @@ astria-go dev purge binaries [flags] |---|---|---|---| | `--instance` | string | `ASTRIA_GO_INSTANCE` | Choose the target instance. (default "default") | +## `dev purge logs` + +Delete all logs for a given instance. This deletes all data in the +`~/.astria/logs` directory. Re-initializing is NOT required after using this command. + +### Usage + +```bash +astria-go dev purge logs [flags] +``` + ## `dev reset` The root command for resetting the local development instance data. diff --git a/docs/developer/references/astria-go/cli-config.md b/docs/developer/references/astria-go/cli-config.md new file mode 100644 index 00000000..8159793b --- /dev/null +++ b/docs/developer/references/astria-go/cli-config.md @@ -0,0 +1,355 @@ +# `astria-go` Configuration + +Config for the `astria-go` CLI can be broken out into the following catagories: +- [CLI TUI/devrunner](#tui-config) +- [Services](#service-config) and [networks](#devrunner-networks-config) run by the TUI +- Presets for running [`sequencer` commands](#sequencer-networks-config) used when interacting with the Astria sequencer. + +## TUI Config + +Once `astria-go dev init` has been run, a `~/.astria/tui-config.toml` file will +be created. This config file control the starting settings of the TUI app. + +| Setting | Description | +| --- | --- | +| `auto_scroll` | Control if the TUI starts with auto scrolling logs enabled | +| `wrap_lines` | Control if the TUI starts with word enabled | +| `borderless` | Control if the full screen log views start in borderless mode | +| `override_instance_name` | Override the default instance name that the `--instance` flag defaults to when running `astria-go dev` commands | +| `cometbft_starts_minimized` | Control if the CometBFT process pane starts minimized or not | +| `conductor_starts_minimized` | Control if the CometBFT process pane starts minimized or not | +| `composer_starts_minimized` | Control if the Composer process pane starts minimized or not | +| `sequencer_starts_minimized` | Control if the Sequencer process pane starts minimized or not | +| `generic_starts_minimized` | Control if the generic process pane(s) starts minimized or not | +| `highlight_color` | Override the highlight color for focused process panes | +| `border_color` | Override the border color for focused process panes | + +The default TUI settings are as follows: + +```toml +auto_scroll = true +wrap_lines = false +borderless = false +override_instance_name = 'default' +cometbft_starts_minimized = false +conductor_starts_minimized = true +composer_starts_minimized = true +sequencer_starts_minimized = false +generic_starts_minimized = false +highlight_color = "blue" +border_color = "#808080" +``` + +The `highlight_color` and `border_color` accept both [W3C named +colors](https://www.w3schools.com/tags/ref_colornames.asp) and hexadecimal +notation: + +```toml +highlight_color = "deepskyblue" # names should be all lowercase with no spaces +border_color = "#808080" +``` + + + +## Sequencer Networks Config + +The `~/.astria/sequencer-networks-config.toml` provides presets for interacting +with different sequencer networks when using `astria-go sequencer` commands. Use +the `--network ` flag to simplify your commands. + +To add presets for a new network, append to `sequencer-networks-config.toml`: + +```toml +[networks.new_network] +sequencer_chain_id = 'new-network' +sequencer_url = '' +asset = '' +fee_asset = '' +``` + +Use the new config with: + +```bash +astria-go sequencer nonce --network new_network +``` + +## Devrunner Networks Config + +The devrunner networks config provides simplified and powerful options for +running different Astria services for your own local sequencer network or +running services to target a remote sequencer network. + +A `networks-config.toml` exists for each instance managed by the cli, and +exists at `~/.astria//networks-config.toml`. The `--network` flag is +used with the `astria-go dev run` command to select which network config the +devrunner will use. + +```bash +# Run services against the Astria Dusk dev-net +astria-go dev run --network dusk +``` + +> NOTE: The `network-config.toml` overrides the default values in the [services +> base config](#service-config). + +### Config Structure + +Each network in the toml is defined by three different toml tables: + +```toml +[network.network_name] +[network.network_name.services] +[network.network_name.services.service_name] +``` + +Each of these tables also contains values to update the settings for your +network and the services that are run to create that network. + +A filled out example for a local sequencer network is as follows: + +```toml +[networks.local] +sequencer_chain_id = 'sequencer-test-chain-0' +sequencer_grpc = 'http://127.0.0.1:8080' +sequencer_rpc = 'http://127.0.0.1:26657' +rollup_name = 'astria-test-chain-1' +default_denom = 'nria' + +[networks.local.services] +[networks.local.services.cometbft] +name = 'cometbft' +version = 'v0.38.8' +download_url = 'https://github.com/cometbft/cometbft/releases/download/v0.38.8/cometbft_0.38.8_darwin_arm64.tar.gz' +local_path = '/.astria/default/bin/cometbft-v0.38.8' +args = [] + +[networks.local.services.composer] +name = 'astria-composer' +version = 'v0.8.2' +download_url = 'https://github.com/astriaorg/astria/releases/download/composer-v0.8.2/astria-composer-aarch64-apple-darwin.tar.gz' +local_path = '/.astria/default/bin/astria-composer-v0.8.2' +args = [] + +[networks.local.services.conductor] +name = 'astria-conductor' +version = 'v0.20.0' +download_url = 'https://github.com/astriaorg/astria/releases/download/conductor-v0.20.0/astria-conductor-aarch64-apple-darwin.tar.gz' +local_path = '/.astria/default/bin/astria-conductor-v0.20.0' +args = [] + +[networks.local.services.sequencer] +name = 'astria-sequencer' +version = 'v0.16.0' +download_url = 'https://github.com/astriaorg/astria/releases/download/sequencer-v0.16.0/astria-sequencer-aarch64-apple-darwin.tar.gz' +local_path = '/.astria/default/bin/astria-sequencer-v0.16.0' +args = [] +``` + +A filled out network config for running against the Dusk dev-net is as follows: + +```toml +[networks.dusk] +sequencer_chain_id = 'astria-dusk-10' +sequencer_grpc = 'https://grpc.sequencer.dusk-10.devnet.astria.org/' +sequencer_rpc = 'https://rpc.sequencer.dusk-10.devnet.astria.org/' +rollup_name = '' +default_denom = 'nria' + +[networks.dusk.services] +[networks.dusk.services.composer] +name = 'astria-composer' +version = 'v0.8.1' +download_url = 'https://github.com/astriaorg/astria/releases/download/composer-v0.8.2/astria-composer-aarch64-apple-darwin.tar.gz' +local_path = '/.astria/default/bin/astria-composer-0.8.2' +args = [] + +[networks.dusk.services.conductor] +name = 'astria-conductor' +version = 'v0.19.0' +download_url = 'https://github.com/astriaorg/astria/releases/download/conductor-v0.20.0/astria-conductor-aarch64-apple-darwin.tar.gz' +local_path = '/.astria/default/bin/astria-conductor-v0.20.0' +args = [] +``` + +### Dynamic Services + +In the previous section, you can see that the local network config has four +services defined and the dusk network has two services defined. The devrunner +read in the config and spins up a service for each item defined in the +`[networks.network_name.services]` table. + +If you would like to add or remove services you can delete a named service or +add a new one: + +```toml +[networks.dusk.services.new_service_name] +name = 'new-service-name' +version = '' # update the version +download_url = '' # provide a download to a release if applicable +local_path = '' +args = ["arg1", "arg2"] # args to be passed to the service +``` + +If you do provide a `download_url`, that binary will be downloaded and extracted +to the `~/.astria//bin` directory. This download link is also required +to be a `.tar.gz` download. When extracting the file, it will be renamed as the +`name-version` as specified in the service table in the toml. + +If you are pointing to a local binary, you only need to provide the local path +without a download url. + +### Dynamic Networks + +Similar to specifying individual services, you can also specify entire networks. +An example case for this is if you need to rollback the versions for specific +services for some local testing: + +```toml +[networks.local-rollback] +sequencer_chain_id = 'rollback-test-chain' +sequencer_grpc = 'http://127.0.0.1:8080' +sequencer_rpc = 'http://127.0.0.1:26657' +rollup_name = 'astria-test-chain-1' +default_denom = 'nria' + +[networks.local-rollback.services] +[networks.local-rollback.services.cometbft] +name = 'cometbft' +version = 'v0.38.6' +download_url = 'https://github.com/cometbft/cometbft/releases/download/v0.38.6/cometbft_0.38.6_darwin_arm64.tar.gz' +local_path = '/.astria/default/bin/cometbft-v0.38.6' +args = [] + +[networks.local-rollback.services.composer] +name = 'astria-composer' +version = 'v0.7.0' +download_url = 'https://github.com/astriaorg/astria/releases/download/composer-v0.7.0/astria-composer-aarch64-apple-darwin.tar.gz' +local_path = '/.astria/default/bin/astria-composer-v0.7.0' +args = [] + +[networks.local-rollback.services.conductor] +name = 'astria-conductor' +version = 'v0.16.0' +download_url = 'https://github.com/astriaorg/astria/releases/download/conductor-v0.16.0/astria-conductor-aarch64-apple-darwin.tar.gz' +local_path = '/.astria/default/bin/astria-conductor-v0.16.0' +args = [] + +[networks.local-rollback.services.sequencer] +name = 'astria-sequencer' +version = 'v0.12.0' +download_url = 'https://github.com/astriaorg/astria/releases/download/sequencer-v0.12.0/astria-sequencer-aarch64-apple-darwin.tar.gz' +local_path = '/.astria/default/bin/astria-sequencer-v0.12.0' +args = [] +``` + +You can then have the cli download all of the services specified in the new +network that was added by running: + +```bash +astria-go dev init --log-level info +``` + +You will see a log message for this new network: + +```bash +INFO[0000] --Downloading binaries for network: local-rollback +``` + +And then you can run the new network with: + +```bash +astria-go dev run --network local-rollback +``` + +### What the Networks Config Doesn't Do + +The networks config does not control the genesis of a sequencer network, even +if you are only running a local sequencer. It is used for configuring the Astria +services interacting with a given sequencer network at runtime. If you are +running a local sequencer stack, you need to use the `astria-go dev init` +command with the `--local-network-name` and `--local-default-denom` flags to set +the sequencer chain id and default denom respectively. + +For example, if you initialize your local sequencer stack with the following +command: + +```bash +astria-go dev init \ + --local-network-name test-chain \ + --local-default-denom testdenom +``` + +Your local networks config will look like this: + +```toml +[networks.local] +sequencer_chain_id = 'test-chain' +sequencer_grpc = 'http://127.0.0.1:8080' +sequencer_rpc = 'http://127.0.0.1:26657' +rollup_name = 'astria-test-chain' +default_denom = 'testdenom' +``` + +If you then update `sequencer_chain_id`: + +```toml +sequencer_chain_id = 'different-chain' +``` + +And then run `astria-go dev run`, your local sequencer will still be started +with a chain id of `test-chain`, but the services run by the `astria-go` cli +will be trying to communicate with a sequencer that has a chain id of +`different-chain`. + +To communicate with the correct sequencer, you need to either revert +`sequencer_chain_id` to `'test-chain'` or run the following commands to +re-initialize your local sequencer to the new chain id: + +```bash +astria-go dev purge all +astria-go dev init \ + --local-network-name different-chain \ + --local-default-denom testdenom + +``` + +## Service Config + +The full configuration for all Astria services can be found in the +`~/.astria//config/base-config.toml` file. All Astria services are +configured using environment variables and the contents of the +`base-config.toml` represent all of the required values. The config file is +generated when `astria-go dev init` is run and then dynamically loaded and +parsed at runtime of an `astria-go dev run` command. + +All key value pairs defined in the config toml are parsed in the following way: + +```toml +astria_composer_sequencer_url = 'http://127.0.0.1:26657' +``` + +Becomes the env var: + +```bash +ASTRIA_COMPOSER_SEQUENCER_URL=http://127.0.0.1:26657 +``` + +All values loaded from the `base-config.toml` are then passed to the devrunners +that run the services for the CLI TUI. + +Because this config is loaded dynamically, you can also add new values of your +choosing to the `base-config.toml` and those values will be added to the +environment. + +```toml +lower_snake_case_var_name = 'value' +``` + +Will end up in the service environment as: + +```bash +LOWER_SNAKE_CASE_VAR_NAME=value +``` + +> NOTE: The `network-config.toml` overrides the default values in the +> `base-config.toml`. diff --git a/docs/developer/references/astria-go/cli-installation.md b/docs/developer/references/astria-go/cli-installation.md index 4a63f923..4ffa1fe1 100644 --- a/docs/developer/references/astria-go/cli-installation.md +++ b/docs/developer/references/astria-go/cli-installation.md @@ -10,4 +10,9 @@ View all releases [here](https://github.com/astriaorg/astria-cli-go/releases). ## Build from Source +This requires `Go` and `just` to be installed on your system. + +- [Go](https://go.dev/doc/install) +- [just](https://github.com/casey/just) + diff --git a/docs/developer/references/astria-go/cli-networks-configuration.md b/docs/developer/references/astria-go/cli-networks-configuration.md deleted file mode 100644 index cd2a286b..00000000 --- a/docs/developer/references/astria-go/cli-networks-configuration.md +++ /dev/null @@ -1,88 +0,0 @@ -# Astria Cli Networks Configuration - -For each instance created with the `astria-go` cli, a `networks-config.toml` -file can found in the `~/.astria//` directory. This file allows for -simplified configurations of different sequencer networks that can be targeted -by the cli. - -Selecting which network the cli is targeting can be controlled by using the -`--network` flag when using the `astria-go dev run` command. - -## Primary Use Case - -In general, the default values in the networks config should not need to be -changed for most development situations. The most likely case where a user will -need to update the configs is if they are trying to test their local components -against a different sequencer rpc/grpc. - -For example, the default Astria Dusk dev net configuration is as follows: - -```toml -[dusk] -sequencer_chain_id = 'astria-dusk-8' -sequencer_grpc = 'https://grpc.sequencer.dusk-8.devnet.astria.org/' -sequencer_rpc = 'https://rpc.sequencer.dusk-8.devnet.astria.org/' -rollup_name = '' -default_denom = 'nria' -``` - -If you needed to instead test against different endpoints, you would update the -values above to suit your needs, the can run the command: - -```bash -astria-go dev run --network dusk -``` - -To have you local components use the `dusk` configuration you just set. - -## What the Networks Config Doesn't Do - -The networks config does not control the creation of a sequencer network, even -if you are only running a local sequencer. It is used for configuring the Astria -services interacting with a given sequencer network at runtime. If you are -running a local sequencer stack, you need to use the `astria-go dev init` -command with the `--local-network-name` and `--local-default-denom` flags to set -the sequencer chain id and default denom respectively. - -For example, if you initialize your local sequencer stack with the following -command: - -```bash -astria-go dev init \ - --local-network-name test-chain \ - --local-default-denom testdenom -``` - -Your local networks config will look like this: - -```toml -[local] -sequencer_chain_id = 'test-chain' -sequencer_grpc = 'http://127.0.0.1:8080' -sequencer_rpc = 'http://127.0.0.1:26657' -rollup_name = 'astria-test-chain' -default_denom = 'testdenom' -``` - -If you then update `sequencer_chain_id`: - -```toml -sequencer_chain_id = 'different-chain' -``` - -And then run `astria-go dev run`, your local sequencer will still be started -with a chain id of `test-chain`, but the services run by the `astria-go` cli -will be trying to communicate with a sequencer that has a chain id of -`different-chain`. - -To communicate with the correct sequencer, you need to either revert -`sequencer_chain_id` to `'test-chain'` or run the following commands to -re-initialize your local sequencer to the new chain id: - -```bash -astria-go dev purge all -astria-go dev init \ - --local-network-name different-chain \ - --local-default-denom testdenom - -``` diff --git a/docs/developer/references/endpoints.md b/docs/developer/references/endpoints.md index 5c8625db..e6fe31fc 100644 --- a/docs/developer/references/endpoints.md +++ b/docs/developer/references/endpoints.md @@ -3,4 +3,5 @@ | Network | Sequencer RPC | |---|---| | local | | -| Dusk | | +| Dusk | | +| Dawn | | diff --git a/docs/developer/tutorials/assets/dusk-10-go-cli-local-sequencer.png b/docs/developer/tutorials/assets/dusk-10-go-cli-local-sequencer.png new file mode 100644 index 00000000..28c5b536 Binary files /dev/null and b/docs/developer/tutorials/assets/dusk-10-go-cli-local-sequencer.png differ diff --git a/docs/developer/tutorials/assets/dusk-10-go-cli-remote-sequencer.png b/docs/developer/tutorials/assets/dusk-10-go-cli-remote-sequencer.png new file mode 100644 index 00000000..f92327db Binary files /dev/null and b/docs/developer/tutorials/assets/dusk-10-go-cli-remote-sequencer.png differ diff --git a/docs/developer/tutorials/assets/go-cli-local-sequencer.png b/docs/developer/tutorials/assets/go-cli-local-sequencer.png deleted file mode 100644 index 1d22b637..00000000 Binary files a/docs/developer/tutorials/assets/go-cli-local-sequencer.png and /dev/null differ diff --git a/docs/developer/tutorials/assets/go-cli-remote-sequencer.png b/docs/developer/tutorials/assets/go-cli-remote-sequencer.png deleted file mode 100644 index 549a1727..00000000 Binary files a/docs/developer/tutorials/assets/go-cli-remote-sequencer.png and /dev/null differ diff --git a/docs/developer/tutorials/install-the-cli.md b/docs/developer/tutorials/install-the-cli.md index 7ed92c93..0b1fc17f 100644 --- a/docs/developer/tutorials/install-the-cli.md +++ b/docs/developer/tutorials/install-the-cli.md @@ -10,6 +10,11 @@ View all releases [here](https://github.com/astriaorg/astria-cli-go/releases). ## Build from Source +This requires `Go` and `just` to be installed on your system. + +- [Go](https://go.dev/doc/install) +- [just](https://github.com/casey/just) + ## Commands Used in this Tutorial diff --git a/docs/developer/tutorials/run-local-rollup-against-remote-sequencer.md b/docs/developer/tutorials/run-local-rollup-against-remote-sequencer.md index 1a3efe15..861c30b7 100644 --- a/docs/developer/tutorials/run-local-rollup-against-remote-sequencer.md +++ b/docs/developer/tutorials/run-local-rollup-against-remote-sequencer.md @@ -10,18 +10,13 @@ Astria stack locally on your machine. Requires `Go`, `just`, and `Foundry`: -- Go: -- just: -- Foundry: +- [Go](https://go.dev/doc/install) +- [just](https://github.com/casey/just) +- [Foundry](https://book.getfoundry.sh/getting-started/installation) Open a new terminal window and clone and build Geth. -```bash -git clone git@github.com:astriaorg/astria-geth.git -cd astria-geth -git checkout local-dev -just build -``` + ### Configure the Geth Genesis Information @@ -39,14 +34,28 @@ Then, open the `geth-genesis-local.json` file and update the `chainId` and `astriaSequencerInitialHeight` using the block height from the previous command to choose which sequencer block the first block of your rollup will be in: +Create a new genesis account for your Geth rollup: + +```bash +cast w new +``` + +Also in the `geth-genesis-local.json` file, update the `"alloc"` account with +your new one: + ```json +{ "config": { ... "chainId": <6 digit number>, "astriaRollupName": "", "astriaSequencerInitialHeight": , ... - }, + "alloc": { + "": { "balance": "300000000000000000000" } + } + } +} ``` Keep the `chainId` and `astriaRollupName` you chose on hand, as they will also @@ -62,23 +71,9 @@ will work but will cause your rollup to sync potentially millions of blocks that have no relevant data for your new rollup. ::: -Create a new genesis account for your Geth rollup: +You will use the private key for your new account to send [test +transactions](./test-transactions.md) later on. -```bash -cast w new -``` - -Also in the `geth-genesis-local.json` file, update the `"alloc"` account with -your new one: - -```json - "alloc": { - "": { "balance": "300000000000000000000" } - } -``` - -You will use the private key for your new account with the [test -transactions](./test-transactions.md) later on. ## Start Geth @@ -100,7 +95,6 @@ just run If you need to restart the rollup and want to also clear the state data, you can use: ```bash -# in astria-geth dir just clean-restart ``` @@ -123,15 +117,15 @@ Navigate to the `~/.astria` directory. If you have run the commands shown above, you should find a `default` directory. Open the `~/.astria/default/networks-config.toml` file and update the -`rollup_name` variable in the `[dusk]` sections using the same +`rollup_name` variable in the `[networks.dusk]` sections using the same `"astriaRollupName"` you used when [setting up your Geth rollup](#setup-a-geth-rollup). ```toml -[dusk] -sequencer_chain_id = 'astria-dusk-8' -sequencer_grpc = 'https://grpc.sequencer.dusk-8.devnet.astria.org/' -sequencer_rpc = 'https://rpc.sequencer.dusk-8.devnet.astria.org/' +[networks.dusk] +sequencer_chain_id = 'astria-dusk-10' +sequencer_grpc = 'https://grpc.sequencer.dusk-10.devnet.astria.org/' +sequencer_rpc = 'https://rpc.sequencer.dusk-10.devnet.astria.org/' rollup_name = '' # update this value default_denom = 'nria' ``` @@ -142,11 +136,11 @@ created. :::warning If you skip updating the priv key the Astria services will still start correctly -but your Composer will not be able to write transactions to the sequencer. +but your Composer will not be able to submit transactions to the sequencer. ::: You can then use the [Sequencer -Faucet](https://faucet.sequencer.dusk-8.devnet.astria.org/) to fund the account +Faucet](https://faucet.sequencer.dusk-10.devnet.astria.org/) to fund the account you just created using the account address. ## Run the local Astria components against the Remote Sequencer @@ -160,7 +154,7 @@ astria-go dev run --network dusk When running against the remote sequencer, you will see a TUI that displays the logs of the Astria Conductor and Composer: ![Running against a remote sequencer using the Astria -cli](./assets/go-cli-remote-sequencer.png) +cli](./assets/dusk-10-go-cli-remote-sequencer.png) ## Test your Rollup diff --git a/docs/developer/tutorials/run-local-rollup-and-sequencer.md b/docs/developer/tutorials/run-local-rollup-and-sequencer.md index 938aaad1..f230336f 100644 --- a/docs/developer/tutorials/run-local-rollup-and-sequencer.md +++ b/docs/developer/tutorials/run-local-rollup-and-sequencer.md @@ -8,18 +8,13 @@ Astria stack locally on your machine. Requires `Go`, `just`, and `Foundry`: -- Go: -- just: -- Foundry: +- [Go](https://go.dev/doc/install) +- [just](https://github.com/casey/just) +- [Foundry](https://book.getfoundry.sh/getting-started/installation) Open a new terminal window and clone and build Geth: -```bash -git clone git@github.com:astriaorg/astria-geth.git -cd astria-geth -git checkout local-dev -just build -``` + Create a new genesis account for your Geth rollup: @@ -34,8 +29,8 @@ Open the `geth-genesis-local.json` file in your Geth repo and update the ```json { "config": { - "chainId": <6 digit number>, ... + "chainId": <6 digit number>, "astriaRollupName": "", ... "alloc": { @@ -45,12 +40,8 @@ Open the `geth-genesis-local.json` file in your Geth repo and update the } ``` -You will use the private key for your new account, and the `"chainId"` you chose, -with the [test transactions](./test-transactions.md) later on. - - +You will use the private key for your new account to send [test +transactions](./test-transactions.md) later on. ## Start Geth @@ -72,7 +63,6 @@ just run If you need to restart the rollup and want to also clear the state data, you can use: ```bash -# in astria-geth dir just clean-restart ``` @@ -93,7 +83,7 @@ Open the `~/.astria/default/networks-config.toml` file and update the rollup](#setup-a-geth-rollup). ```toml -[local] +[networks.local] sequencer_chain_id = 'sequencer-test-chain-0' sequencer_grpc = 'http://127.0.0.1:8080' sequencer_rpc = 'http://127.0.0.1:26657' @@ -104,7 +94,7 @@ default_denom = 'nria' Use the cli to run a local Astria Sequencer. ```bash -astria-go dev run +astria-go dev run --network local ``` :::tip @@ -117,7 +107,7 @@ When running the Astria stack locally, you will see a TUI that displays the logs of the Astria Sequencer, the underlying Cometbft node, the Astria Conductor, and Astria Composer: ![Running a local sequencer in the Astria -cli](./assets/go-cli-local-sequencer.png) +cli](./assets/dusk-10-go-cli-local-sequencer.png) ## Test your Rollup diff --git a/docs/developer/tutorials/test-transactions.md b/docs/developer/tutorials/test-transactions.md index 95e05de8..ee47bbeb 100644 --- a/docs/developer/tutorials/test-transactions.md +++ b/docs/developer/tutorials/test-transactions.md @@ -1,99 +1,70 @@ # Test Transactions -## Configure the Testing Script +## Setup `spamooor` -To run the test transactions script you will need `Foundry`: -- Foundry: +Clone and build the [`spamooor` transaction spamming +tool](https://github.com/astriaorg/spamooor). -In a new terminal window, clone and configure the evm test transactions repo: +Requirements: + +- [Go](https://go.dev/doc/install) + + + +## Configure Your Rollup Account + +Make sure you have a local Geth rollup configured and running. +- [Set up a Geth + Rollup](run-local-rollup-against-remote-sequencer.md#setup-a-geth-rollup) + +Add your private key from your testing account and the rollup rpc to the environment: + +```bash +export PRIV_KEY="" # DON'T include the '0x' prefix +export ROLLUP_RPC="http://localhost:8545" +``` + +## Setup Your Environment for `spamooor` + +There are several `spamooor` settings that you can configure: +- `max-wallets`: The number of child wallets that will be created. +- `throughput`: The number of transactions to send per block. +- `count`: The total number of transfer transactions to send. +- `timeout`: The number of seconds to wait before the `spamooor` test times out. +- `gas-units-to-burn`: The approximate amount of gas your transactions will + burn. + +Add these settings to your environment: ```bash -git clone --recurse-submodules git@github.com:astriaorg/astria-web3.git -cd astria-web3 -git checkout local-evm -cd packages/evm-test-data/ -forge install -cp .env.example .env +export SPAMOOOR_MAX_WALLETS="10" +export SPAMOOOR_THROUGHPUT="50" +export SPAMOOOR_COUNT="100" +export SPAMOOOR_TIMEOUT="20" +export SPAMOOOR_GAS_UNITS_TO_BURN="5000000" ``` -Open the `.env` file and update the chain id and private key. The chain id -should match the `"chainId"` value in the `geth-genesis-local.json` file in the -`astria-geth` repo. The private key used here should be the private key for the -account you used when [setting up -Geth](./run-local-rollup-and-sequencer.md#setup-a-geth-rollup) previously: +## Generate Transactions + +With your sequencer, rollup, and `spamooor` setup, you can now send test +transactions: +Send transfers: ```bash -# this value should be the same as what you used for configuring Geth above -CHAIN_ID=<6 digit number> -PRIVATE_KEY= +./spamooor eoatx --privkey $PRIV_KEY --rpchost $ROLLUP_RPC --max-wallets $SPAMOOOR_MAX_WALLETS --throughput $SPAMOOOR_THROUGHPUT --count $SPAMOOOR_COUNT ``` -## Run the Testing Script +Send ERC20 transfers: +```bash +./spamooor erctx --privkey $PRIV_KEY --rpchost $ROLLUP_RPC --max-wallets $SPAMOOOR_MAX_WALLETS --throughput $SPAMOOOR_THROUGHPUT --count $SPAMOOOR_COUNT --timeout $SPAMOOOR_TIMEOUT +``` +Send gas burner transactions: ```bash -just generate-transactions +./spamooor gasburnertx --privkey $PRIV_KEY --rpchost $ROLLUP_RPC --max-wallets $SPAMOOOR_MAX_WALLETS --throughput $SPAMOOOR_THROUGHPUT --count $SPAMOOOR_COUNT --timeout $SPAMOOOR_TIMEOUT --gas-units-to-burn $SPAMOOOR_GAS_UNITS_TO_BURN ``` -You will see the transactions going through in both the `forge` script and the -log windows in the `astria-go` cli. - -:::tip -The test script sends transactions directly to the local rollup running on your -machine. Thus, the transactions will work regardless of whether you are running -everything locally with `astria-go dev run --network local` or if you are running -against a remote sequencer with `astria-go dev run --network dusk`. -::: - -## Common Issues - -### `EvmError: OutOfFunds` - -If you see a an `OutOfFunds` error when running the testing script, this means -that your rollup genesis account was not configured correctly. To fix this -issue: -1. Go back to the `astria-geth` repo. -2. Run `cast w new` to create a new rollup account. -3. Add the new address to the `geth-genesis-local.json` under `"alloc"`. -4. Restart your rollup with `just clean-restart`. -5. Update the `PRIVATE_KEY` env var in the test transactions repo with the - private key from the new account. -6. Rerun the testing script. - -### Test script hangs - -If you are running against a remote sequencer and the transactions test script -hangs, navigate to the cli TUI and look at the logs for the Composer. You will -likely see an error that contains `sequencer rejected the transaction ... -insufficient funds for asset`. This means that the sequencer account that was -created was either improperly configure or not funded correctly. To fix this -issue: -1. Stop the `astria-go` cli. -2. Create a new sequencer account with `astria-go sequencer createaccount` or - use an existing account if you already have one for testing, and fund the - account using the [Sequencer - Faucet](https://faucet.sequencer.dusk-8.devnet.astria.org/). -3. Make sure the `astria_composer_private_key` variable in the - `~/.astria/default/config/base-config.toml` is set to the private key for your funded - sequencer account. -4. Re-launch the cli with `astria-go dev run --network dusk`. -5. Rerun the transactions testing script. - -### Chain Data Mismatch - -If you start seeing warning in Composer that say `failed getting latest nonce -from sequencer` or errors in Conductor that say `first latest height from -sequencer was bad`, this likely means that block data on your rollup and the -block data coming from whatever sequencer you are using (either local or remote) -are mismatched. To fix this issue: -1. Stop your rollup and the cli. -2. Restart the rollup with `just clean-restart` and restart the cli with the run - conditions you were using. - -This will clean the data your rollup and allow it to resync. - -If issues still persist, you can clean the data for the rollup and the sequencer -(if you are running a local sequencer): -1. Stop your rollup and the cli. -2. With the cli run `astria-go dev clean` then `astria-go dev init`. -3. Restart the rollup with `just clean-restart`. -4. Restart the cli with `astria-go dev run`. +Send transactions that will revert: +```bash +./spamooor revertingtx --privkey $PRIV_KEY --rpchost $ROLLUP_RPC --max-wallets $SPAMOOOR_MAX_WALLETS --throughput $SPAMOOOR_THROUGHPUT --count $SPAMOOOR_COUNT +``` diff --git a/docs/dusk-faq/faq.md b/docs/dusk-faq/faq.md index 742b663f..f870bd9a 100644 --- a/docs/dusk-faq/faq.md +++ b/docs/dusk-faq/faq.md @@ -1,24 +1,25 @@ # FAQ and Debugging -## Endpoints +## Dusk-10 Endpoints and Service Versions - + -## Software Versions - -The latest Devnet (dusk-8) runs the following software versions: - -- [conductor v0.17.0](https://github.com/astriaorg/astria/releases/tag/conductor-v0.17.0) -- [composer v0.7.0](https://github.com/astriaorg/astria/releases/tag/composer-v0.7.0) -- [sequencer-relayer v0.14.0](https://github.com/astriaorg/astria/releases/tag/sequencer-relayer-v0.14.0) -- [sequencer v0.15.0](https://github.com/astriaorg/astria/releases/tag/sequencer-v0.15.0) -- [astria-geth EVM v0.12.0](https://github.com/astriaorg/astria-geth/releases/tag/v0.12.0) -- [CometBFT v0.38.6](https://github.com/cometbft/cometbft/releases/tag/v0.38.6) + ## Install the latest Astria cli +Download using curl: + +Build from source: + + + ## `astria-go` CLI Commands [View all the `astria-go` cli commands.](../developer/references/astria-go/cli-commands.md) + +## Install the Rust `astria-cli` + + diff --git a/docs/overview/introduction.md b/docs/overview/introduction.md index 49280f44..e1cb8422 100644 --- a/docs/overview/introduction.md +++ b/docs/overview/introduction.md @@ -43,10 +43,7 @@ Rollups Work](/overview/how-rollups-work) or [The Astria Sequencer Network](/overview/the-astria-sequencer-network). If you're a rollup developer eager to get started, you should go straight to our -[`astria-go` cli tutorials](../developer/tutorials/dev-cluster-local-rollup). - -For more advanced development, you can read about deploying a rollup full using -a local Kubernetes cluster [here](../local-rollup/1-introduction.md). +[`astria-go` cli tutorials](../developer/tutorials/install-the-cli.md). You can find our endpoints and FAQ [here](/astria-evm/overview.md)