Skip to content

Added packet manipulation dupe glitches fixes#22

Open
GrapJeje wants to merge 1 commit intoKittehDev:masterfrom
GrapJeje:master
Open

Added packet manipulation dupe glitches fixes#22
GrapJeje wants to merge 1 commit intoKittehDev:masterfrom
GrapJeje:master

Conversation

@GrapJeje
Copy link

Async Vault Saving with Anti-Dupe Protection

Problem:

  • Vault saves block main thread (server lag)
  • Race conditions cause data corruption
  • Players can exploit packet manipulation to dupe items
  • No verification after writes

Solution
Implement async saves with per-player locking and anti-dupe validation.

Changes

  • Async Saves - File I/O in background thread pool (zero lag)
  • Per-Player Locks - Only one save per player at a time
  • Atomic Writes - Temp file + rename (no corruption on crash)
  • Verification - Reload and validate after save
  • Anti-Dupe Checks - Block saves < 500ms, validate item amounts

Result

  • ✅ Zero server lag during saves
  • ✅ No data corruption from concurrent writes
  • ✅ Packet duping exploits blocked
  • ✅ Fully backwards compatible

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.

1 participant