-
Notifications
You must be signed in to change notification settings - Fork 820
Refactor Chain docs to add performance and troubleshooting #2264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
title: Node Performance | ||
slug: /node-performance | ||
description: Guides on how to improve syncing performance of Base node clients | ||
--- | ||
|
||
import { Button } from 'vocs/components' | ||
|
||
# Node Performance | ||
|
||
## Hardware | ||
|
||
We recommend the following hardware configuration to run a Base mainnet node: | ||
|
||
1. A modern multi-core CPU with good single-core performance | ||
2. At least 16 GB RAM (32 GB recommended) | ||
3. A locally attached NVMe SSD drive | ||
4. Adequate storage capacity to accommodate both the snapshot restoration process (if restoring from snapshot) and chain data, plus a 20% buffer for growth. | ||
|
||
:::info | ||
|
||
If utilizing Amazon Elastic Block Store (EBS), io2 Block Express is recommended to ensure timing buffered disk reads are fast enough in order to avoid latency issues alongside the rate of new blocks added to Base during the initial synchronization process. | ||
|
||
**The Base team highly recommends using locally attached NVMe SSD drives rather than networked storage.** | ||
|
||
::: | ||
|
||
## Client Software | ||
|
||
The [Base Node](https://github.com/base/node) repository contains the current stable configurations. | ||
|
||
#### Supported Clients | ||
|
||
Reth is currently the most performant client for running Base nodes. Future optimizations will be made | ||
primarily to Reth. You can read more about our migration to Reth [here](https://blog.base.dev/scaling-base-with-reth) | ||
|
||
| Type | Supported Clients | | ||
| :------ | :------------------------------------------------------------------------------------------------------- | | ||
| Full | [Reth](https://github.com/base/node/tree/main/reth), [Geth](https://github.com/base/node/tree/main/geth) | | ||
| Archive | [Reth](https://github.com/base/node/tree/main/reth) | | ||
|
||
## Geth LevelDB Tuning | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @0x00101010 do you think this belongs in a the new |
||
|
||
For teams running Geth with leveldb, the following patch can be used to set leveldb initialization parameters via environment variables: | ||
|
||
[https://github.com/0x00101010/goleveldb/commit/55ef34](https://github.com/0x00101010/goleveldb/commit/55ef3429673fb70d389d052a15a4423e13d8b43c) | ||
|
||
This patch can be applied with a replace directive for leveldb in go.mod go.mod when building op-geth. | ||
Here is how that can be done via the Dockerfile: | ||
|
||
```docker | ||
RUN git clone $REPO --branch $VERSION --single-branch . && \ | ||
git switch -c branch-$VERSION $COMMIT && \ | ||
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' | ||
|
||
RUN echo '' >> go.mod && \ // [!code ++] | ||
echo 'replace github.com/syndtr/goleveldb => github.com/0x00101010/goleveldb v1.0.4-param-customization' >> go.mod && \ // [!code ++] | ||
go mod tidy \ // [!code ++] | ||
|
||
# Continue building op-geth | ||
COPY op-geth/ ./ | ||
RUN go run build/ci.go install -static ./cmd/geth | ||
``` | ||
|
||
Sensible values for leveldb with this patch are as follows: | ||
|
||
```bash | ||
LDB_BLOCK_SIZE="524288" #Maximizes IO efficiency, 512 KiB block size which equals our raid 0 config chunk size shown in `cat /proc/mdstat`. See http://go/leveldb for detailed explanation | ||
LDB_COMPACTION_TABLE_SIZE="8388608" #8 MiB, default is 2 MiB for leveldb. See http://go/leveldb for detailed explanation | ||
LDB_COMPACTION_TOTAL_SIZE="41943040" #40 MiB, default is 8 MiB for leveldb. See http://go/leveldb for detailed explanation | ||
LDB_DEBUG_OPTIONS="1" #Emit leveldb debug logs | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Snapshots | ||
slug: /snapshots | ||
description: Information for how to restore a base node from a snapshots | ||
author: taycaldwell & wbnns | ||
--- | ||
|
||
# Snapshots | ||
|
||
:::warning | ||
|
||
Geth Archive Nodes are no longer supported. For Archive functionality, use Reth, which provides significantly better performance in Base’s high-throughput environment. | ||
|
||
::: | ||
|
||
If you're a prospective or current Base Node operator and would like to restore from a snapshot to save time on the initial sync, it's possible to always get the latest available snapshot of the Base chain on mainnet and/or testnet by using the following CLI commands. The snapshots are updated every week. | ||
|
||
#### Restoring from snapshot | ||
|
||
In the home directory of your Base Node, create a folder named `geth-data` or `reth-data`. If you already have this folder, remove it to clear the existing state and then recreate it. Next, run the following code and wait for the operation to complete. | ||
|
||
| Network | Client | Snapshot Type | Command | | ||
| ------- | ------ | ------------- | --------------------------------------------------------------------------------------------------------------------- | | ||
| Testnet | Geth | Full | `wget https://sepolia-full-snapshots.base.org/$(curl https://sepolia-full-snapshots.base.org/latest)` | | ||
| Testnet | Reth | Archive | `wget https://sepolia-reth-archive-snapshots.base.org/$(curl https://sepolia-reth-archive-snapshots.base.org/latest)` | | ||
| Mainnet | Geth | Full | `wget https://mainnet-full-snapshots.base.org/$(curl https://mainnet-full-snapshots.base.org/latest)` | | ||
| Mainnet | Reth | Archive | `wget https://mainnet-reth-archive-snapshots.base.org/$(curl https://mainnet-reth-archive-snapshots.base.org/latest)` | | ||
|
||
You'll then need to untar the downloaded snapshot and place the `geth` subfolder inside of it in the `geth-data` folder you created (unless you changed the location of your data directory). | ||
|
||
Return to the root of your Base node folder and start your node. | ||
|
||
```bash [Terminal] | ||
cd .. | ||
docker compose up --build | ||
``` | ||
|
||
Your node should begin syncing from the last block in the snapshot. | ||
|
||
Check the latest block to make sure you're syncing from the snapshot and that it restored correctly. If so, you can remove the snapshot archive that you downloaded. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Troubleshooting | ||
slug: /troubleshooting | ||
description: Information on how to troubleshooting a Base node | ||
author: hndvx | ||
--- | ||
|
||
# Troubleshooting | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wbnns do you have common troubleshooting steps listed somewhere? |
||
|
||
If you still cannot resolve the problems with your node, please open a GitHub issue or reach out on our Discord: | ||
|
||
Once you've joined, in the Discord app go to server menu > Linked Roles > connect GitHub and connect your GitHub account so you can gain access to our developer channels | ||
Report your issue in #🛟|developer-support or 🛠 | node-operators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section header is "Network Information" so I'm using a different name to avoid
Open to better names