<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Joel Boutros on Medium]]></title>
        <description><![CDATA[Stories by Joel Boutros on Medium]]></description>
        <link>https://medium.com/@jdb_2817?source=rss-af4b76578c1a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*v0l7RiQu2jStFq5q</url>
            <title>Stories by Joel Boutros on Medium</title>
            <link>https://medium.com/@jdb_2817?source=rss-af4b76578c1a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 13:25:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jdb_2817/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing ChainTail, a Streams Processor for Blockchain Transactions]]></title>
            <link>https://blog.milliononmars.com/introducing-chaintail-a-streams-processor-for-blockchain-transactions-70f71643aa07?source=rss-af4b76578c1a------2</link>
            <guid isPermaLink="false">https://medium.com/p/70f71643aa07</guid>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[playtoearn]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[gaming]]></category>
            <dc:creator><![CDATA[Joel Boutros]]></dc:creator>
            <pubDate>Thu, 17 Feb 2022 22:05:19 GMT</pubDate>
            <atom:updated>2022-02-17T22:08:27.685Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="/service/mailto:jdb@milliononmars.com">Joel Boutros</a>, Principal Architect &amp; Founder at Million on Mars</p><p>We founded Million on Mars to bring Mars to the masses, to engage people with our celestial neighbor, and to have fun doing it. And to engage with Mars, you have to be quick, scrappy, and effective. That’s how we like to think of ourselves at Million on Mars.</p><p>We’ve developed a tool within Million on Mars that we feel exemplifies those traits: something we were able to put together quickly, that serves our needs without trying to do too much, and, simply, a tool that works for us. It’s <strong>Chaintail</strong>, our software for monitoring blockchain transactions for “interesting” events, distributing them to internal services.</p><h3>Fast and Reliable Blockchain Stream Processing in the Metaverse</h3><p>Million on Mars believes strongly in ensuring players have solid and clear ownership of the lands and items they build within the Mars Metaverse. Much of our gameplay is virtualized, which allows us to move swiftly, but the blockchain is the record of truth when it comes to asset ownership. If a player buys a plot, Artifact, Founders’ Token, or any game asset, we want to ensure that it’s recognized quickly and reliably, and players can put them to use when they want to.</p><p>The blockchain also serves as a critical source of data, as it documents revenue and other important transaction data. To that end, it’s essential to record the history into separate databases.</p><p>Our game is running on top of the Wax blockchain, an EOS chain. We quickly identified<a href="https://github.com/EOSChronicleProject/eos-chronicle"> eos-chronicle</a> and<a href="https://github.com/EOSChronicleProject/chronicle-consumer-npm"> chronicle-consumer-npm</a>, a pair of excellent open-source packages from cc32d9, as core to our solution. A solution where chronicle listens to the blocks from an EOS chain and delivers them to a web socket service, chronicle-consumer, a NPM package that then dispatches those transactions to our code.</p><h3>Sidecarring the Metaverse</h3><p>Million on Mars is a modern web application, relying on Serverless functions to handle all aspects of gameplay. While this allows our game to scale automatically (literally, without us noticing), it also means that we don’t have an easy way to run long-lived processes like a websocket service internally to the game. We knew early that this meant it couldn’t be directly integrated into the game code — we’d need a sidecar service.</p><p>Million on Mars makes a second game — a more-traditional MMO using Unity and a game-focused backend. A game backend is a complicated thing, and burdening it with blockchain handling code isn’t exactly anyone’s first choice. Here’s where the concept of Chaintail came into play, the potential of a foundation shared across several products.</p><h3>Enter Chaintail</h3><p>With those design goals in mind, we settled on something that would listen to the chain using chronicle, digest the messages into useful summaries, and distribute it to downstream services.</p><p>Each of our products uses it differently, but all are interested in roughly the same information: what happens to an asset over its life, from mint to burn? Those assets might be tokens, like our DUSK game currency, or NFTs like a Land Deed or Blueprint. Chaintail turns these blockchain actions into their own records and transmits them in an envelope. Most chain-specific details are discarded — we have an immutable blockchain that stores this data if we need it — leaving a clear, simple record of lifecycle events. Mint, transfer, burn.</p><h3>Handling Long-Turnaround User Experience</h3><p>Blockchain development comes with new perspectives and challenges for ‘old web’ developers. Chain transactions take time to complete or may not complete at all. This either means working with transactions that may be later repealed, or minutes’ delays waiting for irreversibility, resulting in a significant shift in user experience.</p><p>To better message this, each transaction submitted should have a corresponding completion event from Chaintail. This translates to a database record per transaction in our code: as the player initiates an action, we create a <em>pending</em> transaction record. Once Chaintail confirms it, we mark it completed. If we receive a transaction that’s already completed, we won’t re-process it.</p><p>With records of pending and completed transactions, we can build a user interface for players, letting them know what’s coming, what’s already received, and what game assets they received for a transaction.</p><p>Another shift in perspective is error handling, developers should assume that blockchain transactions are only delivered once. If an error occurs in processing, they’re likely lost. Chaintail will exit if the target webhook throws errors, which will cause chronicle to exit. If services automatically restart, they’ll attempt redelivery, which may result in more errors. Depending on how services are managed, chronicle may restart from scratch, re-sending transactions that it’s already delivered from an older block number. The downstream services need to be designed to anticipate these possibilities — either suppressing errors or ensuring replays of old data won’t cause issues.</p><p>Additionally, care must be taken to understand the consequences of lost transactions. Developers may consider recording transactions into durable queues. We plan to add support for publishing to pubsub topics to Chaintail in the future as we expand our downstream services.</p><h3>Chaintail, Versatility in a NFT World</h3><p>We’ve already integrated Chaintail into the game, where it’s handling burns of NFTs for game deposits, mint monitoring, and ownership transfer events. Chaintail delivers event bundles in an envelope to a webhook endpoint exposed by the game backend and processed similarly to other game calls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/0*1iavDwcU0CpVHcQv" /></figure><p>We’ve already integrated Chaintail into the game, where it’s handling burns of NFTs for game deposits, mint monitoring, and ownership transfer events. Chaintail delivers event bundles in an envelope to a webhook endpoint exposed by the game backend and processed similarly to other game calls.</p><p>We plan to monitor players listing an NFT for sale and display that information in-game: potential buyers can link to marketplaces, and sellers can be reminded that installing or destroying a building will affect its value for the listing.</p><p>As part of our handling of multi-account players and bot networks, we’ve also begun experimenting with monitoring blockchain transactions for outlier patterns. We hope to return with more on this topic in future posts!</p><h3>The Future</h3><p>Part of being scrappy is understanding what compromises you can make. Given the circumstances, Chaintail was initially written as an internal tool. But with the vast number of uses within Million on Mars, we expect others would find Chaintail and its downstream services useful. We’ve even read discussions between players of monitoring the chain for interesting market listings and watching for updated game metadata as a way of gaining alpha — it turns out, our players could use Chaintail too.</p><p>We plan to release Chaintail as open-source under an MIT license soon. If you’d like to experiment with it under early access, given some company-specific nuances to work around, reach out to us. We’re happy to share in this new space.</p><p>Ready to play <strong>Million on Mars</strong>?</p><p>Check us out! <a href="https://milliononmars.com/">https://milliononmars.com</a><br><strong>Join our Discord</strong> at <a href="https://milliononmars.com/discord">https://milliononmars.com/discord</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70f71643aa07" width="1" height="1" alt=""><hr><p><a href="https://blog.milliononmars.com/introducing-chaintail-a-streams-processor-for-blockchain-transactions-70f71643aa07">Introducing ChainTail, a Streams Processor for Blockchain Transactions</a> was originally published in <a href="https://blog.milliononmars.com/">Million on Mars</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>