Skip to content

Fix config assets and payment rate limiting#61

Merged
Manuel1234477 merged 2 commits into
StellarGateLabs:mainfrom
Tomoya0k:fix-config-assets-rate-limit
Jun 26, 2026
Merged

Fix config assets and payment rate limiting#61
Manuel1234477 merged 2 commits into
StellarGateLabs:mainfrom
Tomoya0k:fix-config-assets-rate-limit

Conversation

@Tomoya0k

@Tomoya0k Tomoya0k commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix Horizon payment reconciliation to use accepted_assets instead of the removed usdc_issuer config field.
  • Keep Config's manual Debug implementation so secrets remain redacted.
  • Add RATE_LIMIT_REQUESTS_PER_SEC config support and wire rate limiting for POST /payments.
  • Use Axum ConnectInfo for real client IPs, with x-forwarded-for / x-real-ip as fallback.
  • Add API coverage for 429 rate_limit_exceeded.

Validation

  • cargo check
  • cargo test

Notes

Cargo.lock was updated to include governor and its transitive dependencies, matching the existing Cargo.toml dependency.

Merge Update

  • Merged upstream/main into this branch.
  • Kept the upstream merchant auth, API keys, shutdown coordination, migrations, and config validation changes.
  • Preserved the branch-specific rate limiting refinement:
    • RateLimitState scoped to the router
    • POST /payments only
    • ConnectInfo IP first, then x-forwarded-for / x-real-ip fallback
  • Re-ran the full test suite after merge.

@GBOYEE

GBOYEE commented Jun 24, 2026

Copy link
Copy Markdown

I'd like to work on this.

Approach:

  • I'll add the CI config and test it locally before pushing
  • Verify with existing tests + add new ones if needed

Estimated effort: ~1-2 hours. PR incoming shortly.

@Manuel1234477 Manuel1234477 merged commit 205e8b3 into StellarGateLabs:main Jun 26, 2026
3 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.

3 participants