Description

This role configures RocketPool smart node to run using Systemd services.

Introduction

For general information about RocketPool read this article.

In simple terms RocketPool provides a "decentralised ETH2 staking protocol". It depends on an Eth1 and Eth2 nodes being available. This role deploys it's own nimbus-eth2 node but depends on an external URL for go-ethereum.

Installation

Add to your requirements.yml file:

- name: infra-role-rocketpool
  src: git@github.com:status-im/infra-role-rocketpool.git
  scm: git

Configuration

A basic configuration would look like:

rocketpool_graffiti: 'my-rocketpool-node'
rocketpool_network: 'holesky'
# Mandatory
rocketpool_eth2_fee_recipient: '0x1111111111111111111111111111111111111111'
rocketpool_eth1_exec_layer_jwtsecret: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
rocketpool_eth1_exec_layer_authrpc_url: 'http://1.2.3.4:8551/'
rocketpool_eth2_exec_layer_rpc_url: 'http://1.2.3.4:8545/'
rocketpool_eth2_exec_layer_ws_url: 'ws://1.2.3.4:8546/'

The main config file is user-settings.yml which normally is generated by rocketpool-cli service config, but we used that just once and used the result to create the templates/user-settings.yml.j2 which we use instead.

In case of a version upgrade it might be necessary to use the commented out task which calls rocketpool-cli in tasks/config.yml to generate a new config and update the template format.

Management

The smart node installation procedure will create 3 Systemd services:

 > systemctl list-units --type=service -a 'rocketpool-*'
  UNIT                          LOAD   ACTIVE SUB     DESCRIPTION
  rocketpool-eth2-node.service  loaded active running Nimbus Beacon Node on mainnet network (stable)
  rocketpool-smart-node.service loaded active running RocketPool smart node daemon
  rocketpool-watchtower.service loaded active running RocketPool watchtower activity daemon

Those can be managed with systemctl and logs viewed with journalctl.

RocketPool binaries are installed in /opt/rocketpool and symlinked at /usr/local/bin.

 > ls -o /usr/local/bin/rocketpool*
lrwxrwxrwx 1 root 58 Oct 27 17:59 /usr/local/bin/rocketpool-cli -> /opt/rocketpool/v1.0.0-pre3/bin/rocketpool-cli-linux-amd64
lrwxrwxrwx 1 root 61 Oct 27 17:59 /usr/local/bin/rocketpool-daemon -> /opt/rocketpool/v1.0.0-pre3/bin/rocketpool-daemon-linux-amd64

All config files and data are created in /data/rocketpool. It also contains:

  • cli.sh - Wrapper script which simplifies use of CLI tool.
  • eth2-stop.sh - Wrapper script which stops the Beacon node service.
  • eth2-restart.sh - Wrapper script which restarts the Beacon node service.
  • treegen.sh - Wrapper script which does a dry-run of rewards tree generation.

The node wallet can be managed manually by executing commands such as cli.sh wallet restore or cli.sh wallet init.

Rewards Tree Dry-Run

The role also installs the treegen tool and a Systemd timer which periodically does a dry-run of rewards tree generation for the current interval. The purpose is to verify ahead of the RPL rewards checkpoint that our Execution and Beacon node endpoints are capable of generating the rewards tree.

rocketpool_treegen_ec_url: '{{ rocketpool_eth1_archive_url }}'
rocketpool_treegen_bn_url: '{{ rocketpool_eth2_rest_api_url }}'
rocketpool_treegen_timer_frequency: 'Sun *-*-* 02:00:00 UTC'

Note that treegen has no fallback endpoint support and the Execution Client must have state for the targeted block, hence the archive node URL default.

Results are stored in per-run subdirectories of /data/rocketpool/treegen.

sudo systemctl list-timers rocketpool-treegen.timer
sudo systemctl start rocketpool-treegen.service
sudo journalctl -fu rocketpool-treegen.service
S
Description
Ansible role for Nimbus-based RocketPool smart node
Readme MIT
212 KiB
Languages
Jinja 100%