Skip to content

[Feature] Speed up consensus version unit testing #2935

@vicsn

Description

@vicsn

🚀 Feature

There is a lot to improve on our compilation and testing front. One specific concern is that developers should feel comfortable writing new integration unit tests, such as the once in test_v*.rs.

Taking an example for running some tests in test_v9:

  • a build from scratch takes multiple minutes. A trivial incremental build takes 1-1.5 minutes. Setting lto=off in the test profile would degrade CI performance. Should we create a custom test profile for CI with lto=thin? I tried setting RUSTFLAGS="-C lto=off" to override the profile but that gives me a linker error.
  • individual tests take 30-120 seconds. The biggest reason for this is block and proof generation.
    • Can we locally cache ledgers up to the appropriate starting height after the first run of the unit test?
    • We can consider turning off proof verification and relying on evaluation instead of execution, and assume that there is a set of tests which checks for equivalence of evaluation and execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions