Skip to content

Commit

Permalink
feat(blockchain-guides): arbitrum and celo guides updated to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
calinah committed May 3, 2024
1 parent de4965b commit b46b15d
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 158 deletions.
135 changes: 68 additions & 67 deletions docs/launchpad/guides/arbitrum-archive-kubernetes-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,116 +2,117 @@
---
# Arbitrum Archive Mainnet Node Guide

:::warning
This Quick Start guide has not yet been updated for Launchpad V2.
:::
## Introduction
This guide provides an end-to-end walkthrough for setting up an Indexer on the Graph Protocol Mainnet for the Arbitrum One network. It details the steps for deploying both Arbitrum Classic and Arbitrum Nitro.

This guide is intended to be an end to end walk-through of setting up an Indexer running on the Graph Protocol Mainnet on the Arbitrum One network.
## Sync Duration
- **Arbitrum Classic**: Approximately 1 week is required to sync on dedicated hardware.
- **Arbitrum Nitro**: Typically syncs within 3 days due to a shorter historical data span.

Sync times are reported to be in the range of 1 week on dedicated hardware. The node consists of 2 parts, the classic part and the nitro hardfork. The classic part is only required to request archive data for blocks before the hardfork and takes the aforementioned 1 weeks to sync from scratch. The nitro history is shorter and can be quickly synced within 3 days.
## Architecture Overview
Arbitrum Nitro includes a built-in proxy that automatically redirects queries for blocks older than its genesis to the Arbitrum Classic node.

Newer versions of Arbitrum Nitro require beaconchain url
Arbitrum Nitro has a built-in proxy to redirect queries with block numbers below it’s genesis block (they’re sent to the Arbitrum Classic node).
## Setup Environment
This guide assumes operation within a Kubernetes cluster:
- For setups using Launchpad, follow the steps outlined [here](#kubernetes-cluster-using-launchpad).
- For setups using Helm only, refer to the instructions [here](#deploying-with-helm-in-a-kubernetes-cluster-outside-launchpad).

## Prerequisites
Before you begin, ensure you have the following:
- An `ethereum-mainnet` RPC endpoint.
- CPU: 4 Cores / 8 Threads.
- RAM: 16 GiB.
- Storage: 3 TiB NVMe SSD.

All the [Launchpad Prerequisites](../prerequisites) apply, so be sure to read them first.
## Kubernetes Cluster Using Launchpad

You will need:
- an `ethereum-mainnet` RPC endpoint
- CPU: 4 Cores / 8 Threads
- RAM: 16 GiB
- Storage: 3 TiB NVMe SSD
Ensure all [Launchpad Prerequisites](../prerequisites) are met before proceeding.

## If running a Kubernetes cluster using `Launchpad`
### Initial Configuration

1. Check that the cluster is running and healthy - review [Quick Start](../quick-start/) guide for more info.
2. In your private infra repo pull in latest `launchpad-starter` changes
1. Confirm your cluster is operational by consulting our [Quick Start](../quick-start/) guide.
2. In your private infra repo pull in latest `launchpad-starter` changes:
```shell
task launchpad:pull-upstream-starter
```
1. **blockchain node data snapshot** The [Arbitrum-One namespace](https://github.com/graphops/launchpad-namespaces/blob/main/arbitrum-one/README.md) contains default configurations for both Arbitrum Classic and Arbitrum Nitro to download data from a snapshot. The snapshots have been set by default:
- for Arbitrum Classic

### Data Restoration and Configuration

1. **Blockchain node data snapshot** The [Arbitrum-One namespace](https://github.com/graphops/launchpad-namespaces/blob/main/arbitrum-one/README.md) contains default configurations for both Arbitrum Classic and Arbitrum Nitro to download data from a snapshot. The snapshots have been set by default:
- for [Arbitrum Classic](https://github.com/graphops/launchpad-namespaces/blob/585f4a0aa711b27adedd2493daa57b28f01eeca1/arbitrum/values/one/arbitrum-classic.yaml.gotmpl#L20-L24)
```yaml
arbitrum:
restoreSnapshot:
enable: true
snapshotUrl: https://snapshot.arbitrum.foundation/arb1/classic-archive.tar
restoreSnapshot:
enabled: true
snapshotUrl: https://snapshot.arbitrum.foundation/arb1/classic-archive.tar
```
- for Arbitrum Nitro
- for [Arbitrum Nitro](https://github.com/graphops/launchpad-namespaces/blob/585f4a0aa711b27adedd2493daa57b28f01eeca1/arbitrum/values/one/arbitrum-nitro.yaml.gotmpl#L11-L13)
```yaml
nitro:
restoreSnapshot:
enabled: true
snapshotUrl: "https://snapshot.arbitrum.foundation/arb1/nitro-archive.tar"
restoreSnapshot:
enabled: true
snapshotUrl: https://snapshot.arbitrum.foundation/arb1/nitro-archive.tar
```
1. **connect to eth-mainnet-rpc-node** Both Arbitrum Classic and Arbitrum Nitro connect to l1 via the following commands:
- for Arbitrum Nitro - update values in [`<your-private-copy-of-launchpad-starter>/helmfiles/release-names/arbitrum-mainnet/arbitrum-classic-archive-trace-mainnet.yaml`](https://github.com/graphops/launchpad-starter/blob/main/helmfiles/release-values/arbitrum-mainnet/arbitrum-classic-archive-trace-mainnet.yaml) as needed. Example:
you can overwrite both of these values in [`<your-private-copy-of-launchpad-starter>/namespaces/arbitrum-one.yaml`](https://github.com/graphops/launchpad-starter/blob/main/namespaces/arbitrum-one.yaml)

2. **Connect to eth-mainnet-rpc-node** Both Arbitrum Classic and Arbitrum Nitro connect to l1, and recent versions of Arbitrum Nitro require connection to a beacon chain RPC:
- for **Arbitrum Classic** - update values in [`<your-private-copy-of-launchpad-starter>/namespaces/arbitrum-one.yaml`](https://github.com/graphops/launchpad-starter/blob/main/namespaces/arbitrum-one.yaml) as needed. Example:
```yaml
arbitrum:
extraArgs:
- --node.chain-id=42161 # determines Arbitrum network - 42161 mainnet
- --l1.url=http://a-link-to-your-eth-mainnet-url:8545
arbitrum-classic:
values:
arbitrum:
config:
parentChainUrl: http://your-eth-mainnet-url:8545 ## changeme
```
- for Arbitrum Nitro - update values in [`<your-private-copy-of-launchpad-starter>/helmfiles/release-names/arbitrum-mainnet/arbitrum-nitro-archive-trace-mainnet.yaml`](https://github.com/graphops/launchpad-starter/blob/main/helmfiles/release-values/arbitrum-mainnet/arbitrum-nitro-archive-trace-mainnet.yaml) as needed. Example:
- for **Arbitrum Nitro** - update values in [`<your-private-copy-of-launchpad-starter>/helmfiles/namespaces/arbitrum-one.yaml`](https://github.com/graphops/launchpad-starter/blob/main/namespaces/arbitrum-one.yaml) as needed. Example:
```yaml
nitro:
extraArgs:
- --http.api=net,web3,eth,debug
- --l2.chain-id=42161 # determines Arbitrum network - 42161 mainnet
- --l1.url=http://a-link-to-your-eth-mainnet-url:8545
- --node.rpc.classic-redirect=http://arbitrum-classic-archive-trace-mainnet-0:8547/
- --init.url=https://snapshot.arbitrum.io/mainnet/nitro.tar
arbitrum-nitro:
values:
nitro:
config:
parentChainUrl: http://your-eth-mainnet-url:8545 ## changeme
parentChainBeaconUrl: http://your-eth-consensus-node-url:5052 ## changeme
```

## Deploying with helm in a Kubernetes cluster outside Launchpad

You can find blockchain related helm packages ['here'](https://github.com/graphops/launchpad-charts/tree/main/charts)
## Deploying with helm in a Kubernetes Cluster Outside Launchpad

Given that Arbitrum needs both Nitro and classic to run use the following commands:
You can find blockchain related helm packages [here](https://github.com/graphops/launchpad-charts/tree/main/charts)

### Deploy Arbitrum Classic

We'll first deploy Arbitrum Classic as Arbitrum Nitro needs to connect to the Classic endpoint.

Create a values `arbitrum-classic.yaml` file with the following contents
1. Prepare your configuration file, `arbitrum-classic.yaml`, with the necessary RPC URL and optional snapshot URL:
```yaml
arbitrum:
extraArgs:
- --node.chain-id=42161 # determines Arbitrum network - 42161 mainnet
- --l1.url=http://a-link-to-your-eth-mainnet-url:8545
config:
parentChainUrl: http://your-eth-mainnet-url:8545 ## changeme
restoreSnapshot:
enable: true
snapshotUrl: https://a-link-to-your-snapshot-archive.tar.gz
mode: streaming # or multipart depending on chain
enabled: true
snapshotUrl: https://a-link-to-your-snapshot-archive.tar.gz ## specify only if overriding default
```

Deploy helm-chart:
2. Add the Helm repository and deploy:

```sh
helm repo add graphops http://graphops.github.io/launchpad-charts
```

```sh
helm install --dry-run arbitrum-classic graphops/arbitrum-classic:latest --namespace arbitrum-mainnet --value arbitrum-classic.yaml
helm install --dry-run arbitrum-classic graphops/arbitrum-classic:latest --namespace arbitrum-one --value arbitrum-classic.yaml
```

### Deploy Arbitrum Nitro


Create a values `arbitrum-nitro.yaml` file with the following contents
1. Prepare your configuration file, `arbitrum-nitro.yaml`, with the necessary RPC URLs, classic node URLs and optional snapshot URL:
```yaml
nitro:
extraArgs:
- --http.api=net,web3,eth,debug
- --l2.chain-id=42161 # determines Arbitrum network - 42161 mainnet
- --l1.url=http://a-link-to-your-eth-mainnet-url:8545
- --node.rpc.classic-redirect=http://arbitrum-classic:8547/ # replace `arbitrum-classic` with the name of your arbitrum-classic release deployed at the previous step
- --init.url=https://snapshot.arbitrum.io/mainnet/nitro.tar
config:
parentChainUrl: http://your-eth-mainnet-url:8545 ## changeme
parentChainBeaconUrl: http://your-eth-consensus-node-url:5052 ## changeme
classicUrl: http://arbitrum-classic:8547/ # replace `arbitrum-classic` with the name of your arbitrum-classic release deployed at the previous step
restoreSnapshot:
enabled: true
snapshotUrl: https://a-link-to-your-snapshot-archive.tar.gz ## specify only if overriding default
```
Deploy helm-chart:
2. Deploy using helm:
```sh
helm install --dry-run arbitrum-nitro graphops/arbitrum-classic:latest --namespace arbitrum-mainnet --value arbitrum-nitro.yaml
helm install --dry-run arbitrum-nitro graphops/arbitrum-classic:latest --namespace arbitrum-one --value arbitrum-nitro.yaml
```
39 changes: 19 additions & 20 deletions docs/launchpad/guides/celo-archive-kubernetes-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
---
# Celo Archive Mainnet Node Guide

:::warning
This Quick Start guide has not yet been updated for Launchpad V2.
:::

## Introduction
This guide is intended to be an end to end walk-through of running an Celo Archive Mainnet Node in an existing Kubernetes cluster.

## Sync Duration
Sync times are reported to be in the range of 4 days on dedicated hardware.

## Prerequisites
## Setup Environment
This guide assumes operation within a Kubernetes cluster:
- For setups using Launchpad, follow the steps outlined [here](#kubernetes-cluster-using-launchpad).
- For setups using Helm only, refer to the instructions [here](#deploying-with-helm-in-a-kubernetes-cluster-outside-launchpad).

All the [Launchpad Prerequisites](../prerequisites) apply if running a Kubernetes cluster using `Launchpad`, so be sure to read them first. This guide can be used with existing Kubernetes clusters as well.
## Prerequisites

For Celo workload you will need:
- CPU: 4 Cores / 8 Threads
Expand All @@ -20,18 +22,18 @@ For Celo workload you will need:

## If running a Kubernetes cluster using `Launchpad`

1. Check that the cluster is running and healthy - review [Quick Start](../quick-start/) guide for more info.
2. In your private infra repo pull in latest `launchpad-starter` changes
All the [Launchpad Prerequisites](../prerequisites) apply if running a Kubernetes cluster using `Launchpad`, so be sure to read them first. This guide can be used with existing Kubernetes clusters as well.

1. Confirm your cluster is operational by consulting our [Quick Start](../quick-start/) guide.

2. In your private infra repo pull in latest `launchpad-starter` changes:
```shell
task launchpad:pull-upstream-starter
```
3. Pull in `latest-core` changes
```shell
task launchpad:update-core
```
4. Check default values- double-check values and update as needed in [`<your-private-copy-of-launchpad-starter>/helmfiles/release-names/arbitrum-mainnet/celo-archive-trace-mainnet-0.yaml`](https://github.com/graphops/launchpad-starter/blob/main/helmfiles/release-values/arbitrum-mainnet/celo-archive-trace-mainnet-0.yaml)

5. Deploy celo-mainnet namespace
1. Check default values and update as needed in [`<your-private-copy-of-launchpad-starter>/helmfiles/namespaces/celo-mainnet.yaml`](https://github.com/graphops/launchpad-starter/blob/main/namespaces/celo-mainnet.yaml)

2. Deploy celo-mainnet namespace
```shell
task releases:apply celo-mainnet
```
Expand All @@ -40,7 +42,7 @@ task releases:apply celo-mainnet

You can find blockchain related helm packages [here](https://github.com/graphops/launchpad-charts/tree/main/charts)

Create a values `celo-mainnet.yaml` file with the following contents or similar:
1. Prepare your configuration file, `celo-mainnet.yaml`, to override chart default values as necessary. Example:
```yaml
celo:
extraArgs:
Expand All @@ -54,12 +56,9 @@ celo:
- --http.api=eth,net,web3,debug,admin,personal
```
Deploy helm-chart:
2. Add the Helm repository and deploy:
```sh
```shell
helm repo add graphops http://graphops.github.io/launchpad-charts
```

```sh
helm install --dry-run celo graphops/celo:latest --namespace celo-mainnet --values celo-mainnet.yaml
```
71 changes: 0 additions & 71 deletions docs/launchpad/guides/goerli-indexer-guide.md

This file was deleted.

0 comments on commit b46b15d

Please sign in to comment.