From c6cf88a7e922a98123ecf3cb9d03e043805f773e Mon Sep 17 00:00:00 2001 From: holgerd77 Date: Mon, 22 Oct 2018 12:57:13 +0200 Subject: Added sealEngine related infos to README and blockchain test format docs --- README.md | 12 ++++++++++- docs/test_types/blockchain_tests.rst | 40 +++++++++++++++--------------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d9c063da3..d616c65e4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,17 @@ tests [![Build Status](https://travis-ci.org/ethereum/tests.svg?branch=develop)](https://travis-ci.org/ethereum/tests) ===== -Common tests for all clients to test against. See the documentation http://ethereum-tests.readthedocs.io/ +Common tests for all clients to test against. + +Test Formats +------------ + +See descriptions of the different test formats in the official documentation at http://ethereum-tests.readthedocs.io/. + +*Note*: +The format of BlockchainTests recently changed with the introduction of a new field ``sealEngine`` (values: ``NoProof`` | ``Ethash``), see related JSON Schema [change](https://github.com/ethereum/tests/commit/3be71ec3364a01fd4f2cb9b9fd086f3f69f0225c) or BlockchainTest format [docs](https://ethereum-tests.readthedocs.io/en/latest/test_types/blockchain_tests.html) for reference. + +This means that you can skip PoW validation for ``NoProof`` tests but also has the consequence that it is not possible to rely on/check ``PoW`` related block parameters for these tests any more. Contents of this repository --------------------------- diff --git a/docs/test_types/blockchain_tests.rst b/docs/test_types/blockchain_tests.rst index c9b6dd359..cb4e9ab94 100644 --- a/docs/test_types/blockchain_tests.rst +++ b/docs/test_types/blockchain_tests.rst @@ -39,6 +39,8 @@ The client is expected to iterate through the list of blocks and ignore invalid Test Structure -------------- +For a formal structure definition see also the related `JSON Schema `_ in the repo. + :: { @@ -63,31 +65,12 @@ Test Structure "lastblockhash": " ... ", "network": "Byzantium", "postState": { ... }, - "pre": { ... } + "pre": { ... }, + "sealEngine": [ "NoProof" | "Ethash" ] }, "TESTNAME_EIP150": { - "blocks" : [ - { - "blockHeader": { ... }, - "rlp": { ... }, - "transactions": { ... }, - "uncleHeaders": { ... } - }, - { - "blockHeader": { ... }, - "rlp": { ... }, - "transactions": { ... }, - "uncleHeaders": { ... } - }, - { ... } - ], - "genesisBlockHeader": { ... }, - "genesisRLP": " ... ", - "lastblockhash": " ... ", - "network": "Byzantium", - "postState": { ... }, - "pre": { ... } - }, + ... + } ... } @@ -160,6 +143,17 @@ Pre and postState Sections * ``postState`` section: as described in :ref:`state_tests` (section - post). +Seal Engine +^^^^^^^^^^^ + +The ``sealEngine`` parameter (values: ``NoProof`` | ``Ethash``) defines the seal engine the +test is generated with. For tests with a value ``NoProof`` you can skip block validation +which will speed up test execution. Note that this also means that you cannot rely on +``PoW`` specific block header values (``mixHash``, ``nonce``) for tests labelled this way. + +Currently this field is optional and there are still tests with no ``sealEngine`` parameter +with the default here being the ``NoProof`` setting. So make sure to first check on parameter +existence in your implementation. Optional BlockHeader Information ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- cgit From 2daa4ab522385bcf4c3498a65219424dc7f35458 Mon Sep 17 00:00:00 2001 From: holgerd77 Date: Mon, 22 Oct 2018 12:57:33 +0200 Subject: Some updates to test generation doc section --- docs/using-testeth.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/using-testeth.rst b/docs/using-testeth.rst index b725b8746..1395447ad 100644 --- a/docs/using-testeth.rst +++ b/docs/using-testeth.rst @@ -4,7 +4,11 @@ Test Creation Instructions on how to create tests and how to use the cpp-client ``testeth`` tool can be found in the c++ documentation -`test generation chapter `_. +`test generation chapter `_. + +Since docker images pointed to in the test generation docs are often outdated, you will probably +have to rely on your own `source build `_ of the Aleth C++ +Ethereum client for generating tests (start this early on since this is taking some time). -- cgit