Closed 0xaatif closed 1 month ago
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
These are basically to run in a DEBUG
like profile with closer to RELEASE
performances. Especially debug-assertions
include additional checks on the proving system (starky
) to ensure all our constraints are consistent when proving statements.
As for the error:
Kernel PC is out of range: 65782
This doesn't happen in regular release mode. While I don't quite get why this happens with these particular flags, the issue is because for the transient storage test, we define a new static KERNEL
:
Which contains an additional assembly file (checkpoint_label.asm
) causing the total (new) KERNEL
code length to be 65852 instead of the regular length of 65782. I think the issue lies in the identical naming of 2 distinct static variables, which surprisingly doesn't trigger the error in regular release mode.
I first came across this on https://github.com/0xPolygonZero/zk_evm/actions/runs/11043011303/job/30676493011?pr=659
I've checked that this repros on master:
Note that the test fails when run as part of the suite, but not in isolation, suggesting that our tests are polluting one another. Also note that we pass weird compiler options when we run CI: https://github.com/0xPolygonZero/zk_evm/blob/56e7d08eb243020e82e228693ee5f8c42d86901e/.github/workflows/ci.yml#L94
Not entirely sure what is going on here, but it's a smell