Managing Private State in Midnight: Patterns, Pitfalls, and Best Practices One of the most common points of confusion for developers new to Midnight is the distinction between private and public state. On EVM chains, the distinction is simple: everything in contract storage is public, and anything you want "private" requires off-chain infrastructure (encrypted APIs, TEEs, etc.). On Midnight, pri