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

Crypto generators #382

Closed

Conversation

danielSanchezQ
Copy link
Contributor

@danielSanchezQ danielSanchezQ commented May 15, 2020

Created generators for:

  • vrf
  • ed25519
  • blake2b256

Implemented utils generators:

  • Unique items generator

Implemented insecure random number generator wrapper (just for testing).

@danielSanchezQ danielSanchezQ self-assigned this May 15, 2020
@danielSanchezQ danielSanchezQ linked an issue May 15, 2020 that may be closed by this pull request
5 tasks
Comment on lines +11 to 12
"chain-generators",
"chain-test-utils",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we try to keep all test utilities in a single crate? Or is chain-test-utils meant to be a core library onto which other generator crates with their varying dependencies are based? Trying to capture the intent here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What I had in mind was that in utils we should have whatever that deal with the chain libs testing part but that is common for them. What we have already, for example, the utilities for checking the serialization bijection. Also, I added the NonSecureRng in the utils because even if it is part of the generators stuff I think it is a general concept enough to be separated from the main ones. Also, some generators that I have in mind for the future (for example a generator that keeps track of the generated values to discard the duplicated ones) I was planning to put them here. By keeping them separated we may also import just the utils ones for implementing the same for some jormungandr types if we do not really need any chain type.
I don't say it is the best option though, and I see the value on keeping everything together (for example with a utils submodule inside the chain-generators crate).
What do @input-output-hk/jormungandr team think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's OK to have a library of common test utilities and another providing the generator framework. Just keep these responsibilities clearly separated.

@@ -0,0 +1,48 @@
use chain_crypto;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the lint

chain-generators/Cargo.toml Show resolved Hide resolved
chain-test-utils/Cargo.toml Outdated Show resolved Hide resolved
@danielSanchezQ
Copy link
Contributor Author

Closing this for now. We are taking other dev paths for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generator based testing framework
3 participants