Skip to content

feat(api): budget sponsorship in self-hosted deployments too - #2582

Closed
multipletwigs wants to merge 4 commits into
chore/sponsorship-budget-drop-organization-scopefrom
chore/sponsorship-budget-self-hosted
Closed

multipletwigs wants to merge 4 commits into
chore/sponsorship-budget-drop-organization-scopefrom
chore/sponsorship-budget-self-hosted

Conversation

@multipletwigs

Copy link
Copy Markdown
Collaborator

Stacked on #2580. Self-hosted deployments now sponsor through the same budget as managed SDP: createSponsorshipFeePayment always returns BudgetedFeePayment.

  • Removes the self-hosted bypass from feat: enforce dynamic Kora sponsorship budgets #1060 (withOwnedSubmissionLifecycle), so self-hosted operators get the per-project and global caps, breaker and reconciliation by default, and local runs exercise the production path without KMS.
  • Nothing new to configure: Redis and Kora's RPC (KORA_<CLUSTER>_RPC_URL) were already required at boot in every mode.
  • Money admission and sponsor-byte integrity still run: the budgeted sponsor performs both, so the 9 self-hosted-only cases that covered them are deleted.

Verification: typecheck 28/28, biome clean. Against the local self_hosted stack with devnet Kora, a sponsored transfer reserved the worst case (9,910,000 lamports) against global and project:<id> and settled to the actual 10,000. A 1,000-lamport project cap refused and released; a missing project row refused only that project with the breaker closed; kill refused and resume restored. Vitest not run locally.

Known gap, not changed here: a budget refusal on POST /v1/payments/transfers surfaces as 502 SOLANA_RPC_ERROR with the internal message, because mapTransferExecutionError only passes AppError through.

@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sdp-docs Ready Ready Preview Oct 27, 2026 3:33pm UTC
sdp-web Ready Ready Preview Oct 27, 2026 3:33pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge, with no new blocking issues found.

Summary

Self-hosted sponsorship now uses BudgetedFeePayment, matching managed deployments.

  • Self-hosted sponsored transactions now use the project budget.
  • Local test setup cleans up budget reservations and uses a lower Kora limit.

No new actionable issues were found in the changes since the previous review. multipletwigs manually resolved the earlier test-coverage thread without an explanatory reply.

Reviews (4) · Last reviewed commit: "test(web): clear sponsorship reservation..." · Reviewed by Greptile

Comment thread apps/sdp-api/src/services/sponsorship.service.node.test.ts
createSponsorshipFeePayment always returns the budgeted fee payment, so
self-hosted operators get the same per-project and global caps, breaker and
reconciliation as managed SDP, and local runs exercise the production path.
Redis and Kora's RPC were already required at boot in every mode.
… the Surfpool shim

The shim advertised 10,000,000 lamports while infra/kora/kora.toml allows 9,900,000. With self-hosted runs now budgeted, the worst-case reservation (network fee plus max_allowed_lamports) exceeded the sandbox per-transaction cap and every sponsored call returned 429.
…organizations

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhoeJoQRZxzdNUMVTZXeoU
@github-actions

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 3108810.

@multipletwigs

Copy link
Copy Markdown
Collaborator Author

backoffice solves this

This branch was successfully deployed

2 active deployments
Preview – sdp-web — 31088100 Deployed Oct 27, 2026 by vercel[bot]
Preview – sdp-docs — 31088100 Deployed Oct 27, 2026 by vercel[bot]
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