Skip to content

Track perch upstream consumability gaps: perch-smart-account crate + cap-capable compiler pin #208

Description

@willemneal

Two related workarounds in contracts/smart-account/src/doc.rs exist because of gaps in what's actually consumable from perch today. Both are worth revisiting once perch's own releases close them (raised during PR #207 review — thanks @elizabethengelman).

1. perch-smart-account trait crate is not consumed

It's unpublished, unbuildable as a git dependency (bakes git-ignored fetched wasm artifacts at build time via include_str!/registry_contract!), and its storage/install helpers are private. doc.rs mirrors the trait's surface (apply_doc, applied_doc_hash) and install shape manually at the wire level (CompiledDoc/CompiledRule) instead of depending on it.

Revisit when: perch-smart-account is published in a form that's buildable as a normal crate dependency without baking in git-ignored artifacts.

2. Cap-capable compiler wire types are hand-mirrored, not perch-sourced

The deployed testnet doc-compiler predates perch's cap-lowering feature — its CompiledRule has five fields (no cap), and it refuses capped documents at compile time (CapUnsupported). doc.rs hand-transcribes the wire types from stellar contract fetch/stellar contract info interface of the deployed artifact rather than consuming perch's own compiled types, because consuming the perch-doc-compiler crate at a source revision previously produced six-field types that didn't match the deployed five-field compiler and caused every live apply_doc call to trap.

Revisit when: the deployed testnet compiler is upgraded to a cap-capable build, at which point the pin can be bumped and the cap field re-added to the local mirror (the lowering branch already exists in history, just currently unreachable).

Neither is urgent — the current on-chain behavior is correct and tested — but both are manual-maintenance surfaces that should shrink as perch's own releases mature.

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