Skip to content

Instantly share code, notes, and snippets.

@yorickdowne
yorickdowne / Besu Bebop.md
Last active September 26, 2024 09:29
Optimal Besu settings for database growth

Overview

Besu, an Ethereum execution layer client, is optimized for minimal database growth (7-8 GiB/week) with default parameter --bonsai-limit-trie-logs-enabled. It can use RAM for more block processing speed.

If you have 64 GiB of RAM or more, you can add --Xplugin-rocksdb-high-spec-enabled=true for better performance.

A long-running Besu DB, started before trie-log limit was enabled, will have sizeable trie log storage. This can be reduced with a one-off prune using the storage trie-log prune subcommand, assuming Besu 24.7.0 or later.

Somer Esat adjustment

@yorickdowne
yorickdowne / nethermost.md
Last active September 26, 2024 09:30
Pruning Nethermind

Overview

Nethermind as of January 2024 takes about 1.1 TiB of space on a snap sync, and then grows by ~ 27 GiB/week.

When it starts to fill its disk, it can be online pruned (no downtime) to free up space again, to around the size of a fresh sync.

Prerequisites

  • This is not an archive node. Do not try to prune an archive node.
@yorickdowne
yorickdowne / HallOfBlame.md
Last active April 10, 2025 02:54
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on latency and IOPS, I/O Per Second, of the storage. Budget SSDs will struggle to an extent, and some won't be able to sync at all. IOPS can roughly be used as proxy of / predictor for latency. Measuring latency directly is arguably better.

This document aims to snapshot some known good and known bad models.

The drive lists are ordered by interface and then by capacity and alphabetically by vendor name, not by preference. The lists are not exhaustive at all. @mwpastore linked a filterable spreadsheet in comments that has a far greater variety of drives and their characteristics. Filter it by DRAM yes, NAND Type TLC, Form Factor M.2, and desired capacity.

For size, 4TB is a very conservative choice. The smaller 2TB drive should last an Ethereum full node until at least sometime 2026, with the [pre-merge history expiry](https://hackmd.io/@hBXHLw_9Qq2va4pRt

@marcbelmont
marcbelmont / rofi_notes.py
Last active September 19, 2024 13:19
Manage notes stored in a text file using Rofi. Bonus: tiny calculator using Python's eval. For details, see first comment.
#! /usr/bin/python3
import os
import sys
from pathlib import Path
NOTES = Path('~/Documents/notes.txt').expanduser()
def to_clipboard(text):
os.system('echo "%s"|xclip -f -r -sel c > /dev/null' % str(text).strip())
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
[Unit]
Description=Disable WiFi Power Management
After=network-online.target
[Service]
Type=simple
ExecStartPre= /bin/sleep 10
ExecStart= /usr/bin/iw dev wlp3s0 set power_save off
[Install]
@safijari
safijari / orgmode_spacemacs.org
Last active May 30, 2023 16:11
Org mode spacemacs tutorial file

I hope the tutorial has been useful to you. If it was kindly leave a like and a comment, and consider subscribing and turning on subscription notifications. I intend to make more videos like this on the topics mentioned before as well as on other spacemacs topic like magit (git plugin), large scale refactoring, and a number of other things. Thank you so much for watching.

Org tutorial

Note: a great reference can be had here http://spacemacs.org/layers/+emacs/org/README.html

Outlines/headers

Show that each outline has it’s associated “text” under it

@sam016
sam016 / AllGattCharacteristics.java
Last active April 15, 2025 12:28
Bluetooth GATT Services & Characteristics
package com.sam016.vsflatomation.service.ble;
import java.util.HashMap;
import java.util.UUID;
public class AllGattCharacteristics {
private static HashMap<String, String> attributes = new HashMap();
static {
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name");
@yzf
yzf / ubuntu_18.04.sources.list
Created May 7, 2018 02:35
ubuntu 18.04 阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
@wabouhamad
wabouhamad / gist:e0c2cb8937ecbf15870b34f3d669a8f3
Created September 8, 2017 15:33
OCP 3.6 Ansible playbook to tune journald
name: journald optimizations to allow for increased logging rates
hosts: all
gather_facts: False
tasks:
- name: Stop and disable rsyslog
systemd:
name: "{{ item }}"
state: stopped
enabled: no
with_items: