Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make debugging easier on proptests with large vectors #2232

Merged
merged 5 commits into from
Jun 2, 2021

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Jun 1, 2021

Motivation

It's hard to diagnose a proptest failure when you get hundreds of pages of log output.

Solution

  • Wrap large proptest vectors in the SummaryDebug type
  • Make that type easier to use
  • Reduce the size of random vectors that are embedded in other types

The code in this pull request has:

  • Documentation Comments
  • Existing Property Tests

Review

This code can be reviewed by anyone, but we'll all want it next time a block or chain test fails :-)

Related Issues

Some of this code was accidentally deleted in PR #2012.

I really needed it when the chain proptests in #2185 were failing. (But they're fixed now.)

teor2345 added 2 commits June 1, 2021 18:29
And also add it to some more proptest vectors.
This makes debugging easier
@teor2345 teor2345 added A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement P-Low labels Jun 1, 2021
@teor2345 teor2345 requested a review from a team June 1, 2021 08:35
@teor2345 teor2345 self-assigned this Jun 1, 2021
zebra-chain/src/fmt.rs Show resolved Hide resolved
zebra-chain/src/fmt.rs Outdated Show resolved Hide resolved
@teor2345 teor2345 requested review from jvff and dconnolly June 2, 2021 02:07
@teor2345 teor2345 enabled auto-merge (squash) June 2, 2021 02:08
@teor2345 teor2345 merged commit 35f0979 into ZcashFoundation:main Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants