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
@veox
veox / erc20.abi.json
Created January 21, 2018 14:59
ERC20 ABI in JSON format
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
@veox
veox / namehash-timeit.py
Last active July 8, 2022 10:25
`namehash()` for Python 3.6
#!/usr/bin/env python3
import timeit
import matplotlib.pyplot as plt
from namehash import *
basename = 'a.b.c.d.e.f.g.h'
labels = 8
TIMESLABELS = 32*8
MAXTIMES = 1024*8
@veox
veox / geth.service
Last active April 29, 2022 17:41
go-ethereum systemd config
[Unit]
Description=go-ethereum node
After=network.target
[Service]
Type=simple
User=geth
Group=geth
## ===== initial sync: no light peers, please =====
ExecStart=/usr/bin/geth --nousb --datadir /home/geth/.ethereum --cache 2048 --txpool.pricelimit 99999999999 --txpool.globalslots 1024
% pytest -vvvvv --capture=no -k "test_state_fixtures[/home/veox/src/py-evm/fixtures/GeneralStateTests/stReturnDataTest/modexp_modsize0_returndatasize.json:modexp_modsize0_returndatasize:Byzantium:4]"
========================================================================================= test session starts =========================================================================================
platform linux -- Python 3.7.0, pytest-3.6.4, py-1.6.0, pluggy-0.7.1 -- /home/veox/src/py-evm/.virtualenv/py-evm/bin/python
cachedir: .pytest_cache
rootdir: /home/veox/src/py-evm, inifile: pytest.ini
plugins: xdist-1.18.1, cov-2.5.1, asyncio-0.9.0, asyncio-network-simulator-0.1.0a2, hypothesis-3.69.5
collected 82815 items / 82814 deselected / 1 skipped
tests/json-fixtures/test_state.py::test_state_fixtures[/home/veox/src/py-evm/fixtures/GeneralStateTests/stReturnDataTest/m
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