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

driver, runner and CI for interoperable test-vector based testing. #3081

Merged
merged 23 commits into from
Aug 26, 2020

Conversation

raulk
Copy link
Member

@raulk raulk commented Aug 15, 2020

This commit introduces a new package conformance containing:

  1. the test driver to exercise Lotus against interoperable JSON-based test vectors (currently supporting message-class vectors), — and —
  2. the test runner, which subjects the Lotus VM to the test vector corpus hosted at https://github.com/filecoin-project/test-vectors/.

It also modifies the CircleCI configuration to add this as a separate suite, at least for now. This work is still stabilising, and some things may break. We don't want to add noise to the current suites.

The test vector corpus (https://github.com/filecoin-project/test-vectors/ repo) is mounted onto the Lotus repo via a git submodule.

Right now, only message-class test vectors are supported. In the next week, support will be extended to tipset-class, chain-class, and block sequence-class vectors.

Alerting on consensus-breaking changes

We are still pre-mainnet and we can afford to perform frequent network resets to introduce consensus-breaking changes (e.g. actor state data model or state manipulations). However, that luxury has an expiry date, and we need to level up our game in detecting breakages that can lead to forks.

Furthermore, other teams need to test their interoperability with us, in a gradual and targeted manner.

These test vectors are generated from the reference Filecoin implementation (Lotus), at a particular version. As such, they will alert us about regressions and consensus-breaking changes, such as: changes in state data model, changes to state transformations, changes in gas pricing, changes in exit codes, etc.

In some cases, the change might be intended; in others, it might not. That's the value of this: it will force a reflection/coordination point.

TODO

  • finish migrating outstanding chain validation message-class suites: create_actor, multisig, transfer.
  • generate those test vectors too.
  • merge the corpus into master, tag v0.
  • READMEs to explain how everything works. (will be done tomorrow in https://github.com/filecoin-project/test-vectors/)

This commit introduces a new package `conformance` containing:

 1. the test driver to exercise Lotus against interoperable
    test vectors, and
 2. the test runner, which integrates go test with the test vector
    corpus hosted at https://github.com/filecoin-project/conformance-vectors.

The corpus is mounted via a git submodule.

Right now, only message-class test vectors are supported. In the
next week, this support will be extended to tipset-class, chain-class,
and block sequence-class vectors.
.circleci/config.yml Outdated Show resolved Hide resolved
Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, i'd prefer minimal dependencies, but not a huge deal.

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just 1 thing to update

conformance/driver.go Outdated Show resolved Hide resolved
@whyrusleeping whyrusleeping merged commit deb013c into master Aug 26, 2020
@whyrusleeping whyrusleeping deleted the conformance-tests branch August 26, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants