<?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[StarkWare - Medium]]></title>
        <description><![CDATA[Developing the Full Proof Stack for STARK - Medium]]></description>
        <link>https://medium.com/starkware?source=rss----4f99567ac65a---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>StarkWare - Medium</title>
            <link>https://medium.com/starkware?source=rss----4f99567ac65a---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 19 Apr 2026 08:10:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/starkware" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Stwo Prover: the next-gen of STARK scaling is here]]></title>
            <link>https://medium.com/starkware/stwo-prover-the-next-gen-of-stark-scaling-is-here-f7429e764127?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/f7429e764127</guid>
            <category><![CDATA[zkrollup]]></category>
            <category><![CDATA[starkware]]></category>
            <category><![CDATA[zkstark]]></category>
            <category><![CDATA[ethereum-scaling]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Thu, 29 Feb 2024 23:44:48 GMT</pubDate>
            <atom:updated>2024-02-29T23:44:32.072Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Stwo Prover — Open Source, based on Circle-STARKs" src="https://cdn-images-1.medium.com/max/1024/1*UHYC9FLH0B47vRRXTJn07A.jpeg" /></figure><h4>TL;DR</h4><ul><li>StarkWare is developing a new blazing-fast prover: <strong>Stwo.</strong></li><li>Stwo will implement the groundbreaking Circle STARK, which will unlock the efficient prime field M31.</li><li>Stwo will be open-sourced from day one under Apache 2.0.</li><li>In time, systems benefitting from Stone prover, including public Starknet and Starknet appchains, will benefit from Stwo.</li></ul><h3>Unlocking the next phase of STARKs</h3><p>The next generation of STARK proofs is here! To avoid a barrage of unsolicited information, we’ll go for an overview with some fancy words peppered throughout. We invite you to go link-hopping and window-shopping!</p><h4>High level for non-math folks</h4><p>The future of STARK-scaling is coming. On the theoretical front, joint research with the <a href="https://polygon.technology/">Polygon Labs</a> team culminated in a groundbreaking mathematical innovation: the <a href="https://starkware.co/resource/circle-starks/">Circle STARK protocol</a>. On the applied front, StarkWare is developing a new blazing-fast open-source prover: <strong>Stwo</strong>. Stwo will implement the new Circle STARK protocol alongside various other optimizations. It will unlock the full potential of the extremely efficient prime field M31 for the benefit of everyone in the zk-proof and blockchain spaces.</p><h4>Deep dive for math folks</h4><p>The classical STARK protocol requires an algebraic structure for its constituent steps. Chiefly, it requires a prime field of size p so that p-1 is divisible by a large power of two. Why? To facilitate two core parts of the STARK protocol: FFT and FRI. This is all nice and good, but such a constraint rules out many fields of smaller size that are otherwise very well-suited to efficient computation. Specifically, it rules out the very efficient Mersenne prime field M31 (with p=231–1) because p-1=2(230–1) is not even divisible by 4. Thus we are at an impasse: the classical STARK protocol does not mix with M31.</p><p>Before we proceed, a quick digression. A few years ago, we stumbled upon a similar problem, albeit with a different motivation. We wanted to adapt the STARK protocol for two cryptographic mainstream curves: secp256k1 and secp256r1. Each of these uses a different prime, neither of which satisfies the constraint of the above paragraph. To circumvent this problem, we came up with the <a href="https://arxiv.org/abs/2107.08473">ECFFT paper</a> that uses elliptic curves to provide an alternative source of structure for FFT and FRI. This research detailed machinery for adapting STARKs to pretty much any field you can think of.</p><p>Back to our story. The desire to adapt the classical STARK protocol for M31 led to a fertile collaboration with the Polygon Labs team, culminating in Circle STARK: a compact, elegant protocol that avoids the heavy machinery of ECFFT paper. In a nutshell: when p+1 is divisible by a large power of two, as is the case with M31, the circle curve over the prime field furnishes the structure necessary to adapt both <a href="https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm">FFT</a> and <a href="https://vitalik.eth.limo/general/2017/11/22/starks_part_2.html">FRI</a>. The remaining details — of which there are plenty — are lucidly worked out in <a href="https://eprint.iacr.org/2024/278.pdf">the paper</a>.</p><h3>Next-gen open-source prover: Stwo</h3><p>The shiny new math isn’t just for show though. It comes with a blazing-fast open-source prover that will leverage Circle STARKs, and various other optimizations, to bring unprecedented proving performance.</p><p>What is the name of this mythical creature, you ask? The first generation is St<strong>one</strong>, so the second generation can only be S<strong>two</strong>! (pronounced “Stoo”). Now, what do you get out of it?</p><p>That depends on who you are.</p><p>Users and builders will benefit from next-level scaling. The zk-proof and blockchain spaces will benefit from having an open-source implementation of the most advanced STARK technology! Since the first implementation of STARK-based scaling technology (launched in June 2020 with StarkEx), many protocols have moved to develop STARK-based scaling solutions. Anyone interested in diving into these fascinating fields (pun intended) — whether to learn about or to use STARKs for whatever purpose — will have the best tool at their disposal.</p><p>What about systems that are or will be based on Stone, namely Starknet and appchains that may launch around it? Not a problem. Developers will not be impacted at all because high-level Cairo will be completely compatible with Stwo. When the time comes, and Stwo is ready to be rolled out, the Starknet ecosystem — namely users and developers — will benefit from Stwo’s next level of scaling without having to do anything at all! Stwo will be compatible with high level Cairo code in which contracts are written, and also with <a href="https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/cairo-and-sierra/">Sierra</a>. The Starknet prover(s), currently based on Stone, will employ it. Users/builders/dapps will reap its benefits both in terms of latency and fees.</p><h3>Summary</h3><p>Stwo is the future of scaling! It will leverage the mathematical leap that blew the minds of math lovers — Circle STARKs — to the benefit of the Starknet ecosystem.</p><p>The blazing-fast, open-source Stwo prover will empower Starknet developers with an optimized proving experience on all fronts. And, yes, that will translate into faster and cheaper transactions for users.</p><p>Builders, don’t wait — <a href="https://www.starknet.io/en/developers">start building on Starknet today</a> so you can benefit from the supercharged scalability Stwo will offer once it is available.</p><p>Stwo will be open-sourced from day one under Apache 2.0. Be sure to follow its development <a href="https://github.com/starkware-libs/stwo">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7429e764127" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/stwo-prover-the-next-gen-of-stark-scaling-is-here-f7429e764127">Stwo Prover: the next-gen of STARK scaling is here</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Milestones to Masterstrokes: StarkWare’s Year in Review]]></title>
            <link>https://medium.com/starkware/from-milestones-to-masterstrokes-starkwares-year-in-review-84d890620730?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/84d890620730</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[starkware]]></category>
            <category><![CDATA[scaling]]></category>
            <category><![CDATA[layer-2]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Wed, 27 Dec 2023 12:22:37 GMT</pubDate>
            <atom:updated>2023-12-29T10:52:03.439Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zp5ZZBJ9HjaOj5b2CpoA4g.jpeg" /></figure><h4>STARK-tech as the secret sauce that helps dApps scale and thrive on Ethereum — today and tomorrow.</h4><h3>TL;DR</h3><ul><li>Starknet set the foundations to be the home for complex, computational-hungry, and innovative DeFi platforms, onchain games, dynamic NFTs, and more.</li><li>Starknet continues to have the fastest-growing dev ecosystem among all L2s (and a few L1s).</li><li>StarkWare open-sourced key elements such as Stone Prover, Starknet sequencer, and Papyrus full node in 2023.</li></ul><p>Read on to learn about our highlights and the overall progress of the Starknet ecosystem in 2023.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VI2vLnZ7XWIbkhM-Q6S0Gg.jpeg" /></figure><h3>Decentralization &amp; Community Expansion</h3><ul><li><a href="https://starkware.co/resource/let-the-games-begin-redefining-on-chain-gaming-with-starknet/"><strong>Gaming Boom on Starknet</strong></a></li></ul><p>L1 limitation of scale, UX, and high costs have made creating successful onchain games nearly impossible. But with the maturity of Validity Rollup technology, the promise of onchain games is finally being delivered.</p><p>As a result, the number of projects building fully onchain games on Starknet boomed over the past year. Some examples include <a href="https://www.influenceth.io/">Influence</a>, a grand-strategy MMO set in a distant asteroid belt with a player-owned open economy, <a href="https://starkware.co/resource/trailblazing-the-way-to-building-new-worlds/">Shoshin</a>, a user-programmable fighting game, <a href="https://realms.world/">Realms</a>, a fantasy-strategy game, and <a href="https://loot-survivor.vercel.app/">Loot Survivor</a>, a survival-strategy game.</p><p>This year, we also saw the launch of <a href="https://starkware.co/resource/dojo-on-starknet-game-on/">Dojo</a>, a decentralized gaming engine built by the Starknet community, which simplifies key elements required for game building. Other components like ECS, Sozu, Torii, and Katana aid game development and deployment.</p><ul><li><strong>The Starknet Decentralization Roadmap</strong></li></ul><p>The Starknet ecosystem took several strides in 2023 toward fulfilling the <a href="https://www.starknet.io/en/posts/engineering/starknet-decentralization-a-roadmap-in-broad-strokes">Starknet decentralization roadmap</a>. Published in October 2023, this canonical paper outlines the values on which the ecosystem was created, how the transition process to a decentralized Starknet will look like, the decentralized network architecture, and the plan towards a fully open-sourced software stack.</p><ul><li><strong>The Devonomics Pilot Program</strong></li></ul><p>Starknet’s founding vision recognized that developers are central to the network’s<br>mission of scaling Ethereum while retaining Ethereum’s core principles of decentralization, transparency, inclusivity, and security.</p><p>That’s why, in December 2023, and in accordance with this <a href="https://www.starknet.io/en/posts/governance/part-1-starknet-sovereignty-a-decentralization-proposal">vision of decentralized governance</a>, the Starknet Foundation, in collaboration with StarkWare, launched the <a href="https://www.starknet.io/en/posts/developers/starknet-launches-the-devonomics-pilot-program">Devonomics Pilot Program</a>. A first-of-its-kind program among L2s, Devonomics distributes over 1,600 ETH to Starknet dApp and Core Developers who have contributed to Starknet’s expansion and adoption. The distribution is done via a novel mechanism that aims for fairness, inclusivity, and transparency.</p><p>The end goal of Devonomics is to bolster developer participation in decision-making and the future operation of Starknet.</p><h3>STARK-Tech: Reaching New Heights</h3><ul><li><strong>Leading the Pack</strong></li></ul><p>STARK-Tech continues to scale Ethereum and provide apps with the ability to grow their audience and activity at low costs. StarkEx passed <a href="https://starkware.co/">$1 trillion</a> (yes, you read that right) in cumulative trading, and Starknet, during several weeks in 2023, scaled more activity on Ethereum than all the other L2s combined.</p><p>Moreover, in 2023, Starknet’s developer ecosystem grew by 14% to become the <a href="https://www.developerreport.com/">8th largest</a> crypto developer community, the largest developer ecosystem among all L2s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UjWAP6P103SMIMWvLYQ4xg.jpeg" /></figure><ul><li><a href="https://starkware.co/resource/starknet-quantum-leap-major-throughput-improvements-are-here/"><strong>Quantum Leap</strong></a></li></ul><p>The release of Starknet Alpha v0.12.0 marked the beginning of a quantum leap forward in providing enhanced performance and scalability, featuring a 10x increase in throughput. Three key ingredients contributed to this improvement: Cairo VM in Rust (part of a year-long collaboration between LambdaClass and StarkWare), Blockifier, and Papyrus, all benefiting from the power of Rust.</p><h3>Innovating on Ethereum</h3><ul><li><a href="https://starkware.co/resource/proving-ethereums-state-on-starknet-with-herodotus/"><strong>Herodotus Proves Ethereum</strong></a></li></ul><p>In ground-breaking research that used cryptographic proofs and block hashes, Herodotus collaborated with StarkWare to prove Ethereum blocks all the way back to the Genesis block. Until this point, the only records developers could access in a trustless manner was the history of the past hour. However, by leveraging Herodotus’s storage proofs solution and StarkWare’s powerful SHARP (SHARed Prover) system, developers can now retrieve — in a chain-native and provable way — all Ethereum block hashes back to the Genesis block.</p><p>By doing so, this accomplishment achieves the goals of <a href="https://eips.ethereum.org/EIPS/eip-2935">EIP-2935</a> — a way to access historical block hashes older than 256 blocks in a chain-native way, and unlocks new use cases for Defi and more.</p><h3>Open-Sourcing Time — Setting New Bars for Protocols</h3><p>In keeping with its vision to facilitate decentralization on Starknet, StarkWare open-sourced various key components of its tech stack to empower developers. Here are some of the key elements that were open-sourced:</p><ul><li><a href="https://starkware.co/resource/cairo-1-0-is-here/"><strong>Cairo</strong></a></li></ul><p>The upgrade from Cairo Zero to (the new) Cairo in January brought 2023 in with a bang. A major milestone in the evolution of Cairo, the Turing-complete programming language for efficiently writing provable programs, this new release made Cairo dev-friendly, allowing for writing safer code while also being more expressive.</p><p>Cairo also introduced Sierra, a new intermediate representation that ensures every program that Cairo runs can be proven. This makes Cairo particularly well-suited for use in a permissionless network like Starknet, where it can provide robust DoS protection and censorship resistance. To learn more about Cairo, <a href="https://starkware.co/resource/the-whats-what-of-the-cairo-world/">read here</a>.</p><ul><li><a href="https://www.starknet.io/en/posts/developers/papyrus-an-opensource-starknet-full-node"><strong>Papyrus Full Node</strong></a></li></ul><p>A Rust implementation of a Starknet full node, Papyrus was launched to provide the foundations for the new Starknet Sequencer, which dramatically enhances Starknet’s throughput. In line with StarkWare’s ongoing move to open-source the Starknet stack, Papyrus was provided open source under the Apache 2.0 license and joined other Starknet full nodes — <a href="https://github.com/eqlabs/pathfinder">Pathfinder</a>, <a href="https://github.com/NethermindEth/juno">Juno</a>, and <a href="https://github.com/KasarLabs/deoxys">Deoxys</a> — which were built by external teams in the ecosystem.</p><ul><li><a href="https://www.starknet.io/en/posts/engineering/starknets-new-sequencer"><strong>Starknet’s Sequencer</strong></a></li></ul><p>Built on the foundations of Papyrus, the new open-sourced Starknet sequencer became available under the Apache 2.0 license and was designed and developed to boost throughput and level up Starknet’s performance. The vital first stop in a user transaction’s journey to STARK scaling, sequencers order the transaction and produce blocks to be converted into a proof for Ethereum.</p><ul><li><a href="https://starkware.co/resource/open-sourcing-the-battle-tested-stone-prover/"><strong>Stone Prover</strong></a></li></ul><p>StarkWare open-sourced its battle-tested and powerful Stone (STARK one) Prover under the Apache 2.0 license. In doing so, StarkWare allows builders to use this robust battle-tested prover and build their proving systems around it for whatever cause they choose. It also allows more eyes to review the code and offer optimizations, improve its quality, help detect bugs, and provide transparency.</p><h3>Appchains on Starknet: The Home of Innovative dApps</h3><p>Public networks offer composability and ecosystem benefits, but for some apps, a dedicated scaling solution can offer specific benefits that cannot be implemented on the public network. Starknet appchains are making notable strides forward, with the first Starknet appchain already in production. Here are a few milestones we saw in 2023:</p><ul><li><a href="https://starkware.co/resource/paradex-starknets-first-appchain/"><strong>The Launch of Starknet’s First Appchain</strong></a></li></ul><p>In July 2023, Paradigm, the largest institutional liquidity network in crypto, launched <a href="https://www.paradex.trade/">Paradex</a>, a crypto-derivatives exchange and the first appchain on Starknet. The launch demonstrated Starknet’s ability to cater to the needs of apps that require heavy computation, low costs, and custom specs, all while retaining self-custody.</p><p>The smart contract behind this new, beta-stage perpetual trading platform was written in Cairo by the Paradex team within only six months.</p><ul><li><a href="https://www.starknet.io/en/posts/ecosystem/harnessing-the-beast-madara-and-the-revolution-of-starknet-appchains"><strong>Madara: An Exploration Team Project</strong></a></li></ul><p>The launch of Madara, a sequencer built by Starknet’s exploration team and community members, was a game-changer for projects and developers interested in creating customizable and efficient appchains.</p><p>By using the Substrate framework, Madara amplifies the capabilities of the Cairo VM, leading to provable, secure, and flexible programs. Madara offers developers special features, including support for potential onchain privacy, streamlined interoperability across various chains, and robust execution.</p><p>Madara is paving the way in dApp development by delivering cost-effective, scalable, and customizable solutions in the blockchain domain and already has many projects using it to enhance their apps with scalable infrastructure, high throughput, and unprecedented control.</p><ul><li><a href="https://www.starknet.io/en/posts/ecosystem/the-starknet-stacks-growth-spurt"><strong>Starknet’s Tech Stack</strong></a></li></ul><p>One of the Starknet ecosystem’s main goals is to provide developers with decentralized, open-sourced tools that empower them to create scalable and secure projects. Starknet has the most decentralized rollup stack, including lots of key infrastructure built by multiple independent teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vDp7U6fx8fFqUpnXfaOl7Q.jpeg" /></figure><h3>Community Engagement &amp; Events</h3><p>While creating programs to benefit our existing community members, StarkWare continued expanding the Starknet community by holding countless meetups, workshops, hacker houses, and events. Two of the events that stand out most are StarkWare Sessions and StarkWare Summit.</p><ul><li><a href="https://starkware.medium.com/starkware-sessions-23-two-stark-days-e2bc9f188c4b">StarkWare Sessions</a> — Over the course of two days, StarkWare hosted more than 1,000 attendees from all over the world, crypto ecosystem, and walks of life. Designed to bring the ever-expanding StarkWare community together to meet, collaborate, and learn, the event exceeded our wildest expectations and served as a promising beacon for the future of the Ethereum and Starknet developer community. Relive the magic of all the discussions and workshops on our <a href="https://www.youtube.com/playlist?list=PLcIyXLwiPilUs4PiBinyL2ker2oEFT-mc">YouTube channel</a>.</li><li><a href="https://summit23.starknet.io/about">Starknet Summit</a> — In August, hundreds of participants flew into San Francisco to meet the faces behind the Twitter handles and Discord IDs of the vast STARK ecosystem.</li></ul><h3>Vision for the Future</h3><p>StarkWare aims to lead the way in developing the most innovative solutions for scaling Ethereum.</p><p>STARK-tech has proved itself to be the secret sauce that allows amazing use cases to scale and thrive and turning Starknet into a hub of creative apps with complex logic such as fully onchain gaming, perpetuals, dynamic NFTs, and more.</p><p>Throughout 2023, StarkWare supported the Starknet ecosystem with tools for building blockchain applications by providing unlimited scaling needs at low costs. In parallel to those accomplishments, StarkWare made significant strides toward supporting developers and other members of the ecosystem, under its goal of expanding decentralization on Starknet.</p><p>By introducing innovative technology and processes, and open-sourcing key elements of its tech stack, Starknet became the fastest-growing L2 (by number of devs) in the industry and continues to expand. Going into 2024, expect StarkWare to build on these amazing achievements and bring more ideas to Starknet’s thriving ecosystem.</p><p>Make sure to join the discussion on <a href="https://discord.com/invite/qypnmzkhbc">Discord</a> and follow <a href="https://twitter.com/StarkWareLtd">StarkWare</a> and <a href="https://twitter.com/Starknet">Starknet on X</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84d890620730" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/from-milestones-to-masterstrokes-starkwares-year-in-review-84d890620730">From Milestones to Masterstrokes: StarkWare’s Year in Review</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Starknet Launches the ‘Devonomics’ Pilot Program]]></title>
            <link>https://medium.com/starkware/starknet-launches-the-devonomics-pilot-program-22b6b0ed8d5c?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/22b6b0ed8d5c</guid>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[governance]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Tue, 12 Dec 2023 15:21:50 GMT</pubDate>
            <atom:updated>2023-12-12T15:21:50.714Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*ELLsEDriAKU3Pj3FiqKJwA.jpeg" /></figure><h4>Moving towards decentralization by supporting and empowering Starknet developers</h4><h3>TL;DR</h3><ul><li>The Starknet Foundation, in collaboration with StarkWare, is launching Devonomics, an experimental pilot program that puts Starknet developers first by rewarding and empowering them.</li><li>Devonomics is initially allocating over 1600 ETH ($3.5M+ at time of publication), constituting 10% of all transaction fees accumulated until November 30, 2023.</li><li>The program runs through a transparent and inclusive distribution process, unique to Ethereum’s L2 landscape.</li><li>The end goal of Devonomics is to bolster developer participation in decision-making and the future operation of Starknet.</li></ul><h3>Overview</h3><p>In accordance with its <a href="https://medium.com/@starkware/part-1-starknet-sovereignty-a-decentralization-proposal-bca3e98a01ef">vision of decentralized governance</a>, the Starknet Foundation, in collaboration with StarkWare, is launching the Devonomics Pilot Program which will distribute over 1,600 ETH (over $3,500,000 at current prices) to Starknet developers. This constitutes approximately 10% of all Starknet fees accrued from November 2021 until November 30, 2023. The distribution will be done via a novel mechanism, unique to the Ethereum L2 landscape, that aims for fairness, inclusivity, and transparency.</p><p>This post provides background on Starknet, describes the details of Devonomics, and explains how it relates to Starknet’s decentralization vision. Finally, it discusses Devonomics in the broader context of other initiatives for Starknet users and developers.</p><h3>Background on Starknet</h3><p>Since Nov ’21, developers worldwide have worked around the clock to build and develop Starknet’s Mainnet, the first Turing-complete Validity Rollup on Ethereum. As a result, Starknet is now the largest developer ecosystem among all L2s, having grown 14% over the past year to become the <a href="https://www.developerreport.com/">8th largest</a> blockchain developer community, and the leader in the L2 landscape.</p><p>This growth is partially explained by the mature technology stack Starknet offers. This stack is built on <a href="https://starkware.co/stark/">STARKs</a> — the safest and most scalable proof system; <a href="https://www.cairo-lang.org/">Cairo</a> — an ergonomic and dev-friendly smart contract language; and includes novel blockchain features like <a href="https://starkware.co/resource/native-account-abstraction-opening-blockchain-to-new-possibilities/">native account abstraction</a>.</p><p>Another explanation for the rapid growth of Starknet’s developer ecosystem is <a href="https://medium.com/@starkware/part-1-starknet-sovereignty-a-decentralization-proposal-bca3e98a01ef">its vision</a>, in which Devonomics plays a key role.</p><h3>Starknet’s Vision Reflected in Devonomics</h3><p>Starknet’s founding vision recognized that developers are central to the network’s mission of scaling Ethereum, while retaining Ethereum’s core principles of decentralization, transparency, inclusivity, and security.</p><p>By distributing fees via the Devonomics Program, Starknet is progressing according to this vision in the following ways:</p><ol><li><strong>Rewarding developers for operating and developing the network</strong></li></ol><p>Devonomics will give devs additional rewards for operating core network infrastructure or building new dApps and incentivize them to continue doing so in the future. In this sense, the program is a realization of the network’s governance vision. “A fair, open, and censorship-resistant service is only possible if several parties show up to compete to perform work that powers the decentralized service, and that can only be guaranteed if those workers are compensated for their role as operators of the network.” (<a href="https://medium.com/starkware/part-2-a-decentralization-and-governance-proposal-for-starknet-23e335645778">A Decentralization and Governance Proposal for Starknet</a>)</p><p><strong>2. Empowering developers to govern the network in a decentralized manner</strong></p><p>Devonomics helps those who build the network and its dApps play a prominent role in governing the network. It ensures that no single centralized entity holds sway over Starknet. It uses a reliable method for judging the level of contribution of dApps to the ecosystem, assessed by fees generated, and likewise will use reliable methods to judge the contribution of core developers. These judgments are then reflected in the strength each developer has in the governance of the ecosystem.</p><p><strong>3. Maintaining and securing the network by staking</strong></p><p>In the future, all fees on Starknet will be denominated in STRK and the operation of the network will be decentralized via a Proof-of-Stake based protocol. At that time, Devonomics will enable devs to stake their STRK to participate in ensuring the liveness and security of the network, via sequencing, STARK-proving services and data availability provisioning, to name a few examples.</p><h3>Overview of the Devonomics Pilot Program</h3><p>As mentioned above, Devonomics will initially allocate 10% of Starknet transaction fees accrued from the launch of Mainnet in November 2021 until the end of November 2023. This is over 1,600 ETH (over $3,500,000 at the time of writing).</p><p>This sum will be distributed by the Starknet Foundation to two cohorts of developers, (a) dApp Developers and (b) Core Developers, as follows:</p><h4><strong>Fee allocation for dApp Developers</strong></h4><p><strong>The program will distribute 8% of collected fees (over 1,200 ETH) to dApp Developers.</strong></p><p>The value offered to users by a smart contract is reflected in the amount of fees collected by that smart contract. By allocating a fixed portion of fees to each smart contract, Starknet rewards dApp Developers objectively, transparently and fairly, in correlation with the value they offer to Starknet users. In other words, smart contracts that contribute to users’ engagement with Starknet will receive more funds.</p><p>The computation of the exact allocation to each dApp is done by measuring the L1 and L2 fees paid by users of these contracts (the fee estimation algorithm has been built to ensure the inclusion of a variety of dApps and will likely be modified over time). In the future, the allocation of fees and ongoing newly minted Stark Tokens to dApp Developers will be automatically done by the Starknet protocol itself in a manner that is fair, transparent and objective.</p><p>A description of the fee allocation algorithm and the list of recipient Starknet accounts can be found <a href="https://starkware.notion.site/starkware/Devonomics-Pilot-Program-4d75aad22a8b437bb1032dc9ad6e1adb">here</a>.</p><h4>Fee allocation for Core Developers</h4><p><strong>The program will distribute 2% of collected fees (over 300 ETH) to Core Developers.</strong></p><p>While the relative value offered by dApp Developers can be assessed by the fees users pay, there is no known objective metric to compare the contribution of Core Developers, such as those who write code for provers, sequencers, full nodes, long-term storage providers, etc. Therefore some human discretion is needed. However, having a single central entity assigning a fixed portion of fees to Core Developers would be arbitrary and open to favoritism. With this in mind, we are conducting research on the best practices to evaluate contributions in a fair, transparent, and efficient manner, and we are learning from existing mechanisms in the blockchain space.</p><p>For the current Pilot Program, we decided to put the responsibility for recommending the assignment of funds to Core Developers in the hands of the very dApp Developers who receive fees from the program. We made this decision in order to have a simple yet reliable mechanism for the Pilot Program, as dApp Developers are familiar with core projects and their contribution to Starknet.</p><p>In other words, during the Pilot Program, each dApp Developer will be asked to recommend how to allocate an additional 25% of fee revenue on top of what they have received. Thereby, an additional 2% of fees collected by Starknet (over 300 ETH) will be apportioned by dApp Developers to Core Developers whose work they value.</p><p>Example: Suppose Alice, a dApp Developer, is set to receive 8 ETH. As part of the claiming process, Alice will be asked to recommend how to allocate a separate amount of 2 ETH (i.e., 25% of her allocated amount), to Core Developers, at arm’s length. To clarify, this amount of 2 ETH is separate from, and additional to, the 8 ETH that Alice receives as a dApp Developer, and is paid directly from the Starknet Foundation to the Core Developers.</p><p>Further restrictions appear in the “Fine Print” section below.</p><h3>Other Starknet Initiatives for Users and Developers</h3><p>Devonomics is one of several complementary initiatives that reflect Starknet’s commitment to decentralization. These initiatives seek to empower important network stakeholders who have contributed in the past to Starknet’s success, and ensure that present and future stakeholders continue to maintain Starknet as a public good. Previous Starknet Foundation initiatives include:</p><ul><li><a href="https://community.starknet.io/t/announcing-round-1-of-early-adopter-grants-eag/54269">The Early Adopter Grant (EAG) Program</a></li><li><a href="https://community.starknet.io/t/announcing-the-early-community-member-program/102092">The Early Community Member Program (ECMP)</a></li><li>Developer Partnerships (DPs)</li><li><a href="https://www.starknet.io/en/community/ambassadors-program">Grants to Individual Contributors</a></li></ul><p>Regarding user-facing initiatives, the upcoming first round of Provisions, the first of several rounds, will initiate Starknet’s user-focused decentralization efforts. Future user-oriented initiatives include rebates denominated in STRK on transactions performed, and other mechanisms that recognize and reward the contribution of users to the network.</p><p>Finally, in the near future there is expected to be a significant reduction in fees, a benefit to all ecosystem users.</p><h3>Summary</h3><p>The Devonomics Pilot Program is an important step in Starknet’s progress towards a fully decentralized ecosystem in both its tech stack and the processes that govern it. Put simply, it is a bold experiment in building and sustaining a decentralized community.</p><p>By allocating 10% of transaction fees to developers, the program seeks to encourage the growth of the Starknet community and bolster the role developers play in the network’s decision making processes. As the program is expected to change over time, developers are encouraged to actively participate and explore this exciting space together by providing feedback to shape the pilot program’s evolution into something more robust and permanent.</p><p>Want to join the discussion about the Devonomics Pilot? Join our <a href="https://community.starknet.io/">community forum</a> and follow <a href="https://twitter.com/Starknet">Starknet on X</a>.</p><p>To become a member of Starknet’s community, get started with the <a href="https://book.starknet.io/">Starknet Book</a> and <a href="https://book.cairo-lang.org/">Cairo Book</a>.</p><p>— — — — — —</p><p>Fine Print</p><ul><li>At the moment, there is no need to reach out to the Starknet Foundation or any other party in the Starknet ecosystem regarding participation in the program. The Starknet Foundation will initially reach out to projects directly and later on share details on how to receive fee allocations through the program.</li><li>Fees in the first phase of the program will be paid in ETH, and, when relevant after the launch of Starknet v0.13.0, in both ETH and STRK. Generally speaking, Devonomics will be denominated in the token(s) used to pay transaction fees on Starknet.</li><li>It should be noted that the Devonomics mechanism is not supposed to replace sustainable business models for projects. In particular, it may be modified over time and may be terminated at any point in time based on an evaluation of its benefit to the Starknet ecosystem.</li><li>The mechanisms for allocating fees to both dApp and Core Developers will be modified over time, to improve transparency, fairness and efficiency.</li><li>The fraction distributed is very likely to change over time, e.g., following events such as future fee reductions on Starknet due to greater efficiency and scale, the introduction of EIP-4844, introduction of a fee market to Starknet and modification of the Starknet gas computation model. The percentage may also evolve based on community feedback and other factors.</li><li>The Starknet Foundation will strive to allocate fees in accordance with the outlined pilot program. However, final discretion on all payments will be left to the Starknet Foundation, to accommodate regulatory and financial obligations.</li><li>The Devonomics Pilot Program has a total budget of 8% for dApps and 2% for Core Developers, but this does not create a current or future commitment, legal or otherwise, to allocate to any dApp 8% of the fees collected through such dApp. The exact computation method for the Pilot Program is merely an attempt to approximate a fair allocation.</li><li>The claiming threshold for receiving fees in this round is set at 0.1ETH. In case this threshold is not reached, fees will accumulate and roll over to the next distribution date until the threshold is met.</li></ul><h3>FAQs:</h3><p><strong>What do I need to do to receive Devnomics?</strong></p><p>Nothing, at the moment. The Starknet Foundation will release further details at a later point in time and will contact the relevant projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22b6b0ed8d5c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/starknet-launches-the-devonomics-pilot-program-22b6b0ed8d5c">Starknet Launches the ‘Devonomics’ Pilot Program</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Session Keys: Unlocking Better UX]]></title>
            <link>https://medium.com/starkware/session-keys-unlocking-better-ux-c34231de477a?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/c34231de477a</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[account-abstraction]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Thu, 16 Nov 2023 04:43:10 GMT</pubDate>
            <atom:updated>2023-11-16T04:42:36.533Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Towards a Smoother Blockchain User Experience" src="https://cdn-images-1.medium.com/max/1024/1*M7HWhPjMNcTcxA8eYV33vw.jpeg" /></figure><h4>Towards a Smoother Blockchain User Experience</h4><p>Ethereum has revolutionized the world of decentralized applications (dApps), offering a secure and transparent way to interact online. However, early blockchain networks like Ethereum, provide a basic account model which is unintuitive for most users, called <a href="https://ethereum.org/en/developers/docs/accounts/">Externally Owned Accounts</a> (EOAs).</p><p>In a recent blog post about native account abstraction, we dived into the key challenges posed by EOAs:</p><ul><li>A subpar blockchain user experience.</li><li>Security risks associated with complete control by the private key holder.</li><li>The lack of flexibility due to EOA’s rigid ties with the Ethereum protocol.</li></ul><p>To deal with these problems, account abstraction was introduced. Account abstraction redefines how accounts function, offering developers flexibility through customizable “account contracts.” These contracts, acting as smart contracts, employ the three pillars of account abstraction: signature abstraction for custom permissions, fee abstraction for versatile payments, and nonce abstraction for enhanced convenience.</p><p>For a deeper understanding of the challenges associated with EOAs and how Starknet overcomes them, visit <a href="https://starkware.co/resource/native-account-abstraction-opening-blockchain-to-new-possibilities/">Native Account Abstraction: Opening Blockchain to New Possibilities</a>.</p><h3>Session Keys</h3><p>A particularly promising application of account abstraction lies in the concept of “session keys.” Traditionally, decentralized applications (dApps) require users to individually sign each transaction through their wallet, introducing friction, especially during multiple transactions in a session. Account abstraction introduces the innovation of generating “session keys,” enabling a dApp to autonomously sign transactions on behalf of the user for a specified period and transaction parameters, such as limits on duration and value.</p><p>The implementation of session keys presents a significant opportunity for dApps to streamline user interactions. Users can tailor session keys to their specific needs, whether they engage in frequent trading or occasional purchases. This adaptability fosters a more inclusive user base for blockchain technology and markedly enhances user experience in two pivotal areas: decentralized finance (DeFi) and onchain gaming.</p><h3>DeFi</h3><p>In the DeFi realm, the current inconvenience of decentralized exchanges (DEXs) lies in the necessity to approve each transaction individually at various stages. However, with session keys, we can replicate the seamless experience of centralized exchanges (CEXs) without succumbing to their drawbacks. For instance, a user could create a session key valid for an hour, allowing trades of up to $7000 on a decentralized exchange without the need for individual confirmation of each transaction through their wallet. This not only simplifies the process but also contributes to a more user-friendly and efficient DeFi ecosystem.</p><figure><img alt="Session Keys: Unlocking Better UX" src="https://cdn-images-1.medium.com/max/1024/0*2rWS1OoLJ0z5tADT.png" /></figure><h3>Gaming</h3><p>The current state of onchain gaming can be described as clunky at best. Rather than imposing the intricacies of managing gas fees or signing multiple transactions on users, session keys facilitate seamless UX, resembling the smooth experience of traditional games. This shift results in a more user-friendly onchain gaming environment, liberating gamers from the hassle of configurations and errors. Gamers can focus on gaming, instead of having to focus more on the blockchain itself.</p><h3>Conclusion</h3><p>Ethereum has transformed decentralized applications (dApps) but faces challenges with rigid account structures like Externally Owned Accounts (EOAs). The introduction of account abstraction addresses these issues, offering developers flexibility and enhancing user experience through customizable “account contracts.”</p><p>Perhaps one of the most important applications of account abstraction is “session keys,” which streamlines user interactions in DeFi and onchain gaming. In DeFi, session keys eliminate the need for individual transaction approvals on decentralized exchanges (DEXs), providing a user-friendly experience similar to centralized exchanges (CEXs). In onchain gaming, session keys simplify the user experience, freeing gamers from the complexities of gas fees and transaction signatures. Explore more special features enabled by using Starknet’s <a href="https://starkware.co/resource/native-account-abstraction-opening-blockchain-to-new-possibilities/">Native Account Abstraction</a>, and learn <a href="https://www.cairo-lang.org/">Cairo</a> to try it out yourself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c34231de477a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/session-keys-unlocking-better-ux-c34231de477a">Session Keys: Unlocking Better UX</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Herodotus: Proving Ethereum’s State Using Storage Proofs on Starknet]]></title>
            <link>https://medium.com/starkware/herodotus-proving-ethereums-state-using-storage-proofs-on-starknet-e7906525cd21?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/e7906525cd21</guid>
            <category><![CDATA[zkrollup]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[storage-proofs]]></category>
            <category><![CDATA[validity-rollup]]></category>
            <category><![CDATA[starknet]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Thu, 02 Nov 2023 09:38:38 GMT</pubDate>
            <atom:updated>2023-11-02T09:53:57.390Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F1gEP5phIUcCUm5VqD__CA.png" /><figcaption>Herodotus: Proving Ethereum’s State Using Storage Proofs on Starknet</figcaption></figure><h3>TL;DR:</h3><ul><li>StarkWare and Herodotus have created a way to prove Ethereum blocks all the way back to genesis</li><li>This is accomplished using the power of cryptographic proofs and block hashes</li><li>It achieves the goals of <a href="https://eips.ethereum.org/EIPS/eip-2935">EIP-2935</a> — a way to access historical block hashes older than 256 blocks in a chain-native way, and unlocks new use cases for Defi and more</li><li>This technology is being brought to Ethereum as a public good by Herodotus and StarkWare</li></ul><h3>Introduction</h3><p>Being able to access historical state on Ethereum in a provable way is important — but until now all you could access in a trustless manner was the history of the past hour.</p><p>But Starknet is a vibrant, innovative ecosystem that pushes the edge of what’s possible. And now, thanks to Herodotus and StarkWare, you can retrieve — in a chain-native and provable way — <em>all </em>Ethereum block hashes <strong>all the way back to the genesis block</strong>.</p><p>Let’s look in detail at how Herodotus and StarkWare achieved this and what it all means. We’ll start with a background on storage proofs.</p><h3>What are Storage Proofs?</h3><p>Storage proofs allow us to prove that a certain state existed at some point in the past, and without having to trust any third party. With storage proofs, trust is built into the mathematics. Storage proofs can also be used to access this state across different chains.</p><p>In <a href="https://www.starknet.io/en/posts/developers/what-are-storage-proofs-and-how-can-they-improve-oracles#">a recent article</a> on storage proofs, we introduced <a href="https://www.herodotus.dev/">Herodotus</a>, the team leading the research and innovation of storage proofs. The Herodotus team has now created a way to make storage proofs even better by providing trustless proving of Ethereum all the way back to the genesis block.</p><p>Let’s look at how Herodotus achieved this and why it’s important.</p><h3>Proving Ethereum’s Genesis Block On-Chain</h3><p>First, we need to understand how Ethereum block headers and block hashes work.</p><h3>So, What is a Block Header and a Block Hash?</h3><p>A <strong>block header</strong> is the section of a block that summarizes all the information kept in that block. It includes the hash of the parent block, the block timestamp, the state root, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O9q5XRcfEGAwHAuJ.jpg" /></figure><p>Ethereum block header and state merkle tree (<a href="https://www.researchgate.net/publication/330752524_A_Platform_Architecture_for_Multi-Tenant_Blockchain-Based_Systems">source</a>)</p><p>There is a lot of information kept inside the block header. For this article, we’re particularly interested in the <strong>state root</strong>. Let’s look at why.</p><p>In the diagram above you can see, just below the block header, the <strong>Ethereum Account State</strong>. Every Ethereum account has an associated storage space where that account’s variables are stored (essentially, the smart contract’s state). A cryptographic commitment of the account’s storage is hashed and stored as a <strong>storage root</strong> along with the account balance, nonce, and code hash. Together, this all acts as a basic summary of this account’s state.</p><p>A <a href="https://ethereum.org/en/developers/docs/data-structures-and-encoding/patricia-merkle-trie/">Merkle Patricia Trie</a> of <em>all </em>the Ethereum account states is constructed, and its hash is stored in the block header as the <strong>state root</strong> (labeled <em>stateRoot</em> in the diagram above). This state root contains all the information you need to prove the state of the entire Ethereum network at any particular point in time.</p><p>Finally, since every block on Ethereum (and EVM chains) contains this state root, and since every block also has an associated string called the <strong>block hash</strong> (which is the result of hashing everything inside the block header including the state root), <strong>the block hash acts as a cryptographic commitment of the entire Ethereum state at a particular time</strong>.</p><h3>Historical Block Hashes on EVM</h3><p>Since so much key information is kept in the block hashes, we often need to access them historically.</p><p>In Solidity, if we want to retrieve the block hash of the block that was mined two blocks ago (the backward count starts from the block in which a transaction is included), we use the following syntax:</p><pre>bytes32 lastBlockHash = blockhash(block.number - 2);</pre><p>Pretty simple. But there’s a catch — this block-hash method <em>can only retrieve the block hash for the last 256 blocks</em>. With an average of 12-second blocks on Ethereum, that’s 51.2 minutes of history on-chain.</p><p>For someone who wishes to use historical block hashes as a source of entropy (randomness), the 256 limit is generally good enough. However, if you want to use block hashes for fetching the historical state of the chain at a specific block, a 51-minute history is not nearly enough (compared to an eight-year history of the Ethereum blockchain).</p><p>This 256 limit of on-chain block hash retrieval was primarily a design choice made for state storage efficiency and to mitigate potential state growth problems.</p><h3>Herodotus Gives Access to the Complete History of Block Hashes</h3><p>So, how does Herodotus solve this limitation and allow us to:</p><ul><li>access the complete history of block hashes on Ethereum</li><li>prove Ethereum’s state all the way back to the genesis block</li><li>and all in a trustless manner?</li></ul><p>The key is the power of cryptographic proofs.</p><p>Let’s delve deeper by dividing the Herodotus Historical Block Hash Accumulator procedure into steps:</p><h4>Step 1. Registering a recent block hash</h4><p>On the Ethereum mainnet, a recent block hash is registered in a smart contract named the <a href="https://etherscan.io/address/0xa5f95f9a5bcde5673610e4f223da21d5b14a0013"><em>SharpFactsAggregator</em></a> smart contract. The block hash can be retrieved using the block hash opcode (opcode value 0x40) and saved in the aforementioned smart contract as a simple string variable. The corresponding block number can also be registered for access later on.</p><p>Let’s assume that the registered block number is block <a href="https://etherscan.io/block/18000000">18,000,000</a>. From Etherscan, we can see that the block hash of this block is 0x95b1…4baf3.</p><h4>Step 2. Proving the block hash of the latest block</h4><p>The next step is to retrieve the block header (from an archival node) for block <a href="https://etherscan.io/block/18000000">18,000,000</a>, compute its block hash in an off-chain computation, and compare it to the registered block hash 0x95b1…4baf3. This calculation is also run through a prover to create a proof of this computation.</p><p>The block hash for this block is added to a Merkle Mountain Range (MMR). This is a variation of a Merkle tree such that appending new elements to the tree does not require significant computation.</p><h4>Step 3. Proving the block hash of block X-1</h4><p>Once we have proven that the block header retrieved from the archival node is valid, we retrieve the block header for block X-1, compute its block hash, and compare it with the parentHash value for block X. (It is available in the X’s block header that we retrieved earlier).</p><p>If the hashes match, we know that the block header for X-1 is also valid. Since this whole computation can be modeled as a function, a STARK proof of this computation can be created simultaneously. Hence, a proof of validity for the block header of block X-1 is created (see diagram below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fchu8x2MdQhzr57y.jpg" /></figure><h4>Step 4. Recursively proving the block hashes for previous blocks</h4><p>The block hashes are computed similarly for all the previous blocks until we reach all the way back to the Genesis block — the first block on the Ethereum mainnet. These are all appended to the MMR tree, thus creating a final MMR root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NDK8fyxM26ltVo01.jpg" /></figure><p>It should be noted that all of these computations are done off-chain with a simultaneous generation of proof of computation by Herodotus.</p><h4>Step 5. Publishing of proof on-chain and subsequent use</h4><p>Once the final MMR root is generated, this root can be published on-chain (on a Proofs Aggregation smart contract) along with the proof of computation for the millions of blocks. Since the generated STARK proofs are exponentially cheaper to verify, the cost of verifying these proofs on-chain is reasonable.</p><p>And there we have it! We’ve created a way to access Ethereum’s state all the way back to the genesis block.</p><p>These MMRs (called “historical block hash accumulators” by the Herodotus team) achieve the goals of <a href="https://eips.ethereum.org/EIPS/eip-2935">EIP-2935</a> proposed by Vitalik Buterin and Tomasz Stanczak in 2020 — a way to access historical block hashes older than 256 blocks. This was a problem that had remained unsolved for over three years! And yet, Herodotus and Starknet achieved it without having to make any protocol-level changes.</p><p>Some key points to note on the process above:</p><ul><li>Herodotus processes the blocks in batches of ~1350 blocks, and the proof is published on-chain for every single batch. Once the whole process is completed for the first 18,000,000 blocks on Ethereum, the MMR root for the history of the block can be updated periodically as new blocks are added to the chain’s history.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/0*NZcIqBgDXcoNSwJZ.jpg" /></figure><ul><li>Once the MMR root is available on-chain, it becomes possible to prove the inclusion of every single block hash in the MMR (that’s a basic property of Merkle trees).</li><li>Before sending the proof onto the Ethereum mainnet, the Herodotus team’s prover uses <a href="https://starkware.co/resource/joining-forces-sharp/">SHARP</a>, created by the StarkWare team. The primary benefit of the SHARP system is its ability to decrease costs and enhance the efficiency of the generated proofs.</li><li>The workflow described above is being duplicated for two independent MMRs — one that uses the Keccak256 hashing function and one that uses the Poseidon. On Ethereum, the Keccak256 variant will be used, while Starknet will use the Poseidon variant.</li><li>The MMR root for the Ethereum mainnet is also sent to Starknet using the native Starknet L1-to-L2 messaging protocol for use on Starknet. The Herodotus Block Hash Accumulator also enables Ethereum historical data access on Starknet. The Starknet L1-to-L2 messaging system can be used to relay an L1 block hash and the verified MMR root to Starknet in a secure manner. Once on Starknet, storage proofs of historical Ethereum data can be verified against these commitments.</li></ul><h3>New Opportunities with the Herodotus Block Hash Accumulators</h3><p>These block hash accumulators are being brought to Ethereum by Herodotus and StarkWare as a public good. Once the final MMR roots are published on Ethereum mainnet, along with proofs of computation, any developer can utilize them for accessing a provable state of the chain for any time since inception.</p><p>Since the MMR roots for Ethereum are also going to be sent to Starknet via the native messaging protocol cross-chain, cross-chain state information can be accessed in a simple yet trustless manner. DeFi protocols could benefit from historical state proofs by utilizing the information about a specific account balance or leveraged positions of an account at any point in time. More robust random number generation using a larger history of block hashes becomes possible. Cross-chain voting becomes simplified without users having to bridge assets before they cast their votes on an L2. And much more.</p><h3>Conclusion</h3><p>In the evolving world of blockchain scalability, decentralization, and verifiability, teams on Starknet are emerging as beacons of innovation. Projects created in Starknet are becoming key elements in scaling Ethereum. As we delve into this new future, familiarizing yourself with the ecosystem will position you for what lies ahead.</p><p>Read more about projects in the Starknet ecosystem here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7906525cd21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/herodotus-proving-ethereums-state-using-storage-proofs-on-starknet-e7906525cd21">Herodotus: Proving Ethereum’s State Using Storage Proofs on Starknet</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[7 Super Cool Dev Tools for Starknet Devs]]></title>
            <link>https://medium.com/starkware/7-super-cool-dev-tools-for-starknet-devs-ea789febd5a0?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/ea789febd5a0</guid>
            <category><![CDATA[ethereum-developers]]></category>
            <category><![CDATA[starkware]]></category>
            <category><![CDATA[starknet]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 14:40:30 GMT</pubDate>
            <atom:updated>2023-10-27T14:40:11.010Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rkh_M3SF9O6cI4RsjGOdXA.png" /></figure><h3>The building blocks for Starknet developers</h3><p>While Starknet is a Layer 2 network built over Ethereum, it is different from other Layer 2s built on the model of the Ethereum virtual machine (EVM), and so it has many of its own developer tools to support the community of developers that are building on Starknet.</p><p>While originally the stack of Starknet development tools was based mostly on Python, there is an overall trend to move from tools built on Python to tools built in Rust.</p><p>Here are 7 Dev Tools for Starknet devs:</p><ol><li>Starkli</li><li>Starknet-devnet</li><li>Katana</li><li>Scarb</li><li>Starknet Foundry</li><li>Hardhat</li><li>Starknet Remix Plugin</li></ol><h3>Workflow</h3><p>This diagram illustrates the development process, with the tools that are useful for each stage of development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*817DlznOy4YlKl0S.png" /></figure><h3>Starkli</h3><h4>What is it?</h4><p>Starkli, pronounced <em>Stark-lie</em>, is a fast command-line interface that replaces the legacy starknet-CLI. Starkli is a standalone interface, that is, you can use it on its own, rather than as a component of another tool. If you’re not actually developing on Starknet and just want to interact, such as by sending transactions, then a standalone CLI might be more appropriate than an interface such as Cast, which is an integrated component of the Foundry development environment.</p><h4>Who maintains it?</h4><p>Starknet community contributor Jonathan Lei, the co-founder and CTO of zkLend.</p><h4>Why should you care?</h4><p>Starkli is a Starknet CLI similar to cairo-lang but written in Rust. It’s easier to install and to navigate, and has no dependencies. The tool supports Braavos and Argent X smart wallets, and has embedded support for RPC endpoints.</p><p>Starkli includes standard CLI functionality, such as the following:</p><ul><li>deploying accounts</li><li>interacting with contracts</li><li>getting Starknet data, such as information about blocks, transactions and more</li></ul><p>Starkli also includes the following features:</p><ul><li>compute class hashes from the Cairo file that defines the class</li><li>compute a function’s selector</li><li>encode messages</li><li>auto-completion</li><li>useful help commands</li><li>the ability to make multi-calls</li></ul><h4>Where do you get it?</h4><p>For information on getting started, including installation instructions, see <a href="https://medium.com/starknet-edu/starkli-the-new-starknet-cli-86ea914a2933">Starkli: The New Starknet CLI</a>.</p><p>See also:</p><ul><li><a href="https://github.com/xJonathanLEI/starkli/">The Starkli Github repository</a></li><li>the <a href="https://book.starkli.rs/">Starkli book</a></li></ul><h3>SDKs: A window into Starknet</h3><p>A Software Development Kit (SDK) is a library that abstracts the complexities of Starknet when building transactions and interacting with the blockchain, including the following:</p><ul><li>read and write API calls, using both the JSON-RPC and the Feeder gateway API</li><li>account creation</li><li>cryptography: Signature verification and signing, computing hashes used by Starknet</li><li>contract interactions: ABI import, constructing transactions</li></ul><p>There are several SDKs for various languages, so you can choose the SDK according to your preferred language.</p><p><strong>LanguageUsed byWho maintains it?Where do you get it?</strong>Starknet.jsJavaScript/</p><p>TypeScript</p><p>Dapps/WalletsShardlabsThe <a href="https://github.com/0xs34n/starknet.js">starknet.js Github repository</a>Starknet.pyPythonUseful scriptsSoftware Mansion (SWM)The <a href="https://github.com/software-mansion/starknet.py">starknet.py Github repository</a>Starknet-rsRustStarkli, FoundryJonathan LeiThe <a href="https://github.com/xJonathanLEI/starknet-rs">starknet-rs Github repository</a>Starknet-goGoChainlinkNethermindThe <a href="https://github.com/NethermindEth/starknet.go">starknet-go Github repository</a></p><h3>starknet-devnet, starknet-devnet-rs</h3><h4>What is it?</h4><p>A devnet is a Starknet instance that you run as a local node, which enables much quicker development than is possible using testnet, as well as providing privacy prior to launching on testnet.</p><p>Shardlabs, originally wrote starknet-devnet in Python, but they are now actively developing a version in Rust, starknet-devnet-rs. For now, the Python-based version is more feature-rich, with the most notable feature being the ability to fork the network at a given block, so if that’s important to you, then you need to use the Python-based version. However, starknet-devnet-rs runs more quickly, and the developers are working to bring it to feature parity with the Python-based starknet-devnet.</p><p>starknet-devnet-rs is the only version that is receiving new features.</p><h4>Who maintains it?</h4><p>Shardlabs</p><h4>Why should you care?</h4><p>starknet-devnet and starknet-devnet-rs include some accounts that are already funded with an ERC-20 token that can be used to pay fees. The ERC-20 contract that defines this token is also included.</p><p>With starknet-devnet and starknet-devnet-rs You can do the following:</p><ul><li>Create mock accounts.</li><li>Send transactions using pre-deployed, pre-funded accounts, which are included.</li><li>Test tools.</li><li>Test RPC requests.</li><li>Deploy new contracts using an included Universal Deployer Contract (UDC).</li></ul><h4>What’s next?</h4><p>starknet-devnet-rs is the devnet to pay attention to, as it is developed in cooperation with StarkWare, and it is the version that is being actively developed.</p><h4>Where do you get it?</h4><ul><li><a href="https://github.com/Shard-Labs/starknet-devnet">The starknet-devnet Gitbhub repository</a></li><li><a href="https://github.com/0xSpaceShard/starknet-devnet-rs">The starknet-devnet-rs Github repository</a></li></ul><h3>Katana</h3><h4>What is it?</h4><p>Katana, developed by the Dojo team, is an extremely fast devnet designed to support local development with Dojo, which is a gaming engine for Starknet. You can use Katana as a general purpose devnet as well. Katana lets developers test applications locally using the Katana network to test the transactions being sent during the game.</p><ul><li>Katana provides convenient RPC methods that you can use to change the network’s configuration as needed. For example, you can change the block time or allow zero-fee transactions.</li><li>Katana supports version v0.3.0 of the Starknet JSON-RPC specifications, the latest version as of June 2023. Katana lets you use native Starknet JSON calls, such as starknet_getTransactionReceipt, starknet_getStorageAt</li></ul><h4>Where do you get it?</h4><p>For information on installing and using Katana, see <a href="https://book.dojoengine.org/toolchain/katana/overview.html">Katana</a> in the Dojo documentation.</p><h3>Scarb: The Cairo package manager</h3><h4>What is it?</h4><p>The official package manager for Starknet.</p><h4>Who maintains it?</h4><p>Software Mansion</p><h4>Why should you care?</h4><p>It makes life easier in the following ways:</p><ul><li>When installing Cairo packages, it handles adding, updating, and removing dependencies.</li><li>You can use it to compile smart contracts.</li><li>When creating your own Cairo package, it takes care of patching any libraries you need from Github, and lets you know if there’s a version mismatch. You can then use it to build and test your project, using the Cairo test runner. Building is quite fast.</li><li>It includes the Cairo compiler, built-in, so unless you’re actually a compiler developer, you don’t need to set up any extra tooling.</li><li>It includes a bundled binary of the Cairo language server, which you can use</li><li>It works well with other tools in the Cairo ecosystem, such as Foundry and Dojo.</li></ul><h4>What’s next?</h4><p>Developers are currently working on improving the way Scarb handles the management of versions, projects, and workspaces.</p><h4>Where do you get it?</h4><p><a href="https://docs.swmansion.com/scarb/">The Scarb site</a></p><h3>Starknet Foundry</h3><h4>What is it?</h4><p>Starknet Foundry is a toolchain for developing Starknet smart contracts. It helps with writing, deploying, and testing your smart contracts.</p><h4>Who maintains it?</h4><p>Software Mansion</p><h4>Why should you care?</h4><p>Starknet Foundry includes the following features:</p><ul><li>Forge, a fast testing framework. Forge achieves performance comparable to the Cairo Test Runner with a better user experience. You can test standalone functions in your smart contracts and embed complex deployment flows.</li><li>Support for prints in contracts. According to the documentation, the debugging features will follow the addition of support in the Starknet compiler.</li><li>The online Foundry Book, with lots of helpful information and guidance in writing and running tests and interacting with Starknet.</li><li>Integrated compiling and dependency management, using Scarb.</li><li>Cast, which the documentation refers to by its command name, `sncast`. Cast is an integrated CLI specifically designed for performing Starknet RPC calls, sending transactions and getting Starknet chain data. You can use Cast to declare, deploy, and interact with contracts using the Starknet JSON-RPC.</li></ul><h4>What’s next?</h4><p>Many new features are coming soon, including fuzz testing, L1&lt;&gt;L2 messaging, and code coverage.</p><p>The Starknet Foundry Github repo has a <a href="https://github.com/foundry-rs/starknet-foundry/#roadmap">roadmap</a> showing new and in-development features, although it’s not clear if the checkmarks indicate features that are already implemented, or in active development.</p><h4>Where do you get it?</h4><p><a href="https://github.com/foundry-rs/starknet-foundry/">The Starknet Foundry Github repo</a></p><h3>Hardhat (with a plugin)</h3><h4>What is it?</h4><p>A tool primarily for testing Cairo code. You can also deploy contracts using scripts in JavaScript.</p><h4>Who maintains it?</h4><p>Shardlabs</p><h4>Why should you care?</h4><p>Hardhat is a popular JavaScript development environment for Ethereum, and if you are already familiar with it and want to use it on Starknet, then this plugin can come in handy. You can run Starknet commands as tasks in Hardhat, such as compiling a Cairo contract.</p><p>Hardhat is integrated with a local devnet, so you only need to worry about writing your tests, in JavaScript, of course.</p><h4>What’s next?</h4><p>Upcoming features include:</p><ul><li>improved integration with Starknet.js, for a better developer experience</li><li>improved support for the latest Cairo features</li></ul><h4>Where do you get it?</h4><p>Get Hardhat at <a href="https://hardhat.org/">the Hardhat site</a>.</p><p>Get the Starknet plugin at the <a href="https://github.com/0xSpaceShard/starknet-hardhat-plugin">Starknet Hardhat plugin Github repo</a>.</p><p>See examples of how to use the plugin at the <a href="https://github.com/0xSpaceShard/starknet-hardhat-example/tree/master">Starknet Hardhat example scripts Github repo</a>.</p><h3>The Starknet Remix plugin</h3><h4>What is it?</h4><p>Remix is a browser-based integrated development environment (IDE) for Ethereum that you can use for learning, experimenting and finding vulnerabilities in smart contracts, without installing anything. The Starknet Remix plugin lets you use Remix for testing Starknet smart contracts, so you can focus on learning Cairo and Starknet without the distraction of setting up a toolchain.</p><h4>Who maintains it?</h4><p>Nethermind</p><h4>Why should you care?</h4><p>Remix and the Starknet Remix plugin include the following features:</p><ul><li>Integrated compiling.</li><li>You can deploy contracts on any devnet, including the plugin’s own integrated devnet.</li><li>You can also deploy on testnet or Mainnet.</li><li>You can call functions of contracts that you have already deployed, to facilitate testing and interaction.</li><li>Seamless integration with Scarb.</li><li>Integration with block explorers such as Voyager, so you can easily check the execution of your transactions, in real time.</li><li>The Starknet Remix Plugin is integrated with <a href="https://starknet-by-example.voyager.online/">Starknet By Example</a>, a rich repository of practical learning content.</li></ul><p>For more information on the Starknet Remix plugin, see <a href="https://medium.com/nethermind-eth/unlocking-onboarding-to-starknet-an-overview-of-the-starknet-remix-plugin-6b0658e73521">Unlocking Onboarding to Starknet: An Overview of the Starknet Remix Plugin</a>.</p><h4>What’s next?</h4><ul><li>Support for testing Starknet contracts directly within the browser.</li><li>An integrated code editor is planned for a future release.</li></ul><h4>Where do you get it?</h4><p>To get started with Remix, see the <a href="https://remix-project.org/">Remix Project</a> site.</p><p>To get started with the Starknet Remix plugin, see <a href="https://github.com/groksmith/starkware-remix-plugin">the Starknet Remix plugin’s Github repo</a>.</p><p>Looking for more dev tools, libraries and tutorials? Go to Starknet’s <a href="https://www.starknet.io/en/developers">Developers Hub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea789febd5a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/7-super-cool-dev-tools-for-starknet-devs-ea789febd5a0">7 Super Cool Dev Tools for Starknet Devs</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Starknet Decentralization: A Roadmap in Broad Strokes]]></title>
            <link>https://medium.com/starkware/starknet-decentralization-a-roadmap-in-broad-strokes-f1fab9c67004?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/f1fab9c67004</guid>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[layer-2]]></category>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[starkware]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Tue, 24 Oct 2023 16:33:43 GMT</pubDate>
            <atom:updated>2023-10-24T16:33:22.876Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xPml4CCHs9PTfaw-TysdxA.png" /></figure><h3>TL;DR</h3><ul><li>StarkWare is progressing towards decentralization in two threads: planning and implementation.</li><li>A clear roadmap lies ahead for the steps required to ensure the transition of the Starknet protocol to a decentralized proof-of-stake protocol.</li></ul><h3>Intro</h3><p>Starknet enjoys the security and decentralization provided by Ethereum by sending STARK proofs of its state transitions for verification on the Ethereum blockchain. This flow places substantial limits on the power of otherwise centralized entities building and maintaining Starknet, such as StarkWare and the Starknet Foundation: no centralized entity on the network can forge transaction messages that would misstate or otherwise fraudulently manipulate user data or assets.</p><p>This is the first and most critical step in ensuring that Starknet is trust-minimized, and that users of Starknet are not reliant on the honesty of any centralized party when they use the network. However, more must be done to ensure full trust-minimization and decentralization, so that even if entities like the Foundation or StarkWare were to disappear, the network would continue to function as designed and without interruption. This post outlines a tentative roadmap for those next steps.</p><h3>How We Got Here</h3><p>Just under a year ago, we began documenting our decentralization research process in <a href="https://community.starknet.io/t/starknet-decentralized-protocol-i-introduction/2671">a long series of blog posts</a> which culminated in a <a href="https://community.starknet.io/t/simple-decentralized-protocol-proposal/99693">simple concrete proposal</a>.</p><p>In short, our goal is to transition operation of the Sequencer+Prover to a decentralized proof-of-stake protocol, whereby anyone can participate in sequencing and such that no party is essential to the continued liveliness of the network. To this end, two necessary threads open:</p><ol><li>Implementation of the various components required to run the decentralized protocol,</li><li>A transitional process to gradually decentralize operations to Starknet stakers.</li></ol><p>In this post we will focus on the latter.</p><h3>The Transition Process</h3><p>In a nutshell, the transition process itself has four main threads:</p><ol><li>Transitioning to a decentralized network architecture while Sequencer operation remains under centralized operation</li><li>Ensuring the availability of a fully open-sourced software stack</li><li>Developing increasingly broad testing and integration networks</li><li>Fostering Staker onboarding in advance of the final transition of Sequencer operation to proof-of-stake participants.</li></ol><p>The numbering represents some obvious sequential dependencies, but a lot of concurrent work is possible. Below we slightly expand with a paragraph for each thread.</p><h3>Decentralized Network Architecture</h3><p>The Starknet network will move to a more decentralized model:</p><ul><li>At present, full nodes do not communicate with each other, instead each node relies on periodic queries to the Sequencer through a centralized feeder gateway.</li><li>In a less centralized model, full nodes will be part of a peer-to-peer network that does not require a connection between each of them and the Sequencer.</li></ul><p>This change goes beyond the connectivity of the network. Let us illustrate this with two examples.</p><p>First, the Sequencer will sign its blocks to alleviate some trust assumptions and prepare for a vote-based BFT protocol with many voters. Second, data propagation will take on a more distributed flavor, with nodes helping each other to sync on the state and complete their local view.</p><h3>Working towards a Fully Open-Sourced Software Stack</h3><p><strong>Open-Source Software Stack: </strong>Ensuring availability of an open-source software stack is critical to enable everyone to participate in the various aspects of the protocol and the network. As more components are implemented, both by StarkWare and by other contributors, they will be released for everyone to test, criticize, and get comfortable with. Some notable examples (of already open sourced parts of the stack) are full nodes (Pathfinder, Juno, Deoxys), Provers (Stone, Sandstorm), Sequencers (Blockifier, Madara), and Block Explorers (Starkscan, Voyager, ViewBlock, Stark Compass)</p><p><strong>Testing &amp; Integration Networks: </strong>Increasingly broad testing and integration networks are necessary for a maximally smooth transition process. For each new component there will likely be a progression from an internal testnet, to a slightly broader permissioned testnet with external participants, and eventually to a public testnet, integration, and mainnet. There are some choices to be made later, e.g between sequential and concurrent approaches for introducing testing new components, but that’s for another day.</p><p><strong>Staker onboarding: </strong>We must give time for the L1 staking contract to accumulate sufficient staked tokens to secure the decentralized protocol with real economic weight. This is to avoid a scenario where a small number of participants with little actual skin in the game maliciously attempt to take control of Starknet.</p><h3>Conclusion</h3><p>In summary, we have given here a rough overview of the tentative roadmap to decentralizing Starknet. As with any engineering plan, certainly one of this complexity, it is likely to evolve and change over time as our community of contributing builders develops better insights and understanding.</p><p>As always, feedback, suggestions, and criticism are welcome. Feel free to reach out on the <a href="https://community.starknet.io/">Starknet community forum</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1fab9c67004" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/starknet-decentralization-a-roadmap-in-broad-strokes-f1fab9c67004">Starknet Decentralization: A Roadmap in Broad Strokes</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trailblazing the Way to Building New Worlds]]></title>
            <link>https://medium.com/starkware/trailblazing-the-way-to-building-new-worlds-df589009d240?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/df589009d240</guid>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[autonomous-world]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[onchain-gaming]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Wed, 18 Oct 2023 15:06:21 GMT</pubDate>
            <atom:updated>2023-10-18T15:05:17.753Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iFd93sOgmVhHEZVDpvluEQ.png" /></figure><h4>Starknet is taking the emerging Autonomous Worlds space by storm</h4><h3>TL;DR</h3><ul><li>Starknet is a frontier in the evolving space of onchain gaming and autonomous worlds, channeling the power of Dojo engine and Madara to enable onchain gaming.</li><li>Using Starknet’s high throughput and Cairo, a world of possibilities is emerging for devs and users who want to utilize asset ownership and limitless interoperability.</li><li>Multiple teams are utilizing Starknet’s capabilities to bypass EVM limitations and explore new horizons in gaming.</li></ul><h3>Intro</h3><p>Autonomous worlds are the convergence of tech, gaming, decentralization, creativity, and innovation. These worlds operate independently and without a central authority, which allows users to engage and explore, create content, and interact, all without permission from anyone and without any concern of censorship.</p><p>Starknet has positioned itself as the natural choice for those who spearhead the creation of these worlds. Worlds that need an L1 to ensure they can exist forever, but they also need a robust L2 to cater for their complexity. The combination of Ethereum, as the basis layer, and Starknet, as the scaling and creativity enabling layer, allows these worlds to emerge.</p><p>Let’s look at this new frontier of autonomous worlds and onchain gaming and the features that Starknet offers, which makes it so suited for this vision.</p><h3>What Exactly are Autonomous Worlds?</h3><p>As mentioned above, autonomous worlds are worlds that operate independently and without a central authority. Some of the key features of an autonomous world include:</p><ul><li><strong>Constant Accessibility</strong>: They are always available.</li><li><strong>Multiplayer Interactivity</strong>: Allowing multiple players to concurrently explore and have interactive experiences.</li><li><strong>Immunity to Shutdown</strong>: Autonomous worlds are censorship-proof, which means there is no central authority that can be told to shut the game down.</li><li><strong>Unrestricted User Engagement</strong>: They allow users to independently explore, create, and interact (independently, or as a group) with no central authority.</li></ul><p>Players, individually and as a whole, create, control, and play in this world, all on their own. It’s a new frontier in gaming with untapped capabilities and new use cases. It challenges the current conventions in gaming and redefines what is possible. The potential is huge.</p><p>But to exist, autonomous worlds <strong>must be onchain</strong>, on a network that can handle the requirements outlined above. At the same time, they<strong> must be highly performant and highly cost-efficient. </strong>That’s where Starknet comes in.</p><h3>The Origins of Onchain Gaming on Starknet</h3><p>In November 2021, StarkWare released <a href="https://starkware.co/starknet/">Starknet Alpha</a>, and prior to that, <a href="https://www.cairo-lang.org/">Cairo</a>. The combination of a Validity Rollup that provides Ethereum-grade security, and a new non-EVM compatible language, was a challenge and a puzzle that opened a new world of opportunities. The earliest adopters of Cairo (developers like <a href="https://twitter.com/eth_worm">Perama</a> and <a href="https://twitter.com/guiltygyoza">Guiltygyoza</a>) started delving deeper into the language, creating guides and experimenting with physics and neural networks. This level of innovation in the Ethereum ecosystem was impressive.</p><p>Eventually, the first game on Starknet emerged: a proposal to recreate the classic game “Drug Wars” was submitted, a grant was given, and a fully onchain game engine began to take shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dI7Vn0PT6R2mnqXp.png" /></figure><p>Teams such as <a href="https://twitter.com/LootRealms">Realms</a>, <a href="https://twitter.com/influenceth">Influence</a>, and <a href="https://twitter.com/briqNFT">Briq</a> were among the earliest projects to build on Starknet. They came from the Solidity world, where complex games were nearly impossible to build. Others, such as <a href="https://twitter.com/topology_gg">Topology</a>, came directly as they had heard of the limitations of Solidity. For all of them, though, their visions were finally possible with Starknet. Cairo, as a general computation programming language, lifted barriers that were created by the EVM. Teams got a taste of the flexibility it offered builders.</p><h3>Escaping the EVM Limit: Online and Autonomous Games on Starknet</h3><p>Currently, after years of research and iteration, Starknet is one of the first L2s that can sustainably host onchain, high-TPS games. It is the platform where game developers can finally build their complex visions of worlds that operate on a permissionless basis and in a decentralized manner. Among active L2s, Starknet has attracted the largest number of game developers and teams.</p><p>Let’s look at two key technologies that make Starknet the premier platform for building and playing onchain games and autonomous worlds — Dojo gaming engine and the Madara sequencer.</p><h4>Dojo Gaming Engine</h4><p>In a recent <a href="https://starkware.co/resource/dojo-on-starknet-game-on/">article</a>, we covered in detail the <strong>Dojo Gaming Engine </strong>— the world’s first provable onchain game engine. Dojo enables Starknet’s gaming builders to provide transparency, provability, and scalability for their games.</p><p>The Dojo gaming engine is a software framework for Starknet game developers that helps them create fast, provable games onchain. It provides developers with everything they need to get started creating games and autonomous worlds (such as physics, graphics, and game mechanics).</p><p>Dojo is the brainchild of two early innovators in Starknet-based game development — the <a href="https://cartridge.gg/">Cartridge</a> and the <a href="https://www.realm.art/">Realms</a> teams. Their collaboration was inspired by the insights they gained over a one-year journey starting in early 2021, during which they explored the most efficient ways to build games on Starknet.</p><p>Dojo consists of the Entity Component System (ECS) framework, which is a system for blockchain-based game development that promotes modularity, efficiency, and flexibility, and three additional useful tools for game developers: Sozo, Torii, and Katana.</p><p><strong>Sozo — </strong>Sozo is a migration planner that handles the complex task of deploying autonomous worlds onchain. With a simple `sozo migrate` command, deploying an instance of the game world onchain is possible.</p><p>Sozo also has the ability <em>for any participant in the ecosystem</em> to propose new components to the onchain gaming universe by using the simple CLI tool. This is a key philosophy of autonomous games: worlds can outlive the game’s creators, and additional contributors can extend the ecosystem with their own assets, levels, characters, and more.</p><p><strong>Katana — </strong>Katana is a sequencer built for local game development. Running this sequencer on Starknet enables immense jumps in productivity. Katana enables RPC methods offered by Starknet on mainnet and allows the developer to test with various parameters such as the block time, base fee per transaction, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/0*WNbJ3yXUizChhptF.png" /><figcaption>Running the node (once configured) is as easy as running the `katana` command on the CLI</figcaption></figure><p><strong>Torii — </strong>Torii is an indexing layer built on top of the Dojo engine that connects the onchain infrastructure with game development clients such as Unity or Unreal Engine. Based on the developed game’s source, Torii can be used to easily start indexing game-specific events and expose a GraphQL API for queries. Simply running `torii` creates a GraphQL API running on <a href="http://localhost:8080/">http://localhost:8080</a>, ready to be queried.</p><h3>Madara Sequencer</h3><p>The <a href="https://github.com/keep-starknet-strange/madara">Madara sequencer</a> is a high-performance Starknet sequencer that can create highly customizable and efficient <em>appchains</em>, especially suited for gaming. Madara is built using the proven Substrate framework used by the <a href="https://www.polkadot.network/">Polkadot</a> ecosystem.</p><p>Appchains are a private instance of Starknet that allows developers to control virtually all parameters configured in a network: sequencing, data availability, settlement layer, governance, and more.</p><p>Why is this useful? For example, if a game wants to prioritize the <em>speed </em>of player transactions, they could choose to implement a form of First-Come-First-Served sequencing. But if instead, they want to incentivize users to <em>bid higher for quicker block inclusion</em>, Priority Gas Auction (PGA) sequencing could be implemented with a more profit-driven perspective.</p><p>With many other possible parameters (such as block times, frequency of settlement on L2, or utilization of non-native data availability solutions), the possibility to launch their games on a Starknet appchain provides devs with choices and power.</p><h3>Future Features: Offchain Provable Games</h3><p>Not every action that the player takes must be onchain. For some games, where the user’s actions should not be public before the state of the game changes, an offchain proof of the user’s action could be generated on the client, with only the proof stating the action took place being submitted onchain. Beyond multiplayer games, this infrastructure holds promise for auctions and voting-system applications where you might want to obscure the user’s input data.</p><p>Client-side proving also unlocks the possibility for models where gamers try out a hybrid approach: proofs are published, but only whenever something significant happens in-game (e.g., a level is passed or the character finds a rare asset).</p><h3>Autonomous Worlds in Action — Shoshin</h3><p>In a <a href="https://www.starknet.io/en/posts/ecosystem/let-the-games-begin-redefining-onchain-gaming-with-starknet">previous article</a>, we looked at some of the largest gaming projects built on Starknet — from space colonization strategy games to ‘immutable arcade machines’ enabled by ZK circuits. We reviewed games that can be shaped and continue to evolve with the guidance of their player, even if their creators will not operate them.</p><p>One additional example is <a href="https://twitter.com/Shoshin_gg">Shoshin</a> — which has implemented a novel way of onchain gaming where the <em>user </em>programs their character and the actions they take. Once this programmed logic is in place, players can battle with other players’ characters.</p><p>All in-game mechanics are executed within the Cairo virtual machine. Shoshin even had a recent in-person tournament in Palo Alto for pioneer gamers. To try out the game, log in to <a href="https://shoshin.gg/">shoshin.gg</a>, and show off your fighting skills by programming a character no one can beat!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5_O-4YSVdhtlMvcv.png" /><figcaption>episode from Shoshin of programming character action logic</figcaption></figure><h3>Conclusion</h3><p>With onchain gaming and autonomous worlds, Starknet is not just refining the present state of gaming; It is shaping the future of how games are played, assets are owned, and communities are built.</p><p>The likes of <a href="https://twitter.com/eth_worm">eth_worm</a>, <a href="https://twitter.com/guiltygyoza">Guiltygyoza</a>, and others, are trailblazing the field of onchain gaming and technical innovation. Teams such as Realms, Topology, Influence, Briq, Cartridge, and Madara are building on Starknet, escaping EVM limits.</p><p>With these collaborators and many others pushing boundaries, Starknet is poised to lead the way into this new landscape of autonomous worlds.</p><p>Want to play a Starknet-based onchain game? Check out <a href="http://shoshin.gg/">Shoshin</a>, an asynchronous 2-dimensional fighting game from <a href="https://twitter.com/topology_gg">Topology</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df589009d240" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/trailblazing-the-way-to-building-new-worlds-df589009d240">Trailblazing the Way to Building New Worlds</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Safe and Sound — A Deep Dive into STARK Security]]></title>
            <link>https://medium.com/starkware/safe-and-sound-a-deep-dive-into-stark-security-0974af65b2e1?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/0974af65b2e1</guid>
            <category><![CDATA[scaling]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[zkrollup]]></category>
            <category><![CDATA[blockchain-security]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Wed, 04 Oct 2023 15:05:39 GMT</pubDate>
            <atom:updated>2023-10-16T06:17:05.745Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8gGsigwPQPDThf1Pe469g.png" /></figure><h3>Safe and Sound — A Deep Dive into STARK Security</h3><h4>Explore the Full Security Analysis of STARKs</h4><h3>TL;DR</h3><ul><li>Non-interactive STARKs start as <em>Interactive</em> Oracle <em>Proofs</em> (IOPs) which are compiled to non-interactive ones in the random oracle model.</li><li>This post explains the recent update to the <a href="https://eprint.iacr.org/2021/582.pdf">ethSTARK documentation</a>, which gives a full and concrete analysis of the security of the ethSTARK protocol in the random oracle model.</li></ul><h3>STARK Security Explained</h3><p>A STARK proof system (Scalable Transparent Argument of Knowledge) is a powerful tool for computational integrity: it allows verifying the correctness of computations performed on public data in a trustless manner. In this blog post, we delve into the security that is provided by STARK proofs, defining it and exploring techniques to prove scheme security.</p><p>(Read Section 6 in the ethSTARK documentation (version 1.2) for full details, and the important and comprehensive <a href="https://eprint.iacr.org/2023/1071.pdf">independent work</a> of Block et al. on the topic.)</p><p>What are we trying to achieve with our security analysis? We would like to prevent a “successful attack” on the STARK system, which is given by a false statement and a STARK proof accepted by the STARK verifier for this (false) statement. Since false statements are dangerous and they can come in all sizes and shapes, we want to be secure against <em>all</em> false statements. Any false statement, even as trivial as 1+1=3, combined with a STARK proof accepted by a STARK verifier for this statement, is considered a successful attack on the system. (Those with a cryptographic background may be interested to know that STARKs also satisfy stronger security notions such as <a href="https://eprint.iacr.org/2016/116.pdf"><em>knowledge soundness</em></a> but for simplicity this post focuses on the simpler case of soundness.<em>)</em></p><p>How do we formally define the security of a STARK system? We do so by analyzing the “soundness error” which roughly measures the expected “cost” that an attacker would need to spend in order to construct a successful attack (i.e., find a STARK proof for a false statement that nevertheless is accepted by the STARK verifier). Mathematically speaking, the soundness error is a function <em>e</em>(<em>t</em>) that gets as input a time parameter “<em>t”</em>, representing the amount of computation time an attacker is willing to spend to mount the attack, and outputs the success probability of the attacker in succeeding with the attack (finding a convincing proof of a false statement). As the “cost” <em>t</em> that the attacker is willing to spend grows larger, his success probability increases.</p><p>Thus far we have defined the security of STARKs as a function <em>e(t)</em> which is not the way you naturally discuss security, say, on crypto Twitter. There, you probably heard statements of the form “The scheme has 96 bits of security”. How does such a statement translate to our security definition? There is no one answer to this, as people have slightly different interpretations of “<em>x</em> bits of security”:</p><ul><li>A very strict translation would mean that for any<em> t</em> between 1 and 2⁹⁶, the soundness error is <em>e</em>(<em>t</em>) <em>≤ 1/2⁹⁶</em> . This means that any attacker running time at most <em>2⁹⁶</em> has a tiny probability of success, smaller than <em>1/2⁹⁶</em>, which is smaller than one in a billion times a billion times a billion.</li><li>A more relaxed, and perhaps more common, translation is that 96 bits of security means that for any <em>t</em>, it holds that <em>t</em>/<em>e</em>(<em>t</em>) <em>≥ 2⁹⁶</em>. This means that the success probability is (inverse) linear to the running time. For example, if an attacker has running time 2⁸⁶, its success probability is at most 1/2¹⁰.</li></ul><p>In this blog post we will relate to the second option.</p><h3>From IOPs to STARKs with 96-Bit Security</h3><p>So how do we prove that a scheme has 96 bits of security? To answer that, we need to understand the high-level structure of how STARKs are constructed. A STARK consists of three main ingredients: an IOP (interactive oracle proof), a Merkle tree, and a Fiat-Shamir hash; the main component we will focus on is the IOP. Once these components are specified, one can compile them to yield a STARK. We will elaborate on these, what they are, and how to assemble them together.</p><p>The first component we’ll review is the IOP: An IOP is similar to a standard interactive proof, where a prover and verifier interact for multiple rounds (we limit ourselves to public-coin protocols, where the verifier only sends random challenges to the prover). In an IOP, the verifier does not read the prover messages entirely but instead samples a small number of bits from each prover message. This is what allows the succinctness of the later compiled STARK.</p><p>So we have an IOP, how do you build a STARK from it? The prover messages might be long (actually, they are longer than the computation itself). To compress the messages, we use Merkle trees. A Merkle tree is a binary hash tree where each leaf node represents a query or an answer in the IOP. The root of the tree is a commitment to the entire message. When the verifier wants to read a specific location in a message, the prover provides the value at the location and an authentication path. The verifier can then use the path to verify that the value is correct. The IOP verifier reads only a small number of locations from the prover messages. Thus, the use of a Merkle tree results in a succinct protocol (one with small communication).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PM330-dwmPSiRwyNm6t-5Q.png" /></figure><h3>Compressing Rounds</h3><p>One may opt for interactive STARKs, meaning but often it is convenient to make them non-interactive to simplify the process of generating them, so that the prover need not wait for external messages when constructing one. Indeed, this is the way currently all STARK systems are deployed, and this is the way the ethSTARK protocol is constructed. Non-interactive STARKs are also a special case of transparent SNARKs (transparency means that no trusted setup is needed to instantiate them; this is also known as an “Arthur Merlin protocol” or a “public coin IOP”). To this end, a final step is to apply Fiat-Shamir to compress the rounds to a single message, which we’ll call the STARK Proof. The Fiat-Shamir transformation converts an interactive protocol into a non-interactive one. The prover simulates the interactive protocol while “talking to a hash function”. To derive the random challenge for round <em>i</em>, the prover hashes the partial transcript up to round <em>i</em>, and interprets the output as the next challenge.</p><p>This ensures that the prover cannot change their responses after the challenge has been generated. However, the cheating prover has some new strategy avenues that it did not have with the interactive IOP. The prover can regenerate the verifier challenge by modifying the last prover message, which would give a new transcript, and thus a new challenge as well. As it turns out, the standard soundness notion of IOPs does not suffice to prove the security of the Fiat-Shamir transformation.</p><p>For example, consider an IOP with 96 rounds with the following “hack” to the verifier: if the first bit of the randomness of the verifier is 0 in each of the 96 rounds then the verifier accepts (without looking at the proof whatsoever). One can see that adding this hack to the verifier only adds a term of <em>1/2⁹⁶</em> to the soundness error of the IOP. However, after the Fiat-Shamir transformation, an attacker can easily modify the prover messages to ensure that each hash begins with a zero, essentially breaking the system within a very short time. Rest assured, this scary scenario is merely a theoretical example, not one that applies to deployed STARKs. So, let’s see why our STARKs are secure after all? In a nutshell, we’ll show that an attacker running at most t steps will succeed in attacking with probability at most <em>e(t) ≤ t / 2⁹⁶</em>. Details follow.</p><h3>IOPs and Round-by-Round Soundness</h3><p>A STARK can only be as secure as its underlying IOP. But what does it mean for an IOP to have 96-bits of security? The standard definition would say that the IOP has soundness error <em>1/2⁹⁶</em>: meaning that the probability of any attacker (regardless of running time) fooling the verifier is at most <em>1/2⁹⁶</em>. However, as we discussed, IOP soundness is only one component out of three, and this does not suffice to get 96 bits of security for the STARK compiled from all three steps. Instead, security of the compiled STARK is proven assuming the STARK has 96 bits of <em>round-by-round</em> soundness error (sometimes a similar definition called <em>state-restoration soundness</em> is used).</p><p>Intuitively, the round-by-round soundness says that every round has 96-bits of security and not just the overall protocol. In more detail, round-by-round says that there exists a predicate that gets a partial transcript of the protocol and tells us if this transcript is “fooling”: The empty transcript is not “fooling”, a full transcript is “fooling” if and only if the verifier accepts it. Finally, for any partial transcript that is not one that “fools” the verifier, the probability that in the next round the transcript will become “fooling” is at most <em>1/2⁹⁶</em>. If such a predicate exists with these properties, we say that the protocol has 96 bits of round-by-round soundness (the predicate is not required to be efficiently computable).</p><p>In many cases, only the soundness of an IOP is analyzed and not its round-by-round soundness. Admittedly, it is hard to think of examples where an IOP has standard soundness but not round-by-round soundness (except for contrived examples). However, the differences between the two might come up when deriving concrete security bounds where each bit matters. Thus, to derive tight and concrete bounds, one must give a tight analysis of the round-by-round soundness of the IOP. This is precisely what we do to the <a href="https://www.youtube.com/watch?v=c3EHV3iJQSE">FRI protocol</a> and then ethSTARK IOP that underlies the IOP of our STARKs. The analysis itself is far from trivial and beyond the scope of this post. Using the new analysis, we can set precise parameters for our proofs.</p><p>The round-by-round soundness does give us the desired guarantee. The prover can regenerate the challenge many times, but we know that for any round, the probability of generating a “fooling” transcript is <em>1/2⁹⁶</em>. Thus, if the prover has time <em>t</em>, which is measured as the number of hash invocations, then it can try at most <em>t</em> times to get a fooling transcript, which limits its success probability to <em>e(t) ≤ </em>min<em>{t /2⁹⁶,1}</em>.</p><h3>Adding All the Error Terms</h3><p>Finally, for all of this to hold, we need to ensure that the prover cannot tamper with the Merkle tree. One can show that as long as the prover finds no collision in the hash function, it cannot cheat in the Merkle tree. The probability of an attacker finding a collision using <em>t</em> invocations (to a random hash function) is at most min{<em>t²/ 2ˢ,1}</em>, where <em>s</em> is the output length of the hash function (this is due to the “birthday paradox”). This is why we set the hash function to have a length that is double the desired security. Thus, if we have a hash function with output length 192 bits and an IOP with round-by-round soundness of 96 bits, we get a compiled STARK with soundness error <em>e</em>(<em>t</em>) = <em>t</em> /2⁹⁶ + min<em>{t² / 2¹⁹²,1}</em>. In particular, such a scheme has 95 bits of security since the function we use to define security, namely <em>t</em>/<em>e</em>(<em>t</em>), satisfies the inequality <em>t</em>/<em>e</em>(<em>t</em>) ≥ <em>t/(t /2⁹⁶ + </em>min<em>{t² / 2¹⁹²,1}), </em>and the right hand side of this inequality achieves its minimal value<em> </em>at<em> t=2⁹⁶,</em> and for this value of<em> t </em>we have<em> t/e(t) </em>≥ <em>2⁹⁵.</em></p><h3>Summary</h3><p>In conclusion, STARKs provide a powerful method for verifying the correctness of computations performed on public data in a trustless manner. The security of STARKs is typically measured in terms of the “soundness error”, which represents the probability of an attacker successfully providing a false statement and convincing the verifier with a proof. To achieve a desired level of security, such as 96 bits, the underlying IOP must satisfy round-by-round soundness, ensuring that every round maintains a high level of security. We analyzed the round-by-round soundness of the IOP underlying our SATRKs which allowed us to derive concrete security bounds.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0974af65b2e1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/safe-and-sound-a-deep-dive-into-stark-security-0974af65b2e1">Safe and Sound — A Deep Dive into STARK Security</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[​​The What’s What of the Cairo World]]></title>
            <link>https://medium.com/starkware/the-whats-what-of-the-cairo-world-cc4e749e7df?source=rss----4f99567ac65a---4</link>
            <guid isPermaLink="false">https://medium.com/p/cc4e749e7df</guid>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[scaling-solution]]></category>
            <category><![CDATA[cairo-lang]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <dc:creator><![CDATA[StarkWare]]></dc:creator>
            <pubDate>Mon, 11 Sep 2023 13:29:20 GMT</pubDate>
            <atom:updated>2023-09-11T13:29:06.796Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a2dkt3QL4dp03crSS2bEcg.png" /></figure><p>Deciphering Cairo VM, CASM, Cairo Zero, Cairo, and Sierra.</p><h3>Intro</h3><p>In order to unlock secure and decentralized scaling for Ethereum, Validity Rollups make the verification of batches of transactions vastly more efficient than their naive re-execution. Specialized nodes (called Sequencers) on Layer 2 (L2) bundle transactions into new L2 blocks, while Ethereum mainnet nodes confirm these transactions with minimal effort.</p><p>Starknet is a Validity Rollup that leverages the Cairo VM, purposefully designed to optimize the efficiency of Validity proofs. Starknet utilizes STARKs (Scalable, Transparent ARgument of Knowledge) as its proof system, enabling the generation of succinct proofs for complex computations, thus greatly reducing the complexity of on-chain verification processes.</p><p>In this blog post, we’ll dive into the different components that make Starknet the most performant L2 by TPS — Cairo VM, CASM, Cairo Zero, Cairo, and Sierra.</p><h3>Cairo VM</h3><p>Creating Validity Proofs for general computational programs requires a deep grasp of the complex mathematical principles that underlie STARKs. For every computation, it’s crucial to construct an Algebraic Intermediate Representation (AIR), which comprises a set of polynomial constraints that accurately represent the given computation. Initially coined as “CPU AIR,” Cairo is a virtual CPU and a singular AIR, capable of describing any computation with the same “generic” AIR. The Cairo VM is intentionally tailored for Validity Proof systems and is not constrained by the limitations imposed by the EVM (Ethereum virtual machine).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Exhr3cvlAd5s4ud-GVMoIA.png" /></figure><h3>CASM</h3><p>CASM (Cairo Assembly) is the machine code that the Cairo VM runs. CASM is translated to polynomial constraints that enforce the correct execution of a program. CASM is a key component in the ecosystem because regardless of what the user sends to the Starknet sequencer, what’s proven is the correct CASM execution.</p><h3>Cairo Zero, A Breakthrough</h3><p>Cairo Zero, released in 2020, introduced the world’s first Turing-complete language for creating STARK-provable programs, revolutionizing verifiable computation. Cairo Zero programs were compiled locally into CASM and then sent to the Starknet sequencer. Although groundbreaking, Cairo Zero had a steep learning curve owing to its low-level nature and did not entirely abstract away the underlying cryptographic primitives required to prove the program execution.</p><h3>Cairo: Cairo Zero, but Better</h3><p><a href="https://starkware.co/resource/cairo-roadmap-join-the-ride/">Cairo</a> (now v2.1.1) overcomes the limitations of Cairo Zero, promising safer, more efficient contract writing. Cairo greatly improves the developer experience with a Rust-like syntax and by abstracting away the limitations that were present in Cairo Zero (e.g. write once memory). <br>Cairo brings modern programming concepts from the rust world, such as trait/impls, generics, enum matching, without compromising the efficiency of proof generation that is brought about by the underlying CairoVM.</p><h3>Sierra</h3><p>With Cairo, came Sierra. Sierra serves as an intermediate representation between Cairo and CASM. This additional layer ensures that user code remains provable in all cases. Sierra compiles down to “safe CASM,” a subset of CASM that is guaranteed to be provable for all inputs. This intermediate layer between user code and proven code is crucial in protecting the Starknet sequencer from DOS in the form of unprovable transactions.</p><p>A perhaps surprising benefit of Sierra is, that thanks to this simple intermediate representation, Starknet sequencers may eventually run on native hardware directly instead of going through the CairoVM. To illustrate the power of sequencers executing Sierra, consider the following example: one can use type information from Sierra to work with native types (e.g. u32) instead of working in the prime field of the CairoVM.</p><h3>Conclusion</h3><p>Cairo builds upon the foundation laid by CairoVM to revolutionize verifiable computation. With a Rust-like syntax and modern programming languages features, Cairo greatly enhances the developer experience, simplifying contract writing and reducing the chance for bugs. Cairo emerges as a powerful tool driving decentralized innovation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc4e749e7df" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starkware/the-whats-what-of-the-cairo-world-cc4e749e7df">​​The What’s What of the Cairo World</a> was originally published in <a href="https://medium.com/starkware">StarkWare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>