stethoscope-clients
A process runner in python for Eth 2.0 clients. Designed for use with stethoscope.
Background
For both simulation and testing, it's valuable to be able to programmatically start and stop each Eth 2.0 client. This repo provides a python interface for doing just that.
To be platform independent, clients are run via Docker.
To connect with and drive clients, we use rumor, specifically the python interface.
Installation
pip install stethoscope-clients
Usage
The key methods in this library are start_instance, stop_instance, and connect_rumor. See below for a full sample usage:
import trio
from pyrum import SubprocessConn, Rumor
from sclients import start_instance, stop_instance, connect_rumor, InstanceConfig, ENR
enr_str = ...
client_config = InstanceConfig(
client='lighthouse',
beacon_state_path='./genesis.ssz',
enr= ENR(
private_key=...,
tcp=9001,
udp=9002,
id='v4'
ip: '127.0.0.1'
enr: enr_str,
attnets: ...
eth2: ...
)
)
try:
start_instance(client_config)
# This block will eventually be encapsulated in `connect_rumor`
async with SubprocessConn(cmd='rumor bare') as conn:
async with trio.open_nursery() as nursery:
rumor = Rumor(conn, nursery)
client_peer_id = await connect_rumor(rumor, enr_str)
# Insert your rumor interactions with client_peer_id
nursery.cancel_scope.cancel()
finally:
stop_instance('lighthouse')
Client progress
| client | status |
|---|---|
| lighthouse | done |
| prysm | done |
| teku | done |
| nimbus | TODO |
| lodestar | TODO |
| cortex | TODO |
| trinity | TODO |
Release files for stethoscope-clients 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stethoscope-clients-0.1.7.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stethoscope_clients-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 kB
Release files / stethoscope-clients-0.1.7.tar.gz
| Download URL | stethoscope-clients-0.1.7.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8750ed02f3fb5b7c10a11cf0de28ca321b20fc7e104227b5dbd498dca7d045d1
|
|
BLAKE2b-256 checksum How to use checksums |
89b9b11a6756283e8ac0a51b952636ba869b6d134781a1dd6caa18851ab9e407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
|
Release files / stethoscope_clients-0.1.7-py3-none-any.whl
| Download URL | stethoscope_clients-0.1.7-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ebf2bdfdbf213a17bdc9710f6a6d82971d89785349942a70f22c80635d085bf
|
|
BLAKE2b-256 checksum How to use checksums |
a12aad3059a09ed27f2e93a612c23fdb40c2bdccb4e8e7764b91d2dfd1de1fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
|