Skip to content

spel deploy should derive and print program_id without requiring a separate spel program-id call #241

Description

@aegonmyy

Summary

The deployment flow requires two separate commands to get the program_id:

spel deploy my_program.bin          # deploys, prints tx hash but NOT program_id
spel program-id my_program.bin      # separate call to extract the id

This is fragile in CI: if the binary changes between the two calls the IDs diverge.
The deploy command has already validated the binary — it should print the program_id
as part of its output.

Suggested fix

Have spel deploy output a structured result including both tx_hash and program_id:

Deployed program
  tx_hash:    0xabc...
  program_id: 7ab2ad5d...

or as --format json:

{"tx_hash": "0xabc...", "program_id": "7ab2ad5d..."}

This would let CI scripts do a single spel deploy --format json | jq -r .program_id
instead of a two-step build → program-id pipeline.

Current CI workaround (LP-0017)

- name: Extract program_id
  run: |
    HEX=$(spel program-id \
      methods/guest/target/riscv32im-risc0-zkvm-elf/docker/chronicle_registry.bin \
      --format hex)
    echo "PROGRAM_ID=$HEX" >> $GITHUB_ENV

Found while building an LP-0017 Logos Lambda-Prize submission against LEZ rc5 (logos-execution-zone @27360cb7) with lgs/logos-scaffold @9e4d148d. Happy to provide a minimal repro or PR.

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