Skip to content

Instantly share code, notes, and snippets.

@jannikluhn
jannikluhn / basic_containers.yaml
Last active April 3, 2019 13:06
Tree Hash Test Vectors
title: Basic Containers
summary: Tree hash tests for containers of basic types
version: '0.1'
test_cases:
- type:
field0: uint256
value:
field0: '70532389840033727561416535998'
root: '0xbe6f9f62ac4c09c28206e7e30000000000000000000000000000000000000000'
tags:
@jannikluhn
jannikluhn / bool.yaml
Created March 28, 2019 10:56
SSZ 0.5 Test Vectors
title: Bool
summary: Tests for the two bool values
version: '0.1'
test_cases:
- type: bool
valid: true
value: true
ssz: '0x01'
tags:
- basic
import random
import numpy as np
import matplotlib
matplotlib.use("agg")
import matplotlib.pyplot as plt
NUM_NODES = 1000
MAX_NODE_ID = 2**64 - 1
NUM_REPETITIONS = 3
@jannikluhn
jannikluhn / utxo.lll.py
Created December 27, 2017 09:37
Bitcoin-style UTXO system on top of Ethereum with abstracted accounts
MEMORY_COUNTER = 0
MEMORY_N_ITERATIONS = 32
MEMORY_CALLDATA_INDEX = 64
MEMORY_TOTAL_AMOUNT = 96
MEMORY_KEY = 128
MEMORY_SIGNATURE = 160
MEMORY_ADDRESS = 160
# CALLDATA: