Skip to content

Add composable scenario tests for signer using madhouse#1633

Open
moodmosaic wants to merge 17 commits intostacks-sbtc:mainfrom
BowTiedRadone:test/scenario
Open

Add composable scenario tests for signer using madhouse#1633
moodmosaic wants to merge 17 commits intostacks-sbtc:mainfrom
BowTiedRadone:test/scenario

Conversation

@moodmosaic
Copy link

Adds madhouse-based scenario testing to signer.

Provides reusable, DRY test steps that can be composed into scenarios.

First example:

scenario![
    test_context,
    CreateFailedDkgShares,
    WriteDkgShares,
    VerifyDkgVerificationFailed,
];

Based on property-based state machine testing (see spec).

@moodmosaic
Copy link
Author

/cc @cylewitruk

Copy link
Contributor

@cylewitruk cylewitruk left a comment

Choose a reason for hiding this comment

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

Will look more closely later, just tossing out a couple of quick comments on the dependency handling.

This repo has the convention of defining all dependencies in the workspace Cargo.toml, where dependencies in the [dependencies] stanza (i.e. full dependencies) are always specified with default-features = false with explicit feature enablement.

You'll also need to cargo vet and handle the dependency diffs.

@BowTiedRadone
Copy link

@cylewitruk: It seems no vetting is needed after moving madhouse-rs to dev dependencies. cargo vet output:

$ cargo vet
Vetting Succeeded (147 fully audited, 4 partially audited, 559 exempted)
 WARN Your supply-chain has unnecessary exemptions which could be relaxed or pruned.
 WARN   Consider running `cargo vet prune` to prune unnecessary exemptions and imports.

@MCJOHN974
Copy link
Contributor

@cylewitruk: It seems no vetting is needed after moving madhouse-rs to dev dependencies. cargo vet output:

Try to run cargo vet prune and it should fix problems

@BowTiedRadone
Copy link

That worked @MCJOHN974 🙏

$ cargo vet
Vetting Succeeded (151 fully audited, 4 partially audited, 555 exempted)

@moodmosaic considering cargo vet is clean should we consider taking this PR out of draft?

@moodmosaic moodmosaic marked this pull request as ready for review June 10, 2025 10:58
@moodmosaic moodmosaic changed the title [DRAFT] Add composable scenario tests for signer using madhouse Add composable scenario tests for signer using madhouse Jun 10, 2025
@moodmosaic
Copy link
Author

/cc @cylewitruk @djordon @aldur — are you interested in this? Should I keep open for a longer time?

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.

4 participants