Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spec-tests

This repository contains generated JSON test vectors for the ssv-spec project. The JSONs are generated in ssv-spec and synchronized here via CI.

Repository layout

spec-tests/
  qbft/
    tests/
    state_comparison/
  ssv/
    tests/
    state_comparison/
  types/
    tests/
    state_comparison/
  • tests/ — individual test JSON files.
  • state_comparison/ — post‑state comparison JSONs used by spec tests.

How JSONs are generated

JSONs are generated by ssv-spec:

  • make generate-jsons (runs go generate ./...)
  • Generators live under:
    • qbft/spectest/generate/main.go
    • ssv/spectest/generate/main.go
    • types/spectest/generate/main.go

The generators write to an external sibling directory:

../spec-tests/{qbft,ssv,types}/...

This repo should not be edited manually — it’s generated.

CI sync behavior

The ssv-spec CI workflow:

  1. Generates JSONs.
  2. Opens/updates a PR in this repo with the same PR name.
  3. On merge to main in ssv-spec, syncs the JSONs here and merges the matching PR.

Requirements for CI sync

In ssv-spec GitHub Actions:

  • Repo variable: SPEC_TESTS_REPO (e.g., ssvlabs/spec-tests)
  • Secret: SPEC_TESTS_TOKEN with write access to this repo

Usage

Consumers should treat this repo as a read‑only artifact:

  • For test running in production, it is recommended to generate the test vectors JSONs from ssv-spec with make generate-jsons to avoid any CI mishap that may bring this repo out of sync.
  • This repository is helpful for test development, since it helps track changes in the test vectors across commits.

Troubleshooting

  • If JSONs look out of date, re-run make generate-jsons in ssv-spec.
  • If CI doesn’t sync, check SPEC_TESTS_REPO and SPEC_TESTS_TOKEN.

License

Repository is distributed under GPL-3.0.

Releases

Packages

Used by

Contributors