Split testing-btc out of the testing feature

Open
#237 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
testing

Research direction

Start with the feature definitions in Cargo.toml and the conditional compilation gates in src/btc.rs and coordinator/mod.rs. Check whether the exported coordinator test harness depends on btc.rs, especially btc_sign_verify, and inspect the v1_bench and v2_bench targets. Done means the light testing feature builds without bitcoinconsensus while BTC integration checks remain gated by testing-btc.

Written by the indexing model from the issue text.

Description

testing = ["dep:bitcoin", "dep:bitcoinconsensus", "dep:tracing-subscriber"].

Since #233 gated the five test_helpers modules behind testing, that feature is the only way a downstream consumer reaches helpers like common::test_helpers::gen_signer_ids. But enabling it also drags in bitcoinconsensus, so a consumer who wants one signer-id helper has to build a C++ consensus library.

The heavy dependencies exist only for src/btc.rs (#[cfg(any(test, feature = "testing"))], the bitcoin/taproot integration checks).

Suggested shape

testing-btc = ["dep:bitcoin", "dep:bitcoinconsensus"]
testing = ["testing-btc", "dep:tracing-subscriber"]

with btc.rs gated on any(test, feature = "testing-btc"), so the light half can be taken on its own. That also lets [[bench]] v1_bench/v2_bench require only the light feature — right now they pull the consensus library purely to compile, as noted in #233.

Worth confirming nothing in the exported coordinator test harness (coordinator/mod.rs's pub mod test) depends on btc.rs; btc_sign_verify in that module is the likely exception and may need its own gate.

Dominant language
Rust
Stars
34
Forks
19
Avg merge
9h 19m
Merged PRs (30d)
12

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xoloki/wsts

All issues in xoloki/wsts

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.