Skip to content

Instantly share code, notes, and snippets.

@yorickdowne
yorickdowne / README.md
Last active December 3, 2020 13:01
Switch Rocketpool to newer client version

Emergency procedure

Only do this in emergencies, such as when eth2 is not syncing or RAM/CPU use is spiking. This procedure can be used for Prysm or Lighthouse.

The specific client versions mentioned here are for RocketPool 0.0.8. They will not work in prior versions of RP.

Edit config.yml:

cd ~/.rocketpool

Medalla non-finality mid October

What is happening with the Medalla eth2 testnet currently, Oct 17th 2020? Here's an ELI5. (Not exactly 5. Maybe 10. You get the idea.)

  1. A bunch of validators turned off (maybe zinken, maybe bored, who knows)
  2. We entered non-finality. This means we don't have enough validators online to agree to what the state of the network is. We need 2/3rds.
  3. Some sync bugs reared their heads, in Prysm and Nimbus. We lost more validators to the bugs, not everyone has updated since
  4. Non-finality increases memory and CPU requirements, we likely lost more validators because their nodes couldn't handle it
  5. Either people come back in and we regain finality or
  6. They don't and offline validators lose eth faster and faster, until we regain finality. Some may be ejected if their balance falls too low.
@yorickdowne
yorickdowne / README.md
Last active August 9, 2021 07:45
UFW and docker iptables via DOCKER-USER

Use ufw for some, but not all, Docker traffic

This is a slight tweak to https://github.com/chaifeng/ufw-docker by way of https://p1ngouin.com/posts/how-to-manage-iptables-rules-with-ufw-and-docker

For an automated way of handling ufw rules via docker-compose, see https://github.com/shinebayar-g/ufw-docker-automated

Use case

I wanted Docker to keep managing its own iptables rules, including automatically opening port forwards, with the option of stepping in and restricting a port that I did not want open to "world". Container-to-container traffic should flow unimpeded,

@yorickdowne
yorickdowne / README.md
Last active June 26, 2024 10:31
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Ubuntu 24.04

From the comments: "These exact instructions are not working on Ubuntu 24.04. Ubuntu has changed the naming of ZFS partitions, partition 2 and 3 are switched around, and the boot/efi folder is now different."

I don't have my dual-disk test system any longer, and so can't adjust these steps myself.

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04

@yorickdowne
yorickdowne / README.md
Last active December 7, 2021 15:12
Take over BloxStaking KeyVault instance

/u/settleddown posted some excellent instructions on how to create your own BloxStaking KeyVault instance in AWS and keep it updated yourself.

I've adjusted these instructions to "take over" the existing instance, without needing to spin up an entirely new one. The Python script now prompts the user for the password.

NB: pip3 is very slow on WSL2. This can be resolved by running pip3 install -U keyring, and then mkdir -p ~/.config/python_keyring/ and edit vi ~/.config/python_keyring/keyringrc.cfg and paste into it:

[backend]
default-keyring=keyring.backends.null.Keyring
@yorickdowne
yorickdowne / README.md
Last active April 11, 2023 08:31
Verify a public GPG signature - example Lighthouse

Eh?

So a FOSS project might have signed releases with a GPG sig. How do you verify it on a Linux machine?

Example sigp/lighthouse, but same idea for any project.

Install gpg: sudo apt install gpg

Grab their PGP key ID from their download page and gpg --keyserver pgp.mit.edu --recv THEIRKEYID and wait

@yorickdowne
yorickdowne / README.md
Last active June 19, 2024 11:54
How to resize a netcup VPS disk after contract upgrade

Resizing a netcup VPS disk after upgrading the contract to a bigger one

From the comments, this is possible without rescue mode in Linux.

Identify the root partition / with df -h and lsblk and then run something like the below. This one assumes the root partition is vda3; adjust for yours.

df -h output, this shows /dev/vda3 as the partition for /:

/dev/vda3       2.0T  1.9T   20G 100% /

Keybase proof

I hereby claim:

  • I am yorickdowne on github.
  • I am yorickdowne (https://keybase.io/yorickdowne) on keybase.
  • I have a public key ASAMH3gm5u914DMwcR4DXVgPeCKqlPdP9Tdurg-LiKUzVQo

To claim this, I am signing this object:

@yorickdowne
yorickdowne / GethBEHAVE.md
Last active July 22, 2024 16:26
Pruning Geth 1.10.x, 1.11.x, 1.12.x

Note: PBSS in Geth >=1.13.0 removes the need to prune manually.


Old content for reference

Overview

Geth (Go-Ethereum) as of July 2022 takes about 650 GiB of space on a fast/snap sync, and then grows by ~ 14 GiB/week with default cache, ~ 8 GiB/week with more cache.

@yorickdowne
yorickdowne / README.md
Last active June 19, 2024 11:59
Netcup initial setup for RocketPool or solo staking

Overview

Running on netcup is not much different from running on any other Linux host. The main difference is that the host is directly exposed to the Internet. Netcup provision Debian, which works well with RocketPool.

Create a non-root user

Log in via ssh: ssh root@IP. Create a non-root user: adduser USERNAME followed by usermod -aG sudo USERNAME. Log in as that user.

Set up SSH key authentication