0xPolygonZero / plonky2

Apache License 2.0
755 stars 278 forks source link

Fix interpreter jumps #1471

Closed LindaGuiga closed 7 months ago

LindaGuiga commented 7 months ago

In the interpreter, run_jump and run_jumpi were not throwing the correct exceptions. This PR changes the two functions so that they correspond to the logic in operation.rs.

Note that this also removes an unnecessary assert_ne! which suggests to calm KECCAK256 if the segment is MainMemory in KECCAK_GENERAL; since the sys_keccak256 calls KECCAK_GENERAL and the interpreter now relies directly on the kernel syscalls, the assert is no longer useful (and causes unnecessary failures).

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud