-
Notifications
You must be signed in to change notification settings - Fork 174
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
Update code to be compatible with Winterfell 0.8 #1234
Conversation
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.
Thank you! Looks good! Not a full review yet, but I've reviewed most of the files and left some comments inline.
const FMP_MIN: Felt = Felt::new(crate::FMP_MIN); | ||
const SYSCALL_FMP_MIN: Felt = Felt::new(crate::SYSCALL_FMP_MIN); | ||
const SYSCALL_FMP_MIN: Felt = Felt::new(crate::SYSCALL_FMP_MIN as u64); |
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 think FMP_MIN
and SYSCALL_FMP_MIN
are actually just 32 bit values. Maybe we should declare them as such?
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 tried to do so, but it turns out that there are quite a lot of places where we use these constants (mostly FMP_MIN
) as a stack elements in tests, so I decided that it will be better just to use Felt::new()
in some places and don't cast them to the u64
in a large number of places in the tests
+ alphas[2].mul_base( | ||
Felt::try_from((i + 1) as u64) | ||
.expect("value is greater than or equal to the field modulus"), |
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
is guaranteed to be a u32
here because it the row index, I believe. Ideally, we should change the function signature to reflect this. If this is too much for this PR, then we should leave a TODO
comment and use as u32
for i
.
3d06daa
to
4c963d2
Compare
a6613c0
to
5e94731
Compare
4cd5712
to
42861af
Compare
d8ae2e5
to
156a257
Compare
42861af
to
e7479c2
Compare
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.
Looks good! Thank you! I left a few small comments inline.
Before merging, let's make corresponding PRs in miden base and miden node (if needed).
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.
Looks good to me, thank you!
e7479c2
to
55d3359
Compare
55d3359
to
66c7a10
Compare
66c7a10
to
83d5e41
Compare
83d5e41
to
0f8f103
Compare
This PR updates the code to be compatible with new 0.8 version of the Winterfell.
This update mostly contains changes in
Felt
creation, since casting ofu64
toFieldElement
was removed. It also updates the serialization and deserialization of the structs, which contain vectors ofFelt
s orRpoDigest
s.