dev grew new self_program_id/caller_program_id and ChainedCall.program_id call sites (sequencer_stake's rewritten main.rs, gossip validation, cross_zone's shared ping_emission test helper, and three guest test programs) after this branch's ProgramId->AccountId migration commits were originally written, so they predated the self_account_id/ caller_account_id/program_account_id rename and didn't conflict during the rebase - they just still assumed the old ProgramId-typed fields. Converts all of them, recovering ProgramId via the existing bijection only where the RISC0 image id is actually needed, and rebuilds artifacts against the fixed source.
Programs
This crate serves two purposes at once:
- Provide one entrypoint for
cargo risczero buildto build guest binaries used in LEZ in one shot. - Provide access to the built binaries wrapped with
Programtype.
Binaries
This crate contains binaries taken from sub-directories: one per each program. This binaries are meant to be compiled with cargo risczero build. No other use is intended for them.
Library
You may import this crate as a library but it will only make sense if you enable artifacts feature flag.
Enabling this flag will make crate expect that binaries where already built and put in the right place (use just build-artifacts for that).
Why not just risc0_build::embed_methods() ?
Because this will either provide non-deterministic guest build or requires Docker. And forcing to use Docker to build the project is not an option for us especially because we also build Docker images for our services, which would mean we would have to call docker from docker (and this is not really feasible).
risc0_build::embed_methods() works well when you don't need deterministic build or Docker is not a problem. This is the case for our tests and we use it there.