Skip to main content

Python implementation of the Ethereum Virtual Machine

Project description

Join the chat at https://gitter.im/ethereum/py-evm Documentation Status

Documentation hosted by ReadTheDocs

Introducing Py-EVM

Py-EVM is a new implementation of the Ethereum Virtual Machine written in python. It is currently in active development but is quickly progressing through the test suite provided by ethereum/tests. We have Vitalik, and the existing PyEthereum code to thank for the quick progress we’ve made as many design decisions were inspired, or even directly ported from the PyEthereum codebase.

Goals

Py-EVM aims to eventually become the defacto Python implementation of the EVM, enabling a wide array of use cases for both public and private chains. Development will focus on creating an EVM with a well defined API, friendly and easy to digest documentation which can be run as a fully functional mainnet node.

In particular Py-EVM aims to:

  • be an example implementation of the EVM in one of the most widely used and understood languages, Python.

  • deliver the low level APIs for clients to build full or light nodes on top of

  • be easy to understand and modifiable

  • be highly flexible to support both research as well as alternate use cases like private chains.

Trinity

While Py-EVM provides the low level APIs of the EVM, it does not aim to implement a full or light node directly.

We provide a base implementation of a full node called Trinity that is based on Py-EVM.

In the future there may be alternative clients based on the Py-EVM.

Step 1: Alpha Release

The plan is to begin with an MVP, alpha-level release that is suitable for testing purposes. We’ll be looking for early adopters to provide feedback on our architecture and API choices as well as general feedback and bug finding.

Blog posts:

Development

Py-EVM depends on a submodule of the common tests across all clients, so you need to clone the repo with the --recursive flag. Example:

git clone --recursive git@github.com:ethereum/py-evm.git

Py-EVM requires Python 3. Often, the best way to guarantee a clean Python 3 environment is with `virtualenv <https://virtualenv.pypa.io/en/stable/>`__, like:

# once:
$ virtualenv -p python3 venv

# each session:
$ . venv/bin/activate

Then install the required python packages via:

pip install -e .[dev]

Running the tests

You can run the tests with:

pytest

Or you can install tox to run the full test suite.

Releasing

Pandoc is required for transforming the markdown README to the proper format to render correctly on pypi.

For Debian-like systems:

apt install pandoc

Or on OSX:

brew install pandoc

To release a new version:

bumpversion $$VERSION_PART_TO_BUMP$$
git push && git push --tags
make release

To create a docker image:

make create-docker-image version=<version>

By default, this will create a new image with two tags pointing to it: - ethereum/trinity:<version> (explicit version) - ethereum/trinity:latest (latest until overwritten with a future “latest”)

Then, push to docker hub.

docker push ethereum/trinity:<version>
# the following may be left out if we were pushing a patch for an older version
docker push ethereum/trinity:latest

How to bumpversion

The version format for this repo is {major}.{minor}.{patch} for stable, and {major}.{minor}.{patch}-{stage}.{devnum} for unstable (stage can be alpha or beta).

To issue the next version in line, use bumpversion and specify which part to bump, like bumpversion minor or bumpversion devnum.

If you are in a beta version, bumpversion stage will switch to a stable.

To issue an unstable version when the current version is stable, specify the new version explicitly, like bumpversion --new-version 4.0.0-alpha.1 devnum

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-evm-0.2.0a33.tar.gz (258.4 kB view details)

Uploaded Source

Built Distribution

py_evm-0.2.0a33-py3-none-any.whl (359.6 kB view details)

Uploaded Python 3

File details

Details for the file py-evm-0.2.0a33.tar.gz.

File metadata

  • Download URL: py-evm-0.2.0a33.tar.gz
  • Upload date:
  • Size: 258.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

File hashes

Hashes for py-evm-0.2.0a33.tar.gz
Algorithm Hash digest
SHA256 7609f2fb1e8f9d31d2400c69f638ae3ff5f47b9032d28cafe7c8024f3857f568
MD5 834cca286a0d6805034815c770eeab40
BLAKE2b-256 4e071c18d4d2d6e01cedf25d66039857333399be044944765348ff6f3e0cadf6

See more details on using hashes here.

File details

Details for the file py_evm-0.2.0a33-py3-none-any.whl.

File metadata

  • Download URL: py_evm-0.2.0a33-py3-none-any.whl
  • Upload date:
  • Size: 359.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

File hashes

Hashes for py_evm-0.2.0a33-py3-none-any.whl
Algorithm Hash digest
SHA256 d9f1021241a9202741a26bcd0823a8bef59a305565e2baf85965932b38a23105
MD5 4f0ffb00c2d961d8ced9b633d5ec0305
BLAKE2b-256 c29f8c6c3306e6f7d8adca3a6cc2dcb3c5e23a1d15750510561b1e618443eb78

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page