GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ewasm/tests: Common tests for all Ethereum implementations

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

2,251 Commits
2,251 Commits

Folders and files

NameName
Last commit message
Last commit date
ABITests
ABITests
 
 
BasicTests
BasicTests
 
 
BlockchainTests
BlockchainTests
 
 
GeneralStateTests
GeneralStateTests
 
 
GenesisTests
GenesisTests
 
 
JSONSchema
JSONSchema
 
 
KeyStoreTests
KeyStoreTests
 
 
PoWTests
PoWTests
 
 
RLPTests
RLPTests
 
 
RPCTests
RPCTests
 
 
Retesteth/eth
Retesteth/eth
 
 
TransactionTests
TransactionTests
 
 
TrieTests
TrieTests
 
 
VMTests
VMTests
 
 
ansible
ansible
 
 
docs
docs
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
TODO
TODO
 
 
requirements.txt
requirements.txt
 
 
test.py
test.py
 
 

Repository files navigation

tests Build Status

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 or BlockchainTest format docs 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.

Clients using the library

The following clients make use of the tests from this library. You can use these implementations for inspiration on how to integrate. If your client is missing, please submit a PR (requirement: at least some minimal test documentation)!

  • Mana (Elixir): Docs, Test location: ethereum_common_tests
  • go-ethereum (Go): Docs, Test location: tests/testdata
  • Parity Ethereum (Rust): Docs, Test location: ethcore/res/ethereum/tests
  • ethereumjs-vm (JavaScript): Docs, Test location: ethereumjs-testing dependency
  • Trinity (Python): Docs, Test location: fixtures
  • Pantheon (Java): Docs, Test Location: ethereum/referencetests/src/test/resources

Contents of this repository

Do not change test files in folders:

  • StateTests
  • BlockchainTests
  • TransactionTests
  • VMTests

It is being created by the testFillers which could be found at src folder. The filler specification and wiki are in development so please ask on gitter channel for more details.

If you want to modify a test filler or add a new test please contact @winsvega at https://gitter.im/ethereum/aleth

All files should be of the form:

{
	"test1name":
	{
		"test1property1": ...,
		"test1property2": ...,
		...
	},
	"test2name":
	{
		"test2property1": ...,
		"test2property2": ...,
		...
	}
}

Arrays are allowed, but don't use them for sets of properties - only use them for data that is clearly a continuous contiguous sequence of values.

Test Set Sanitation

Setup

(Requires virtualenv)

#> virtualenv -p python3 .env3
#> . .env3/bin/activate
#> python3 -m pip install -r requirements.txt

Checkers

Several basic checks against the test-set are performed to ensure that they have been filled and are formatted correctly. Currently, there are three types of checks that we can perform:

  • make TEST_PREFIX.format: check that the JSON is formatted correctly.
  • make TEST_PREFIX.valid: check that the JSON files are valid against the JSON schemas in ./JSONSchema.
  • make TEST_PREFIX.filled: check that the JSON tests are filled with the correct source hashes against the fillers.

The constant TEST_PREFIX is a path prefix to the test-set you're interested in performing the checks on. For instance:

  • make ./src/VMTestsFiller/vmArithmeticTest.format will check that all JSON files in ./src/VMTestsFiller/vmArithmeticTest are formatted correctly.
  • make ./src.valid will check that all the JSON files in ./src are valid against the JSON schemas in ./JSONSchema.
  • make ./BlockchainTests.filled will check that the source hashes in the JSON tests in ./BlockchainTests are the same as the hashes of the fillers in ./src/BlockchainTestsFiller.

These checks are all performed by the file ./test.py, which can be invoked on individual files as well. Run ./test.py with no arguments for help.

Sanitizers

The above checkers are packaged together into sanitizers for each test-suite, marking which testsuites are passing which testers. See the TODOs in the Makefile to see which checkers are enabled for which test-suites.

  • make sani: will run all passing sanitizers on all passing testsuites.

  • make sani-TESTNAME: will run just the passing sanitizers for the given testsuite. TESTNAME can be one of:

    • vm: VMTests and VMTestsFiller
    • gs: GeneralStateTests and GeneralStateTestsFiller
    • bc: BlockchainTests and BlockchainTestsFiller
    • tx: TransactionTests and TransactionTestsFiller

Runners/Fillers

The tests can also be run/filled with the same Makefile.

  • make run: will use testeth to all the test-suites.
  • make fill: will use testeth to fill all the test-suites.
  • make TEST_PREFIX.run: runs a single testsuite.
  • make TEST_PREFIX.fill: fills and formats a single testsuite.

FAQ

I want to test my client, which version shall I use?

The develop branch in ethereum/tests is the version to use.

How can I add a new test case?

testeth guide to generate test cases

About

Common tests for all Ethereum implementations

Resources

Readme
MIT license
Activity
Custom properties

Stars

8 stars

Watchers

7 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.