Skip to content

Instantly share code, notes, and snippets.

import logging
import multiprocessing
from multiprocessing.managers import (
BaseManager,
)
import tempfile
import time
import pytest
@cburgdorf
cburgdorf / gist:1d4678f135dea129147c3627dd609c4e
Created May 10, 2019 08:43
rocksdb_vs_leveldb_against_single_peer
Supervisord config:
[program:trinity]
user=ubuntu
environment=HOME="/home/ubuntu"
command=/home/ubuntu/trinity/venv/bin/trinity track-perf --track-perf-interval 1 --track-perf-trinity-exec '/home/ubuntu/trinity/venv/bin/trinity' --track-perf-pre-exec-cmd 'cd /home/ubuntu/trinity && git checkout -' --track-perf-report-path '/home/ubuntu/trinity/performance_report.txt' --track-perf-target-block 20000 --track-perf-run-count 10 --track-perf-trinity-args='--disable-discovery --preferred-node="enode://9a1cda701a98a08065b950a87c20df7d076c7e2b11dfcd489a66efd8cbb9fb9894c7788461d6140cf0f312794098917e952f173c09bbbddf848b97afad962d61@40.118.145.245:30303" --max-peers 1'
autostart=false
autorestart=false
redirect_stderr=true
stdout_logfile=/var/log/supervisor/trinity.log
Ran with:
trinity track-perf --track-perf-pre-exec-cmd 'trinity fix-unclean-shutdown && git checkout -' --track-perf-target-block 20000 --track-perf-run-count 10 --track-perf-trinity-args='--disable-discovery --preferred-node="enode://9a1cda701a98a08065b950a87c20df7d076c7e2b11dfcd489a66efd8cbb9fb9894c7788461d6140cf0f312794098917e952f173c09bbbddf848b97afad962d61@40.118.145.245:30303" --max-peers 1'
$ cat ../trinity/performance_report.txt
Performance Tracking (10 runs up to block #20000)
=============================================
Run 1 out of 10
from eth_keys import keys
from eth_utils import decode_hex
from eth_typing import Address
from eth import constants
from eth.chains.base import MiningChain
from eth.consensus.pow import mine_pow_nonce
from eth.vm.forks.byzantium import ByzantiumVM
from eth.db.atomic import AtomicDB
import logging
$ pip install -v 'blake2b-py==0.1.2'
Created temporary directory: /tmp/pip-ephem-wheel-cache-ass6t0sz
Created temporary directory: /tmp/pip-req-tracker-3q4yq_m4
Created requirements tracker '/tmp/pip-req-tracker-3q4yq_m4'
Created temporary directory: /tmp/pip-install-cef4q1jo
Collecting blake2b-py==0.1.2
1 location(s) to search for versions of blake2b-py:
* https://pypi.org/simple/blake2b-py/
Getting page https://pypi.org/simple/blake2b-py/
Found index url https://pypi.org/simple
pytest tests/examples/safe_remote_purchase/test_safe_remote_purchase.py -vv -k 'test_abort' -n0 --log-cli-level 0
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.7.3, pytest-5.2.2, py-1.8.0, pluggy-0.13.0 -- /home/cburgdorf/Documents/hacking/ef/vyper/venv/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/cburgdorf/Documents/hacking/ef/vyper/.hypothesis/examples')
rootdir: /home/cburgdorf/Documents/hacking/ef/vyper, inifile: setup.cfg
plugins: web3-5.2.2, cov-2.8.1, forked-1.1.3, hypothesis-4.42.0, xdist-1.30.0
collected 5 items / 4 deselected / 1 selected
tests/examples/safe_remote_purchase/test
$ pytest tests/examples/safe_remote_purchase/test_safe_remote_purchase.py -vv -k 'test_abort' -n0 --log-cli-level 0
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.7.3, pytest-5.2.2, py-1.8.0, pluggy-0.13.0 -- /home/cburgdorf/Documents/hacking/ef/vyper/venv/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/cburgdorf/Documents/hacking/ef/vyper/.hypothesis/examples')
rootdir: /home/cburgdorf/Documents/hacking/ef/vyper, inifile: setup.cfg
plugins: web3-5.2.2, cov-2.8.1, forked-1.1.3, hypothesis-4.42.0, xdist-1.30.0
collected 5 items / 4 deselected / 1 selected
tests/examples/safe_remote_purchase/tes
(venv-current) cburgdorf at snakebot in ~/Documents/hacking/ef/vyper on fubuloubu/eth-tester-upgrade*
$ pytest tests/examples/safe_remote_purchase/test_safe_remote_purchase.py -vv -k 'test_abort' -n0 --log-cli-level 0
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.7.3, pytest-5.2.2, py-1.8.0, pluggy-0.13.0 -- /home/cburgdorf/Documents/hacking/ef/vyper/venv-current/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/cburgdorf/Documents/hacking/ef/vyper/.hypothesis/examples')
rootdir: /home/cburgdorf/Documents/hacking/ef/vyper, inifile: setup.cfg
plugins: web3-5.2.2, cov-2.8.1, forked-1.1.3, hypothesis-4.42.0, xdist-1.30.0
collected 5 items / 4 deselected / 1 selected
$ trinity
INFO 2019-11-14 11:23:01,592 trinity
______ _ _ __
/_ __/____(_)___ (_) /___ __
/ / / ___/ / __ \/ / __/ / / /
/ / / / / / / / / / /_/ /_/ /
/_/ /_/ /_/_/ /_/_/\__/\__, /
/____/
INFO 2019-11-14 11:23:01,592 trinity Started main process (pid=28151)
INFO 2019-11-14 11:23:01,592 trinity Trinity/v0.1.0a29/linux/cpython3.7.3
$ go run . --sim ethereum/consensus --loglevel 6 --client go-ethereum_master --sim-parallelism 1 --sim-rootcontext --simloglevel 6 --docker-noshell --docker-nocache . --hivemaxtestcount 1 --simlimiter 300
INFO[12-20|10:44:51] docker daemon online version=19.03.3
INFO[12-20|10:44:51] building new docker image client=go-ethereum_master nocache=true
Step 1/11 : ARG branch=latest
Step 2/11 : FROM ethereum/client-go:$branch
EROR[12-20|10:44:54] failed to build docker image client=go-ethereum_master error="manifest for ethereum/client-go:master not found: manifest unknown: manifest unknown"
CRIT[12-20|10:44:54] failed to build client images error="clients/go-ethereum: manifest for ethereum/client-go:master not found: manifest unknown: manifest unknown"
INFO[12-20|10:44:54] Creating output folder if necessary folder=workspace/logs
INFO[12-20|10:44:54] creating ethash container
INFO[12-20|10:44:54] building new docker image nocache=true