Skip to content

UnityChain#124

Open
Blaqkenny wants to merge 3 commits into
UnityChainxx:mainfrom
Blaqkenny:main
Open

UnityChain#124
Blaqkenny wants to merge 3 commits into
UnityChainxx:mainfrom
Blaqkenny:main

Conversation

@Blaqkenny

@Blaqkenny Blaqkenny commented Jul 24, 2026

Copy link
Copy Markdown

Closes #107
Closes #106
Closes #104
Closes #108

Summary

Changes

Testing

Related Issues

Blaqkenny and others added 3 commits July 24, 2026 13:30
…yChainxx#107)

Backend
- New @global CacheModule backed by Redis (lazyConnect, no offline queue)
  with CacheService.getOrSet() and in-process single-flight coalescing.
  Reads missing or stale fall through to the loader; Redis read/write
  errors degrade to direct DB calls without throwing.
- StreakService.getLeaderboard caches via CacheService (60s + 0-10s jitter).
  AnalyticsService.getMostSolvedPuzzles caches via CacheService
  (5min + 0-15s jitter) and eagerly invalidates on recordPuzzleSolve().
- AnalyticsService.recordPuzzleSolve() fires-and-forgets invalidation
  of the most-solved keys so writes become visible immediately instead
  of after the 5min TTL (UnityChainxx#107).
- CacheService takes an @optional DI parameter so existing manual-DI
  unit tests stay green and the service gracefully no-ops without Redis.
- New scripts/bench-mint.ts: concurrency-controlled latency benchmarker
  for POST /nft-claim/claim with p50/p95/p99/min/max/mean output. Ship
  with npm run bench:mint / bench:mint:json (UnityChainxx#108).
- CacheService.spec.ts: 7 cases (single-flight, error propagation,
  Redis-down read fallthrough, write-fallthrough, corrupt-cache,
  invalidate tolerances, in-flight drain).
- AnalyticsService.spec.ts now supplies a no-op CacheService for Nest DI.

Frontend
- New NftGalleryVirtualized component: windowed gallery that only mounts
  rows in the viewport via absolute-positioned row containers + a
  ResizeObserver. No new runtime dependencies. Fires onReachEnd()
  paginated hook for infinite scroll (UnityChainxx#104).
- useGameStore persists only a 50-item lightweight index (metadata
  stripped) and re-fetches the first page on rehydrate so cards render
  with full payloads after a refresh. Wraps localStorage in defensive
  try/catch so quota-exceeded drops the NFT index instead of crashing
  hydration (UnityChainxx#104).
- next.config.mjs: experimental.optimizePackageImports list for
  lucide-react / date-fns / lodash(-es) / ramda so unused icons/imports
  are eliminated at build time (UnityChainxx#106).

Refs UnityChainxx#107 UnityChainxx#104 UnityChainxx#106 UnityChainxx#108.
feat(perf): Redis cache + single-flight, virtualised gallery, mint-latency bench (UnityChainxx#107 UnityChainxx#104 UnityChainxx#106)
Pulls upstream commits (Soroban migration, CI fixes, Cargo.lock commit) into the
fork while preserving our cache/bench perf work (UnityChainxx#107). The single conflict on
frontend/package-lock.json is resolved by keeping our version because our
package.json still pins the @nestjs-modules/ioredis + related deps needed by
CacheModule and the bench-mint script (UnityChainxx#107, UnityChainxx#108).

Resolves the dirty mergeable_state on UnityChainxx/StellarHunts PR UnityChainxx#124.
@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@Blaqkenny 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

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

Labels

None yet

Projects

None yet

1 participant