Skip to content

Migrate instruction encoding from risc0 words to Borsh when bumping off byte-string-fix #351

Description

@erhant

LEZ changed program instruction encoding from risc0 word serialization to Borsh. lez-programs still emits risc0 words everywhere. Nothing is broken today because every pin here is on the pre-borsh side, but the two must move together whenever lez_core comes off the byte-string-fix branch.

Why nothing is broken right now

Pin Location Borsh?
lez_corelogos-execution-zone-module?ref=byte-string-fix (→ LEZ v0.2.2) flake.nix:50 no
lee / lee_core v0.2.4 Cargo.toml:38-39, programs/*/Cargo.toml no
LEZ dev (1e913284d, fcaf30b0f) upstream yes

risc0 words are the correct encoding against v0.2.2/v0.2.4, so current builds are self-consistent. The root flake.nix comment already notes the hold on byte-string-fix is deliberate (deployed sequencer + wallet/spel CLI are on v0.2.4).

What changes after the bump

On post-borsh LEZ, wallet_ffi_send_generic_public_transaction forwards the instruction bytes untouched into Message::new_preserialized, and the guest side does borsh::from_slice(&instruction_data) (read_lee_inputs). risc0-serialized words fail to decode there — the guest panics rather than returning a clean error.

Separately, Program::write_inputs now Borsh-frames the whole ProgramInput, so already-deployed guest ELFs are incompatible and must be rebuilt and redeployed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions