Namespace FishMMO.Server
Namespaces
Classes
- AccountCreationPuzzle
Opaque puzzle payload exchanged with the client.
- NullAccountCreationPuzzleProvider
No-op default that always issues a zero-difficulty puzzle and accepts any solution. Kept so the production pipeline can be wired in without touching call sites.
Interfaces
- IAccountCreationPuzzleProvider
Scaffold interface for client-side proof-of-work (PoW) puzzles issued during account creation. The global hourly cap (
maxGlobalAccountCreationsPerHour) absorbs the impact of registration floods, but spending the budget still costs the server real database I/O. A small PoW puzzle (e.g. a SHA-256 difficulty challenge) shifts the cost asymmetry: an attacker pays CPU per attempt while a legitimate user pays only milliseconds.The intended production implementation:
- Server issues a (challenge, difficulty) tuple bound to the handshake nonce and connection,
- Client solves and returns a nonce such that H(challenge || nonce) has the required leading zero bits,
- Server verifies in <1ms and proceeds with account creation.
The puzzle MUST be bound to the connection / handshake to prevent pre-mining a stockpile of valid solutions. Difficulty is increased dynamically when the global cap is approaching saturation.