Skip to content

Instantly share code, notes, and snippets.

View amanelis's full-sized avatar
🧙‍♀️

amanelis

🧙‍♀️
View GitHub Profile
@fxfactorial
fxfactorial / extract_top_peers.py
Created February 4, 2022 02:47 — forked from bogatyy/extract_top_peers.py
Extract top peers
from collections import defaultdict
GETH_LOGFILE = 'geth-log.txt'
def extract_parameter(source_str, before_str, after_str):
start_pos = source_str.find(before_str) + len(before_str)
return source_str[start_pos:source_str.find(after_str, start_pos)]
@0xAlcibiades
0xAlcibiades / Multicall.sol
Created March 22, 2022 00:19
A Pre EIP-1559 MEV/Multicall in pure Yul integrated with ApeBank and with Native GasTokens
// SPDX-License-Identifier: MIT
object "Multicall" {
code {
// Deploy the contract
// Store gas token burn cost in zero slot
sstore(0, 0)
sstore(1, 0)
sstore(2, 0)
datacopy(0x0, dataoffset("MulticallRuntime"), datasize("MulticallRuntime"))
@yorickdowne
yorickdowne / HallOfBlame.md
Last active February 26, 2026 13:16
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 conservative choice which also supports a Fusaka "supernode". The smaller 2TB drive should last an Ethereum full node until at least sometime 2026, with [pre-merge history expiry](http

@btschwertfeger
btschwertfeger / spot_orderbook.py
Last active December 17, 2024 20:57
A realtime order book for trading Spot on the Kraken cryptocurrency exchange using the pyhton-kraken-sdk
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# GitHub: https://github.com/btschwertfeger
#
"""
This module provides an example on how to use the Spot websocket
client of the python-kraken-sdk (https://github.com/btschwertfeger/python-kraken-sdk)
to retrieve and maintain a valid Spot order book for a specific