Skip to content

Instantly share code, notes, and snippets.

@ckeenan
ckeenan / log.txt
Created June 14, 2017 15:33
geth log with --vmodule=core/*=6
INFO [06-14|10:16:06] Starting peer-to-peer node instance=Geth/v1.6.6-unstable-6171d01b/darwin-amd64/go1.8.3
INFO [06-14|10:16:06] Allocated cache and file handles database=XXX
INFO [06-14|10:16:06] Initialised chain configuration config="{ChainID: 59970 Homestead: 1 DAO: <nil> DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Metropolis: <nil> Engine: clique}"
INFO [06-14|10:16:06] Initialising Ethereum protocol versions="[63 62]" network=133
INFO [06-14|10:16:06] Loaded most recent local header number=352 hash=39f3c9…a64c1c td=705
INFO [06-14|10:16:06] Loaded most recent local full block number=352 hash=39f3c9…a64c1c td=705
INFO [06-14|10:16:06] Loaded most recent local fast block number=352 hash=39f3c9…a64c1c td=705
WARN [06-14|10:16:06] Blockchain not empty, fast sync disabled
INFO [06-14|10:16:07] Starting P2P networking
INFO [06-14|10:16:09] UDP listener up self=enode://93e7955c0b3a2ad7e293c65ff0344b1827d55c87a1af21c1a3d0
@ckeenan
ckeenan / findTransactions.js
Last active July 11, 2016 12:31
Find DAO burn transactions
var Web3 = require('web3');
var net = require('net');
var fs = require('fs');
var async = require('async');
var client = net.Socket();
var web3 = new Web3(new Web3.providers.IpcProvider("/root/.ethereum/geth.ipc", client));
var daoAddr = '0xbb9bc244d798123fde783fcc1c72d3bb8c189413';
var knownAttackers = {"0x969837498944ae1dc0dcac2d0c65634c88729b2d": true, "0xf35e2cc8e6523d683ed44870f5b7cc785051a77d": true, "0xe500732effa4922a97671cd310c613ba88c32315": true, "0x
@ckeenan
ckeenan / findBadDAOs.js
Created July 9, 2016 18:41
Web3 script to query theDAO for suspicious children
var Web3 = require('web3');
var net = require('net');
var client = net.Socket();
var web3 = new Web3(new Web3.providers.IpcProvider("/root/.ethereum/geth.ipc", client));
var abi = [{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposals","outputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"},{"name":"d
escription","type":"string"},{"name":"votingDeadline","type":"uint256"},{"name":"open","type":"bool"},{"name":"proposalPassed","type":"bool"},{"name":"proposalHash","type":"bytes32"
},{"name":"proposalDeposit","type":"uint256"},{"name":"newCurator","type":"bool"},{"name":"yea","type":"uint256"},{"name":"nay","type":"uint256"},{"name":"creator","type":"address"}
],"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool
"}],"type":"function"},{"constant":true,"inputs":[],"name":"minTokensToCreate","outputs":[{"name":"","type":"uint256"}],"type
I0601 03:43:24.862660 5 chain_manager.go:662] imported 0 block(s) (1 queued 0 ignored) in 4.437005ms. #1481 [a4c22976 / a4c22976]
panic: runtime error: index out of range
goroutine 8434 [running]:
runtime.panic(0xac7a00, 0x1726557)
/usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
crypto/cipher.(*ctr).XORKeyStream(0xc22ae0d7d0, 0xc231a24080, 0x10, 0x20, 0xc231a24080, ...)
/usr/lib/go/src/pkg/crypto/cipher/ctr.go:52 +0x176
github.com/ethereum/go-ethereum/p2p.(*rlpxFrameRW).WriteMsg(0xc231df6a20, 0x0, 0x68, 0x7fd467b7db40, 0xc2322dc870, ...)
/go/src/github.com/ethereum/go-ethereum/p2p/rlpx.go:510 +0x2c9
@ckeenan
ckeenan / gist:841e5ede1718c08ecce6
Created April 24, 2015 13:58
geth 0.9.9 "invalid memory address or nil pointer dereference"
I0424 04:01:12.913637 25 chain_manager.go:550] imported 175 block(s) 0 queued in 1.896128785s. #55912 [f764b646 / 575390e0]
I0424 04:01:16.064627 25 chain_manager.go:550] imported 256 block(s) 0 queued in 3.150723033s. #56168 [722f3cae / 07ac4334]
I0424 04:01:19.020043 25 chain_manager.go:550] imported 256 block(s) 0 queued in 2.955156415s. #56424 [942b0e65 / bde92229]
I0424 04:01:19.598979 25 chain_manager.go:506] Split detected. New head #56477 (f47410ee) TD=26832211194, was #56647 (ef7ef152) TD=26831854557
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4b9f0a]
goroutine 931 [running]:
github.com/ethereum/go-ethereum/core/types.(*Block).Hash(0x0, 0x0, 0x0, 0x0, 0x0)
/root/go/src/github.com/ethereum/go-ethereum/core/types/block.go:313 +0xca