Skip to content

Instantly share code, notes, and snippets.

View obscuren's full-sized avatar
😎
Working on Grid Online

Jeffrey Wilcke obscuren

😎
Working on Grid Online
View GitHub Profile
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
input, _ := bufio.NewReader(os.Stdin).ReadString('\n')
VM STAT 254 OPs
PC 00000000: PUSH1 GAS: 265285 COST: 3
STACK = 0
MEM = 0
STORAGE = 0
PC 00000002: PUSH1 GAS: 265282 COST: 3
STACK = 1
0000: 0000000000000000000000000000000000000000000000000000000000000060
MEM = 0
I0314 17:12:57.990829 core/blockchain.go:959] imported 4 block(s) (0 queued 0 ignored) including 4 txs in 1.561715ms. #4 [6dfa658d / d36a13be]
I0314 17:12:57.990913 miner/worker.go:559] 3 uncles to pick from
I0314 17:12:57.990933 miner/worker.go:565] miner: Uncle's parent unknown (47f7ca6e): bad uncle found and will be removed (4fdd6ca0)
I0314 17:12:57.990952 miner/worker.go:570] commiting 47f7ca6e as uncle
I0314 17:12:57.990970 miner/worker.go:565] miner: Uncle's parent unknown (4fdd6ca0): bad uncle found and will be removed (dc551712)
I0314 17:12:57.990976 miner/worker.go:578] committed 1 uncles
received uncle: 0x6dfa658da28209b1257a2dfe695a7ed6e38c37c7ac26653444afb3f3e62c451a
received uncle: 0xc806e51a41be84fde566db0d72d9d7987b1ff0912ebff8647d5946aa47ac4852
#### current block ####
Block(#5): Size: 1.01 kB {
I0314 17:03:59.783218 core/blockchain.go:959] imported 4 block(s) (0 queued 0 ignored) including 4 txs in 1.854815ms. #4 [338678bb / 807d5dfd]
I0314 17:03:59.783277 miner/worker.go:559] 3 uncles to pick from
I0314 17:03:59.783296 miner/worker.go:570] commiting 47f7ca6e as uncle
I0314 17:03:59.783310 miner/worker.go:565] miner: Uncle's parent unknown (4fdd6ca0): bad uncle found and will be removed (dc551712)
I0314 17:03:59.783323 miner/worker.go:565] miner: Uncle's parent unknown (47f7ca6e): bad uncle found and will be removed (4fdd6ca0)
I0314 17:03:59.783329 miner/worker.go:578] committed 1 uncles
I got 1 pending uncles
received uncle: 0x338678bb90f8169799431eb431f1997503bded4c79797d1dcf50f0dfbe8c0c41
received uncle: 0xe5871dc98c3ba71c038fa4f0a62f38e746328913b0e266c3c8144dd35277013a
I0314 17:03:59.783442 miner/worker.go:559] 3 uncles to pick from
debug.transaction(eth.getBlock(173523).transactions[1], {})
{
gas: 688040,
returnValue: "60606040526000357c01000000000000000000000000000000000000000000000000000000009004806323b104e41461005a57806341c0e1b51461007b5780637022a89f1461008a578063a83e58a1146100c857610058565b005b6100796004808035906020019091908035906020019091905050610406565b005b61008860048050506107a5565b005b6100b260048080359060200190919080359060200190919080359060200190919050506100f4565b6040518082815260200191505060405180910390f35b6100de60048080359060200190919050506103d2565b6040518082815260200191505060405180910390f35b6000604060405190810160405280600081526020016000815260200150608060405190810160405280604060405190810160405280600081526020016000815260200150815260200160008152602001600081526020015060003373ffffffffffffffffffffffffffffffffffffffff16877f7465347ef066ca479e5437a3cf221261cca1fccc04005bd5af9ee2d15ca2a77260405180905060405180910390a3428510156101a657600093506103c8565b60648661ffff1610156101bc57600093506103c8565b6000341115156101cf57600093506103c8565b604
var etherapisContract = web3.eth.contract([{"constant":false,"inputs":[{"name":"serviceId","type":"uint256"}],"name":"subscribe","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"userServicesLength","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"servicesLength","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"subscriptionId","type":"bytes32"}],"name":"getSubscription","outputs":[{"name":"from","type":"address"},{"name":"serviceId","type":"uint256"},{"name":"nonce","type":"uint256"},{"name":"value","type":"uint256"},{"name":"cancelled","type":"bool"},{"name":"closedAt","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"},{"name":"endpoint","type":"string"},{"name":"price","type":"uint256"},{"name":"cancellationTime","type":"uint256"}],"name":"addService","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name"
@obscuren
obscuren / delegate_call.asm
Last active February 23, 2016 11:16
Homestead test code
asm {
;; 0x601038036010600039601038036000f36000600060006000731a66ab66f772e3ab3ca44c370830b74c46d2681b610fa05a03f4
;; code starts at the 10th byte
PUSH1 16
CODESIZE
SUB
PUSH1 16 ; code start byte
@tgerring @obscuren is there some progress / has there been some decision about letting us add a jenkins worker process to the el capitan geth node just for building release binaries?
obscuren 23:07
@chriseth i’m not aware of anything nor am I sure what you mean
chriseth 23:12
we would like to create release binaries for el capitan, as it seems that the yosemite release binaries do not work for el capitan. As far as I know, the best way to do that is to just build on a machine that is running el capitan. I heard that the go builds use an aws node that runs el capitan. So the solution is to either rent a new one for the c++ builds or add a jenkins worker to the node used for go.
I would like to resolve that so that we have working signed binaries for homestead.
obscuren 23:15
@obscuren
obscuren / 6.md
Last active February 5, 2016 11:25
Weekly dev gist 6

Dev diary: entry 1

The Ethereum Developer Logs - Stardate 5210.5

The core team has decided to include EIP-8 in the homestead release. This means that all implementations are required to implement the EIP-8 networking changes.

General

> ethid.validate(eth.accounts[3])
false
// verify 3, 4, and 5
> ethid.verify(eth.accounts[3], 0, {from:eth.accounts[0], gas:200000});
> ethid.verify(eth.accounts[4], 0, {from:eth.accounts[0], gas:200000});
> ethid.verify(eth.accounts[5], 0, {from:eth.accounts[0], gas:200000});
0
/ | \