Skip to content

Execution-truth receipt semantics for Soroban contract invocations (CoreGuard) #433

Open

Description

@EslaM-X

Subject: Execution-truth receipt semantics for Soroban contract invocations (CoreGuard)

Body draft:

Hi Soroban examples team -

CoreGuard builds a verifiable-execution-truth layer for Stellar and AI-agent
payments. Every integrated action (an AI-agent payment, a DEX swap, a dispute
filing) carries an authorization judged BEFORE submit (policy/allowlist,
deadline, size), a deterministic receipt that re-verifies byte-exactly, and a
tamper-evident execution record a third party replays from the public ledger.

Measured state (machine-pinned, never promised): Soroban commitment anchor
CCKA2GYVILX7YZVSXGVIHOPNLTRBBF2SSWKBTQBIE7M67N5N2QMMXPSP; first signed funded
swap confirmed; ESCROW/1 mirror; SEP draft for receipt semantics; DEX-GATE/1
pre-swap gate designed for verifiable swap execution.

We are preparing an ecosystem integration via PR. Would the Soroban examples
repo consider hosting an execution-truth receipt semantics surface for contract
invocations as an ecosystem standard, and would this repo host the integration
via PR?

Activity

  1. IVANLI2412 commented on Nov 20, 2026

    @IVANLI2412

    Propuesta: #433: Execution-truth receipt semantics for Soroban contract invocations (CoreGuard)

    Entendí el problema: Subject: Execution-truth receipt semantics for Soroban contract invocations (CoreGuard)

    Body draft:

    Hi Soroban examples team -

    CoreGuard builds a verifiable-execution-truth layer for Stellar and AI-agent
    payments. Every integrated action (an AI-agent payment, a DEX swap, a dispute
    filing) carries an authorization judged BEFORE submit (policy/allowlist,
    deadline, size), a deterministic receipt t
    Cómo lo resuelvo: 1) ... 2) ... 3) ...
    Prueba de que puedo: experiencia previa en tests y fixes de esta misma red
    Entrega: 2026-11-20 · Precio: 0 USDC · Pago en SOL/USDC a GAAUNVKEGJVXC4HRRTDT5ASHSTC4ALZ4ORL2PJV5VWOSNXWNS6PJD6OT

    Solicitud de asignación

    Please assign #433 to @IVANLI2412 before any PR is opened. I will implement the fix with local tests (RED->GREEN) and keep the public API unchanged. Red de la ola: stellar. Pago solicitado en USDC liquido. No se abre PR sin asignación formal.

  2. EslaM-X commented on Nov 20, 2026

    @EslaM-X
    Author

    Thanks for jumping in.

    To clarify the intent here: I opened this issue to ask the maintainers whether a small, concrete example around execution/receipt semantics for Soroban contract invocations would be a good fit for this repo (and, if so, what shape would be most useful alongside the existing examples).

    I’m not looking to assign paid implementation work through this thread. If it helps move the discussion forward, I’m happy to share a tighter proposal or draft PR outline (scope, example structure, and what it would demonstrate) so the team can assess whether it belongs here or would be better suited elsewhere in the Stellar/Soroban ecosystem.

    Appreciate any guidance from the maintainers on fit and preferred direction.

  3. EslaM-X commented on Nov 20, 2026

    @EslaM-X
    Author

    Following up with the concrete shape instead of another description, so there is something to judge.

    receipt-anchor — one contract, one file, written against soroban-sdk 28 to match this repo. anchor(caller, target, fn_name, args, result, ledger) commits to

    sha256("receipt-anchor/1" ++ xdr(target) ++ xdr(fn_name)
           ++ sha256(xdr(args)) ++ sha256(xdr(result)) ++ xdr(ledger))
    

    and stores that receipt under the caller's address, gated by caller.require_auth() so a stranger cannot write into someone else's list. commitment(...) is exported so an off-chain verifier derives the same 32 bytes without trusting a call to the contract, and verify(receipt, args, result) recomputes and compares. No policy engine, no allowlist, no fund movement: deciding whether a call should happen belongs to whoever authorizes it, and this only records what did happen.

    Correction to what I said earlier: it is nine tests, not eight, and I have now actually run them rather than only written them. cargo test against soroban-sdk 28: 9 passed, 0 failed. stellar contract build: a 5.2 KB wasm with the five entry points exported. The tamper cases are the point of the example rather than decoration — changing the args (including their order and their length), the result, the ledger, the target, or the function name each breaks verification on its own, so a receipt that passes is not passing for an incidental reason. Two more check the content-addressed property: the same invocation anchored by two different callers produces the same commitment, and neither can occupy the other's index. The ninth calls anchor without mocking authorization and expects it to fail, so the require_auth gate is tested instead of assumed.

    Two questions I would rather ask than assume:

    • Name. receipt-anchor if it should read as one of the examples; commitment-anchor if that vocabulary fits better here.
    • Val-typed args. It commits to the XDR the host actually executed, which is the honest encoding for arbitrary calldata, but it makes the ABI less friendly than the other examples. I can ship a Bytes-only variant if that teaches better.

    Rather than sit on it, I put the current shape up as a draft PR: #434 — in the same layout as the other examples (src/lib.rs, src/test.rs, Cargo.toml, Makefile, README.md), draft precisely because the two questions above are still yours to answer. Renaming it or narrowing the interface to Bytes is a small change from there. If the answer is that this belongs outside soroban-examples, that is just as useful and I will close the PR rather than push something the team does not want to own.

    One note for whoever reviews: soroban-sdk 28 refuses wasm32-unknown-unknown, so the Makefile uses stellar contract build and targets wasm32v1-none like the rest of the examples.

  4. EslaM-X commented on Nov 23, 2026

    @EslaM-X
    Author

    Concrete implementation update on the CoreGuard side, offered only as technical context for the proposed example — no claim that this repo has accepted or endorsed anything.

    Since the earlier receipt-anchor sketch, the CoreGuard verification surface has been extended and merged on main:

    Relevant boundary for this thread: CoreGuard still does not sign, broadcast, custody funds, implement bridges, or assert physical-world truth. The Soroban-facing idea remains a read-only verification/anchor surface that could consume a contract-invocation receipt as evidence; it is not a new payment rail or a trusted oracle.

    If maintainers see fit, the useful next step is still the narrow receipt-anchor example shape discussed above, with explicit "what this verifies / what it does not" semantics. Scope and non-claims are tracked in CoreGuard #114.

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