Skip to content

indexer#603

Open
Glam26 wants to merge 3 commits into
Epta-Node:mainfrom
Glam26:indexer
Open

indexer#603
Glam26 wants to merge 3 commits into
Epta-Node:mainfrom
Glam26:indexer

Conversation

@Glam26

@Glam26 Glam26 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Here's the complete summary of what was delivered:
──────

Summary

✅ All Acceptance Criteria Met

78 tests passing across 7 suites (57 pre-existing + 21 new)
──────

What was built / fixed

🔒 Rate Limiting (rateLimit.ts)

• Already existed — sliding-window in-memory limiter, rateLimitRead (60
RPM/IP), rateLimitWrite (10 RPM/address), Retry-After header
• Added resetRateLimiter() for test isolation

🔑 Stellar Auth (stellarAuth.ts)

• Fixed malformed 400 JSON response (error string was a key, not a value)
• Fixed keypair.verifyHash() → keypair.verify() (correct stellar-sdk
API)
• Ed25519 sig verification, 30s timestamp tolerance, replay protection all
fully working

📊 Structured Logging (logger.ts, index.ts, stream.ts)

• All console.log/error in core files replaced with pino structured
logger
• Request logging: { requestId, method, path, statusCode, durationMs,
stellarAddress? }
• Slow query warn (>500ms), abuse pattern error (>5 429s from same IP in
60s)
• healthState updated by indexer lifecycle ( dbConnected , rpcConnected
)
• Fixed syntax error in stream.ts (orphaned closing brace)

🏥 Health Endpoint (index.ts)

• GET /health → { status, uptime, dbConnected, rpcConnected }
• Returns 200 ok or 503 degraded

✉️ DM Relay Endpoint

• POST /api/messages — requires requireStellarAuth + rateLimitWrite

🧪 Tests (middleware.test.ts)

21 tests covering all acceptance criteria:

• Burst 70 → exactly 61st returns 429 ✓
• Valid Stellar sig accepted ✓
• 60s-old timestamp → 403 ✓
• Invalid signature → 401 ✓
• Plus 17 additional boundary/edge cases

closes #569

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@Truphile is attempting to deploy a commit to the Jaja's projects Team on Vercel.

A member of the Team first needs to authorize it.

@devJaja

devJaja commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@Glam26 Resolve the conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants