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

Murisi/strategy constructors #2259

Merged
merged 17 commits into from
Dec 29, 2023
Merged

Murisi/strategy constructors #2259

merged 17 commits into from
Dec 29, 2023

Conversation

murisi
Copy link
Collaborator

@murisi murisi commented Dec 9, 2023

Describe your changes

Updated the test vector generation code to make it easier to produce complete test vectors. More specifically, the changes are as follows:

  • Test vector generation is now done offline using a Cargo [[example]] so that those needing them do not need to start a server to produce them
  • Vector generation is now randomly produced with proptest strategies in order to more comprehensively cover the full domain of transactions
    • This approach has the additional benefit that these strategies can also be reused in other proptest tests
  • Vector generation is now done in Rust in order to take advantage of Rust's type-checking and to ensure that the code is kept up to date
  • The old approach to generating test vectors using shell scripts and hooks in the transaction generation and signing process have been removed as they are now redundant

Indicate on which release or other PRs this topic is based on

#2257

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@murisi murisi requested review from tzemanovic and sug0 December 9, 2023 22:15
@murisi murisi marked this pull request as ready for review December 9, 2023 22:15
@murisi murisi mentioned this pull request Dec 9, 2023
@murisi murisi requested a review from karbyshev December 9, 2023 22:28
Copy link
Collaborator

@sug0 sug0 left a comment

Choose a reason for hiding this comment

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

couple of comments

core/src/ledger/ibc/mod.rs Show resolved Hide resolved
core/src/types/eth_bridge_pool.rs Outdated Show resolved Hide resolved
core/src/types/eth_bridge_pool.rs Outdated Show resolved Hide resolved
core/src/types/hash.rs Outdated Show resolved Hide resolved
core/src/types/token.rs Outdated Show resolved Hide resolved
tzemanovic
tzemanovic previously approved these changes Dec 11, 2023
Fraccaman pushed a commit that referenced this pull request Dec 14, 2023
* origin/murisi/strategy-constructors:
  renaming and restructuring testing modules for consistency
  testing: use the appropriate address generators for address type
  Added a changelog entry.
  Added a README to explain the new examples directory.
  Removed generate_test_vector and the test vector shell script since they have been made redundant by the generate_txs example.
  Added a binary to automatically generate test vectors.
  Added proptest strategies for generating transactions.
brentstone added a commit that referenced this pull request Dec 29, 2023
* origin/murisi/strategy-constructors:
  renaming and restructuring testing modules for consistency
  testing: use the appropriate address generators for address type
  Added a changelog entry.
  Added a README to explain the new examples directory.
  Removed generate_test_vector and the test vector shell script since they have been made redundant by the generate_txs example.
  Added a binary to automatically generate test vectors.
  Added proptest strategies for generating transactions.
@brentstone brentstone merged commit 7294e00 into main Dec 29, 2023
13 of 14 checks passed
@brentstone brentstone deleted the murisi/strategy-constructors branch December 29, 2023 19:37
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