Skip to content

feat: implement Soroban RPC contract calls and appeal process#45

Merged
soomtochukwu merged 1 commit into
DXmakers:mainfrom
playground-ogazboiz:feat/backend-rpc-and-appeals
Mar 26, 2026
Merged

feat: implement Soroban RPC contract calls and appeal process#45
soomtochukwu merged 1 commit into
DXmakers:mainfrom
playground-ogazboiz:feat/backend-rpc-and-appeals

Conversation

@ogazboiz
Copy link
Copy Markdown
Contributor

Summary

Soroban RPC Contract Calls (#5)

  • Replace stubbed StellarService with full implementation
  • Build InvokeHostFunction XDR transactions using stellar-xdr
  • Fetch sequence numbers from Horizon, sign with Ed25519 keypair
  • Submit via Soroban RPC sendTransaction, poll getTransaction
  • Retry once on sequence number collision
  • Methods: release_milestone, open_dispute, resolve_dispute

Appeal Process (#10)

  • POST /disputes/:id/appeal — create appeal for disputes with budget > 1000 USDC
  • Returns 400 if dispute below threshold
  • POST /appeals/:id/vote — arbiter voting
  • 3-of-5 arbiter quorum closes appeal and overrides AI judge verdict
  • DB migration for appeals, arbiter_votes, arbiters tables

Closes #5
Closes #10

Test plan

  • cargo clippy -p backend -- -D warnings — clean
  • CI: lint-backend and test-backend jobs pass
  • Testnet: release_milestone submits real tx and returns valid hash
  • Appeal returns 400 for low-value disputes
  • 3-of-5 vote closes appeal and updates verdict

Soroban RPC (DXmakers#5):
- Build InvokeHostFunction transactions with stellar-xdr
- Fetch sequence numbers from Horizon before signing
- Submit via sendTransaction, poll getTransaction until confirmed
- Retry once on sequence number collision
- Implement release_milestone, open_dispute, resolve_dispute
- Ed25519 signing with JUDGE_AUTHORITY_SECRET keypair

Appeal Process (DXmakers#10):
- POST /disputes/:id/appeal — threshold check (budget > 1000 USDC)
- Returns 400 for low-value disputes
- 3-of-5 arbiter voting via POST /appeals/:id/vote
- Final verdict overrides AI judge decision
- DB migration for appeals, arbiter_votes, arbiters tables

Closes DXmakers#5
Closes DXmakers#10
@ogazboiz ogazboiz requested a review from soomtochukwu as a code owner March 26, 2026 23:06
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Mar 26, 2026

@ogazboiz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@soomtochukwu soomtochukwu merged commit 9cf9200 into DXmakers:main Mar 26, 2026
5 checks passed
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.

Appeal Process for Large Disputes Soroban RPC Contract Calls (Backend)

2 participants