scroll-tech / ceno

Accelerate Zero-knowledge Virtual Machine by Non-uniform Prover Based on GKR Protocol
Apache License 2.0
53 stars 6 forks source link

Make the platform dynamic #566

Closed naure closed 1 day ago

naure commented 2 weeks ago

Currently, platform details (e.g. special memory addresses) are constants, and guest programs must target it.

It’s possible to upgrade these constants to parameters chosen by guest programs. These parameters can be given in ELF files and/or CLI arguments.

To do it, replace all usages of the CENO_PLATFORM constant into a platform: Platform argument, like for example VMState.platform does. It might be harder than it sounds; did not try yet.

_Refs: platform.rs, linker script, etc._

Related: #215, #378, #476.

naure commented 4 days ago

A number of these dependencies to Platform are being removed in #368.

A notable exception is StaticMemTable::len() and PubIOTable::len() which are currently hard-coded.

naure commented 1 day ago

@mcalancea This issue is solved right?

mcalancea commented 1 day ago

Yep.