-
Notifications
You must be signed in to change notification settings - Fork 61
docs(node-operation): single node type, verify-mode, drop deprecated zkTrie migration (#988) #148
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: main
Are you sure you want to change the base?
Changes from all commits
d69e73c
bfcf72d
15b0bba
1ca5cd4
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 |
|---|---|---|
|
|
@@ -8,8 +8,8 @@ import TabItem from '@theme/TabItem'; | |
|
|
||
| This guide will help you start a full node using [run-morph-node](https://github.com/morph-l2/run-morph-node). | ||
|
|
||
| :::tip Already running a node? | ||
| If you are upgrading an existing **zkTrie node**, do **not** redeploy from scratch. Follow the [zkTrie -> MPT migration](../upgrade-node/0-zktrie-to-mpt-migration.md) guide instead. | ||
| :::info Single node type | ||
| There is no longer a separate "validator node" to run. Every node verifies the chain against L1; the verification method is selected by `DERIVATION_VERIFY_MODE`. If you want a node that derives blocks from L1 like the former validator, set it to `layer1` — see [Batch verification mode](#batch-verification-mode) below. | ||
| ::: | ||
|
|
||
| ## Hardware Requirements | ||
|
|
@@ -179,6 +179,25 @@ curl http://localhost:26657/status | |
|
|
||
| When `catching_up` is `false`, the node has finished syncing. | ||
|
|
||
| ### Batch verification mode | ||
|
|
||
| Every node verifies batches against L1. The method is controlled by `DERIVATION_VERIFY_MODE` in `morph-node/.env` / `.env_hoodi`: | ||
|
|
||
| | Mode | Behavior | | ||
| |------|----------| | ||
| | `local` (default) | Rebuilds blob bytes from local L2 blocks and compares versioned hashes against L1. No beacon-blob fetch on the happy path — lighter weight. | | ||
| | `layer1` | Pulls the L1 beacon blob, decodes it, and derives blocks via the engine. This is equivalent to the **former validator node** that derives from L1. | | ||
|
|
||
| :::tip Want the old validator behavior? | ||
| If you want a node that derives from L1 the way the previous validator node did, set `DERIVATION_VERIFY_MODE=layer1` in your env file. The default (`local`) is sufficient for most operators. | ||
| ::: | ||
|
|
||
| If a node detects a mismatch between the sequencer's submission and its own verification, it logs a line such as: | ||
|
|
||
| ``` | ||
| root hash or withdrawal hash is not equal originStateRootHash=0x... deriveStateRootHash=0x... | ||
| ``` | ||
|
Comment on lines
+195
to
+199
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. Add a language tag to the log example fence. Markdownlint flags this fenced block as missing a language. Use 🧹 Proposed fix-```
+```text
root hash or withdrawal hash is not equal originStateRootHash=0x... deriveStateRootHash=0x...Verify each finding against current code. Fix only still-valid issues, skip the In |
||
|
|
||
| ## Advanced Usage | ||
|
|
||
| ### Customizing the data directory | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| title: Upgrade to the centralized sequencer | ||
| lang: en-US | ||
| --- | ||
|
|
||
| Morph has moved node operation to a **centralized sequencer** architecture. This page summarizes what changed for node operators and how to upgrade an existing node. | ||
|
|
||
| :::tip | ||
| If you are setting up a node from scratch, just follow [Run a full node](../full-node/1-run-in-docker.md) — it already reflects the centralized-sequencer setup. This page is for operators upgrading an existing node. | ||
| ::: | ||
|
|
||
| ## What changed | ||
|
|
||
| - **Single node type.** There is no longer a separate *validator node*. Every node runs the same way (`make run-node`) and verifies the chain against L1. The `validator` Docker Compose service and the `make run-validator` / `stop-validator` / `*-validator-binary` targets have been removed. | ||
| - **Batch verification is now configurable** via `DERIVATION_VERIFY_MODE` (see below). The previous validator behavior — deriving from L1 — is now an opt-in mode rather than a separate node. | ||
| - **Almost no new configuration.** Everything except the L1 beacon RPC endpoint uses per-network defaults baked into the binary, so for most operators upgrading the binary is enough. | ||
|
|
||
| ## Environment variables | ||
|
|
||
| For most operators the **only** variable you may need to add is `L1_BEACON_CHAIN_RPC`. Everything else (rollup / deposit contract addresses, derivation heights) uses per-network defaults selected by the network flag — you don't need to set them. | ||
|
|
||
| | Variable | Required? | Notes | | ||
| |----------|-----------|-------| | ||
| | `L1_BEACON_CHAIN_RPC` | **Yes** | L1 beacon chain RPC endpoint. The node exits at startup without it — add it if your node doesn't already have one. | | ||
| | `DERIVATION_VERIFY_MODE` | Optional | Batch verification mode. Default `local` (rebuild blob from local L2 blocks and compare versioned hashes against L1). Set `layer1` to pull the L1 beacon blob and derive via the engine — **equivalent to the former validator node**. | | ||
|
|
||
| :::tip Were you running a validator? | ||
| A validator was simply a node that derives from L1. To keep that behavior, add a single variable — `DERIVATION_VERIFY_MODE=layer1`. Nothing else changes. | ||
| ::: | ||
|
|
||
| Do **not** set `L1_SEQUENCER_CONTRACT` or `CONSENSUS_SWITCH_HEIGHT` — they use per-network hard-coded defaults; setting them (especially `CONSENSUS_SWITCH_HEIGHT=-1`) would override the built-in consensus-switch activation height. | ||
|
|
||
| ## If your node is already running | ||
|
|
||
| This is an **in-place upgrade** — your existing data is preserved, so there is no need to re-download a snapshot or resync. In most cases you simply swap the binary/image and restart. | ||
|
|
||
| :::caution Upgrade before the consensus switch height | ||
| The network switches consensus from the Tendermint validator set to the centralized sequencer at a fixed L2 block height built into the new release. Upgrade in good time, before the chain reaches that height, so your node follows the switch without interruption. | ||
| ::: | ||
|
|
||
| Steps: | ||
|
|
||
| 1. **Pull the updated node image / binary** — bump the `node` image tag in `morph-node/docker-compose.yml` (Docker), or pull the new source and `make build` (binary). | ||
| 2. **Make sure `L1_BEACON_CHAIN_RPC` is set** in your env file (`morph-node/.env` or `.env_hoodi`). A former validator already has it; a plain full node that ran without it must add it now. No other variables need changing. | ||
| 3. **Former validators only:** add `DERIVATION_VERIFY_MODE=layer1` to keep deriving from L1. Otherwise the default (`local`) applies — nothing to set. | ||
| 4. **Restart the node** (it resumes from your existing data): | ||
|
|
||
| ```bash | ||
| make stop-node && make run-node # mainnet (Docker) | ||
| make stop-node && make run-hoodi-node # Hoodi (Docker) | ||
| ``` | ||
| 5. **Confirm it is following the chain** — see [Verify](#verify) below. | ||
|
|
||
| ## Verify | ||
|
|
||
| Check sync status as usual (see [Run a full node → Verify the Node](../full-node/1-run-in-docker.md#verify-the-node)). Every node verifies batches against L1; if it detects a mismatch you will see a log line such as: | ||
|
|
||
| ``` | ||
| root hash or withdrawal hash is not equal originStateRootHash=0x... deriveStateRootHash=0x... | ||
| ``` |
This file was deleted.
This file was deleted.
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.
Keep the validator-node wording scoped to this guide.
This callout is fine here, but
docs/build-on-morph/build-on-morph/1-integration-one-page.mdstill tells readers to run a “full node and validator node”, so the docs read as contradictory until that page is updated too. Either update that doc in the same PR or soften this note to avoid a site-wide claim.♻️ Proposed fix
🤖 Prompt for AI Agents