-
Notifications
You must be signed in to change notification settings - Fork 62
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
Open
curryxbo
wants to merge
7
commits into
main
Choose a base branch
from
docs-988-node-operation-sequencer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d69e73c
docs(node-operation): single node type + DERIVATION_VERIFY_MODE (morp…
bfcf72d
docs(node-operation): remove deprecated zkTrie->MPT migration guide
15b0bba
docs(node-operation): add centralized sequencer upgrade guide
1ca5cd4
docs: refine centralized-sequencer upgrade — only L1_BEACON_CHAIN_RPC…
cb75308
docs: keep validator commands backward-compatible in centralized-sequ…
fe1db44
docs(node-operation): correct sequencer switch trigger and add activa…
e999eec
docs: address CodeRabbit review — fence languages + drop stale valida…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...eloper-resources/node-operation/upgrade-node/0-centralized-sequencer-upgrade.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 binary and verifies the chain against L1. Your existing `run-morph-node` validator commands still work unchanged; a validator is now simply the single node running in `layer1` mode. | ||
| - **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? | ||
| If your node already passes the old `--validator` flag, **you don't need to change anything — just upgrade the binary.** `--validator` is now a deprecated alias for `--derivation.verify-mode=layer1`, so it keeps deriving from L1 exactly as before (it only logs a deprecation warning). Migrate to `DERIVATION_VERIFY_MODE=layer1` when convenient, as `--validator` will be removed in a future release. | ||
| ::: | ||
|
|
||
| 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:** nothing to change — the existing `--validator` flag still selects L1 derivation (it now aliases `DERIVATION_VERIFY_MODE=layer1`). For new setups, prefer `DERIVATION_VERIFY_MODE=layer1`. Plain full nodes need nothing here; the default is `local`. | ||
| 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... | ||
| ``` | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
49 changes: 0 additions & 49 deletions
49
...ph/developer-resources/node-operation/upgrade-node/0-zktrie-to-mpt-migration.md
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
168 changes: 0 additions & 168 deletions
168
...d-on-morph/developer-resources/node-operation/validator-node/1-run-in-docker.md
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.