Skip to content

Instantly share code, notes, and snippets.

View Gustav-Simonsson's full-sized avatar
💭
tuning into the gpu coil whine

Gustav-Simonsson

💭
tuning into the gpu coil whine
View GitHub Profile
"SuicideCoinbase" :
contract killer { function x() {suicide(msg.sender); }}"
Filler tests needs first one tx where non-contract account calls Killer.x and then another tx (can be anything)
"OOGStateCopyContainingDeletedContract":
contract Victim {
function Die () {
suicide(msg.sender);
func BenchmarkSignRandomInput(b *testing.B) {
for i := 0; i < b.N; i++ {
b.StopTimer()
_, seckey := GenerateKeyPair()
msg := randentropy.GetEntropyCSPRNG(32)
b.StartTimer()
if _, err := Sign(msg, seckey); err != nil {
b.Fatal(err)
}
}
> eth.getBlock(443947)
{
difficulty: 6628388332836,
extraData: "0xd583010203844765746885676f312e35856c696e7578",
gasLimit: 3141592,
gasUsed: 1827755,
hash: "0x47155617d178ae63d3d7d7ae9e9f1357d5dadd5d4a8e76e523764825c6f4294c",
logsBloom: "0x00000800000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000010000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x4e2f2f1d8e0870cd073a0286cbc99c911053446b",
nonce: "0xa10198831a7e1893",
> debug.getBlockRlp(443947)
"f90683f90216a03182597a55e06f309d37ffac524d4398d59570a3c02f1e986955745d58b1b72ca0c0ab732e2356ffea1687a6da1e1ed4c359d7b8cadd26246e9ba3e04c349b06f794cefa54c1a83a0ecc31dd4e329e0d4b42869b1eb9a0952b1629b02c743931ac802922ae18c7b24d28eb62b270e635ba12f43cfedca9a0279fff32c31c99103904db217b5b3c1126d04446c7a6928e561ade8ce682b026a0bcd8074b5c072938965a609d806bb30b3d12f5afd8318cf901d418f2cc32a4d8b90100000008000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000100000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000008606074abb65248306c62b832fefd8831b3ddc84562e715896d583010203844765746885676f312e35856c696e75
> eth.getCode(versions.address).length
5956
> eth.getStorageAt(versions.address,0)
"0x0000000000000000000000000000000000000000000000000000000000000002"
> eth.getStorageAt(versions.address,1)
"0x0000000000000000000000000000000000000000000000000000000000000000"
> eth.getStorageAt(versions.address,2)
"0x0000000000000000000000000000000000000000000000000000000000000002"
> eth.getStorageAt(versions.address,3)
"0x0000000000000000000000000000000000000000000000000000000000000000"
// WARNING: WORK IN PROGRESS & UNTESTED
//
// @AUTHORS: Gustav Simonsson <gustav@ethdev.com>
// @DATE: 2015-10-30
// @VERSION: 0.1
// @LICENSE: GNUBL 2.0 (https://github.com/Gustav-Simonsson/GNUBL/blob/master/LICENSE)
//
// contract tracking versions added by designated signers.
// designed to track versions of geth (go-ethereum) recommended by the
// go-ethereum team. geth client interfaces with contract through ABI by simply
// WARNING: WORK IN PROGRESS & UNTESTED
//
// @AUTHORS: Gustav Simonsson <gustav@ethdev.com>
// @DATE: 2015-10-30
// @VERSION: 0.1
// @LICENSE: GNUBL 2.0 (https://github.com/Gustav-Simonsson/GNUBL/blob/master/LICENSE)
//
// contract tracking versions added by designated signers.
// designed to track versions of geth (go-ethereum) recommended by the
// go-ethereum team. geth client interfaces with contract through ABI by simply
StateTest: createNameRegistratorPreStore1NotEnoughGas
VM STAT 24 OPs
PC 00000000: PUSH32 GAS: 55268 COST: 3
STACK = 0
MEM = 0
STORAGE = 0
PC 00000033: PUSH1 GAS: 55265 COST: 3
STACK = 1
0000: 6001600155601080600c6000396000f3006000355415600957005b6020356000
20:37:37 ((detached from origin/develop)) ~/eth/cpp/webthree-umbrella/build
./libethereum/test/testeth -t StateTests/userDefinedFileState --singletest /home/gs/eth/tests/StateTests/stCallCreateCallCodeTest.json createNameRegistratorPreStore1NotEnoughGas --sealengine Homestead --vmtrace --verbosity 13
Running 1 test case...
ℹ 20:37:47.714|testeth Testing user defined test: /home/gs/eth/tests/StateTests/stCallCreateCallCodeTest.json
Test Case "userDefinedFileState":
100%
ℹ 20:37:47.763|testeth createNameRegistratorPreStore1NotEnoughGas
EVM 20:37:47.808|testeth
STACK
MEMORY
# Poem:
#
#there are so many tictoc
#clocks everywhere telling people
#what tictoc time it is for
#tictic instance five toc minutes toc
#past six tic
#Spring is not regulated and does
#not get out of order nor do