Skip to content

Instantly share code, notes, and snippets.

View veox's full-sized avatar
💭
Being skeptical of status feature.

Noel Maersk veox

💭
Being skeptical of status feature.
View GitHub Profile
pragma solidity ^0.5.11;
/*
* @author Agustin Aguilar <@agusx1211>
*/
library ChunkStorage {
struct Storage {
mapping(bytes32 => address) slots;
}
@ritzdorf
ritzdorf / EIP1884.md
Last active September 27, 2022 12:03
Recently Executed Transactions affected by EIP1884

Recently Executed Contracts with Issues in EIP 1884

EIP 1884 is set to be implemented into the upcoming Ethereum 'Istanbul' hard fork. It

  • increases the cost of opcode SLOAD from 200 to 800 gas
  • increases the cost of BALANCE and EXTCODEHASH from 400 to 700 gas
  • adds a new opcode SELFBALANCE with cost 5.
@cburgdorf
cburgdorf / gist:1d4678f135dea129147c3627dd609c4e
Created May 10, 2019 08:43
rocksdb_vs_leveldb_against_single_peer
Supervisord config:
[program:trinity]
user=ubuntu
environment=HOME="/home/ubuntu"
command=/home/ubuntu/trinity/venv/bin/trinity track-perf --track-perf-interval 1 --track-perf-trinity-exec '/home/ubuntu/trinity/venv/bin/trinity' --track-perf-pre-exec-cmd 'cd /home/ubuntu/trinity && git checkout -' --track-perf-report-path '/home/ubuntu/trinity/performance_report.txt' --track-perf-target-block 20000 --track-perf-run-count 10 --track-perf-trinity-args='--disable-discovery --preferred-node="enode://9a1cda701a98a08065b950a87c20df7d076c7e2b11dfcd489a66efd8cbb9fb9894c7788461d6140cf0f312794098917e952f173c09bbbddf848b97afad962d61@40.118.145.245:30303" --max-peers 1'
autostart=false
autorestart=false
redirect_stderr=true
stdout_logfile=/var/log/supervisor/trinity.log
import logging
import multiprocessing
from multiprocessing.managers import (
BaseManager,
)
import tempfile
import time
import pytest
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@5chdn
5chdn / stureby.aleth.json
Last active December 3, 2018 21:51
Stureby PoW Testnet Configuration for Constantinople Transition
{
"sealEngine":"Ethash",
"params":{
"accountStartNonce":"0x00",
"maximumExtraDataSize":"0x20",
"homesteadForkBlock":"0x2710",
"daoHardforkBlock":"0x00",
"EIP150ForkBlock":"0x3a98",
"EIP158ForkBlock":"0x59d8",
"byzantiumForkBlock":"0x7530",
contract MazeHashFunction {
function generateRandomNumber(uint _treasureMap) view public returns (uint) {
bytes memory randomNumber = new bytes(32);
bytes memory treasureMapInBytes = toBytes(_treasureMap);
uint8 nextByteInTreasureMap = uint8(treasureMapInBytes[31]);
uint8 pointerToNextPosition = nextByteInTreasureMap;
for(uint i = 31; i >0; i--) {
uint nextHashInLabyrinth = uint(blockhash(block.number - 1 - pointerToNextPosition));
{
"SstoreCallToSelfSubRefundBelowZero": {
"_info": {
"comment": "Test where accnt has slot 1 value of '2', is cleared, then calls itself and overwrites with '3', causing a refund-deduction in second call context",
"filledwith": "manaually filled by @holiman",
"lllcversion": "none",
"source": "none",
"sourceHash": "none"
},
"env": {
@holiman
holiman / result.md
Last active October 15, 2018 13:31

parity stateroot:0xa054d80c3c6192476447b6fdb3276af19400068432949c28431e5cc3e63d3c3f,, geth stateroot: 0x3ba0188e00002fd15395c3acca8cbbca76dbe56f5f2214d7fb12c1c348aaa965

#import asyncio
import logging
from flask import Blueprint, Flask, request, render_template, g
from flask_graphql import GraphQLView
from google.cloud import logging as glogging
#from graphql.execution.executors.asyncio import AsyncioExecutor
from web3 import Web3, HTTPProvider
from werkzeug.serving import run_simple
from graphql import (
graphql,