Skip to content

feat: solver anti-griefing controls, AsyncAPI v1 WS protocol, Redis-backed replay (#453, #456, #457) - #579

Merged
NanaKhadija1980j merged 5 commits into
stellar-vortex-protocol:mainfrom
Demilade10:feat/453-457-redo
Oct 2, 2026
Merged

NanaKhadija1980j merged 5 commits into
stellar-vortex-protocol:mainfrom
Demilade10:feat/453-457-redo

Conversation

@Demilade10

@Demilade10 Demilade10 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #453
Closes #456
Closes #457

Demilade10 and others added 5 commits October 1, 2026 14:05
…x-protocol#453)

- SolverGriefingService: rolling unfilled-accept ratio per solver over
  configurable time window (GRIEFING_WINDOW_SECONDS, default 1h)
- Escalating state machine: ok -> cooldown -> reduced-concurrency -> suspended
  driven by configurable ratio thresholds
- Enforced at accept time in IntentsController.accept before acceptIfOpen write
- recordUnfilled wired into IntentsSweeperService.slashMissedFill
- Incident exclusion: operators can exclude network-outage intents from ratio
- Manual reset endpoint: DELETE /api/v1/admin/griefing/:address
- Audit/reputation log with per-solver and global query
- Metrics: griefing_state_transitions_total, griefing_unfilled_ratio,
  griefing_enforced_solvers added to MetricsService
- SolverGriefingController at /api/v1/admin/griefing (admin-guarded)
- Canary solvers exempt from enforcement counters
- 19 unit tests in solver-griefing.service.spec.ts (all passing)
- sweeper specs updated for new optional griefingService constructor arg
…riteria

Criterion 2 - reputation impact:
- Add GRIEFING_REPUTATION_MULTIPLIERS (ok=1.0, cooldown=0.8,
  reduced-concurrency=0.5, suspended=0.0) to solver-griefing.types.ts
- Add applyGriefingPenalty() pure function
- Apply penalty in SolversController.getLeaderboard and getSolverStats
- leaderboard/stats responses now include griefingState field
- Suspended solvers always rank last regardless of historical fill rate

Criterion 3 - per-solver metrics fully wired:
- SolverGriefingService.setMetrics() called from SolversModule.onModuleInit
- transitionState emits recordGriefingTransition, setGriefingEnforcementState,
  setGriefingConcurrencyLimit, setGriefingEnforcedCount on every state change
- recordUnfilled emits setGriefingRatio after each unfilled event
- MetricsService: add griefing_enforcement_state{solver,state} gauge and
  griefing_concurrency_limit{solver} gauge (previously only declared, not
  initialised or called)

Tests: 33 tests in solver-griefing.service.spec.ts (14 new), all passing
@NanaKhadija1980j
NanaKhadija1980j merged commit 251878d into stellar-vortex-protocol:main Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants