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

chore(ckbtc): property tests for event serialization and deserialization #3277

Merged
merged 4 commits into from
Dec 23, 2024

Conversation

lpahlavi
Copy link
Contributor

@lpahlavi lpahlavi commented Dec 20, 2024

(XC-238) Add property tests for the ckBTC event serialization/deserialization logic where events (both legacy and new) are arbitrarily generated from all possible event types. See this comment.

@github-actions github-actions bot added the chore label Dec 20, 2024
@lpahlavi lpahlavi force-pushed the lpahlavi/xc-238-proptest-for-encode-decode-events branch from 8dc3152 to 28c7082 Compare December 20, 2024 10:07
@lpahlavi lpahlavi added the CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 label Dec 20, 2024
@lpahlavi lpahlavi force-pushed the lpahlavi/xc-238-proptest-for-encode-decode-events branch from 28c7082 to d57b093 Compare December 20, 2024 10:14
@lpahlavi lpahlavi force-pushed the lpahlavi/xc-238-proptest-for-encode-decode-events branch from d57b093 to 73a2e65 Compare December 20, 2024 14:52
@lpahlavi lpahlavi marked this pull request as ready for review December 20, 2024 15:14
@lpahlavi lpahlavi requested a review from a team as a code owner December 20, 2024 15:14
Copy link
Member

@gregorydemay gregorydemay left a comment

Choose a reason for hiding this comment

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

Just had the time for a brief review, but LGTM!

}

fn txid() -> impl Strategy<Value = Txid> {
pvec(any::<u8>(), 32).prop_map(|bytes| {
Copy link
Member

Choose a reason for hiding this comment

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

nit: Withuniform32(any::<u8>()) you directly obtain an array of the right size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, thanks for the suggestion!

rs/bitcoin/ckbtc/minter/src/test_fixtures.rs Show resolved Hide resolved
Copy link
Member

@ninegua ninegua left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@lpahlavi lpahlavi enabled auto-merge December 23, 2024 09:14
@lpahlavi lpahlavi added this pull request to the merge queue Dec 23, 2024
Merged via the queue into master with commit 72a1f85 Dec 23, 2024
25 checks passed
@lpahlavi lpahlavi deleted the lpahlavi/xc-238-proptest-for-encode-decode-events branch December 23, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 @cross-chain-team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants