Release notes

py-evm 0.3.0-alpha.14 (2020-02-10)

Features

  • Change return type for import_block from Tuple[BlockAPI, Tuple[BlockAPI, ...], Tuple[BlockAPI, ...]] to BlockImportResult (NamedTuple). (#1910)

Bugfixes

  • Fixed a consensus-critical bug for contracts that are created and destroyed in the same block, especially pre-Byzantium. (#1912)

Internal Changes - for Contributors

  • Add explicit tests for validate_header (#1911)

py-evm 0.3.0-alpha.13 (2020-01-13)

Features

  • Make handling of different consensus mechanisms more flexible and sound.

    1. validate_seal and validate_header are now instance methods. The only reason they can be classmethods today is because our Pow implementation relies on a globally shared cache which should be refactored to use the ConsensusContextAPI.

    2. There a two new methods: chain.validate_chain_extension(header, parents) and vm.validate_seal_extension. They perform extension seal checks to support consensus schemes where headers can not be checked if parents are missing.

    3. The consensus mechanism is now abstracted via ConsensusAPI and ConsensusContextAPI. VMs instantiate a consensus api based on the set consensus_class and pass it a context which they receive from the chain upon instantiation. The chain instantiates the consensus context api based on the consensus_context_class. (#1899)

  • Support Istanbul fork in GOERLI_VM_CONFIGURATION (#1904)

Bugfixes

  • Do not mention PoW in the logging message that we log when validate_seal fails. The VM could also be running under a non-PoW consensus mechanism. (#1907)

Deprecations and Removals

  • Drop optional check_seal param from VM.validate_header and turn it into a classmethod. Seal checks now need to be made explicitly via VM.check_seal which is also aligned with VM.check_seal_extension. (#1909)

py-evm 0.3.0-alpha.12 (2019-12-19)

Features

py-evm 0.3.0-alpha.11 (2019-12-12)

Bugfixes

  • When double-deleting a storage slot, got KeyError: (b'\x03', 'key could not be deleted in JournalDB, because it was missing'). This was fallout from #1893 (#1898)

Performance improvements

  • Improve performance when importing a header which is a child of the current canonical chain tip. (#1891)

py-evm 0.3.0-alpha.10 (2019-12-09)

Bugfixes

  • Bug: if data was missing during a call to apply_all_transactions(), then the call would revert and continue processing transactions. Fix: we re-raise the EVMMissingData and do not continue processing transactions. (#1889)
  • Fix for net gas metering (EIP-2200) in Istanbul. The “original value” used to calculate gas costs was incorrectly accessing the value at the start of the block, instead of the start of the transaction. (#1893)

Improved Documentation

  • Add Matomo Tracking to Docs site.

    Matomo is an Open Source web analytics platform that allows us to get better insights and optimize for our audience without the negative consequences of other compareable platforms.

    Read more: https://matomo.org/why-matomo/ (#1892)

py-evm 0.3.0-alpha.9 (2019-12-02)

Bugfixes

  • Remove the ice age delay that was accidentally left in Istanbul (#1877)

Improved Documentation

  • In the API docs display class methods, static methods and methods as one group “methods”. While we ideally wish to separate these, Sphinx keeps them all as one group which we’ll be following until we find a better option. (#794)

  • Tweak layout of API docs to improve readability

    Group API docs by member (methods, attributes) (#1797)

  • API doc additions (#1880)

    • Add missing API docs for MiningChain.
    • Add missing API docs for eth.db.*
    • Add missing API docs for ConstantinopleVM, PetersburgVM and IstanbulVM forks
    • Move all docstrings that aren’t overly specific to a particular implementation from the implementation to the interface. This has the effect that the docstring will appear both on the interface as well as on the implementation except for when the implementation overwrites the docstring with a more specific descriptions.
  • Add docstrings to all public APIs that were still lacking one. (#1882)

py-evm 0.3.0-alpha.8 (2019-11-05)

Features

  • Partly implement Clique consensus according to EIP 225. The implementation doesn’t yet cover a mode of operation that would allow to operate as a signer and create blocks. It does however, allow syncing a chain (e.g. Görli) by following the ruleset that is defined in EIP-225. (#1855)
  • Set Istanbul block number for mainnet to 9069000, and for Görli to 1561651, as per EIP-1679. (#1858)
  • Make the max length validation of the extra_data field configurable. The reason for that is that different consensus engines such as Clique repurpose this field using different max length limits. (#1864)

Bugfixes

  • Resolve version conflict regarding pluggy dependency that came up during installation. (#1860)
  • Fix issue where Py-EVM crashes when 0 is used as a value for seal_check_random_sample_rate. Previously, this would lead to a DivideByZero error, whereas now it is recognized as not performing any seal check. This is also symmetric to the current opposite behavior of passing 1 to check every single header instead of taking samples. (#1862)
  • Improve usability of error message by including hex values of affected hashes. (#1863)
  • Gas estimation bugfix: storage values are now correctly reset to original value if the transaction includes a self-destruct, when running estimation iterations. Previously, estimation iterations would produce undefined results, if the transaction included a self-destruct. (#1865)

Performance improvements

Internal Changes - for Contributors

  • Update upstream test fixtures to v7.0.0 beta.1 and address the two arising disagreements on what accounts should be collected for state trie clearing (as per EIP-161) if a nested call frame had an error. (#1858)

py-evm 0.3.0-alpha.7 (2019-09-19)

Features

  • Enable Istanbul fork on Ropsten chain (#1851)

Bugfixes

  • Update codebase to more consistently use the eth_typing.BlockNumber type. (#1850)

py-evm 0.3.0-alpha.6 (2019-09-05)

Features

  • Add EIP-1344 to Istanbul: Chain ID Opcode (#1817)
  • Add EIP-152 to Istanbul: Blake2b F Compression precompile at address 9 (#1818)
  • Add EIP-2200 to Istanbul: Net gas metering (#1825)
  • Add EIP-1884 to Istanbul: Reprice trie-size dependent opcodes (#1826)
  • Add EIP-2028: Transaction data gas cost reduction (#1832)
  • Expose type hint information via PEP561 (#1845)

Bugfixes

  • Add missing @abstractmethod decorator to ConfigurableAPI.configure. (#1822)

Performance improvements

  • ~20% speedup on “simple value transfer” benchmarks, ~10% overall benchmark lift. Optimized retrieval of transactions and receipts from the trie database. (#1841)

Improved Documentation

  • Add a “Performance improvements” section to the release notes (#1841)

Deprecations and Removals

  • Upgrade to eth-utils>=1.7.0 which removes the eth.tools.logging module implementations of ExtendedDebugLogger in favor of the ones exposed by the eth-utils library. This also removes the automatic setup of the DEBUG2 logging level which was previously a side effect of importing the eth module. See eth_utils.setup_DEBUG2_logging for more information. (#1846)

py-evm 0.3.0-alpha.5 (2019-08-22)

Features

  • Add EIP-1108 to Istanbul: Reduce EC precompile costs (#1819)

Bugfixes

  • Make sure persist_checkpoint_header sets the given header as canonical head. (#1830)

Improved Documentation

  • Remove section on Trinity’s goals from the Readme. It’s been a leftover from when Py-EVM and Trinity where hosted in a single repository. (#1827)

py-evm 0.3.0-alpha.4 (2019-08-19)

Features

  • Add an optional genesis_parent_hash parameter to persist_header_chain() and persist_block() that allows to overwrite the hash that is used to identify the genesis header. This allows persisting headers / blocks that aren’t (yet) connected back to the true genesis header.

    This feature opens up new, faster syncing techniques. (#1823)

Bugfixes

  • Add missing @abstractmethod decorator to ConfigurableAPI.configure. (#1822)

Deprecations and Removals

  • Remove AsyncHeaderDB that wasn’t used anywhere (#1823)

py-evm 0.3.0-alpha.3 (2019-08-13)

Bugfixes

  • Add back missing Chain.get_vm_class method. (#1821)

py-evm 0.3.0-alpha.2 (2019-08-13)

Features

  • Package up test suites for the DatabaseAPI and AtomicDatabaseAPI to be class-based to make them reusable by other libaries. (#1813)

Bugfixes

  • Fix a crash during chain reorganization on a header-only chain (which can happen during Beam Sync) (#1810)

Improved Documentation

  • Setup towncrier to generate release notes from fragment files to ensure a higher standard for release notes. (#1796)

Deprecations and Removals

  • Drop StateRootNotFound as an over-specialized version of EVMMissingData. Drop VMState.execute_transaction() as redundant to VMState.apply_transaction(). (#1809)

v0.3.0-alpha.1

Released 2019-06-05 (off-schedule release to handle eth-keys dependency issue)

  • #1785: Breaking Change: Dropped python3.5 support
  • #1788: Fix dependency issue with eth-keys, don’t allow v0.3+ for now

0.2.0-alpha.43

Released 2019-05-20

  • #1778: Feature: Raise custom decorated exceptions when a trie node is missing from the database (plus some bonus logging and performance improvements)
  • #1732: Bugfix: squashed an occasional “mix hash mismatch” while syncing
  • #1716: Performance: only calculate & persist state root at end of block (post-Byzantium)
  • #1735:
    • Performance: only calculate & persist storage roots at end of block (post-Byzantium)
    • Performance: batch all account trie writes to the database once per block
  • #1747:
    • Maintenance: Lazily generate VM.block on first access. Enables loading the VM when you don’t have its block body.
    • Performance: Fewer DB reads when block is never accessed.
  • Performance: speedups on chain.import_block():
    • #1764: Speed up is_valid_opcode check, formerly 7% of total import time! (now less than 1%)
    • #1765: Reduce logging overhead, ~15% speedup
    • #1766: Cache transaction sender, ~3% speedup
    • #1770: Faster bytecode iteration, ~2.5% speedup
    • #1771: Faster opcode lookup in apply_computation, ~1.5% speedup
    • #1772: Faster Journal access of latest data, ~6% speedup
    • #1773: Faster stack operations, ~9% speedup
    • #1776: Faster Journal record & commit checkpoints, ~7% speedup
    • #1777: Faster bytecode navigation, ~7% speedup
  • #1751: Maintenance: Add placeholder for Istanbul fork

0.2.0-alpha.42

Released 2019-02-28

  • #1719: Implement and activate Petersburg fork (aka Constantinople fixed)
  • #1718: Performance: faster account lookups in EVM
  • #1670: Performance: lazily look up ancestor block hashes, and cache result, so looking up parent hash in EVM is faster than grand^100 parent

0.2.0-alpha.40

Released Jan 15, 2019

  • #1717: Indefinitely postpone the pending Constantinople release
  • #1715: Remove Eth2 Beacon code, moving to trinity project