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
diff --git a/lib/rouge/lexers/solidity.rb b/lib/rouge/lexers/solidity.rb
index 3c98caad..8c6369f0 100644
--- a/lib/rouge/lexers/solidity.rb
+++ b/lib/rouge/lexers/solidity.rb
@@ -91,11 +91,10 @@ module Rouge
)
# size helpers
- sizesm = (0..256).step(8)
- sizesn = (8..256).step(8)
git bisect start
# bad: [d5226fa6dbae0569ee43ecfc08bdcd6770fc4755] Linux 5.5
git bisect bad d5226fa6dbae0569ee43ecfc08bdcd6770fc4755
# good: [219d54332a09e8d8741c1e1982f5eae56099de85] Linux 5.4
git bisect good 219d54332a09e8d8741c1e1982f5eae56099de85
# good: [8c39f71ee2019e77ee14f88b1321b2348db51820] Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
git bisect good 8c39f71ee2019e77ee14f88b1321b2348db51820
# bad: [76bb8b05960c3d1668e6bee7624ed886cbd135ba] Merge tag 'kbuild-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
git bisect bad 76bb8b05960c3d1668e6bee7624ed886cbd135ba
# bad: [21b26d2679584c6a60e861aa3e5ca09a6bab0633] Merge tag '5.5-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
@veox
veox / 0.2.0a42-cherrypicked-DEBUG2.log
Last active January 29, 2020 11:54
Trinity transaction traces for main-net block 116525, for txs at index 71 and 72 - see https://github.com/ethereum/trinity/issues/1478#issuecomment-579702298
DEBUG2 01-29 13:33:37 FrontierState TRANSACTION: sender: 0xa9ac1233699bdae25abebae4f9fb54dbb1b44700 | to: 0x | value: 0 | gas: 300000 | gas-price: 50000000000 | s: 55913883862835521849307979288544960188951986692119664256187476034693051060161 | r: 102178374235423226027600875022665691281706310448544972504649657464502182377454 | v: 28 | data-hash: 0xe4dc91fa341ebe5c6b16bf6456f95adf7ff2ee6e5cfebc2e6bcc5776094ae6b8
DEBUG2 01-29 13:33:37 Computation COMPUTATION STARTING: gas: 234696 | from: 0xa9ac1233699bdae25abebae4f9fb54dbb1b44700 | to: 0x | value: 0 | depth 0 | static: n
DEBUG2 01-29 13:33:37 Computation OPCODE: 0x60 (PUSH1) | pc: 0
DEBUG2 01-29 13:33:37 GasMeter GAS CONSUMPTION: 234696 - 3 -> 234693 (PUSH1)
DEBUG2 01-29 13:33:37 Computation OPCODE: 0x60 (PUSH1) | pc: 2
DEBUG2 01-29 13:33:37 GasMeter GAS CONSUMPTION: 234693 - 3 -> 234690 (PUSH1)
DEBUG2 01-29 13:33:37 Computation OPCODE: 0x52 (MSTORE) | pc: 4
D
@veox
veox / disasm
Created January 16, 2020 14:27
raw disassemby for contract in failing block, as presented by `evm disasm`
6080604052348015600f57600080fd5b5060043610604e577c0100000000000000000000000000000000000000000000000000000000600035046341c0e1b581146053578063f1eae25c14605b575b600080fd5b60596061565b005b6059609d565b60005473ffffffffffffffffffffffffffffffffffffffff16331415609b5760005473ffffffffffffffffffffffffffffffffffffffff16ff5b565b6000805473ffffffffffffffffffffffffffffffffffffffff19163317905556fea165627a7a723058203230f97067f2d9f26cc43a9945289dd758190b45efa590bf0889d8f768e2fed40029
00000: PUSH1 0x80
00002: PUSH1 0x40
00004: MSTORE
00005: CALLVALUE
00006: DUP1
00007: ISZERO
00008: PUSH1 0x0f
0000a: JUMPI
0000b: PUSH1 0x00
@veox
veox / pip-freeze.txt
Created January 16, 2020 11:08
trinity pip-freeze output
aiohttp==3.6.0
alabaster==0.7.12
apipkg==1.5
argcomplete==1.11.1
argh==0.26.2
asn1crypto==1.3.0
async-exit-stack==1.0.1
async-generator==1.10
async-lru==0.1.0
async-service==0.1.0a4
@veox
veox / trinity.log
Created January 15, 2020 14:35
Trinity Goerli sync against geth: Mismatch between block and imported block on 1 fields: - header.state_root
INFO 2020-01-15 16:29:51,287 trinity
______ _ _ __
/_ __/____(_)___ (_) /___ __
/ / / ___/ / __ \/ / __/ / / /
/ / / / / / / / / / /_/ /_/ /
/_/ /_/ /_/_/ /_/_/\__/\__, /
/____/
INFO 2020-01-15 16:29:51,287 trinity Started main process (pid=82575)
INFO 2020-01-15 16:29:51,288 trinity Trinity/v0.1.0a34/linux/cpython3.7.5
INFO 2020-01-15 16:29:51,288 trinity Trinity DEBUG log file is created at /home/veox/.local/share/trinity/goerli/logs-eth1/trinity.log
@veox
veox / 0-get-duration-samples.sh
Last active October 7, 2019 16:39
slowest py-evm tests
#!/bin/sh
# extracted from shell history (i.e. not actual script)
# spoof "run slowest, too"
export TRAVIS_EVENT_TYPE=cron
# run 10 times, obtain N slowest each time
for r in `seq 1 10`; do
echo "===== starting run $r =====" >> durations
pytest --quiet --durations=10000 --numprocesses=8 tests/json-fixtures/test_blockchain.py | tee -a durations
Persisting new state root: 0x599ec0e61fc3d0211bd84e94d0122ae078a76f3aba514fbd674e17700a22be62
TRANSACTION: sender: 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b | to: 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b | value: 0 | gas: 69000 | gas-price: 1 | s: 49866007334426543369019003812479859422538097422032334019063008919630256994192 | r: 28802132639651452550156019155366189981506769780359114535318817073663133211308 | v: 28 | data-hash: 0x299837ff86d4e311fdf5de67b1c760655fdfaf69a5555221730c2ce339e63b6a
COMPUTATION STARTING: gas: 47720 | from: 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b | to: 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b | value: 0 | depth 0 | static: n
OPCODE: 0x60 (PUSH1) | pc: 0
GAS CONSUMPTION: 47720 - 3 -> 47717 (PUSH1)
OPCODE: 0x60 (PUSH1) | pc: 2
GAS CONSUMPTION: 47717 - 3 -> 47714 (PUSH1)
OPCODE: 0x60 (PUSH1) | pc: 4
GAS CONSUMPTION: 47714 - 3 -> 47711 (PUSH1)
OPCODE: 0x35 (CALLDATALOAD) | pc: 6
@veox
veox / RevertPrecompiledTouch.json-RevertPrecompiledTouch_d0g0v0_Istanbul-Istanbul-2019-10-04T16:46:31.375139.log
Created October 4, 2019 14:27
py-evm trace for failing test RevertPrecompiledTouch_d0g0v0_Istanbul
Persisting new state root: 0x7b39dbfaac2cd3a71aaf38acb848302eead430c75c21a49365f17404423aa8d3
TRANSACTION: sender: 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b | to: 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b | value: 0 | gas: 100000 | gas-price: 1 | s: 40891726403850439953374365587933587017898540460236132698587327163578512598704 | r: 96796879067996587441862252401368798040487612135108074009208954375442237283108 | v: 27 | data-hash: 0xece9ce86711568efac1ac8e5ef132e802927f0fd42029c938dcfd034fed6d097
COMPUTATION STARTING: gas: 78860 | from: 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b | to: 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b | value: 0 | depth 0 | static: n
OPCODE: 0x60 (PUSH1) | pc: 0
GAS CONSUMPTION: 78860 - 3 -> 78857 (PUSH1)
OPCODE: 0x60 (PUSH1) | pc: 2
GAS CONSUMPTION: 78857 - 3 -> 78854 (PUSH1)
OPCODE: 0x60 (PUSH1) | pc: 4
GAS CONSUMPTION: 78854 - 3 -> 78851 (PUSH1)
OPCODE: 0x60 (PUSH1) | pc: 6
@veox
veox / RawBlock.go
Created October 1, 2019 16:44
geth-get-block
// https://gist.github.com/SomniaStellarum/1753b2b469864e7ce8350cae2a4e2ab2
package main
import (
"bytes"
"context"
"fmt"
//"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/ethclient"
//"github.com/ethereum/go-ethereum/rlp"