0xPolygonZero / plonky2

Apache License 2.0
757 stars 283 forks source link

Fix set_context constraints #1401

Closed hratoanina closed 9 months ago

hratoanina commented 9 months ago

Some constraints for SET_CONTEXT were incorrect. Instead of checking that the new stack top was what was read in memory channel 3, we were only checking the first limb and forcing the other 7 to be 0.

Additionally, the zero-checking of the high limbs of value for one-limb quantities (like the stack length, or the context) wasn't done.

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information