This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move sr-arithmetic to a new crate and add in a fuzzer #3799
Move sr-arithmetic to a new crate and add in a fuzzer #3799
Changes from 51 commits
963a14d
0bc870d
b1a9793
dc8cc41
ee26625
38597b9
c7c5888
cd2db5d
8a0ef6b
562cdff
c66f882
7adc99d
c28ae3f
77a8cbb
1fe1a9f
40c0708
c7f5345
20813dd
4aa7dd5
e8cbb1d
ed264e5
f4c5154
85f8487
03dd42e
aeb6a1d
117f818
458edbd
419bc5a
89f6b06
8fb2890
5eb310a
316f562
ac9a2f2
5a21213
99f366e
2123d00
dc651e4
2acc346
38650cf
a377d3e
ae25a41
20a0488
17933d1
7c80be9
c5616c2
c082792
7878cec
5387c96
98cdb31
42f6521
3ac8b87
41cfa3a
99099c9
85a790b
e32f887
883272c
1209939
7202e2d
1cadf86
a934f37
2dd9c31
9a02591
d58d6d3
9dd0688
ab5ec37
dcf169c
f51e484
900c305
79e4348
0a843c8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is fuzz code, it is okay to depend on git dependencies, but is there any other way to not depend on this branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's not quite ideal, but to compare the
BigUint
implementations I need access to the underlying slice, so I had to use my own branch. I'll try and make a PR for that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rust-num/num-bigint#12 does what I want, but the repo seems to be moving pretty slowly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as fuzzer is part of workspace then the test-suite will fail if this branch is changed, I think this is not fine, not sure what the best way to solve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used for the function
fn assert_biguints_eq(a: &BigUint, b: &num_bigint::BigUint)
I think you can come up with a solution by converting
a
into num_bigint and use the partialeq implementation of num_bigint.Or you can use the function https://docs.rs/num-bigint/0.2.3/num_bigint/struct.BigUint.html#method.to_radix_be or https://docs.rs/num-bigint/0.2.3/num_bigint/struct.BigUint.html#method.to_radix_le
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider this? I suppose you can go to
to_str_radix
and then easily convert every 4 chunks into aSingle
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting to
num_bigint::BigUint
seems like the easiest approach for now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give this a try, think it is possible to build the thing from str_radix