Skip to content

Instantly share code, notes, and snippets.

@cassc
cassc / medusa.benchmark.md
Created April 9, 2025 07:54
medusa.benchmark.md

Great, I’ll look for academic papers, blog posts, GitHub repos, and conference talks where Crytic’s Medusa has been used or referenced. I’ll also find projects or studies comparing it—especially in terms of speed and accuracy—with other popular EVM-compatible smart contract fuzzers like Echidna, Foundry, and Mythril.

I’ll update you once I’ve gathered a solid set of sources you can use for benchmarking.

Medusa Fuzzer Benchmarks and Comparisons

Academic Benchmarks and Research

@cassc
cassc / demo_no_arg_constructor.cu
Last active April 1, 2025 02:01
cuda: demo no arg constructor in extended struct
/// nvcc -std=c++20 -arch=sm_86 -o demo-no-arg-constructor demo_no_arg_constructor.cu
/// ❯ /opt/cuda/extras/compute-sanitizer/compute-sanitizer \
// --leak-check=full --report-api-errors=all \
// --check-cache-control \
// --check-api-memory-access=yes --check-device-heap=yes \
// --tool memcheck \
// ./demo-no-arg-constructor
@cassc
cassc / callcallcodecall_ABCB_RECURSIVE.json
Created March 26, 2025 08:47
callcallcodecall_ABCB_RECURSIVE.json
{
"callcallcodecall_ABCB_RECURSIVE": {
"_info": {
"comment": "call -> callcode <-> call",
"filling-rpc-server": "evm version 1.11.4-unstable-e14043db-20230308",
"filling-tool-version": "retesteth-0.3.0-shanghai+commit.fd2c0a83.Linux.g++",
"generatedTestHash": "211ea7dd46b6d4484fabfe01304c46d6a87369445c4c88502acc0ee0c2f5b4e9",
"lllcversion": "Version: 0.5.14-develop.2022.7.30+commit.a096d7a9.Linux.g++",
"solidity": "Version: 0.8.17+commit.8df45f5f.Linux.g++",
"source": "src/GeneralStateTestsFiller/stCallCodes/callcallcodecall_ABCB_RECURSIVEFiller.json",
@cassc
cassc / initCollidingWithNonEmptyAccount-2-0-0_initCollidingWithNonEmptyAccount.json
Created March 26, 2025 08:43
initCollidingWithNonEmptyAccount-2-0-0_initCollidingWithNonEmptyAccount.json
{
"initCollidingWithNonEmptyAccount": {
"_info": {
"comment": "Account attempts to send tx to create a contract on a non-empty address",
"filling-rpc-server": "evm version 1.11.4-unstable-e14043db-20230308",
"filling-tool-version": "retesteth-0.3.0-shanghai+commit.fd2c0a83.Linux.g++",
"generatedTestHash": "f7fd69bb91fcc96edbbc0d4b131f4ed3ae8060b05af53e145b58344a60f7c7cf",
"lllcversion": "Version: 0.5.14-develop.2022.7.30+commit.a096d7a9.Linux.g++",
"solidity": "Version: 0.8.17+commit.8df45f5f.Linux.g++",
"source": "src/GeneralStateTestsFiller/stEIP3607/initCollidingWithNonEmptyAccountFiller.yml",
@cassc
cassc / opcode_frequency_word_cloud.py
Created November 5, 2024 09:44
opcode_frequency_word_cloud
from wordcloud import WordCloud
import matplotlib.pyplot as plt
# Mapping of hex opcodes to user-friendly names based on https://www.evm.codes/
opcode_map = {
"60": "PUSH1", "52": "MSTORE", "36": "CALLDATASIZE", "10": "LT", "61": "PUSH2", "57": "JUMPI",
"35": "CALLDATALOAD", "1C": "SHR", "80": "DUP1", "63": "PUSH4", "11": "GT", "14": "EQ",
"5B": "JUMPDEST", "03": "SUB", "81": "DUP2", "01": "ADD", "90": "SWAP1", "91": "SWAP2",
"56": "JUMP", "88": "DUP9", "8A": "DUP11", "12": "SLT", "15": "ISZERO", "82": "DUP3",
"8B": "DUP12", "50": "POP", "73": "PUSH20", "16": "AND", "92": "SWAP3", "97": "SWAP8",
@cassc
cassc / stats_by_foundry.py
Created October 29, 2024 07:21
Get transation stats by foundry
import json
import subprocess
from web3 import Web3
import os
import plotly.express as px
import plotly.io as pio
import pandas as pd
import concurrent.futures
num_processes = os.cpu_count()
@cassc
cassc / HallOfBlame.md
Last active November 7, 2024 05:43 — forked from yorickdowne/HallOfBlame.md
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. For simplicity, this page treats IOPS as a proxy for/predictor of latency.

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 comes recommended as of mid 2024. The smaller 2TB drive should last an Ethereum full node until early 2025 or thereabouts, with crystal ball uncertainty. The Portal team aim to make 2TB [last forever with EIP-4444](https://

@cassc
cassc / lsblk.md
Created September 24, 2024 09:13
Check if disk is SSD or HDD

To determine whether a drive is an SSD or an HDD on Ubuntu from the command line, you can use one of the following methods:

1. Using lsblk

The lsblk command can display whether a disk is an SSD.

lsblk -d -o name,rota
  • name: The name of the disk.
  • rota: Displays 0 for SSDs (non-rotational) and 1 for HDDs (rotational).
@cassc
cassc / gdisk.md
Created September 24, 2024 09:01
create partition from raw disk

The issue you’re seeing is related to the limitations of the fdisk tool with the MBR (Master Boot Record) partition scheme, which can only handle partitions up to 2 TiB in size. However, your disk is 7.3 TiB, and to fully utilize it, you need to use the GPT (GUID Partition Table) scheme instead of MBR.

Here’s how to correctly create a GPT partition that supports your entire 7.3 TiB disk using gdisk, which is suitable for larger disks.

Steps to Partition and Format the Disk Using gdisk:

  1. Install gdisk (if not already installed):
    sudo apt-get update

sudo apt-get install gdisk

@cassc
cassc / non-trivial-tx-monitor.py
Last active August 23, 2024 05:30
script to monitor complex transactions
import csv
import argparse
from web3 import Web3
import os
from datetime import datetime
import time
WEB3_PROVIDER_URI = 'https://eth-mainnet.g.alchemy.com/v2/token'