Skip to content

feat: add dry-run slashing, logger cleanup, and token registry persis… - #350

Open
jiyiola396-pixel wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
jiyiola396-pixel:feat/issue-261-264-fixes
Open

feat: add dry-run slashing, logger cleanup, and token registry persis…#350
jiyiola396-pixel wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
jiyiola396-pixel:feat/issue-261-264-fixes

Conversation

@jiyiola396-pixel

Copy link
Copy Markdown

Summary

This PR delivers the core on-chain enforcement and observability work needed for the current rollout:

  • real solver slashing submission path with dry-run guard
  • shared Winston logger replacement in the on-chain and sweeper services
  • stale-chain reconciliation backstop for event ingestion
  • persistence-backed token registry with in-memory fallback

What changed

Solver slashing

  • SolverRegistryService.slashSolver() now simulates, then submits the slash transaction when the dry-run flag is off.
  • The dry-run flag is configured centrally in app config and validated as part of runtime configuration.
  • Broadcast/network failures are captured as structured SlashResult responses instead of bubbling as exceptions.
  • The sweeper still preserves its non-throwing behavior for bad records during deadline enforcement.

Logging cleanup

  • Replaced raw console.* calls with the shared Winston logger in the Soroban event-ingestion and sweeper paths.
  • Preserved the existing prefixed service log messages while ensuring consistent log levels and format.

Chain-state reconciliation

  • EventIngestionService now tracks last-known intent update times and logs stale intent conditions.
  • It includes a reconciliation poll backstop for stale intents so delayed or dropped events do not leave the local cache permanently stale.

Token registry persistence

  • Added repository interfaces and concrete in-memory / Prisma implementations for tokens.
  • Wired the registry into TokensService so the app uses a repository-backed source of truth with an in-memory fallback when persistence is not enabled.
  • Updated the seed script to include token registry seed rows.

Why

This closes the main gap between the documented on-chain slash behavior and the actual implementation, while also making the relevant services conform to the repo’s shared logging standard and adding a safety net for stale chain state.

Scope / Risk

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@jiyiola396-pixel 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