---
title: "使用 erpc validator 和 erpc rpc 執行 validator 與 RPC 節點"
description: "erpc rpc 在 18 條鏈上執行 RPC 節點，erpc validator 在 13 條鏈上執行 validator；每條鏈使用相同的子命令，且不需要 ERPC 帳戶。"
canonical: "https://erpc.global/zh-tw/doc/erpc-cli/nodes/"
locale: "zh-tw"
---

# 使用 erpc validator 和 erpc rpc 執行 validator 與 RPC 節點

`erpc rpc` 在 18 條鏈上執行 RPC 節點，`erpc validator` 在其中 13 條鏈上執行 validator。每條鏈都使用相同的子命令，這些節點生命週期命令免費，且不需要帳戶。

本頁說明 ERPC CLI `v0.1.0-rc.4`，這是發行前版本。在實際主機上的驗收仍在進行中：[各鏈的現況](https://erpc.global/zh-tw/doc/erpc-cli/nodes/#各鏈的現況)與各鏈的指南會說明每條鏈的狀態。

## 部署節點

`init` 會準備伺服器，`deploy` 會安裝並啟動節點。Ethereum RPC 節點從僅安裝 Ubuntu（24.04 或更新版本）的伺服器開始：

```bash
# check the server, pin the client releases, store the node in 1Password
erpc rpc --chain ethereum -n mainnet --name eth1 init --host <address> --vault <vault id> --ssh-key ~/.ssh/id_ed25519.pub
# install, fetch a snapshot, apply the firewall, start
erpc rpc --chain ethereum -n mainnet --name eth1 deploy --ssh-key ~/.ssh/id_ed25519.pub
# both layers, sync and head
erpc rpc --chain ethereum -n mainnet --name eth1 status --ssh-key ~/.ssh/id_ed25519.pub
```

有些鏈需要事先準備更多項目，各鏈的指南會說明需要哪些。新的 Solana validator 或 RPC 節點需要掛載三個檔案系統，且其金鑰已存放在 1Password 中。

## 選擇鏈、網路與主機

使用 `--chain`、`ERPC_CHAIN` 或 `default_chain` 設定選擇鏈，使用 `-n` 選擇網路，使用 `--name` 選擇主機。對主網上的節點進行變更時，必須在命令列上寫明 `--chain`。

- `erpc validator`（別名 `v`）、`erpc rpc`（別名 `r`）與 `erpc node`（別名 `n`，用於 Avalanche 與 Sui）負責執行節點命令。
- 執行命令群組而不帶子命令（`erpc validator`），即可列出其子命令。
- 在節點命令中，`--json` 必須放在命令之前：`erpc --json rpc …`。

## 適用於每條鏈的命令

| 子命令 | 作用 |
| --- | --- |
| `init` | 檢查伺服器、固定用戶端版本、將節點存放到 1Password，並準備主機 |
| `deploy` | 安裝或構建用戶端、取得快照、在 erpc 為該節點提供防火牆時套用防火牆，並啟動節點 |
| `list`, `status`, `logs` | 清單、健康狀態與日誌 |
| `start`, `stop`, `restart` | 服務控制；對於有多個層的節點，會依正確的順序執行 |
| `update` | 切換到另一個用戶端版本；回滾策略取決於用戶端 |
| `update-config` | 依照該鏈的重新啟動規則，套用設定與存取權的變更 |
| `plan` | 顯示該鏈的部署或設定計畫 |
| `destroy` | 停止或退役所擁有的服務；資料、金鑰與防火牆的保留方式依該鏈的營運指南而定 |

在 solv 後端上記錄的 Solana validator，在這些命令中只有 `init`、`deploy`、`list` 與 `status`。

## 鏈與指南

| 鏈 | RPC 節點 | Validator | 網路 | 指南 |
| --- | --- | --- | --- | --- |
| Solana | `erpc rpc --chain solana` | `erpc validator --chain solana` | mainnet, testnet | [營運](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/solana-native.md)、[註冊](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/solana-registration.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/solana.md) |
| Ethereum | `erpc rpc --chain eth`（mainnet，`--type full` 或 `archive`） | `erpc validator --chain eth`（Hoodi、mainnet） | mainnet, Hoodi | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/ethereum-rpc.md)、[Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/ethereum-validator.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/ethereum.md) |
| Base | `erpc rpc --chain base` | | mainnet, sepolia | [鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/base.md) |
| Avalanche | `erpc rpc --chain avax`（也可使用 `erpc node`） | `erpc validator --chain avax` | mainnet, fuji | [營運](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/avalanche.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/avalanche.md) |
| Bitcoin | `erpc rpc --chain bitcoin` | | mainnet, testnet4, signet, regtest | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/bitcoin-rpc.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/bitcoin.md) |
| Polygon | `erpc rpc --chain polygon` | `erpc validator --chain polygon` | mainnet, amoy | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/crates/erpc-chain-polygon/templates/README.md)、[Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/polygon-validator.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/polygon.md) |
| BNB Chain | `erpc rpc --chain bsc` | `erpc validator --chain bsc` | mainnet, chapel | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/bsc-rpc.md)、[Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/bsc-validator.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/bsc.md) |
| Kaia | `erpc rpc --chain kaia` | `erpc validator --chain kaia` | mainnet, kairos | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/kaia-rpc.md)、[Core cell](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/kaia-core-cell.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/kaia.md) |
| Arbitrum | `erpc rpc --chain arbitrum`（mainnet、nova、sepolia） | `erpc validator --chain arbitrum`（僅限 Arbitrum One 主網） | mainnet, nova, sepolia | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/nitro-rpc.md)、[Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/arbitrum-validator.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/arbitrum.md) |
| Optimism | `erpc rpc --chain optimism` | | mainnet, sepolia | [營運](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/op-follower-rpc.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/optimism.md) |
| Hyperliquid | `erpc rpc --chain hyperliquid` | `erpc validator --chain hyperliquid` | mainnet, testnet | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/hyperliquid-rpc.md)、[Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/hyperliquid-validator.md)、[AQA](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/hyperliquid-aqa.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/hyperliquid.md) |
| Monad | `erpc rpc --chain monad` | `erpc validator --chain monad` | mainnet, testnet | [營運](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/monad-node.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/monad.md) |
| TRON | `erpc rpc --chain tron` | `erpc validator --chain tron` | mainnet, nile | [營運](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/crates/erpc-chain-tron/templates/README.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/tron.md) |
| Sui | `erpc rpc --chain sui`（也可使用 `erpc node`） | `erpc validator --chain sui` | mainnet, testnet | [營運](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/crates/erpc-chain-sui/templates/README.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/sui.md) |
| NEAR | `erpc rpc --chain near` | `erpc validator --chain near` | mainnet, testnet | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/near-rpc.md)、[Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/near-validator.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/near.md) |
| Arc | `erpc rpc --chain arc` | | mainnet, testnet | [RPC 執行環境](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/arc-runtime.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/arc.md) |
| Robinhood Chain | `erpc rpc --chain robinhood` | `erpc validator --chain robinhood` | mainnet, testnet | [准入](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/robinhood-admission.md)、[Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/robinhood-defensive-validator.md)、[鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/robinhood.md) |
| Soneium | `erpc rpc --chain soneium` | | mainnet, minato | [鏈](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/soneium.md) |

[執行節點](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/nodes.md)列出每條鏈使用的用戶端。

## erpc 在伺服器上需要什麼

- erpc 以 sudo 使用者（預設為 `ubuntu`）的身分，透過 SSH 使用您的金鑰登入，金鑰來自 1Password SSH agent 或 `SSH_AUTH_SOCK`，並在第一次連線時固定主機金鑰。
- 伺服器需要 `/usr/bin/python3`，以及一個執行 `sudo` 時不要求密碼的登入帳戶。
- `/opt` 必須已經是由 root 擁有、群組與其他使用者都無法寫入的實際目錄，也就是 Ubuntu 預設提供的狀態；erpc 不會建立它。`/opt/erpc` 以及 erpc 在其中建立的 `runs` 與 `uploads` 目錄也適用同樣的規則，且這些都不得是符號連結：若要將它們放在其他磁碟區上，請將該磁碟區掛載到 `/opt/erpc`。對於節點，存放 `/opt/erpc` 的檔案系統還必須保留 POSIX ACL（ext4 與 XFS 預設會保留），否則 erpc 會停止。
- 新的 Solana 主機需要 Ubuntu 24.04、systemd 255，以及具備 AVX2 與 SHA CPU 功能的 x86-64。ERPC 要求 Solana RPC 節點至少有 32 個邏輯執行緒與 480 GiB 可用記憶體，主網 validator 至少需要 24 個執行緒與 300 GiB，測試網 validator 至少需要 24 個執行緒與 120 GiB。

## erpc 如何執行節點

- 大多數鏈會以無法登入的專屬使用者身分執行用戶端，在安裝每個版本之前根據已固定的校驗和進行檢查，並套用 nftables 防火牆，附帶須由新的管理連線確認的定時回滾。並非所有鏈都如此：新的 Solana 節點是在伺服器上從已固定的原始碼 commit 構建，而在 solv 後端上記錄的 Solana 節點則以具備免密碼 sudo 的登入使用者身分執行，並在沒有校驗和的情況下取得部分工具。
- erpc 不會為 solv 後端上的 Solana validator、Ethereum validator 或 Bitcoin 節點套用防火牆，因此這些主機的過濾需由您自行處理。
- 在網路變更期間，請保留一個可連線到主機的獨立方式。
- 當受保護服務的 drop-in 目錄中有其他檔案（例如 `systemctl edit` 產生的 `override.conf`）時，防火牆步驟會拒絕執行，且不做任何變更。請將您的 drop-in 移出該目錄，然後再次執行命令。
- 從您的機器傳送的 Secret 會透過標準輸入抵達伺服器，絕不出現在命令列上。
- 新的 Solana validator 會在停用投票的情況下，以另一個獨立身分進行同步。`deploy --activate-validator` 會在公開註冊與原生 BLS 檢查之後，將健康的主機切換為其原本註冊的身分。`--backend solv` 會接續既有的 solv 主機，無法建立新的主機。
- 請勿從備份恢復 Ethereum validator 的簽署者：請使用 `erpc v --chain eth migrate` 遷移簽署者。

[登入與金鑰](https://erpc.global/zh-tw/doc/erpc-cli/sign-in-and-keys/#節點金鑰保存在哪裡)說明每個節點在 1Password 與主機上保存哪些金鑰。

## 各鏈的現況

對於表中的每條鏈，實作都經過離線檢查，而在實際主機上的實地驗收已延後。RPC 命令路由檢查會針對全部十八條鏈執行全部十二個共通子命令，而這些檢查都不會在實際主機上執行節點。[鏈原始碼對照表](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/README.md)中每條鏈的頁面會說明其現況。
