Skip to content

Ansible role for Nimbus-based RocketPool smart node

License

Notifications You must be signed in to change notification settings

status-im/infra-role-rocketpool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: [email protected]: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.

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