PodBrowser
Ethereum Foundation

How To Hallucinate A Server by gubsheep | Devcon SEA

Monday, 27 January 2025 · 3 min read · Listen to the episode ↗

In this episode, Gub Sheep discusses Hallucinated Servers utilized in the Frog Zone game, highlighting its decentralized architecture and reliance on Fully Homomorphic Encryption (FHE) for securing player actions and game states. Insights on multi-party computation emphasize security, privacy, and interoperability within blockchain technologies. Additionally, the concept of a "cryptomata" is explored, posing philosophical questions about autonomy in encrypted environments and its implications for AI and smart contracts.

Gub Sheep, co-founder of 0xpark, introduces Hallucinated Servers through the innovative Frog Zone game, a four-player experience on a 32x32 grid where players control frogs to reach an ice biome and defeat a dragon within five minutes. The game features a fog of war mechanic, limiting visibility, and has a compact game state size of about 150 bytes. Development involved collaboration from Gauss Labs, Xerox PARC, and PSE, utilizing React and Phaser for the front end and around 500 lines of C++ for the back end. A key innovation is the game's operation within Fully Homomorphic Encryption (FHE), encrypting all game states and player actions, marking a significant advancement for multi-user applications.

The discussion contrasts traditional server deployment with a decentralized approach using programmable cryptography, where participants store cryptographic shards of the overall state. Technologies like multi-party computation and FHE simulate a virtual machine, raising questions about digital services as distributed computations, focusing on security, privacy, and interoperability. The game currently runs on nine machines, including MacBooks and AWS, with operational costs around $200 per hour.

Players send encrypted requests to servers, each maintaining a fully encrypted game state. The need for five servers arises from high operational costs, distributing the load for player actions. No single player has the complete decryption key; each client holds a shard, requiring coordination for decryption. Servers perform deterministic operations on encrypted data, acting as computation delegates without accessing secret data.

Despite the potential for local computations, performance limitations necessitate additional computational power. The speaker plans to share techniques for operating the game within these constraints, referencing early game development and projects like Dark Forest. Key challenges include managing a 200-byte plaintext state, a billion times computation overhead, and ensuring player actions execute within a second. The FHE circuit processes the game state and checks movement restrictions efficiently.

Technical aspects of game mechanics are discussed, including hit points representation, monster movement, and randomness. Hit points for players and monsters are encoded in a uniform 32-bit structure. Monster movement is managed by four autonomous frogs within a fog of war, optimizing performance based on monster types. Players generate local randomness, which is encrypted and sent to the server, maintaining a global random state for NPC actions. The current game state is described as slow and brittle, with aspirations for improved performance through increased server capacity and enhanced FHE protocols.

The limitations of FHE are noted, particularly its inefficiency in handling state transitions compared to modern programming models. Ongoing theoretical work aims to align FHE and Multi-Party Computation (MPC) protocols with conventional programming. Challenges include decryption issues among parties and the need for verifiability in computations, emphasizing that machines executing FHE should not learn about the computations they perform.

Philosophical questions about autonomy in encrypted environments are raised, drawing parallels to blockchains and smart contracts. The potential of running an AGI within this framework leads to the concept of a "cryptomata," a self-sovereign program with perfect obfuscation. The podcast concludes with an invitation for audience questions and mentions of the project's contributors.

This summary was generated from the episode transcript and can contain mistakes.