Zebra/book/src/dev/rfcs/drafts/xxxx-basic-integration-test...

6.3 KiB

Summary

Zebra's basic integration tests make sure that it works when deployed on mainnet and testnet.

Basic acceptance tests:

  • genesis tests for basic network integration
  • restart with existing state
  • quick tests for a few thousand blocks
    • can be unstable on the current testnet
  • checkpoint_sync = true
    • not yet implemented

On main branch merge:

  • slow tests past the canopy mandatory checkpoint, for full block verification
  • slow tests to the tip of the chain

For an up-to-date list, see:

Design strategies:

  • we write Rust-based acceptance tests, not shell scripts
  • use #[ignored] to disable long-running integration tests by default
  • use a feature to disable integration tests that need pre-cached state

Logging plans:

  • limit bundled logs to the first N lines, and the last N lines ?
  • write logs to a file ?
  • work out how to avoid filling up the child stdout and stderr pipes
  • keep warning and error logs
  • only keep initial and final info/debug/trace logs

Motivation

To develop and deploy Zebra, we need to make sure that its sync, verify, and state functionality works.

These tests help us be confident that PRs and main branch merges don't break Zebra's basic functionality.

Definitions

Guide-level explanation

Reference-level explanation

Drawbacks

Rationale and alternatives

Prior art

Unresolved questions

Future possibilities