コンテンツへスキップ

Hybrid Modeの設定

ソロステーキングの構成にロケットプールのバリデーターを追加し、MEV-Boostを単独のバイナリからロケットプールのDockerに切り替えます。

ソロステーキング
Hybrid Mode
  • 実行クライアント、コンセンサスクライアント、MEV-Boostのポートを解放する。
sudo ufw allow 8545

sudo ufw allow 5052

sudo ufw allow 18550
  • GethのRPCを解放する。
sudo nano /etc/systemd/system/geth.service
[Unit]
Description=Go Ethereum
After=network.target
Wants=network.target

[Service]
User=goeth 
Group=goeth
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/geth \
  --datadir /var/lib/goethereum \
  --authrpc.jwtsecret /var/lib/jwtsecret/jwt.hex \
  --http \
  --http.port 8545 \
  --http.addr 0.0.0.0 \
  --http.corsdomain '*' \
  --http.vhosts '*'

[Install]
WantedBy=default.target
  • またはNethermindのRPCを解放する。
sudo nano /etc/systemd/system/nethermind.service
[Unit]
Description=Nethermind
After=network.target
Wants=network.target

[Service]
User=nethermind
Group=nethermind
Type=simple
Restart=always
RestartSec=5
WorkingDirectory=/var/lib/nethermind
Environment="DOTNET_BUNDLE_EXTRACT_BASE_DIR=/var/lib/nethermind"
ExecStart=/usr/local/bin/nethermind/Nethermind.Runner \
  --config mainnet \
  --datadir /var/lib/nethermind \
  --Sync.SnapSync true \
  --Sync.AncientBodiesBarrier 11052984 \
  --Sync.AncientReceiptsBarrier 11052984 \
  --JsonRpc.JwtSecretFile /var/lib/jwtsecret/jwt.hex \
  --JsonRpc.Enabled true \
  --JsonRpc.Host 0.0.0.0 \
  --JsonRpc.Port 8545

[Install]
WantedBy=default.target
  • LighthouseのHTTPを解放する。
sudo nano /etc/systemd/system/lighthousebeacon.service
[Unit]
Description=Lighthouse Beacon Node
Wants=network-online.target
After=network-online.target

[Service]
User=lighthousebeacon
Group=lighthousebeacon
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/lighthouse bn \
  --network mainnet \
  --datadir /var/lib/lighthouse \
  --http \
  --http-address 0.0.0.0 \
  --http-allow-origin "*" \
  --execution-endpoint http://localhost:8551 \
  --execution-jwt /var/lib/jwtsecret/jwt.hex \
  --builder http://localhost:18550

[Install]
WantedBy=multi-user.target
  • 設定を適応してgeth(またはnethermind)とlighthouseを再起動する。
sudo systemctl stop geth

sudo systemctl stop lighthousebeacon

sudo systemctl daemon-reload

sudo systemctl start geth

sudo systemctl start lighthousebeacon
  • Rocketpoolのウィザード設定では、実行クライアントとコンセンサスクライアントをExternally Managed にする。
    • 実行クライアントのHTTP URLにはlocalhostを使わずにサーバーのローカルIPを指定する。(例:http://192.168.0.44:8545
    • コンセンサスクライアントのHTTP URLにはlocalhostを使わずにサーバーのローカルIPを指定する。(例:http://192.168.0.44:5052
  • Serviceで動かしているMEV-boostをDockerのmev-boostに切り替えるため、まずはserviceで動かしているmev-boostを停止し、削除します。
sudo systemctl stop mev-boost

sudo systemctl disable mev-boost

sudo rm /etc/systemd/system/mev-boost.service

sudo rm /usr/local/bin/mev-boost
  • lighthousebeaconの--builder http://localhost:18550とlighthousevalidatorの--builder-proposalsはそのままにしておいてください。
  • DockerのMEV-boostのAPI ポートを解放する。rocketpool service config > MEV-Boost > Expose API Portにチェックを入れる。
  • rocketpool service logs mev-boostで”listening on 0.0.0.0:18550″と表示されればDockerのmev-boostは正常に起動されています。
  • 何分か待ち、sudo journalctl -fu lighthousevalidatorで”Published validator registrations to the builder network, count: 1, service: preparation”が表示されるか、rocketpool service logs mev-boostで”http: POST /eth/v1/builder/validators 200″が表示されればバリデーターが正常にDockerのmev-boostと通信ができています。
  • Serviceで動かしているバイナリのLighthouseと、Smartnode Stackで動いているDockerのLighthouseのバージョンが異なるとSmartnode Stackのバリデーターは上手く動作しません。両方のバージョンが揃っていることを確認してください。
# バイナリのLighthouseのバージョン確認
/usr/local/bin/lighthouse --version

# Smartnode StackのLighthouseのバージョン確認
rocketpool service version
  • Smartnode StackはLighthouseの主要アップデートの時だけLighthouseのバージョンを上げます。Smartnode Stackの方がバージョンが低いことが多いため、Smartnode Stackのバージョンを手動で上げることでバイナリのバージョンと合わせることができます。rocketpool service configで設定ウィザードを開き、Consensus Client (ETH2)のContainer Tagをバイナリと同じバージョンにしてください。(例:バイナリのバージョンが”v3.5.1-319cc61″のようになっていたら、Dockerのバージョンは”v3.5.1-modern”のようにDockerhubのTagを入力します。)