Skip to content

feat: bring the Soroban vault in-repo with tests, CI and relay readback - #34

Merged
Oyinkans0la12 merged 1 commit into
mainfrom
feat/soroban-vault
Nov 27, 2026
Merged

Oyinkans0la12 merged 1 commit into
mainfrom
feat/soroban-vault

Conversation

@Oyinkans0la12

Copy link
Copy Markdown
Collaborator

What

Closes the gap that made this repo look like a TypeScript wrapper around an unverifiable deployed artifact: the on-chain half now lives here.

  • New Rust workspace + contracts/vault/ — a Soroban splitstream-vault (soroban-sdk 29.0.1) with initialize, deposit, post_cycle_root, challenge_and_replace_root, credit_claim, withdraw, and views get_cycle_info, get_latest_cycle, get_balance, has_claimed, get_total_credited. CycleInfo keeps the shape parseCycleInfo decodes, so the relay is unchanged.
  • Cross-language Merkle pinning — Rust tests assert the same golden leaves/roots as test/fixtures/merkle.golden.json.
  • CI contract job — fmt, tests, clippy -D warnings, and stellar contract build (stellar-cli 30.0.1, wasm32v1-none).
  • Relay: verifyPostedCycle() reads get_cycle_info back after posting and fails on root/total mismatch; ledgerCloseTime() now parses the RPC's unix-seconds string (was an Invalid Date).
  • SDK @stellar/stellar-sdk 17.0.1 → ^17.4.0 (old pin couldn't parse the current ledger header).
  • Docs updated; change.md records the full change set.

Verification

Check Result
cargo test --workspace --all-targets 15 passed
cargo fmt --all -- --check / cargo clippy … -D warnings clean
stellar contract build --package splitstream-vault 12,101-byte wasm, 11 exports
npm run typecheck / npm test / npm run check clean / 84 passed, 3 gated skips / passed
Live testnet read-only suite 20 passed, 1 skip

Deployed and initialized on testnet at CBW35L2YQUIPK32XZKT2DJLXU3YNI7KRAFV5WWPR7VF6GUUEINI3ABDN (throwaway admin key, not in the repo; empty vault). The state-changing relay path was proven on a separate throwaway instance and read back on-chain.

Notes

The relay drove a contract that lived in a sibling repository, so the repo
had no reviewable on-chain code. Add a compatible splitstream-vault contract
with the Merkle claim path, pin the shared golden fixture in Rust, build the
wasm in CI, and verify posted roots by reading the cycle back on-chain.

Also fix ledger close time parsing for the SDK's unix-seconds string, and
record that the required `npm run check` status check name is already correct.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@Oyinkans0la12
Oyinkans0la12 merged commit 585c27c into main Nov 27, 2026
2 checks passed
@Oyinkans0la12
Oyinkans0la12 deleted the feat/soroban-vault branch November 28, 2026 12:01
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