Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: adapt JSON suite for cross-client, cross-chain testing #91

Open
1 task
meowsbits opened this issue May 24, 2019 · 2 comments
Open
1 task

tests: adapt JSON suite for cross-client, cross-chain testing #91

meowsbits opened this issue May 24, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@meowsbits
Copy link
Collaborator

Building an idea around adapting multi-geth in coordination with ethereum/tests to use (parts of) the existing JSON ethereum/tests suite to develop cross-client and multi-network available tests.

Hurdles:

  • Current suite uses Fork-derived expectations, which is severely limiting to the extensibility of these tests beyond those precise chain configuration definitions.

Goals:

  • A test suite comparable to 'coverage' in ethereum/tests, but extensible across chain configurations.
  • These improved tests (and their schema patterns) should then be available for adoption between multi-geth and parity-ethereum at least.

These goals together would allow x-client/x-chain testing, which would be really nice to have for substantiating confidence around forthcoming hardforks, proving feature implementations against spec, etc.

  • TODO: continue to flesh out this idea and documentation
@meowsbits meowsbits added the enhancement New feature or request label May 24, 2019
@meowsbits meowsbits changed the title tests: adapt JSON suite for cross-client testing tests: adapt JSON suite for cross-client, cross-chain testing May 24, 2019
@whilei
Copy link
Collaborator

whilei commented May 25, 2019

/*

  • Tests should run respective to chain configurations.
  • Chain configurations should be integrated as test data.
  • Chain configurations which are intergrated as test data should be spec'd,
    so that any client can use those configurations in their feature switch implementations
    and thus actually use the tests.

Operations:

  • Define a chain configuration schema (JSON). This must be expected to play nicely with multi-geth and parity-ethereum.
    • AFAIR there might already exist a tool which can translate between configuration schemas;
      go-ethereum considers chain configuration as a facet of genesis block specification.
    • multi-geth already has JSON tags defined for params.ChainConfig
  • Implement test suite that can run incorporated chain configurations defined under this schema
    against existing test chain configurations (aka Forks). If tests pass, we know that our test runner
    and chain configurations are playing well together to match existing chain configurations.
  • Implement "test runner" that is actually a "test generator," which, instead of check got vs. want test results,
    will write test results to some file in JSON format.
  • Using this test generator, create JSON tests against chain configurations beyond the currently hardcoded ETH-only
    magical snake charming tests. These should be able to prove that existing Parity and Go-ethereum (multi-geth)
    implementations pass tests equivalently for existing (live network) chain configurations.
  • Implement a chain configuration generator that can create chain X test permutations, where chains include but
    are not limited to any network's canonical specifications. This will aid to ferret out edge cases.

*/

@meowsbits meowsbits self-assigned this May 26, 2019
@meowsbits
Copy link
Collaborator Author

There are supposed schemas for JSON tests https://github.com/ethereum/tests/tree/develop/JSONSchema, but I haven't checked that they're actually implemented, and they are still relying on hardcoded opaque chain definitions.

meowsbits added a commit to meowsbits/multi-geth that referenced this issue Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants