Skip to content

Instantly share code, notes, and snippets.

View zelig's full-sized avatar

Viktor Trón zelig

View GitHub Profile
@zelig
zelig / 4 miner ethereum cluster
Last active August 29, 2015 14:17
local ethereum cluster
:) bash cluster.sh /tmp/59/01 4 1 blah
:) grep ChainHeadEvent /tmp/59/01/04.log |cut -d':' -f5,7|tr -d ',' |awk '{print $1, $3}'> /tmp/59/01/04.blox
:) grep ChainHeadEvent /tmp/59/01/03.log |cut -d':' -f5,7|tr -d ',' |awk '{print $1, $3}'> /tmp/59/01/03.blox
:) grep ChainHeadEvent /tmp/59/01/02.log |cut -d':' -f5,7|tr -d ',' |awk '{print $1, $3}'> /tmp/59/01/02.blox
:) grep ChainHeadEvent /tmp/59/01/01.log |cut -d':' -f5,7|tr -d ',' |awk '{print $1, $3}'> /tmp/59/01/01.blox
:) paste /tmp/59/01/*.blox | tail
151 5dc86dcc 151 5dc86dcc 151 5dc86dcc 151 5dc86dcc
152 3ad33047 152 3ad33047 152 3ad33047 152 3ad33047
152 92cf6e23 152 92cf6e23 152 92cf6e23 152 92cf6e23
153 b4faa0eb 153 b4faa0eb 153 b4faa0eb 153 b4faa0eb
@zelig
zelig / cluster.sh
Created March 27, 2015 03:16
local ethereum cluster: usage: bash cluster.sh <cluster_root> <number_of_clusters> <network_id> <runid> <local_IP> [[params]...]
#!/bin/bash
# bash cluster <cluster_root> <number_of_clusters> <network_id> <runid> <local_IP> [[params]...]
#
# sets up a local ethereum network cluster of nodes
# - the nodes are set up with datadir root/00, root/01, ...
# - the nodes log into root/00.log root/01.log, ...
# - new accounts are created for each
# - the new account is unlocked when they launch
# - they launch on port 30300, 30301, ...
# - by collecting the nodes nodeUrl, they get connected to each other
@zelig
zelig / gist:003203cd282e191a3476
Created March 30, 2015 12:36
p2p.Peer.Disconnect blocking?
:) ./geth -datadir /tmp/59/09/00 -loglevel 5 --mine -port 30300 -logfile /tmp/59/09/00.log
Welcome to the FRONTIER
SIGQUIT: quit
PC=0x4059afb
goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x2d03, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4056c9a, 0x404ac60, 0x7fff5fbff108, ...)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/sys_darwin_amd64.s:412 +0xb
semasleep()
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/os_darwin.c:438 +0x16c
@zelig
zelig / gist:78502febb80afed3d30f
Created April 3, 2015 06:03
panic over closed channels in blockpool
2015/04/03 06:56:06 [Blockpool] activateChain: section [8b381488-d383b8c2] activated by peer <58ea4b5ca7a22cb7>
2015/04/03 06:56:06 [Blockpool] addPeer: Update peer <ff91fbe99d56d4d8> with td 20542588609 and current block 8aa54cb4 (was 562c2799)
2015/04/03 06:56:06 [Blockpool] [8b381488-d383b8c2] activate section process for peer <58ea4b5ca7a22cb7>
2015/04/03 06:56:06 [Blockpool] [8b381488-d383b8c2] active mode <b40d3282c01cdd90> -> <58ea4b5ca7a22cb7>
2015/04/03 06:56:06 [Blockpool] addPeer: peer <ff91fbe99d56d4d8> (td: 20542588609 > current td 20538776451) promoted best peer
2015/04/03 06:56:06 [Blockpool] activateChain: section [abb9c805-74543c30] activated by peer <58ea4b5ca7a22cb7>
2015/04/03 06:56:06 [Blockpool] <b40d3282c01cdd90> quit peer processes
2015/04/03 06:56:06 [Blockpool] [abb9c805-74543c30] activate section process for peer <58ea4b5ca7a22cb7>
2015/04/03 06:56:06 [Blockpool] [abb9c805-74543c30] active mode <b40d3282c01cdd90> -> <58ea4b5ca7a22cb7>
2015/04/03 06:56:06 [Blockpool] activateChain: s
@zelig
zelig / gist:adcbb8cd4e9c8259327c
Last active August 29, 2015 14:18
local ethereum cluster
# !/bin/bash
# bash cluster <cluster_root> <number_of_clusters> <network_id> <runid> <local_IP> [[params]...]
# sets up a local ethereum network cluster of nodes
# - <n> is the number of clusters
# - <root> is the root directory for the cluster, the nodes are set up
# with datadir `<root>/00`, `<root>/01`, ...
# - new accounts are created for each node
# - they launch on port 30300, 30301, ...
# - they star rpc on port 8100, 8101, ...
SIGQUIT: quit
PC=0x40619ab
goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x2d03, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x405eb4a, 0x4052b10, 0x7fff5fbff0c8, ...)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/sys_darwin_amd64.s:412 +0xb
semasleep()
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/os_darwin.c:438 +0x16c
runtime.onM(0x7fff5fbff0c8)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:273 +0x9a
geth(8527,0xb0499000) malloc: *** error for object 0xc28cba2008: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
SIGABRT: abort
PC=0x7fff94076866
signal arrived during cgo execution
goroutine 29774 [syscall, locked to thread]:
runtime.cgocall_errno(0x40034b0, 0xc3100c9b30, 0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/cgocall.go:130 +0xf5 fp=0xc3100c9b10 sp=0xc3100c9ae8
github.com/ethereum/ethash._Cfunc_free(0xc28cba2008)
SIGQUIT: quit
PC=0x4060f5b
goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x1503, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x405e0fa, 0x40520c0, 0x7fff5fbff0d8, ...)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/sys_darwin_amd64.s:412 +0xb
semasleep()
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/os_darwin.c:438 +0x16c
runtime.onM(0x7fff5fbff0d8)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:273 +0x9a
SIGQUIT: quit
PC=0x4060f5b
goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x2803, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x405e0fa, 0x40520c0, 0x7fff5fbff148, ...)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/sys_darwin_amd64.s:412 +0xb
semasleep()
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/os_darwin.c:438 +0x16c
runtime.onM(0x7fff5fbff148)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:273 +0x9a
SIGQUIT: quit
PC=0x4060f5b
goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x2803, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x405e0fa, 0x40520c0, 0x7fff5fbff148, ...)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/sys_darwin_amd64.s:412 +0xb
semasleep()
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/os_darwin.c:438 +0x16c
runtime.onM(0x7fff5fbff148)
/usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:273 +0x9a