Skip to content

Instantly share code, notes, and snippets.

@cdetrio
cdetrio / README.md
Last active August 29, 2015 14:02 — forked from jdherg/README.md
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdetrio
cdetrio / pyethereum_state_snapshot_at_block_100000.json
Created March 12, 2017 04:26
pyethereum state snapshot JSON file at block #100000
This file has been truncated, but you can view the full file.
{
"block_number": "100000",
"alloc": {
"381d12209f3d12ca9b10b47eeddb206c4e790137": {
"nonce": "2",
"balance": "0",
"storage": {},
"code": "0x"
},
"845eda2dc559f882d393ffe560a5a6989f7a46e5": {

Keybase proof

I hereby claim:

  • I am cdetrio on github.
  • I am cdetrio (https://keybase.io/cdetrio) on keybase.
  • I have a public key ASC_9u0zlWx3WXuew_6LeeB-dVc2kwfBFh9UWdTdG_MIpgo

To claim this, I am signing this object:

// This file reproduces the EIP 155 examples
// values compared to EIP 155 issue text as of 2017-05-03 https://github.com/ethereum/eips/issues/155#issue-183002027
const ethUtil = require('ethereumjs-util') // ethereumjs-util version 5.1.1
const fields = [{
name: 'nonce',
length: 32,
allowLess: true,
@cdetrio
cdetrio / pyeth-block-decode.ipynb
Created May 27, 2017 20:48
pyethereum block decode example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdetrio
cdetrio / pyeth_trace_howto.md
Created July 8, 2017 21:25
Instructions for generating EVM traces of state tests in pyethereum

Instructions for generating EVM traces of state tests in pyethereum

Step 1. Install pyethereum modules and pytest

I'd suggest using pipenv.

mkdir pyeth
cd pyeth
pipenv --three
file: /home/ubuntu/cdetrio/evmlab/evmlab-holiman/evmlab/generatedTests/GeneralStateTests/stRandom/randomStatetestubuntu-Tue_03_48_41-1432.json
test_name: randomStatetestubuntu-Tue_03_48_41-1432. tx_i: 1
running state test in pyeth.
docker run --rm -t -v /home/ubuntu/cdetrio/evmlab/evmlab-holiman/evmlab/prestate.json:/mounted_prestate cdetrio/pyethereum run_statetest.py /mounted_prestate "{\"data\": \"0x79b94053bf1fb725756225cde415738a99e1a7690cbe409744b73761038f5277367dedc82e30635bc57e35fcb2038306d9a3a6e4ddcb9d306c879e470f5dd81e1148184f62bd6361ae97087aff61cee25c694a734342be5043b1fde117ba383682ba0d91e0db8b6a29c882a044d0c8bb4925a6796d8480df1b1ccc25641df94f43d5802aa8f44bf70a6817ed784e675725bdc7718a54d686307da5234286085240ba84575dac25d7fc32c59999a9d38fee0d25e7c23986006e9c5bb022f7d28a2cab01a4bb37dd4210608d6101bf6101606079637be1ae4373c94f5374fce5edbc8e2a8697c15331677e6ebf0b63627cbc7df161023161030a60213e60686102596102c861032b73b94f5374fce5edbc8e2a8697c15331677e6ebf0b630a549e50f461036761038161026c6103d1633aded16b73b9