Skip to content

SPIKE: CAP-71 SDK support — expose delegate_account_auth#1878

Draft
sisuresh wants to merge 1 commit into
stellar:mainfrom
sisuresh:cap-71-p27
Draft

SPIKE: CAP-71 SDK support — expose delegate_account_auth#1878
sisuresh wants to merge 1 commit into
stellar:mainfrom
sisuresh:cap-71-p27

Conversation

@sisuresh

Copy link
Copy Markdown
Contributor

SPIKE used to e2e-test CAP-71 (Auth delegation) end-to-end against a Quickstart Protocol 27 build (with stellar-core PR #5209 = CAP-83 + CAP-71 enabled via `--enable-next-protocol-version-unsafe-for-production`).

What this changes

  • Pins `soroban-env-{common,guest,host}` and `stellar-xdr` to the CAP-71 commit:
    • `rs-soroban-env` @ `7fb0a840…` (PR Bump version to 23.1.0 #1607, merged) — adds the new `address.delegate_account_auth` / `get_delegated_signers_for_current_auth_check` host fns.
    • `rs-stellar-xdr` @ `a749b69b…`, `features=["cap_0071"]` — adds `SOROBAN_CREDENTIALS_ADDRESS_V2`, `…_WITH_DELEGATES`, `HashIdPreimageSorobanAuthorizationWithAddress`, `SorobanDelegateSignature`.
  • Drops the `curr` feature on `stellar-xdr` (the new per-CAP-feature layout has no `curr` module; everything is at the crate root).
  • Replaces `use stellar_xdr::curr as stellar_xdr;` aliases with crate-root imports.
  • Adds `Address::delegate_account_auth(&self)` — wraps `env.delegate_account_auth(AddressObject)` so a custom-account contract's `__check_auth` can call `delegate.delegate_account_auth()` to hand off auth (CAP-71-01).

How it was used

A 13-line custom-account contract was built against this SDK and deployed to a Quickstart p27 node; a `SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES` auth entry (with a single `SorobanDelegateSignature`) was submitted; the tx returned `SUCCESS` from RPC and was ingested by Horizon without error. (Companion testing on `go-stellar-sdk`, `stellar-rpc`, and `stellar-horizon` is tracked in those repos' SPIKE PRs.)

Notes for a real PR

  • Skipping the `get_delegated_signers_for_current_auth_check` wrapper for now (returns `VecObject` → `Vec` needs a real conversion path).
  • The `stellar-xdr` version constraint had to drop from `=26.0.1` to `=26.0.0` to match the rev's self-reported version.
  • Many `use stellar_xdr::curr as stellar_xdr;` aliases were removed mechanically. A real PR should consolidate to a single re-export.

…unt_auth

- Pin soroban-env-{common,guest,host} and stellar-xdr to the CAP-71 commit
  (7fb0a840 / rs-stellar-xdr a749b69b, features=["cap_0071"]); drop the
  'curr' feature now that rs-stellar-xdr uses a per-cap-feature layout.
- Replace 'use stellar_xdr::curr ...' aliases with crate-root imports.
- Add Address::delegate_account_auth wrapping the new CAP-71-01 host fn
  (env.json: address.a). Custom-account __check_auth can now call
  delegate.delegate_account_auth() to route auth to a delegated signer.

Used to e2e-test CAP-71-01 (delegation) end-to-end through stellar-rpc and
horizon on a Quickstart Protocol 27 build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant