Skip to content

Instantly share code, notes, and snippets.

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 March 21, 2025 19:44
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 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 March 16, 2025 21:27
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 January 17, 2025 17:36
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

@yorickdowne
yorickdowne / Systemd-clean-Geth-restart.md
Last active February 14, 2023 10:52
A systemd unit file for clean Geth restart

Overview

Geth, and other execution clients such as Erigon, Nethermind, and Besu, take some time on shutdown to cleanly close their database. When not given that time, they will need to resync upon restart, often for hours. This gist describes the systemd service file parameter to give them up to 5 minutes of time for a clean shutdown.

Steps

  • Find your service file. It may be called /etc/systemd/system/geth.service or /etc/systemd/system/eth1.service.
  • Edit it using sudo nano FILENAME, and add TimeoutStopSec=300 to the [Service] section. Here is an example of a service file after the change:
@yorickdowne
yorickdowne / rp-and-eth-docker.md
Last active December 24, 2021 14:24
RocketPool and eth-docker solo staking side by side