Replies: 1 comment 5 replies
-
Are you sure we can use the blockchain tests?
We shouldn't go down this route. Just simply running tests in the CI.
From my experience, I'm unsure if this is needed since each ethjson test has each hardfork tests in them. Encoding tests should be included, RLP too. Sure, we are using an external library, but redundancy sakes, it's a good idea. The architecture is sound, except the CLI part. Thanks for the license compatibility check. It is clear that the tests library would need to be GPLv3. Do note that we need to get started on this as soon as possible. I know that you are caught up with NATS, and we can discuss the strategy for next week. I suspect that I will get the initial framework out there though, then we can build upon that. |
Beta Was this translation helpful? Give feedback.
-
Design proposal for testing framework for Engine compliance with Ethereum Test Suite/Bundle and the Ethereum Yellow Paper
Summary:
Objectives and motivation:
Making of a framework for testing of Aurora Engine to be fully compliant with Ethereum Test Suite and thus Ethereum Yellow Paper, as part of a product Quality Assurance process.
Related to and covers the issue #170
Design:
Abstract:
Implementation of a testing framework should include following:
ethjson
, but now this helpers is part ofethcore
), this is reasonable, 'cause corresponded to DRY and its code an actively developed and supported byopenethereum
projectcargo test
and it's usage in CI pipeline and currentmakefile
approach for building processArchitecture:
json
/yaml
formatjson
/yaml
data parser, usingethjson
json spec parser andserde
vm
wrapper (as more high level VM interface for testing purposes),json_tests
fromethcore
as spec parsing helpercargo test
clap
orabscissa
based CLI app, for convenient usage of testing framework as an end-user tool (test utility), for manually run tests for various Engine subsystems, which can be useful in local environment in development process of various subsystems, to run and for test framework usage, and for CI pipelines improvementhttps://crates.io/crates/clap
https://crates.io/crates/abscissa
https://github.com/iqlusioninc/abscissa
Implementation steps:
First of all - making a proof of concept, walking through the following steps, to feel out any caveats and pitfalls, and improve these steps, to implement testing framework:
ethjson
, following DRY, but also be implemented as own parser (takes more efforts). On this step we would have a data from json tests represented as convenient Rust data types.cargo test
, as we have hereTests from Ethereum tests bundle to be used:
Tests from Ethereum tests bundle, that won't be used, 'cause not applied for Engine (as a WASM contract for NEAR) or for Standalone Engine conceptions:
Tests format:
Mainly tests are represented as json key/value definitions of data, the key is represent of a meta-information about data in value field, and value field is a data payload itself, and this payload data can be represented in a format of a block, transaction, transaction receipt, contract account, account storage contents trie, etc.
The particular formats are described in documentation and json schemas:
tests structure in documentation:
https://ethereum-tests.readthedocs.io/en/latest/test_filler/blockchain_filler.html#test-structure
https://ethereum-tests.readthedocs.io/en/latest/test_types/blockchain_tests.html#test-structure
https://ethereum-tests.readthedocs.io/en/latest/test_filler/state_filler.html#test-structure
https://ethereum-tests.readthedocs.io/en/latest/test_types/gstate_tests.html#test-structure
https://ethereum-tests.readthedocs.io/en/latest/test_types/transaction_tests.html#test-structure
JSON schemas for data types and definitions, used in tests (block-chain, state transition and vm tests):
https://github.com/ethereum/tests/tree/develop/JSONSchema
Repository structure:
Repository will include git submodule for tests, and maybe a git submodule for usage
openethereum
's ethjson and json_tests as a libraries, for usage as testing helpers, if these crates cannot be included in other way with using declaration of dependency in a cargo toml file.Dependencies:
ethjson
json spec parserjson_tests
helpersLicense compatibility:
openethereum
node, crates isn't provided through crates.io and due to licensing under GPL can be used only as external dependency, as external library, through provided API, as git submodule or using cargo capabilities of including crates from subdirectories.Beta Was this translation helpful? Give feedback.
All reactions