All posts
cover image
Introducing Quarry: A modern computing environment for your World
4 days ago By
Lattice

“But can it run Doom?” is a well-known rallying cry in the computing world, which has spawned efforts to put the open-source first-person-shooter on everything from old Macs, to Pelotons, to tractors. Up until now, blockchains have largely fallen short of this achievement, which serves as an unofficial benchmark for the sophistication of a piece of hardware.

We’re proud to announce that we put Doom onchain, with just 7 milliseconds of latency. And we’re releasing the tech behind the feat to an alpha-tester group (with a full release coming in early 2025), so you can build ultra-fast applications onchain too. Quarry, our new infrastructure that powers this tech, is a full suite of offerings from Lattice that enables MUD applications to run in real-time at scale.

DOOM running fully onchain on a Quarry-enabled EVM chain

At Lattice, we believe the Ethereum Virtual Machine can one day be the World Computer, not just the world’s financial computer — an open, accessible network that plays host to emergent behavior and eventually Autonomous Worlds. The software we build reflects this belief. With MUD, we built an operating system for applications on the EVM that enables developers to build with a familiar data model and automatic indexer, greatly simplifying the development process, encouraging third-party development, and leaning into the EVM’s natural support of composability. With Redstone, we built a super-low cost Layer Two, which uses an Alt-DA protocol built by Lattice and upstreamed to the OP Stack. Teams like CCP Games (EVE Frontier), Biomes, and more use Redstone and MUD to build Autonomous Worlds and push the frontier of EVM applications.

However, we need to go further in realizing this vision of Autonomous Worlds. While MUD and Redstone go far in pushing the limits of the EVM, we know there are more ways to equip your application with superior latency, onboarding, scalability, and affordability.

Today, we’re introducing Quarry, a modern computing environment for Worlds, and a complement to MUD and Redstone. Quarry augments EVM chains to run worlds in their ideal environment.

Quarry gives you four key provisions:

  • Latency: Slow blocktimes are a fundamental limitation of building games and worlds onchain. With Quarry, users receive the result of their transactions (or ERC-4337 User Operations) in as little as 7 milliseconds. These results are not optimistic updates that could be rolled back, but rather they have the same finality guarantees as any L2 block. And unlike optimistic updates, users not only receive the MUD state updates of their own transaction in as little as 7ms, but the MUD state updates of all transactions on the chain.
  • Onboarding: Onboarding to onchain apps is one of the biggest frictions for users. With MUD we have the foundation for great onboarding: the account delegation primitive allows users to grant a session wallet selected permissions for the duration of a game session, eliminating the need to approve every single transaction. But there is still the remaining friction of account creation for new users and of paying for gas on a new chain, which previously required bridging. Quarry solves both of these challenges with passkey-based smart accounts and with the Quarry Paymaster, enabling seamless onboarding. With a deep integration of ERC-4337 into the block builder, Quarry achieves the 7ms latency even with the overhead of account abstraction.
  • Scalability: As Worlds grow, they will eventually outgrow even the most powerful chains. At that point, Worlds need to be able to scale horizontally across multiple chains. Our next frontier in 2025 will be seamless multi-chain Worlds, by deeply integrating MUD with Optimism’s upcoming OP Stack interoperability protocol. With MUD and Quarry, developers will experience infinite horizontal scalability with the developer experience of building on a single chain.
  • Affordability: To make onchain worlds come alive, we don’t want to be held back by the cost of executing transactions. That’s why we worked closely with Optimism to develop Alt-DA and Plasma mode for the OP Stack (and upstreamed it so it can now be used by other Alt-DA layers like Celestia). Quarry leverages the affordability introduced by Alt-DA mode and productionized with Redstone, our Layer Two for Autonomous Worlds. Learn more about Redstone and Alt-DA Mode it here.

We achieve all of this with a custom block builder network for faster transaction speeds, ultra low-latency APIs to read MUD state for the fastest possible indexing experience, account abstraction for smooth user onboarding, and multi-region bare metal edge deployments. We built our stack using the best possible Rust-based infrastructure: we use Reth for our block builder and collaborated with Index Supply for indexing.

To get more granular, let’s explore some of the product offerings of Quarry.

A quarry roundtrip touching every part of the stack

Wiresaw → An Ultra Low Latency Block Builder

Quarry is fast: we’re talking 7ms fast. We achieved this with Wiresaw, a custom block builder. Unlike the default approach to block building, where transactions land in a mempool and the sequencer picks the highest paying transactions at the end of the block interval, Wiresaw inserts incoming transactions to a pending block and commits to their ordering in a first-come, first-serve model. At the end of the block interval, the sequencer finalizes the block built by Wiresaw and inserts it into the chain.

This approach allows Wiresaw to stream MUD state updates of each incoming transactions to all clients immediately. MUD clients receive the state update of anything happening onchain within 7ms (plus two times the speed of light for the network roundtrip).

The Wiresaw block builder operates in a first-come, first-serve model, enabling ultra-low latency

We designed sequencer-native user operations by leveraging ERC-4337. We eliminated additional overheard by adding a simple eth_sendUserOperation RPC endpoint to Wiresaw, which is optimized for maximum performance. This allowed us to achieve 7ms latency, despite the overhead presented by ERC-4337.

Wiresaw builds on top of Reth's powerful execution layer primitives. It extends the default OP Reth's components with a custom payload builder we designed from the ground up to continuously execute transaction batches while sequencing the canonical payloads.

MUD Indexer → Efficient and Flexible State Hydration

MUD comes with an open-source automatic indexer that picks up any state change in a MUD app and allows the client to hydrate. Quarry takes this one step further by providing a hosted version of the indexer with free public endpoints that allow any MUD client to hydrate the state it needs with high performance and zero configuration.

In addition, the Quarry indexer offers a SQL API, built in collaboration with Index Supply, to allow clients to precisely select the state they need and avoid downloading too much data. This indexer also powers the Worlds Explorer, which allows anyone to explore a MUD World’s data and query it with SQL.

Passkey Smart Accounts: One-click account creation

To help worlds onboard new users, we've integrated passkeys. This allows new users to create secure, non-custodial wallets with minimal effort and without needing complex seed phrases or external wallet apps. Under the hood, a passkey-based smart account is automatically created. For existing crypto users, there is also the option to bring their own wallets.

Once connected with a passkey or an existing wallet, one more tap gets you a session account, which allows for frictionless transacting with no wallet popups or bridging funds for gas. This session account acts on behalf of the connected wallet via MUD's account delegation, allowing onchain actions to be associated with connected wallet. And it integrates with a Quarry Paymaster spender policy to spend gas on behalf of your daily gas allowance.

Quarry Paymaster: Gas-less onboarding

For a smooth onboarding experience, we’re providing a Quarry Paymaster, from which users can claim an allowance to cover the gas of thousands of daily onchain actions on a Quarry-enabled chain.

The Quarry Paymaster is ERC-4337 compliant. In addition, any ERC-4337 paymaster is compatible with Quarry and its low-latency block builder.

Quarry and SWI

Quarry leverages MUD's Standard World Interface

Yesterday, we announced the MUD Standard World Interface (SWI), a standardization effort for how MUD Worlds communicate with their peripheral services and execution environments.

MUD Worlds will always work with default Ethereum RPC APIs and don’t need any custom infrastructure. But there are some features, like ultra low latency state updates from a pending block, that require additional APIs.

The Standard World Interface is an ongoing effort to define, document, and maintain these APIs between MUD Worlds and infrastructure implementations. By standardizing MUD APIs, we encourage more infrastructure providers to develop infrastructure for MUD worlds. While Quarry is the first implementation of the MUD SWI, we don’t expect it to be the only one.

Quarry Demos

Our team has had some fun building mini-games that leverage the capabilities of Quarry. Check them out below!

Eat The Fly

Eat or be eaten. Such is the life of a fly zooming around the endless expanse of greenery, where rogue frogs lurk. You can play as a fly or a frog, but beware — the length of your life might be measured in milliseconds (thanks especially to those ultra-fast confirmations of Quarry).

Each move of the fly or frog is an onchain transaction. Onscreen, there are no optimistic updates: the fly/frog updates on the screen when the onchain state update is received to demonstrate the low roundtrip latency of Quarry.

Eat the Fly is optimized for a smooth mobile experience with smooth onboarding via passkeys. Also we doesn’t require the user to bridge funds; thanks to our paymaster, all actions are sponsored by the allowance granted to the user during sign up.

Play Eat The Fly Here

Doom

DOOM running fully onchain on a Quarry-enabled EVM chain

“Can it run Doom” is the ultimate test for any piece of hardware. We are proud to say that Quarry can run Doom — and yes, it’s all onchain. It’s a classic, and we’re using the original Doom codebase (ported to WebAssembly by CloudFlare).

This is a great stress test for Quarry, since it’s also using the original Doom NetCode, which is sending 35 updates per second per player, and the client only proceeds to the next frame when it has received state updates from all players for that frame (which means it would start lagging immediately if one of the players had a high ping).

Every state update is sent as an ERC-4337 user operation onchain and synchronized to the other players via MUD tables. It also uses Quarry onboarding so players can but don’t need to bring an existing wallet, and gas is sponsored.

Watch the full Doom Demo here and play it at Devcon during the MUD Day CLS!

Mineshoot

A lo-fi, high-octane game of first-person shooter Minecraft

We perhaps unwittingly reverse-engineered a very lo-fi version of Fortnite. While the Doom demo above is mostly using the chain to broadcast messages between players with high throughput and low latency, this First Person Shooter implements the entire game logic onchain, including ray casting for shot hit detection and live player position and orientation. As with the prior two examples, we’re also using Quarry’s seamless onboarding solution.

Watch the Mineshoot Demo here

When Can I Start Building?

Quarry will be available on Rhodolite, Redstone’s devnet, starting today. We will be releasing it on Redstone testnet (Garnet) in early 2025 and Redstone mainnet and other chains shortly thereafter. You can join our Alpha Tester group by filling out this form.

To learn more about Quarry and have your questions answered by the Lattice team, come to MUD Day TODAY at the Devcon Venue (Queen Sirikit National Convention Center) in Classroom A.

We’re excited to see what you start building with Quarry!

QuarryQuarry Website | Documentation | Alpha Tester Sign-upDiscord