<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gear Protocol on Medium]]></title>
        <description><![CDATA[Stories by Gear Protocol on Medium]]></description>
        <link>https://medium.com/@gear_techs?source=rss-eae157a6af62------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qYGZ6sP8phkHii-kTU7sgA.png</url>
            <title>Stories by Gear Protocol on Medium</title>
            <link>https://medium.com/@gear_techs?source=rss-eae157a6af62------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 06 Apr 2026 08:06:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gear_techs/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[The Cryptography Behind Blockchain Signatures: ed25519, sr25519, and secp256k1 Explained]]></title>
            <link>https://medium.com/@gear_techs/the-cryptography-behind-blockchain-signatures-ed25519-sr25519-and-secp256k1-explained-b4f41a6b86ce?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4f41a6b86ce</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 17:03:25 GMT</pubDate>
            <atom:updated>2026-04-01T17:03:25.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EVc6qks0He6__-ZIlhraOQ.jpeg" /></figure><h3>Abstract</h3><p>Digital signatures are the backbone of blockchain security. Every transaction you send, every block a validator signs, every smart contract interaction — all rely on elliptic-curve cryptography to prove authenticity without revealing private keys. This article breaks down the three most widely used signature algorithms in the blockchain space: ed25519, sr25519, and secp256k1. We cover how they work, where they’re used, and why different chains made different choices. Whether you’re a developer choosing a signature scheme for a new project, or simply curious about the cryptography securing your assets, this guide provides the technical foundation you need.</p><h3>Introduction</h3><p>Blockchain developers often work with elliptic-curve cryptography for digital signatures. ed25519, sr25519, and secp256k1 are three prevalent elliptic-curve-based signature algorithms. All three provide roughly 128-bit security and rely on the hardness of the elliptic curve discrete log problem.</p><p>In this introduction, we explore their common properties, key differences, typical use cases (especially in blockchains), and the advantages and disadvantages of each. We also touch on advanced capabilities like hierarchical deterministic key derivation (HDKD), threshold signatures, and distributed key generation (DKG) — features increasingly important for modern blockchain applications.</p><h3>Common Properties</h3><p><strong>Elliptic Curve Cryptography: </strong>All three algorithms are based on elliptic curve mathematics. Their security relies on the difficulty of solving discrete logarithms on elliptic curves. ed25519 and sr25519 use curves based on Curve25519, a twisted Edwards curve known for speed and security. Secp256k1 uses a Koblitz short Weierstrass curve defined by the equation y² = x³ + 7 over a 256-bit prime field (used in Bitcoin).</p><p><strong>Key and Signature Sizes: </strong>All produce relatively compact keys and signatures. Private keys are 256-bit (32 bytes) in each scheme. Public keys are 256-bit points (32-byte compressed form for ed25519/sr25519, 33-byte compressed for secp256k1). Signatures are approximately 64 bytes in ed25519 and sr25519, and typically 64–72 bytes in secp256k1’s ECDSA.</p><p><strong>Deterministic Signatures: </strong>ed25519 and sr25519 produce deterministic signatures — the nonce is derived from the message and private key via hashing, removing the need for a new random number per signature. This avoids the pitfalls of ECDSA, where a poor or repeated random nonce can leak the private key.</p><p><strong>Performance: </strong>All benefit from faster verification and signing compared to traditional RSA. ed25519 and sr25519 often have an edge in performance thanks to Edwards-curve arithmetic. Curve25519-based ed25519 can perform signature verification roughly twice as fast as secp256k1 ECDSA in well-optimized implementations.</p><h3>ed25519 (EdDSA on Curve25519)</h3><p>ed25519 is an instance of the EdDSA signature scheme using the Twisted Edwards curve Curve25519. It was designed by Daniel J. Bernstein et al. for high security and high performance.</p><p><strong>Design and Security: </strong>It has a fully specified deterministic signing procedure, making it robust against poor randomness. It is resilient to certain side-channel attacks because the curve’s structure allows efficient constant-time implementations. ed25519’s parameters were chosen transparently, avoiding suspicion of backdoors.</p><p><strong>Performance: </strong>ed25519 is very fast on modern hardware. Its verification is especially fast — roughly twice as fast as secp256k1 ECDSA verification — due to the curve’s structure and the ability to batch verify multiple signatures efficiently. For blockchains handling many signatures per block, this efficiency is a big advantage. Solana, for example, chose ed25519 in part for its fast, batchable verification.</p><p><strong>Usage: </strong>ed25519 is widely used in new blockchain and crypto projects. Cardano uses ed25519 for transaction signatures, Algorand uses ed25519 for its accounts, Solana uses ed25519 exclusively for signatures, and many Tendermint-based chains (Cosmos, etc.) use ed25519 for validator signatures. It’s also popular outside blockchains — OpenSSH adopted ed25519 keys as a modern default.</p><p><strong>Limitations: </strong>A known limitation is in hierarchical key derivation. The standard ed25519 uses hashing and bit-clamping of the private key, which makes deriving child keys from a parent public key non-trivial. The SLIP-0010 standard for ed25519 HD wallets only supports hardened derivation, meaning you cannot derive a child public key from a parent public key as you can in secp256k1.</p><h3>sr25519 (Schnorr on Ristretto25519)</h3><p>sr25519 is a signature scheme derived from ed25519, created for the Polkadot/Substrate ecosystem. It uses the same underlying Curve25519 elliptic curve but implements a Schnorr signature and uses Ristretto point compression for safer operations. Essentially, sr25519 can be thought of as ‘ed25519 upgraded for advanced use-cases.’</p><p><strong>Schnorrkel and Ristretto: </strong>sr25519 is implemented in the Rust Schnorrkel library using Ristretto, a technique to remove the small cofactor of Curve25519 and work in a prime-order subgroup. By encoding points with Ristretto, sr25519 ensures no weak small-subgroup points ever appear, making protocols like multi-signatures, threshold schemes, and verifiable random functions (VRFs) easier to implement safely.</p><p><strong>Security: </strong>For basic signing, ed25519 and sr25519 offer equivalent security. Both are Schnorr-like signatures on Curve25519, so there’s no known security difference for single signatures. Polkadot’s developers note that ‘there are no differences in security between ed25519 and sr25519 for simple signatures.’</p><p><strong>Blockchain-Friendly Features: </strong>sr25519 was explicitly designed with blockchain applications in mind. It supports native HD key derivation (HDKD) and safer multi-signature/aggregation protocols out of the box. The Schnorrkel library provides both hard and soft key derivation, and even public-key derivation, which ed25519 lacked. It also supports multi-signatures via aggregation with MuSig support.</p><p><strong>Use Cases: </strong>sr25519 is the default key system for Polkadot, Vara, and Substrate-based blockchains. Account keys and consensus keys in these systems often use sr25519 by default. As the Web3 Foundation puts it, ‘sr25519 provides more blockchain-friendly functionality like HDKD and multi-signatures.’</p><h3>secp256k1 (ECDSA/Schnorr)</h3><p>secp256k1 refers to the elliptic curve itself — a 256-bit SECG Koblitz curve — and by extension to the signature schemes used with it. In Bitcoin and Ethereum, ECDSA signatures on secp256k1 are the standard. More recently, secp256k1 is also used with Schnorr signatures, as introduced in Bitcoin’s Taproot upgrade.</p><p><strong>Curve Characteristics: </strong>secp256k1 is a curve of prime order (cofactor = 1), defined over a 256-bit prime field. It was chosen for Bitcoin likely for its performance and because it wasn’t one of the NIST curves. It provides the same 128-bit security level as ed25519.</p><p><strong>ECDSA on secp256k1: </strong>ECDSA is the classic signing algorithm used. It is not deterministic by default — a random nonce is required for each signature — and it’s somewhat more complex to implement than Schnorr. If the nonce is ever repeated or predictable, the private key can be solved. When implemented with care (using RFC6979 for deterministic nonce and constant-time arithmetic), ECDSA is secure. However, it’s harder to batch-verify ECDSA signatures and it doesn’t support native signature aggregation without complex protocols.</p><p><strong>Schnorr on secp256k1: </strong>To overcome ECDSA’s limitations, the Bitcoin community adopted Schnorr signatures for secp256k1 (BIP340 in 2021). Schnorr on secp256k1 yields 64-byte signatures similar to ed25519. It’s slightly simpler and more efficient than ECDSA and enables advanced constructions like MuSig, allowing multiple parties to produce one aggregate signature.</p><p><strong>Use Cases: </strong>secp256k1 (with ECDSA) is the de facto standard in Bitcoin, Ethereum, and many other early cryptocurrencies. Even newer platforms that need Ethereum compatibility support secp256k1 so that keys can be shared between systems. It’s broadly supported in hardware wallets and HSMs.</p><h3>Summary</h3><p>All three algorithms provide strong 128-bit security based on elliptic curve cryptography. ed25519 offers excellent performance and widespread adoption across modern blockchains. sr25519 builds on ed25519 with additional blockchain-friendly features like native HD key derivation and safer multi-signature protocols — making it the default choice for Polkadot, Vara, and Substrate ecosystems. secp256k1 remains the standard for Bitcoin and Ethereum compatibility, with Schnorr signatures now available to overcome ECDSA’s limitations.</p><p>The choice between them depends on your use case: secp256k1 for Ethereum/Bitcoin compatibility, ed25519 for broad support and performance, and sr25519 for advanced blockchain features and Substrate-based development.</p><p><strong>Vara</strong></p><p><a href="https://vara.network/">Website</a> |<a href="https://twitter.com/VaraNetwork"> X</a> |<a href="https://discord.gg/BhhqF6f8u9"> Discord</a> |<a href="http://t.me/VaraNetwork_Global"> Telegram</a> |<a href="https://wiki.vara.network/"> Wiki</a> |<a href="https://github.com/gear-foundation"> GitHub</a></p><p><strong>Gear Protocol</strong></p><p><a href="https://gear-tech.io/">Website</a> |<a href="https://twitter.com/gear_techs"> X</a> |<a href="https://discord.gg/x8ZeSy6S6K"> Discord</a> |<a href="https://t.me/gear_tech"> Telegram</a> |<a href="https://github.com/gear-tech"> GitHub</a> |<a href="https://idea.gear-tech.io/"> Gear IDEA</a> |<a href="https://whitepaper.gear.foundation/"> Whitepaper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4f41a6b86ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Validator Discovery in Vara.ETH Network]]></title>
            <link>https://medium.com/@gear_techs/validator-discovery-in-vara-eth-network-16586d25bb2f?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/16586d25bb2f</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 15:52:37 GMT</pubDate>
            <atom:updated>2026-03-19T15:52:37.730Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_7jW_HKjEREntiZg_H3RuA.jpeg" /></figure><p>This article explains how validator discovery works in the Vara.ETH network in practice: what data it stores, how it queries and publishes identities, and why some checks are strict.</p><p>The implementation is heavily inspired by Substrate authority discovery, but is integrated into Gear’s current networking stack. It consists of 3 tightly associated parts.</p><h3>What Problem It Solves</h3><p>Currently, there are 2 use cases: tight connections between validators because they are part of consensus, and injected transaction routing to send transactions directly to a validator.</p><h3>Part One. Identity</h3><p>A validator identity contains network addresses and the identity creation time. It is signed with both the network key and the validator key.</p><h3>Keys</h3><p>The key design is “double signing”: the validator key proves “this validator approved this identity,” while the networking key proves “this peer controls the peer ID/address side.”</p><p>This prevents two replay-like classes: a validator cannot point to someone else’s network identity, and a random peer cannot claim “I am validator X.”</p><h3>Addresses</h3><p>Network addresses must satisfy the following requirements: they must contain at least 1 address, every address must end with a P2P protocol containing the same peer ID, and duplicate addresses are rejected during decoding.</p><h3>Creation time</h3><p>Kademlia is eventually consistent, so stale (old) identities can appear. To avoid trusting whichever identity version arrives first, we compare the creation time in the identity itself and prefer the newest one.</p><p>This freshness rule works together with the timer behavior described below.</p><h3>Part Two. Timers</h3><p>To keep identities fresh without flooding the network, we use exponential backoff timers with the following parameters: start delay is 2 seconds, so requests are not made when there are no peers in the KAD routing table; factor is 2, a value heuristically selected from Substrate sources; and maximum interval is 10 minutes, after which multiple queries with an exponentially increasing interval should acquire enough identities.</p><p>Two timers are used in total. The first is for querying identities, which everybody does for validator identities. The second is for putting validator identity, where only the validator itself should PUT an identity while other peers verify it via the validator list.</p><h3>Part Three. KAD</h3><p>We use the good old plain Kademlia (KAD) protocol with some key differences.</p><p>Disjoint query paths are enabled to mitigate adversarial routing. Inbound PUT records are always validated to avoid trash records. Peers are inserted into the routing table manually only via discovery services like mDNS, libp2p-identify, or validator discovery to avoid random peers.</p><p>Record TTL is 1 hour and the record publishing interval is 15 minutes. We don’t want stale validator records, so these intervals are much lower than the default libp2p ones.</p><h3>Security and DoS controls</h3><p>After defining the identity format, refresh timers, and KAD behavior, we apply additional cross-cutting controls: strict decode-time validation for signatures and peer-ID consistency, validator membership check (current/next only), freshness check via monotonic creation-time preference, address count limit (10), query concurrency limit (10), and exponential backoff up to 10 minutes.</p><p>Together, these controls keep traffic bounded and reduce the chance of accepting junk identities.</p><h3>Summary</h3><p>Validator discovery here is a strict, practical, KAD-backed identity layer. It publishes a validator’s own identity safely, continuously refreshes other identities with bounded concurrency, and accepts only records that are both cryptographically valid and validator-set relevant.</p><p>The design is conservative by default and optimized for correctness under evolving validator sets.</p><p><strong>Would you like to become part of the community?</strong> Explore and join using the social channels below:</p><p><strong>Vara</strong></p><p><a href="https://vara.network/">Website</a> |<a href="https://twitter.com/VaraNetwork"> X</a> |<a href="https://discord.gg/BhhqF6f8u9"> Discord</a> |<a href="http://t.me/VaraNetwork_Global"> Telegram</a> |<a href="https://wiki.vara.network/"> Wiki</a> |<a href="https://github.com/gear-foundation"> GitHub</a></p><p><strong>Gear Protocol</strong></p><p><a href="https://gear-tech.io/">Website</a> |<a href="https://twitter.com/gear_techs"> X</a> |<a href="https://discord.gg/x8ZeSy6S6K"> Discord</a> |<a href="https://t.me/gear_tech"> Telegram</a> |<a href="https://github.com/gear-tech"> GitHub</a> |<a href="https://idea.gear-tech.io/"> Gear IDEA</a> |<a href="https://whitepaper.gear.foundation/"> Whitepaper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16586d25bb2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Paradox of Ethereum Decentralization: How New Blocks Are Actually Created]]></title>
            <link>https://medium.com/@gear_techs/the-paradox-of-ethereum-decentralization-how-new-blocks-are-actually-created-6d983db04030?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d983db04030</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 07:16:56 GMT</pubDate>
            <atom:updated>2026-03-11T07:16:56.527Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5yqVRVhhAu7fuzJWhgkc6A.jpeg" /></figure><h3>Short Article Introduction Summary</h3><p>Ethereum is currently regarded as a leading example of a decentralized blockchain. However, several structural nuances raise questions about the true extent of its decentralization. This article examines how Ethereum’s present consensus mechanism functions and who effectively controls the block‑production process. We analyze the role of Proposer‑Builder Separation (PBS), the challenges introduced by Maximal Extractable Value (MEV), and explain why — despite nearly one million validators — Ethereum is trending toward centralization at the block‑creation layer.</p><p>Ethereum is often described as one of the most decentralized blockchains, and at first glance this appears accurate: as of early December 2025, the network contains nearly one million active validators. However, behind this impressive figure lie structural mechanics that raise legitimate concerns about the real level of decentralization. This article explains the full lifecycle of a transaction — how it moves from broadcast to inclusion in a block — and identifies the entities that truly control this process.</p><h3>Fundamentals of Proof‑of‑Stake and the Role of Validators</h3><p>Unlike Bitcoin, which relies on the Proof‑of‑Work consensus mechanism, Ethereum uses Proof‑of‑Stake (PoS). In PoS, network security depends on economic incentives rather than computational resources. Validators lock (stake) the network’s native asset (a minimum of 32 ETH) as collateral, granting them the right to participate in transaction validation and block creation.</p><p>Ethereum time is divided into slots (12 seconds) and epochs (32 slots, approximately 6.4 minutes). During each slot, one validator is pseudorandomly selected to propose a new block — the Block Proposer.</p><p>The consensus algorithm is designed so that every validator has an equal probability of being selected, which theoretically ensures a high degree of decentralization.</p><h3>Proposer Authority and the MEV Problem</h3><p>When a validator is chosen to produce a block, it gains exclusive control over which transactions will be included and in what order. This creates opportunities to extract additional profit, known as Maximal Extractable Value (MEV) — the maximum value obtainable by reordering, inserting, or censoring transactions within a block.</p><p>Efficient MEV extraction requires significant computational resources, sophisticated software, and continuous network monitoring. A typical validator running standard software cannot compete with specialized entities that optimize every block for profit maximization.</p><h3>The Solution: Proposer‑Builder Separation (PBS)</h3><p>To mitigate this imbalance, the Proposer‑Builder Separation (PBS) model was introduced. Its purpose is to separate the complex task of constructing an optimal block from the simpler task of proposing it to the network.</p><p>In this model, new participants — Block Builders — are responsible for assembling candidate blocks. Builders compete to produce the most profitable block, aggregating transactions from users and MEV searchers. They then submit these blocks to an open auction. The validator acting as Block Proposer simply selects the most profitable block offered, signs it, and broadcasts it to the network.</p><p>The most widely used implementation of this concept today is MEV‑Boost, adopted by approximately 90% of Ethereum validators.</p><h3>A New Form of Centralization</h3><p>While PBS and MEV‑Boost solved fairness issues for validators, they introduced a new and potentially more serious problem: block‑builder centralization. Despite the presence of nearly one million validators, the overwhelming majority of Ethereum blocks are produced by a very small set of builders.</p><p>As of early December 2025, only 12 active block builders operate in the network, with three of them dominating over 95% of total block production:</p><ul><li>Titan Builder — 50.62%</li><li>BuilderNet — 27.79%</li><li>Quasar (<a href="https://quasar.win">quasar.win</a>) — 17.10%</li></ul><h3>Conclusion</h3><p>As Ethereum’s protocol continues to evolve, it has produced a paradoxical structure. At the validation layer, it remains highly decentralized, supported by hundreds of thousands of independent participants. However, at the critical block‑creation layer, power is concentrated in the hands of only a few specialized entities. A system that appears decentralized on paper increasingly exhibits centralizing tendencies in practice.</p><p><strong>Would you like to become part of the community?</strong> Explore and join using the social channels below:</p><p><strong>Vara</strong></p><p><a href="https://vara.network/">Website</a> |<a href="https://twitter.com/VaraNetwork"> X</a> |<a href="https://discord.gg/BhhqF6f8u9"> Discord</a> |<a href="http://t.me/VaraNetwork_Global"> Telegram</a> |<a href="https://wiki.vara.network/"> Wiki</a> |<a href="https://github.com/gear-foundation"> GitHub</a></p><p><strong>Gear Protocol</strong></p><p><a href="https://gear-tech.io/">Website</a> |<a href="https://twitter.com/gear_techs"> X</a> |<a href="https://discord.gg/x8ZeSy6S6K"> Discord</a> |<a href="https://t.me/gear_tech"> Telegram</a> |<a href="https://github.com/gear-tech"> GitHub</a> |<a href="https://idea.gear-tech.io/"> Gear IDEA</a> |<a href="https://whitepaper.gear.foundation/"> Whitepaper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d983db04030" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Opaque Bytes to Universal Services: Introducing Sails Header v1]]></title>
            <link>https://medium.com/@gear_techs/from-opaque-bytes-to-universal-services-introducing-sails-header-v1-7ca308ef2c62?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ca308ef2c62</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 14:29:27 GMT</pubDate>
            <atom:updated>2026-01-28T14:29:27.570Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjdcXMx0ecj4G1S7Q32M0A.jpeg" /></figure><p><em>Note: The Sails Header specification described below is currently in active development. While the design is finalized, the implementation has not yet landed in the main Sails release. We expect to ship this feature in the near future as part of the next major framework update.</em></p><p>In the actor model architecture of Gear and Vara, communication is king. Programs send messages, and programs reply. However, until now, those messages have essentially been “opaque blobs” of SCALE-encoded bytes. To understand a message, external tools needed the specific Wasm binary, the source code, or a side-channel definition of what the data meant.</p><p>We are changing that.</p><p>We are introducing the <strong>Sails Header v1</strong> — a deterministic, wire-level ABI that lives entirely in userspace. This standard transforms Gear messages from raw byte streams into self-describing, discoverable, and polymorphic service calls.</p><h3>The “Black Box” Problem</h3><p>Currently, if an indexer or a block explorer sees a message on the Vara network, it sees a payload. Without the specific metadata for that exact program, the tool cannot distinguish a Token::Transfer from a Game::Attack.</p><p>This creates friction:</p><ol><li><strong>Fragmented Tooling:</strong> Every dApp needs custom frontend logic just to decode its own messages.</li><li><strong>Identity Crisis:</strong> A wallet doesn’t know if a contract is a Token, a DAO, or a Game until it queries specific state or checks a registry.</li><li><strong>Complex Indexing:</strong> Data availability is hindered because indexing requires heavy execution context.</li></ol><h3>The Solution: Sails Header v1</h3><p>The Sails Header is a compact envelope prepended to the payload. It requires no changes to the Gear node runtime or consensus. It is a strictly opt-in, userspace agreement that creates a universal language for services.</p><h3>The Anatomy of the Header</h3><p>The header is a fixed 16-byte prefix (for the base version) that creates a standard “preamble” for every message:</p><ul><li><strong>Magic (0x47 0x4D):</strong> ASCII for “GM”. This allows parsers to instantly recognize a Sails-compatible message.</li><li><strong>Interface ID (64-bit):</strong> A deterministic, structural fingerprint of the service being called.</li><li><strong>Entry ID (16-bit):</strong> Identifies the specific function or event (e.g., Transfer).</li><li><strong>Route Index (8-bit):</strong> Allows a single program to host multiple instances of a service.</li><li><strong>Payload:</strong> The standard SCALE-encoded data follows immediately after.</li></ul><h3>Efficient In-Program Routing</h3><p>This header doesn’t just help tools outside the blockchain; it radically simplifies the code running <em>inside</em> your contract.</p><p>Previously, routing often relied on parsing strings encoded in the payload (e.g., matching a byte string like “VFT.Transfer”). This was costly: it required reading string bytes, allocating memory, and performing string comparisons — all burning gas.</p><p>With Sails Header v1, routing becomes a simple integer match:</p><ol><li><strong>Read 8 bytes:</strong> Compare the interface_id to see <em>which</em> service is being called (e.g., Token vs. Game).</li><li><strong>Read 2 bytes:</strong> Compare the entry_id to see <em>which</em> function to run.</li></ol><p>This creates a <strong>O(1) dispatch table</strong>. The router simply jumps to the correct function pointer based on two numbers. It is faster, safer, and completely eliminates the risk of string-parsing vulnerabilities or typos.</p><h3>The Game Changer: Optimistic Service Identification</h3><p>The most powerful feature of the new header is how it changes the way tools perceive contracts. The Interface ID is not just a routing number; it is a <strong>semantic fingerprint</strong>.</p><p>Because the ID is derived mathematically from the code structure, every program that implements the exact same standard (e.g., FungibleToken, Tamagotchi, DaoVoting) will broadcast the <strong>exact same Interface ID</strong>.</p><p>This enables <strong>Optimistic Identification</strong>:</p><ol><li><strong>“Duck Typing” for Smart Contracts:</strong> Off-chain tools don’t need to verify the bytecode to know what a contract <em>is</em>. If a contract sends messages with the FungibleToken Interface ID, a Wallet can “optimistically” assume it is a token.</li><li><strong>Instant UI Rendering:</strong> When a wallet sees a transaction targeting a known Interface ID, it can instantly render the appropriate UI (e.g., a “Transfer” screen) without waiting to query an on-chain registry or download an ABI file.</li><li><strong>Universal Indexing:</strong> An indexer can now answer questions like <em>“Show me every NFT transfer on the network”</em> by simply filtering for the specific Interface ID.</li></ol><h3>The Science of Determinism</h3><p>We don’t assign random numbers to services. The Interface ID is a <strong>structural fingerprint</strong> derived from the code itself using the <strong>Keccak256</strong> algorithm. It is calculated at compile-time via a process called <strong>Structural Reflection</strong>.</p><p>The computation (PRE_INTERFACE_ID) is a composite hash of three distinct layers:</p><ol><li><strong>The Function Layer:</strong> We collect every function in the service, sort them lexicographically, and hash their structure.</li><li><strong>Strict Typing:</strong> We hash the <strong>Type</strong> (Query vs. Command), <strong>Name</strong>, <strong>Arguments</strong> (via ReflectHash), and <strong>Return Type</strong>.</li><li><strong>Result Handling:</strong> If a function returns Result&lt;T, E&gt;, we treat T (success) and E (error) as distinct structural components, ensuring that error handling is part of the interface contract.</li><li><strong>Wrapper Transparency:</strong> Protocol wrappers like CommandReply&lt;T&gt; are stripped away, so the ID focuses on business logic, not transport artifacts.</li><li><strong>The Event Layer:</strong> If the service emits events, the structure of the Event Enum is hashed. This ensures that if you add a new event type, the Interface ID changes, signalling a protocol update to listeners.</li><li><strong>The Inheritance Layer (Base Services):</strong> Sails supports service inheritance. If your service extends BaseServiceA, we take its pre-computed <strong>Interface ID</strong> and mix it into the derived service’s hash. This creates a <strong>Chain of Trust</strong>: A service’s ID mathematically proves that it implements the specific versions of the base services it claims to extend.</li></ol><p>The final ID is simply the first 8 bytes of this composite hash: INTERFACE_ID = Keccak256(Functions || Events || BaseServices)[0..8]</p><h3>Zero-Cost Runtime</h3><p>For Rust developers, this complexity is handled at compile-time.</p><ul><li>build.rs parses the service definition and computes the hashes.</li><li>The compiler embeds these IDs as constants.</li><li>At runtime, the program simply writes a static 16-byte array.</li></ul><p><strong>There is zero runtime gas cost for hashing.</strong></p><h3>The Path Forward</h3><p>The Sails Header v1 is designed to be future-proof. It includes versioning and support for extensions (like correlation IDs) without breaking the core protocol.</p><p>By adopting Sails and this header standard, we aren’t just writing smart contracts; we are building a composable, transparent, and robust web of services. We are moving from a world of isolated programs to a unified ecosystem where services announce their identity simply by speaking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oX9ERisU0XR3gsQBqN9Y0Q.jpeg" /><figcaption>KEY TECHNICAL SPECS</figcaption></figure><p><strong>By Vadim Smirnov </strong><a href="https://github.com/ukint-vs"><strong>@ukint-vs</strong></a></p><p><strong>Would you like to become part of the community?</strong> Explore and join using the social channels below:</p><p><strong>Vara</strong></p><p><a href="https://vara.network/">Website</a> |<a href="https://twitter.com/VaraNetwork"> X</a> |<a href="https://discord.gg/BhhqF6f8u9"> Discord</a> |<a href="http://t.me/VaraNetwork_Global"> Telegram</a> |<a href="https://wiki.vara.network/"> Wiki</a> |<a href="https://github.com/gear-foundation"> GitHub</a></p><p><strong>Gear Protocol</strong></p><p><a href="https://gear-tech.io/">Website</a> |<a href="https://twitter.com/gear_techs"> X</a> |<a href="https://discord.gg/x8ZeSy6S6K"> Discord</a> |<a href="https://t.me/gear_tech"> Telegram</a> |<a href="https://github.com/gear-tech"> GitHub</a> |<a href="https://idea.gear-tech.io/"> Gear IDEA</a> |<a href="https://whitepaper.gear.foundation/"> Whitepaper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ca308ef2c62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TLS Tool: The Modern Internet and Ways To Protect Information]]></title>
            <link>https://medium.com/@gear_techs/tls-tool-the-modern-internet-and-ways-to-protect-information-d23c21bdd3f7?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/d23c21bdd3f7</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 04:25:42 GMT</pubDate>
            <atom:updated>2026-01-13T04:25:42.248Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g42ln2wKro_lsjNgDWAz1Q.jpeg" /></figure><p>The modern internet stands on a few pillars: DNS, TCP/IP, and, of course, TLS/HTTPS — a cryptographic protocol that provides privacy and authenticity for connections between browsers, mobile clients, APIs, and millions of services worldwide. Today, TLS is the foundation of trust across the entire network infrastructure.</p><p>In parallel with the development of the internet, blockchains are evolving too. They are turning from simple distributed ledgers into full execution environments and replacements for server-side logic. With the rise of Web3, a fundamental challenge appears: how do we connect the deterministic world of the blockchain with the external world of HTTPS resources without breaking integrity and cryptographic security?</p><p>The TLS-Tool project (<a href="https://github.com/gear-tech/tls-tool/">https://github.com/gear-tech/tls-tool/</a>) from the Gear ecosystem is one possible solution to this problem. It provides a Rust toolkit for working with TLS records and certificates, and, most importantly, makes it possible to verify TLS inside a WASM contract.</p><h3>What’s the problem?</h3><p>Blockchains are traditionally isolated: a smart contract can’t simply execute an HTTPS request. That’s good — determinism, security, repeatable computation. But it also makes it impossible to:</p><p>• fetch data from exchange APIs</p><p>• check the state of external services</p><p>• integrate with OAuth / Web2 authorization</p><p>• use HTTPS as part of the trust model</p><p>Most networks try to solve this with an oracle approach, but that again leads to the need to trust external services.</p><p>Gear takes a different path: the contract itself can verify the authenticity of a TLS session by validating the certificate chain, signatures, and handshake materials inside WASM.</p><h3>What in TLS provides security?</h3><p>TLS is a protocol that proves two things:</p><p><strong>1. Server authenticity:</strong> it truly controls the private key corresponding to the domain certificate.</p><p><strong>2. Correctness of the encrypted channel:</strong> both sides derived the same encryption keys, and no one could have inserted themselves into the process (no MITM).</p><p>HTTPS = HTTP over TLS.</p><p>The whole point of HTTPS boils down to:</p><p><strong>the client verifies → certificate + signatures + handshake,</strong> and then uses the encrypted channel.</p><h3>What exactly does TLS verify, and what does that mean cryptographically?</h3><p><strong>Certificate chain validation (X.509 chain validation):</strong></p><p>1. Correct certificate formats (ASN.1 / DER).</p><p>2. Correct signature on each certificate over the next one.</p><p>3. Domain matching: CN / SAN contains exactly the domain the client requested.</p><p>4. Validity period checks.</p><p>5. Checks for allowed key algorithms and KeyUsage.</p><p>This work is needed to prove:</p><blockquote><em>The server presented a key that the trusted root infrastructure recognized as the key for </em><a href="https://example.com"><em>example.com</em></a></blockquote><p><strong>Verification of the ServerHello + ServerParameters signature (CertificateVerify):</strong></p><p>In TLS 1.3 the server <strong>signs the entire handshake transcript</strong> with its private key.</p><p>This exact point guarantees:</p><blockquote>The server really controls the private key for <a href="https://example.com">example.com</a>, and did not simply send someone else’s certificate.</blockquote><p>Verified:</p><p>1. The signature algorithm matches the certificate.</p><p>2. The signature is computed over the transcript hash (which includes ClientHello).</p><p>3. The correct scheme is used (typically ECDSA P-256 / RSA-PSS).</p><p>4. The public key from the certificate correctly verifies the signature.</p><p>This check is critical:</p><blockquote>Without it, TLS turns into a simple exchange of certificates that are easy to spoof.</blockquote><p><strong>Key agreement verification (ECDHE key exchange):</strong></p><p>TLS 1.3 uses ephemeral Diffie–Hellman (typically X25519 or P-256).</p><p>Verified:</p><p>1. The server sent a valid ephemeral public key.</p><p>2. The client correctly computes the shared secret.</p><p>3. Traffic key derivation uses the exact transcript.</p><p>4. Any mismatch in fields → an attacker is trying to insert themselves.</p><p>Result:</p><blockquote>An attacker cannot substitute encryption keys without also substituting the content.</blockquote><p><strong>Finished-signature verification (HMAC over transcript):</strong></p><p>The last and most important check in TLS 1.3:</p><p>The server sends a <strong>Finished</strong> message, which is:</p><pre>HMAC(server_handshake_traffic_secret, transcript_hash)</pre><p>If even a single bit in the handshake was forged, Finished won’t match.</p><p>This makes TLS cryptographically atomic:</p><blockquote>Either the entire handshake is authentic, or no part of it can be trusted.</blockquote><h3>What do the parts of TLS-tool do?</h3><p><strong>Off-chain collection of TLS artifacts (crate tls_gatherer)</strong></p><p>The off-chain agent performs:</p><p>1. A normal TLS handshake to, for example, <a href="https://example.com">https://example.com</a></p><p>2. Captures all critical data:</p><p>• certificates</p><p>• the server’s ephemeral public key</p><p>• ServerHello</p><p>• CertificateVerify signature</p><p>• Finished</p><p>• transcript hash</p><p>3. Packs everything into serializable structures.</p><p>4. Sends them to the Gear contract.</p><p>Key point:</p><blockquote><em>The agent </em><strong><em>does not interpret</em></strong><em> the results. It does not </em>tell<em> the contract: “trust this site.</em></blockquote><p>It only passes raw TLS records.</p><p><strong>On-chain verification of TLS artifacts (crate wasm_tls_verifier)</strong></p><p>A Gear smart contract that performs a full independent audit of a TLS 1.3 session inside WASM, using only raw cryptographic data, in strict compliance with RFC 8446.</p><p>1. Recomputes HKDF chains on its own</p><p>2. Recomputes the transcript hash on its own</p><p>3. Verifies Finished on its own</p><p>4. Derives AEAD keys and IVs on its own</p><p>5. Decrypts traffic on its own while verifying AEAD tags</p><p>The contract does not trust the external agent by even one byte.</p><p>If verification passes, then:</p><p>• the server → proved control of the domain’s private key</p><p>• the handshake → was not modified</p><p>• the HTTP → is authentic and unmodified</p><p>• AEAD → confirmed integrity and authenticity of the traffic</p><p>Thanks to Finished + AEAD:</p><blockquote>No one can change the contents of HTTPS traffic, even with full control over the off-chain agent.</blockquote><p><strong>Tools for simple integration (crates watcher and app)</strong></p><p>Watcher is a simple library that uses gclient and provides a high-level interface for interacting with the verifying contract.</p><p>App is an application that provides a command-line interface for interacting with the contract, for example:</p><p>app verify — url <a href="https://example.com">https://example.com</a> — contract-id &lt;CONTRACT_ID&gt;</p><h3>How exactly are TLS records verified by the smart contract?</h3><p>The contract has several stages of processing and verifying TLS records inside WASM:</p><p>• fully reconstructs and verifies a TLS 1.3 session</p><p>• decodes and decrypts the HTTP request/response</p><p>• returns a report on the cryptographic correctness of the session</p><p><strong>1. What are Artifact and Report</strong></p><p>Artifact contains:</p><p>• all TLS records from the client (client_records)</p><p>• all TLS records from the server (server_records)</p><p>• keylog (NSS keylog) with traffic secrets (handshake + application)</p><p>• connection meta-information (TlsInfo): cipher suite, SNI, certificate chain, etc.</p><p>Report contains:</p><p>• finished: FinishedReport — verification flags for Finished messages</p><p>• certs: CertsReport — result of certificate chain validation and CertificateVerify</p><p>• close: CloseReport — whether close_notify was seen from both sides</p><p>• client: Vec&lt;u8&gt; — decrypted HTTP request</p><p>• server: Vec&lt;u8&gt; — decrypted HTTP response</p><p><strong>2. Checking that required keys are present</strong></p><p>Extracted from keylog:</p><p>• CLIENT_HANDSHAKE_TRAFFIC_SECRET</p><p>• SERVER_HANDSHAKE_TRAFFIC_SECRET</p><p>• CLIENT_TRAFFIC_SECRET_0</p><p>• SERVER_TRAFFIC_SECRET_0</p><p>Without them there is no point in continuing — we won’t be able to decrypt messages or verify Finished.</p><p><strong>3. Initializing AEAD states for traffic secrets</strong></p><p>Supported cipher suites:</p><p>• TLS_AES_256_GCM_SHA384</p><p>• TLS_AES_128_GCM_SHA256</p><p>• TLS_CHACHA20_POLY1305_SHA256</p><p>For each:</p><p>1. HKDF-Expand-Label is performed via derive_aead_key_and_iv;</p><p>2. a TrafficSecretState is created:</p><p>• hash_algorithm (SHA-256 or SHA-384)</p><p>• the specific AEAD (Aes128Gcm, Aes256Gcm, ChaCha20Poly1305)</p><p>• base IV</p><p>• sequence number counter</p><p>This is the minimal piece of a TLS 1.3 implementation: <strong>exactly what is needed to decrypt records.</strong></p><p><strong>4. Decrypting application data (HTTP)</strong></p><p>The <strong>extract_application_data </strong>function does:</p><p>• for all TlsRecord with content_type == ApplicationData:</p><p>• parses the header (5 bytes)</p><p>• decrypts via AEAD (decrypt_record):</p><p>• nonce = base_iv XOR sequence_number</p><p>• AAD = record_header</p><p>• parses the inner type (InnerPlaintext): content_type + content</p><p>• if inner.content_type = APPLICATION_DATA — collects the payload (HTTP)</p><p>Its result:</p><pre>ApplicationDataResult {<br>    data: Vec&lt;u8&gt;, // clean HTTP<br>    close_notify_received: bool // whether alert close_notify was received<br>}</pre><p>This function is called twice:</p><p>• for artifact.client_records with the client app secret → HTTP request</p><p>• for artifact.server_records with the server app secret → HTTP response</p><p><strong>5. Extracting handshake messages</strong></p><p>The <strong>extract_handshake_messages</strong> function does the following:</p><p>• from client records:</p><p>• Handshake (content_type=Handshake) → cleartext (ClientHello in TLS 1.3)</p><p>• ApplicationData with inner.content_type=Handshake → encrypted handshake messages → client_encrypted</p><p>• from server records:</p><p>• similarly: ServerHello in cleartext, everything else in server_encrypted</p><p>This is exactly the raw stream of handshake messages as seen by a TLS implementation.</p><p><strong>6. Building the handshake transcript</strong></p><pre>let mut handshake_transcript = Vec::new();<br><br><br>handshake_transcript.extend_from_slice(&amp;handshake_streams.client_cleartext);<br>handshake_transcript.extend_from_slice(&amp;handshake_streams.server_cleartext);<br>handshake_transcript.extend_from_slice(&amp;handshake_streams.client_encrypted);<br>handshake_transcript.extend_from_slice(&amp;handshake_streams.server_encrypted);</pre><p>Then it is partially “unwound” while iterating through server_handshake_messages in order to record:</p><p>• transcript_length_before_certificate_verify</p><p>• transcript_length_before_server_finished</p><p><strong>7. Parsing server handshake and extracting CertificateVerify/Finished</strong></p><pre>let server_handshake_messages =<br>    parse_handshake_messages(&amp;handshake_streams.server_encrypted);<br><br><br>let mut server_certificate_verify_body: Option&lt;Vec&lt;u8&gt;&gt; = None;<br>let mut transcript_length_before_certificate_verify: usize = 0;<br>let mut server_finished_verify_data: Option&lt;Vec&lt;u8&gt;&gt; = None;<br>let mut transcript_length_before_server_finished: usize = 0;<br><br><br>for message in server_handshake_messages {<br>    if message.message_type == 15 {<br>        // CertificateVerify<br>        transcript_length_before_certificate_verify = handshake_transcript.len();<br>        server_certificate_verify_body = Some(message.full_message[4..].to_vec());<br>        handshake_transcript.extend_from_slice(&amp;message.full_message);<br>    } else if message.message_type == 20 {<br>        // Finished<br>        transcript_length_before_server_finished = handshake_transcript.len();<br>        server_finished_verify_data = Some(message.full_message[4..].to_vec());<br>        break;<br>    } else {<br>        handshake_transcript.extend_from_slice(&amp;message.full_message);<br>    }<br>}</pre><p>Message types:</p><p>• 11 — Certificate</p><p>• 15 — CertificateVerify</p><p>• 20 — Finished</p><p>What matters here:</p><p>• before CertificateVerify, we fix the transcript length (before CV)</p><p>• before Finished — separately (before Finished)</p><p><strong>8. Verifying server Finished</strong></p><p>The <strong>verify_finished_message</strong> function follows RFC 8446 strictly:</p><p>1. computes transcript_hash = Hash(transcript) (SHA-256 or SHA-384)</p><p>2. derives finished_key via tls13_hkdf_expand_label(…, “finished”, …)</p><p>3. checks HMAC(finished_key, transcript_hash) == verify_data</p><p>If everything is OK → server_finished_ok = true</p><p><strong>9. Adding Server Finished to the transcript and verifying client Finished</strong></p><p>After successful server Finished verification:</p><p>• the reconstructed Finished is added to the transcript as a full handshake message (type=20 + length + data)</p><p>• client_encrypted is parsed the same way, client Finished is searched for and verified using the same <strong>verify_finished_message</strong>, but with client_handshake_traffic_secret</p><p><strong>10. Verifying the certificate chain</strong></p><p>The validate_certificate_chain function:</p><p>Uses:</p><p>• webpki::EndEntityCert</p><p>• rustls_pki_types::CertificateDer</p><p>• webpki_roots::TLS_SERVER_ROOTS — Mozilla root store</p><p>Steps:</p><p>1. parse the leaf (the first certificate in the chain);</p><p>2. EndEntityCert::verify_is_valid_tls_server_cert with:</p><p>• TLS_SERVER_ROOTS root set</p><p>• intermediate certificates</p><p>• UnixTime (current block/call time)</p><p>3. verify DNS:</p><p>• ServerName::try_from(hostname) from SNI</p><p>• verify_is_valid_for_subject_name</p><p>Returns:</p><p>• chain_valid — whether the chain is valid up to a trusted root</p><p>• dns_name_valid — whether the domain matches</p><p><strong>11. Verifying CertificateVerify</strong></p><p>The validate_certificate_verify_signature function</p><p>Does:</p><p>1. parses certificate_verify_body:</p><p>• 2 bytes: SignatureScheme (0x0403, 0x0503, 0x0804, …)</p><p>• 2 bytes: signature length</p><p>• then: the signature itself</p><p>2. builds Transcript-Hash for transcript_before_certificate_verify</p><p>3. forms “signed content” per RFC</p><p>4. extracts the public key from the leaf</p><p>5. selects the algorithm by signature_scheme</p><p>6. calls end_entity.verify_signature(verification_algorithm, &amp;signed_content, signature)</p><p>Success → cert_verify_valid = true</p><p><strong>12. Building the final report</strong></p><p>At the very end:</p><pre>Report {<br>    finished: FinishedReport {<br>        server_finished_ok,<br>        client_finished_ok,<br>    },<br>    certs: CertsReport {<br>        chain_valid,<br>        cert_verify_valid: true/false,<br>        dns_name_valid,<br>    },<br>    close: CloseReport {<br>        server_close_notify: server_result.close_notify_received,<br>        client_close_notify: client_result.close_notify_received,<br>    },<br>    client: client_result.data,<br>    server: server_result.data,<br>}</pre><p>This Report is exactly what is emitted from the contract outward. It allows determining which checks were passed during the audit process and drawing a conclusion about the authenticity of the TLS records.</p><p>Would you like to become part of the community? Explore and join using the social channels below:</p><p><strong>Vara</strong></p><p><a href="https://vara.network/">Website</a> |<a href="https://twitter.com/VaraNetwork"> X</a> |<a href="https://discord.gg/BhhqF6f8u9"> Discord</a> |<a href="http://t.me/VaraNetwork_Global"> Telegram</a> |<a href="https://wiki.vara.network/"> Wiki</a> |<a href="https://github.com/gear-foundation"> GitHub</a></p><p><strong>Gear Protocol</strong></p><p><a href="https://gear-tech.io/">Website</a> |<a href="https://twitter.com/gear_techs"> X</a> |<a href="https://discord.gg/x8ZeSy6S6K"> Discord</a> |<a href="https://t.me/gear_tech"> Telegram</a> |<a href="https://github.com/gear-tech"> GitHub</a> |<a href="https://idea.gear-tech.io/"> Gear IDEA</a> |<a href="https://whitepaper.gear.foundation/"> Whitepaper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d23c21bdd3f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HOW-TO: Stable Substrate Runtime. Part 1]]></title>
            <link>https://medium.com/@gear_techs/how-to-stable-substrate-runtime-part-1-215c2e81a7bc?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/215c2e81a7bc</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 14:24:40 GMT</pubDate>
            <atom:updated>2026-01-06T14:24:40.327Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eB3h072sqvRTOYJk" /></figure><p>This is the first article in a series about achieving stable substrate runtime through test techniques we used for the Gear protocol. These techniques have shown great results, i.e., we have caught some tricky bugs with them. In this article, we will discuss, in general, grey-box testing and how we have used it in our node-loader tool.</p><h4><strong>Are We Sure Everything’s Rock Solid?</strong></h4><p>While developing Gear protocol, we applied many common — or rather, mandatory and obvious — methods of testing our code. We had:</p><ol><li><strong>Unit testing</strong></li></ol><ul><li>Both individual crates and the extrinsics of our pallets.</li></ul><p><strong>2. Integration testing</strong></p><ul><li>Testing Gear protocol itself against a blockchain node instance. In other words, we tested our extrinsics as the available API of the blockchain node itself by spinning up a node on CI and sending transactions to it.</li><li>Testing dependencies for the protocol. What I mean here is that we tested our expectations of how other crates (our dependencies) work. For example, we even have tests verifying that the layer between a Gear program and the WASM executor for Gear programs always returns expected values at the required pointers.</li><li>Yes, this was a pretty low-level and system-level test:<br><a href="https://github.com/gear-tech/gear/blob/ec53e0ae2fab661b1da720ee1c842215dc4594dc/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs"> https://github.com/gear-tech/gear/blob/ec53e0ae2fab661b1da720ee1c842215dc4594dc/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs</a></li></ul><p>Is this enough? When you’re developing a system for decentralized value (money) transfer, especially while preparing for the first mainnet release, you should be <strong>99.999% confident</strong> that your project won’t be the one updating the “Days without blockchain project exploit” counter. Otherwise, you can kiss goodbye to that lambo to an engaged and growing community.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*el9mbray28tm2CVW" /></figure><p>The situation was further heated by the fact that our runtime was quite large, complex, and wasn’t all about user-accessible extrinsics as the main state transition mechanism. Extrinsics merely create certain input data (in our case — placing messages in a queue), which are then processed by an inherent transaction. And the latter, during its execution, creates a deep and difficult-to-fully-grasp chain of state transitions.</p><h4><strong>Black Box Testing to the Rescue</strong></h4><p>You can approach this complex and branching state transition logic in different ways: through positive and negative tests. Well, with positive tests, everything seems clear: you have certain features, and you verify that using them results in expected storage states.</p><p>As for negative tests, in short, it’s about hitting error branches and handling them correctly. But have you covered all cases? Is your project’s architecture and code design really so successful, are components properly decomposed and correctly abstracted, that you’ve managed to handle all input data cases in your code?</p><p>There’s something that gives you a bit more confidence in answering the questions posed above. Your tests need to… <strong>go dark</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EevVjBMMG-nDBSrp" /></figure><p>What I mean is, you should start applying black box testing techniques, which assume you either know absolutely nothing about the executable target or know very little about it. This is testing that emulates how users interact with your product, especially those who use it “incorrectly.” You know what I’m talking about…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cBxSlmtjCGi2ZYC3" /></figure><p>In short, you generate almost completely random input and execute it, then watch how the system behaves, what outputs it produces, whether it crashes. This really gives you more confidence in product stability through greater confidence in negative tests, because there’s always a utility running that conducts those very negative tests. Especially if you introduce such testing as early as possible.</p><p><em>Note: We introduced this long before the mainnet release and continue using it to this day.</em></p><p><strong>How to Start Black Box Testing for a Substrate Runtime Blockchain?</strong></p><ol><li><strong>Choose Your Approach</strong></li></ol><p>Initially, we decided to use black box testing for the entire product. That is, we planned to spin up a working Substrate node with a runtime supporting Gear protocol and bombard it with a large number of nearly random transactions.</p><p>As will be described later, this isn’t the only black box testing approach we applied.</p><p>Obviously, the Substrate outer node part would reject any input garbage, and a working node on the mainnet would generally block a spammer. So the input data (transactions) shouldn’t be completely random. We need to at least hit our main extrinsics:</p><ul><li><strong>upload_program</strong> for creating Gear programs from an attached WASM blob:<br><a href="https://github.com/gear-tech/gear/blob/81a0ddf84a3d493b1c0a5ac843be1320793b607f/pallets/gear/src/lib.rs#L1359"> https://github.com/gear-tech/gear/blob/81a0ddf84a3d493b1c0a5ac843be1320793b607f/pallets/gear/src/lib.rs#L1359</a></li><li><strong>send_message</strong> for sending a message to an actor:<br><a href="https://github.com/gear-tech/gear/blob/81a0ddf84a3d493b1c0a5ac843be1320793b607f/pallets/gear/src/lib.rs#L1476"> https://github.com/gear-tech/gear/blob/81a0ddf84a3d493b1c0a5ac843be1320793b607f/pallets/gear/src/lib.rs#L1476</a></li><li><strong>send_reply</strong> for sending a reply to a received message:<br><a href="https://github.com/gear-tech/gear/blob/81a0ddf84a3d493b1c0a5ac843be1320793b607f/pallets/gear/src/lib.rs#L1513"> https://github.com/gear-tech/gear/blob/81a0ddf84a3d493b1c0a5ac843be1320793b607f/pallets/gear/src/lib.rs#L1513</a></li></ul><p>Users and programs in Gear protocol are actors that can perform nearly the same set of actions. Just as users can use the extrinsics mentioned above, Gear protocol defines for Gear programs their methods of communication (sending messages and creating other programs) and executing messages in the context of their code.</p><p>So, to properly organize testing, we need to generate as input… Gear programs and messages?</p><p><strong>2. Forming Input for Grey Box Testing</strong></p><p>The testing takes on a grey box character because we need to teach our test system <em>slightly more knowledge about the final product</em> to make testing more effective.</p><p>Not an easy task. We need a WASM blob that is also a Gear program, meaning it meets certain requirements for this WASM (no start section, presence of certain exports, etc.).</p><p>Initially, we used an approach with mutation of ready-made templates. <strong>wasm-mutate</strong> helped us with this. That is, we created some subset of programs that would be mutated according to rules we defined:<a href="https://crates.io/crates/wasm-mutate"> https://crates.io/crates/wasm-mutate</a></p><p>However, later we discovered this gem — <strong>wasm-smith</strong>. This crate allows generating WASM from random data, and this generation is configurable through many different parameters. With the wasm-smith config, we defined the number of generated functions, maximum number of instructions, absence of memory-grow instructions, and much more: <a href="https://crates.io/crates/wasm-smith">https://crates.io/crates/wasm-smith</a></p><p>We then used such a generated program as a template. Based on random data, we inserted syscall invocations (host functions that allow reading or writing to the blockchain runtime supporting Gear protocol, more details here:<a href="https://docs.rs/gstd/1.9.1/gstd/"> https://docs.rs/gstd/1.9.1/gstd/</a>) into the generated functions in this WASM template, defining random argument values for them.</p><p><strong>3. Randomization and Determinism</strong></p><p>Since we learned to generate random valid programs, we faced the next task — making the test-utility deterministic. We needed determinism because if we found a program that could break something on the node, we’d need to easily reproduce it.</p><p>For program generation, we used a seeded generator. The seed itself was logged, which allowed us to reproduce the test-utility’s work with high precision — it could simply be run again with the same input.</p><p>Moreover, this generator in turn produced new seeds, which were also logged. These new seeds were used to generate input data for the extrinsic: the program and payload.</p><p>Thus, this approach allowed us to reproduce not only the test-utility’s work from its very beginning but also a specific transaction and even a specific program. This was especially useful when we found bugs using this test-utility.</p><p><strong>4. Final Solution</strong></p><p>In the end, we created a <strong>node-loader</strong>, which worked according to the following algorithm:<br><a href="https://github.com/gear-tech/gear/blob/92eef3b8f5ecfa2fefe8adfa98d3c2518731b5bd/utils/node-loader/src/main.rs#L23"> https://github.com/gear-tech/gear/blob/92eef3b8f5ecfa2fefe8adfa98d3c2518731b5bd/utils/node-loader/src/main.rs#L23</a></p><ol><li>Accepted input parameters via CLI. These parameters were the node address, number of parallel workers, and initial seed (optional).</li><li>Instantiated a client to the node and a generator of input data for extrinsics. The generator, as should be clear by now, used the previously described Gear program generator.</li><li>Sent extrinsics and waited for block updates with corresponding events.</li></ol><p>Obviously, if no response came from the node within a certain period, this signaled that the node had crashed.</p><p><strong>So, Is This Effective?</strong></p><p>You bet! Trophies found:</p><ol><li>Not benchmarked random syscall with large inputs, which caused constantly having block timeout.</li><li>Memory out of bounds panic on instantiation:<br><a href="https://github.com/gear-tech/gear/pull/2197"> https://github.com/gear-tech/gear/pull/2197</a></li><li>Gasful and gasless messages order affected runtime storage and led to panic in runtime:<br><a href="https://github.com/gear-tech/gear/pull/2211"> https://github.com/gear-tech/gear/pull/2211</a></li><li>Panic after init message failure:<br><a href="https://github.com/gear-tech/gear/pull/1967"> https://github.com/gear-tech/gear/pull/1967</a></li><li>Event depositing from reservation:<br><a href="https://github.com/gear-tech/gear/pull/1833"> https://github.com/gear-tech/gear/pull/1833</a></li></ol><p><strong>Limitations of Our Implementation</strong></p><p><strong>1. Coverage</strong></p><p>Although this solution allowed us to find quite a few bugs, this approach has an obvious downside. The thing is, with this approach you can quite effectively test code written something like this:</p><p>Rust example:</p><pre>fn function(random: u32) {<br>    some_function(random);<br>    some_function(random + 1);<br>}<br><br>fn some_function(param: u32) {<br>    if param &gt; 42 {<br>        panic!(&quot;&quot;)<br>    }<br>    <br>    if param &lt; 24 {<br>        panic!(&quot;&quot;)<br>    }<br>}</pre><p>But we write much more complex code where the number of branches is simply enormous. And similarly to how we had to teach the generator something more about our runtime to increase test efficiency by ensuring most cases at least pass the outer node checks and upper layers of extrinsic logic, we also feel the need to have slightly smarter input data that could trigger execution of more branches, as well as deeper branches.</p><p>That is, we need grey box testing that leads to maximum coverage in depth and breadth.</p><p><strong>2. Off-Target Load</strong></p><p>It was mentioned earlier that the goal was to conduct negative testing of Gear protocol. However, Gear protocol is not Substrate. In fact, for testing purposes, we don’t need the latter. We need to somehow abstract away from the Substrate outer node part and everything else. We wanted to focus more on runtime state transitions. For this, we needed to somehow test the runtime while using the same extrinsics as input.</p><p><strong>What’s Next?</strong></p><p>We arrived at a new solution. We started using fuzz testing techniques and created a fuzzer for the runtime. But I’ll tell you about that in part two.</p><p>Stay tuned for the next installment, where we dive into how we built a proper fuzzer that gets us a good coverage of our runtime logic.</p><p><strong>Would you like to become part of the Gear community?</strong></p><p>Make sure to join the <a href="https://discord.gg/BhhqF6f8u9">Gear x Vara Discord</a> or <a href="http://t.me/VaraNetwork_Global">Telegram</a>!</p><p>Or send an email to <a href="mailto:hello@gear-tech.io">hello@gear-tech.io</a></p><p>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=215c2e81a7bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fractured But Whole: Can Ethereum’s Fragmentation Challenge Be Solved?]]></title>
            <link>https://medium.com/@gear_techs/fractured-but-whole-can-ethereums-fragmentation-challenge-be-solved-77b7740f356b?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/77b7740f356b</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 09:20:27 GMT</pubDate>
            <atom:updated>2025-08-20T09:20:27.651Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xLRF9wmvgyecVV0o2wkEng.jpeg" /></figure><blockquote><em>“Maze of isolated chains, highlighting that even simple operations such as token swaps often require cumbersome bridging processes and multiple transactions across networks. Consequently, users frequently experience friction, confusion, and increased exposure to potential errors”</em></blockquote><blockquote>Hart Lambur, Co-Founder of Risk Labs</blockquote><p>Ethereum has always faced the daunting challenge of scalability. L2 solutions emerged as Ethereum’s primary strategy to tackle scalability challenges, dramatically boosting network capacity and significantly reducing transaction fees. According to <a href="https://vitalik.eth.limo/general/2025/01/23/l1l2future.html">Ethereum Foundation reports</a>, L2 rollups have scaled Ethereum’s transaction throughput <a href="https://l2beat.com/scaling/activity?">nearly 17 times</a>, decreasing fees from upwards of $50 per swap to mere cents. This shift has enabled rapid growth and the influx of millions of new users and applications into the Ethereum ecosystem.</p><p>However, the very success of Layer 2 solutions has inadvertently introduced a significant new challenge: fragmentation.</p><p>As of early 2025, there are over 100 Layer 2 blockchains listed on <a href="https://l2beat.com/scaling/summary">L2beat</a>, with new chains launching approximately every 19 days according to <a href="https://www.gemini.com/trend-report-2024">Gemini’s institutional insights report</a>. Users are now navigating an increasingly complex landscape where assets and liquidity are fragmented across numerous isolated networks.</p><p>Developers face their own set of hurdles, forced to manage multiple L2 deployments and bridging infrastructures. Developers who commit to a single L2 risk isolating their applications from users and capital residing on other networks. The resulting complexity stifles innovation and raises barriers to entry for new projects.</p><p><em>«Justin Bons from Cyber Capital highlights a critical issue: “Millions of dollars lost due to vulnerabilities in bridges between networks highlight severe security concerns in Ethereum’s Layer 2 infrastructure.”»</em></p><p>Social coordination adds yet another dimension to the problem. L2 ecosystems such as Arbitrum’s Orbit chains, Optimism’s Superchain, and Polygon’s Aggregation Layer are often built on proprietary stacks with asynchronous sequencing. This modular design leads to further fragmentation of global state, exacerbating issues of interoperability and slowing collective progress due to divergent visions and incompatible standards.</p><h3>Is There a Way Out?</h3><p>Ethereum’s fragmented maze of disparate L2 chains has not gone unnoticed. In response, both core developers and community — led initiatives have been exploring a range of solutions aimed at bringing coherence back to the ecosystem. Broadly, these approaches fall into two key categories:</p><p><strong>The Modular Landscape: Is This the Fix?</strong></p><p>The concept of modular blockchains involves separating core functions — execution, data availability, and settlement — into distinct layers. Execution occurs on rollups, data is posted to Ethereum L1 for availability, and finality is guaranteed by Ethereum’s consensus. This architecture allows each layer to specialize, scaling Ethereum without changing its foundational protocol.</p><p>Projects like Arbitrum Orbit allow developers to launch custom L3 chains on Arbitrum’s stack. Optimism’s Superchain envisions a network of interoperable rollups using shared governance and standards. Polygon’s Aggregation Layer coordinates zero — knowledge rollups under a unified interface. Starkware explores recursive scaling with its “fractal” approach, layering L3s on top of L2s for additional flexibility.</p><p>Yet modularity doesn’t fully resolve fragmentation. Liquidity, user activity, and developer efforts remain dispersed. Each modular ecosystem tends to form its own silo. Asynchronous sequencing leads to inconsistent states, complicating real-time interoperability. Bridging assets or messages across rollups often still requires trust-minimized bridges, involving cost, latency, and risk.</p><p><strong>Standards, Standards and More Standards</strong></p><p>Another approach is standardization, intended to organize Ethereum’s expanding L2 ecosystem. One notable initiative is <a href="https://www.erc7683.org/">ERC-7683</a>, introducing an intents-based architecture. Users simply express their intent — like swapping tokens on one chain using funds from another — while relayer networks handle complex execution behind the scenes.</p><p>Standards simplify interactions significantly (on user side), yet they don’t address fragmentation at its root. Each L2 maintains its own state, sequencer, and stack. Even with a shared interface, liquidity and developer ecosystems remain separate. Social coordination remains a barrier, requiring sustained alignment across competing ecosystems.</p><p>Critics warn about potential risks: “Intent-based execution models, like ERC-7683, can introduce centralization risks as relayers often become dominant market actors. This can lead to concentrated power and resources in the hands of a few participants.”</p><h3>From Fragmentation to Coherence: Gear.exe</h3><p>While mainstream approaches revolve around spinning up additional chains or stitching them together via interoperability layers, Gear.exe offers a genuinely different path — one that rethinks horizontal scalability from the ground up.</p><p>Gear.exe is a computational environment existing natively alongside Ethereum’s Layer 1. Rather than creating separate networks or isolated economic zones, Gear.exe extends Ethereum’s own computational capabilities, running WebAssembly-based smart contracts directly within Ethereum’s economic and security guarantees.</p><p>«Nikolay Volf, founder of Gear Technologies, summarizes: “Gear operates as a computational module that can seamlessly integrate into any blockchain environment, eliminating fragmentation and significantly enhancing user experience.”»</p><p>Notably, Gear.exe does not introduce new tokens or isolated pools of liquidity. Instead, it utilizes Ethereum’s native asset, ETH, thereby maintaining unified liquidity and asset interoperability. Because Gear.exe operates at Ethereum’s core layer and relies on Ethereum finality, composability is preserved naturally. This design ensures full compatibility with existing Ethereum contracts and applications, minimizing the need for additional integration.</p><p><strong>Technical and Social Advantages</strong></p><p>Compared to modular blockchains or cross-chain aggregators, Gear.exe sidesteps the complexity of coordinating different technological stacks and bridging solutions. By embedding itself directly within Ethereum’s infrastructure, Gear.exe offers developers a unified toolset and streamlined deployment. This approach reduces complexity, accelerates development, and offers a practical path toward a more cohesive and scalable Ethereum ecosystem, free from fragmentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77b7740f356b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethereum Meets IoT: Off-Chain Automation with Gear.exe’s Compute Layer]]></title>
            <link>https://medium.com/@gear_techs/ethereum-meets-iot-off-chain-automation-with-gear-exes-compute-layer-3871e2c8a443?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/3871e2c8a443</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 16:22:19 GMT</pubDate>
            <atom:updated>2025-06-12T16:22:19.072Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JJm4qcuMxFSwOQMX" /></figure><p>What happens when blockchain’s determinism meets the unpredictability of the physical world? That’s the puzzle developers face when connecting IoT devices to Ethereum. On one side, you have smart contracts that expect finality, consensus, and onchain proofs. On the other hand, temperature sensors, smart valves, or motion detectors that stream data every few seconds, if not milliseconds.</p><p>Submitting every reading to Ethereum just to validate a threshold breach? That’s a fast track to high gas fees and sluggish performance. But even if you could afford to capture all that data, there’s another hurdle: making sense of it. Validating whether a reading is anomalous, triggering automation based on conditions, or coordinating responses across devices requires complex processing that Ethereum isn’t designed to handle natively.</p><p><a href="https://gear-tech.io/gear-exe">Gear.exe</a> offers a streamlined solution to both challenges.</p><p>First, it keeps raw, high-volume sensor data off-chain, avoiding Ethereum’s bandwidth and cost limitations. Then, using an off-chain compute layer built on WebAssembly (WASM), Gear.exe handles the heavy lifting, like data validation, anomaly detection, and automated decision-making, in a decentralized and verifiable way. Only the final results, such as confirmed events or actionable insights, are posted onchain where smart contracts can react.</p><h3>Why Off-Chain Logic for IoT Makes Sense</h3><p>Let’s start with the obvious: IoT devices aren’t built for L1 latency or gas economics. A temperature sensor in a vaccine shipment doesn’t care about block times. If the cargo gets too warm, it needs to send an alert now, not in 12 seconds. And not at $4 per transaction.</p><p>Developers have tried to solve this with centralized gateways or permissioned edge networks, but those reintroduce trust assumptions. The real goal is to keep the logic decentralized while scaling responsiveness.</p><p>Gear.exe’s compute layer bridges this divide. It lets you move real-time processing off-chain while preserving Ethereum as the ultimate source of truth. In other words: let the IoT sensors talk to Ethereum, but don’t force them to speak Solidity every time they blink.</p><h3>How It Works: Wasm on Gear.exe</h3><p>The Gear.exe network consists of Executor nodes that process WASM modules in a decentralized environment. These modules are uploaded to Gear.exe and executed there.</p><p>Once deployed, any Ethereum smart contract can offload complex or repetitive logic to these WASM modules. For IoT, this might include:</p><ul><li>Automatically turning heating or cooling systems on or off based on room temperature.</li><li>Switching lights on when motion is detected, and off when no one is present.</li><li>Sending mobile alerts if smoke, gas, or an unusual sound is detected in a home or office.</li></ul><p>Executors pick up the computation task, run the logic, and return the result. Outputs are cryptographically signed and passed to the Sequencer, which posts results back to Ethereum. For use cases that demand sub-second responsiveness, like reacting to real-time sensor input, a pre-confirmation mechanism allows applications to act on the result immediately, even before full confirmation or finality on Ethereum. Once finalized, the Mirror Contract updates its state, making the result accessible to any dApp that needs it.</p><p>Because Gear.exe allocates up to 2 GB of memory per program and supports multi‑threaded execution, you can run sophisticated logic without being constrained by Ethereum’s gas or memory limits.</p><h3>So, What Happens When Your Sensor Speaks?</h3><ol><li><strong>Sensor Gateway → Mirror Contract:</strong> Your IoT gateway bundles a batch of readings into a transaction that calls the Mirror Contract’s request function.</li><li><strong>Event Detection by Executors:</strong> Executors monitor Ethereum for those request events. Once spotted, they fetch the corresponding WASM code from Gear.exe’s network and run it against the payload.</li><li><strong>Off‑Chain Computation:</strong> Within milliseconds, the WASM logic validates each reading, dropping out‑of‑range values, running anomaly scores, and determining if an automation trigger fires.</li><li><strong>Sequencer Aggregation:</strong> Executors sign their outputs, forwarding them to the Sequencer, which batches results to reduce on‑chain calls and covers the associated gas fees.</li><li><strong>Instant Pre-Confirmation for dApps</strong>: The Sequencer emits a signed pre-confirmation of the result before final settlement. dApps can consume this off-chain signal and react immediately, which is ideal for automation that can’t afford to wait for Ethereum’s finality.</li><li><strong>Router Contract → Mirror Contract:</strong> The Router Contract ingests the batch, updates the Mirror Contract’s state, and emits an event signalling completion. Now, your dApp or another contract can read the validated results, such as<em> temperature breach detected</em>, directly on Ethereum.</li></ol><p>Explore the <a href="https://gear-tech.io/gear-exe/whitepaper/">whitepaper</a> for comprehensive insights and technical details on Gear.exe’s architecture and capabilities.</p><h3>Mirror Contracts: Your Off‑Chain On‑Ramp</h3><p>Mirror Contracts are more than just convenience wrappers. They allow Ethereum to maintain visibility and control over off-chain execution without needing custom bridges or centralized middleware.</p><p>Each Mirror Contract emits request events and receives result events. This two-way messaging system allows off-chain logic to stay verifiable, trackable, and auditable, while keeping on-chain interaction lean and gas-efficient.</p><p>Developers also benefit from working with familiar tools. Mirror Contracts are standard Solidity contracts that integrate cleanly with MetaMask, Hardhat, and indexing services.</p><h3>Grounding the Concept: Supply Chain Automation</h3><p>Consider a logistics company transporting perishable goods. Containers are equipped with IoT sensors that monitor temperature and humidity. If the temperature rises above a certain threshold, the shipment is compromised.</p><p>A typical Web3 approach might try to log every reading on-chain. That’s unworkable.</p><p>With Gear.exe:</p><ul><li>The sensor gateway pushes readings to a Mirror Contract every minute.</li><li>A WASM module on Gear.exe validates the data off-chain. It might average the last five readings, apply anomaly filters, and check if the breach is sustained.</li><li>If a breach is confirmed, the result is returned on-chain.</li><li>The Ethereum smart contract then unlocks an insurance payout or triggers a refund.</li></ul><p>Only the breach event and its validated proof make it to Ethereum. The rest stays off-chain, where it belongs.</p><h3>So What Makes Gear.exe the Right Fit?</h3><p>Gear.exe delivers noticeable improvements in both cost and speed. Off-chain compute handles the heavy lifting, reducing transaction costs by moving expensive operations off Ethereum. Executors process tasks in parallel threads, enabling near-instant response times for critical triggers — ideal for applications that can’t wait on block finality.</p><p>This performance doesn’t come at the expense of trust. Executors are peer-selected through a restaking model, eliminating centralized control. Developers work with familiar tools: Rust for writing WASM logic, Solidity for smart contracts, and the same Ethereum interfaces they already know.</p><p>Gear.exe allows developers to build smarter Ethereum dApps that don’t choke on sensor input or outsource logic to centralized APIs. For IoT builders, that’s the missing puzzle piece: decentralized automation that actually performs like the systems they’re trying to replace.</p><p>Gear.exe Testnet is around the corner — please reach out to <em>hello@gear-tech.io</em> if you are interested in building the next wave of highly performant blockchain Dapps.</p><p><strong>Join Vara Network and Start Building</strong></p><p><a href="https://twitter.com/VaraNetwork">Vara Network</a> is a stand-alone layer-1 decentralized network built and running on top of<a href="https://www.gear-tech.io/"> Gear Protoco</a>l. Created by<a href="https://twitter.com/Gear_Foundation"> Gear Foundation</a>, Vara aims to be a performant and scalable network for developers to build market-leading decentralized applications.</p><p>Whether you’re looking to build a new project or bring existing applications to the blockchain, Vara Network’s unique architecture offers benefits — including deep scalability and unparalleled composability — making It the ideal platform for developers looking to build the next generation of dApps.</p><p>Would you like to become part of the community? Explore and join using the social channels below:</p><p><strong>Vara</strong></p><p><a href="https://vara.network/">Website</a> | <a href="https://twitter.com/VaraNetwork">X</a> | <a href="https://discord.gg/BhhqF6f8u9">Discord</a> | <a href="http://t.me/VaraNetwork_Global">Telegram</a> | <a href="https://wiki.vara.network/">Wiki</a> | <a href="https://github.com/gear-foundation">GitHub</a></p><p><strong>Gear Protocol</strong></p><p><a href="https://gear-tech.io/">Website</a> | <a href="https://twitter.com/gear_techs">X</a> | <a href="https://discord.gg/x8ZeSy6S6K">Discord</a> | <a href="https://t.me/gear_tech">Telegram</a> | <a href="https://github.com/gear-tech">GitHub</a> | <a href="https://idea.gear-tech.io/">Gear IDEA</a> | <a href="https://whitepaper.gear.foundation/">Whitepaper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3871e2c8a443" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Technical Updates: Gear Release 1.8.1 | May 2025 Recap]]></title>
            <link>https://medium.com/@gear_techs/technical-updates-gear-release-1-8-1-may-2025-recap-2d4c2501cb56?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d4c2501cb56</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Thu, 29 May 2025 14:57:33 GMT</pubDate>
            <atom:updated>2025-05-29T14:57:33.136Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqDjflt9TXzQQs60Rtdo9Q.jpeg" /></figure><h3>Gear Release 1.8.1 — A New Era of Reply Logic, Error Semantics &amp; Economic Security</h3><p>This post presents a <strong>combined overview of Gear releases v1.8.0 and v1.8.1</strong> — two important updates that introduce critical protocol-level improvements and runtime refinements. Together, they signal a clear shift toward <strong>stronger execution guarantees</strong>, <strong>developer-friendly debugging</strong>, and <strong>tightened economic boundaries</strong>.</p><p><em>Note: Whether you’re building dApps, writing runtime logic, or integrating with Gear infrastructure — this release cycle matters.</em></p><h3>TL;DR — What Changed and Why It Matters</h3><p>The Gear protocol is evolving with tighter invariants, more robust error semantics, and stronger economic deterrents. This release brings:</p><ul><li>A <strong>fundamental shift in how value is returned</strong> through error messages</li><li>Major upgrades to <strong>error reply codes and panic behavior</strong></li><li>A substantial <strong>gas/weight price increase</strong> to deter network abuse</li><li>Runtime and userspace improvements for more stable and efficient development</li></ul><h3>Key Highlights</h3><h4>1. Protocol Invariant Change: Value Now Only Flows Through Messages (<a href="https://github.com/gear-tech/gear/pull/4634">#4634</a>)</h4><p>Previously, any error would auto-return the value to the source silently. Not anymore.</p><p>From now on:</p><ul><li><strong>All value transfers must happen via messages</strong>, including error replies.</li><li>If the original message <strong>doesn’t expect a reply</strong> and the program fails — <strong>the value is retained by the destination program</strong>.</li><li><strong>In handle_reply</strong>, you can now reliably track how much value was returned, ensuring transparent and traceable logic.</li></ul><p>💡 This strengthens control and predictability in smart contract execution.</p><h4>2. gr_panic Now Accepts Arbitrary Bytes (<a href="https://github.com/gear-tech/gear/pull/4583">#4583</a>)</h4><p>The <strong><em>gr_panic</em></strong> syscall is now fully flexible:</p><ul><li>Payload can contain <strong>any bytes</strong>, not just formatted strings.</li><li>This makes <strong>binary protocols and low-level debugging easier</strong>.</li><li>No more userspace hacks to encode complex errors.</li></ul><h4>3. Programs That Exit Now Always Reply (<a href="https://github.com/gear-tech/gear/pull/4620">#4620</a>)</h4><p>If a program exits without manually sending a reply, <strong>an auto-generated reply is sent</strong> to honor the protocol invariant.</p><p>This guarantees:</p><ul><li>Every <strong>repliable message always gets a reply</strong></li><li>Client logic becomes more robust and predictable</li></ul><h4>4. Error Reply Codes Refactored and Made Self-Descriptive (<a href="https://github.com/gear-tech/gear/pull/4589">#4589</a>)</h4><p>Error reply behavior has been updated to remove the soft requirement for string-formatted payloads.</p><p>Now:</p><ul><li><strong>UserspacePanic</strong>: contains raw byte payload</li><li><strong>ProgramExited</strong>: includes inheritor ActorId</li><li>All other codes: payloads are empty — rely on the code alone</li></ul><p><strong>💡</strong> Clarified and more flexible handling of payloads, making integration cleaner and less error-prone.</p><h4>5. System GearBank Address Changed (<a href="https://github.com/gear-tech/gear/pull/4588">#4588</a>)</h4><p>The GearBank account now uses <strong>Substrate-native PalletId derivation</strong>, changing its address to modlpy/gbank.</p><p>This makes it:</p><ul><li>Recognizable to tools and explorers</li><li>Easier to integrate in governance and economic flows</li></ul><h4><strong>6. Gas and Weight Cost Increased 100x (#4585)</strong></h4><p>To reduce attack surface and discourage abuse:</p><ul><li>Gas/weight cost raised from <strong>6 units to 100</strong></li><li>Governance deposits increased</li><li>Spamming the network now comes with real cost</li></ul><h4>7. Builtins Now Lock Existential Deposit (<a href="https://github.com/gear-tech/gear/pull/4633">#4633</a>)</h4><p>Built-in programs now behave like regular ones in terms of existential deposit logic:</p><ul><li>Value is <strong>locked from the treasury</strong></li><li>Ensures unified behavior and compatibility during migrations</li></ul><p><strong>Other Notable Updates</strong></p><ul><li>New WASM target: wasm32v1-none (<a href="https://github.com/gear-tech/gear/pull/4407">#4407</a>)</li><li><strong>gmeta</strong> crate fully removed (<a href="https://github.com/gear-tech/gear/pull/4347">#4347</a>)</li><li><strong>gtest</strong> and <strong>gsdk</strong> can now query inheritors of exited programs (<a href="https://github.com/gear-tech/gear/pull/4616">#4616</a>,<a href="https://github.com/gear-tech/gear/pull/4622"> #4622</a>)</li><li>Replaced parity-wasm with custom WASM parser for long-term support (<a href="https://github.com/gear-tech/gear/pull/4494">#4494</a>)</li><li>Improved memory allocation and runtime election thresholds (<a href="https://github.com/gear-tech/gear/pull/4473">#4473</a>,<a href="https://github.com/gear-tech/gear/pull/4428"> #4428</a>)</li><li>Added basic transport fees and governance tracks to gear-eth-bridge (<a href="https://github.com/gear-tech/gear/pull/4590">#4590</a>,<a href="https://github.com/gear-tech/gear/pull/4527"> #4527</a>)</li></ul><p>Would you like to become part of the community? Explore and join using the social channels below:</p><h4><strong>Vara</strong></h4><p><a href="https://vara.network/">Website</a> | <a href="https://twitter.com/VaraNetwork">X</a> | <a href="https://discord.gg/BhhqF6f8u9">Discord</a> | <a href="http://t.me/VaraNetwork_Global">Telegram</a> | <a href="https://wiki.vara.network/">Wiki</a> | <a href="https://github.com/gear-foundation">GitHub</a></p><h4><strong>Gear Protocol</strong></h4><p><a href="https://gear-tech.io/">Website</a> | <a href="https://twitter.com/gear_techs">X</a> | <a href="https://discord.gg/x8ZeSy6S6K">Discord</a> | <a href="https://t.me/gear_tech">Telegram</a> | <a href="https://github.com/gear-tech">GitHub</a> | <a href="https://idea.gear-tech.io/">Gear IDEA</a> | <a href="https://whitepaper.gear.foundation/">Whitepaper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d4c2501cb56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Technical Updates: Treasury & New Rust Edition | March 2025 Recap]]></title>
            <link>https://medium.com/@gear_techs/technical-updates-treasury-new-rust-edition-march-2025-recap-f3faf99fa7de?source=rss-eae157a6af62------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3faf99fa7de</guid>
            <dc:creator><![CDATA[Gear Protocol]]></dc:creator>
            <pubDate>Mon, 07 Apr 2025 21:12:05 GMT</pubDate>
            <atom:updated>2025-04-07T21:12:05.610Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xhsNY8qkbsuvORi7" /></figure><p>March brought continued progress across the <strong>Gear Protocol,</strong> ecosystem tools, and its libraries — focusing on optimization, stability, and improvements to our economic model.</p><p>Developers made <strong>33 contributions</strong> across the main repositories this month, with <strong>26 commits</strong> on the Gear Protocol repository and <strong>7 commits</strong> on the Sails repository. Network activity remained strong, with <strong>113,326 active accounts</strong> and <strong>487 new accounts</strong> added.</p><p><strong>Key changes:</strong></p><p><a href="https://github.com/gear-tech/gear/commit/999c6001e10be1bd6124fd2df403e3510d220279"><strong>Treasury Redirection</strong></a><strong>: </strong>100% of transaction fees now go straight to the “Treasury”, strengthening funding for continued protocol improvements.</p><p><a href="https://github.com/gear-tech/gear/commit/b72be985b54d1594e203342bdc8d7342995c51e5"><strong>Rust Edition 2024</strong></a>: Upgraded to the latest Rust edition, enabling the use of modern language features.</p><p><a href="https://github.com/gear-tech/gear/commit/bfae3921ff81f0e88750130d3c6dca7812e2740a"><strong>Core Refactor</strong></a><strong>: </strong>a minor internal optimization replaces full initialization allocations with a simple boolean flag, reducing memory usage and speeding up initialization.</p><p><a href="https://github.com/gear-tech/gear/commit/bfcf388d3ecd1db96a37974a927cfcf130a3c0cc"><strong>BLAKE3 Update:</strong></a><strong> </strong>library has been updated to the latest version, providing improved performance for hashing operations.</p><p><strong>Join Vara Network and Start Building</strong></p><p><a href="https://twitter.com/VaraNetwork">Vara Network</a> is a stand-alone layer-1 decentralized network built and running on top of<a href="https://www.gear-tech.io/"> Gear Protoco</a>l. Created by<a href="https://twitter.com/Gear_Foundation"> Gear Foundation</a>, Vara aims to be a performant and scalable network for developers to build market-leading decentralized applications.</p><p>Whether you’re looking to build a new project or bring existing applications to the blockchain, Vara Network’s unique architecture offers benefits — including deep scalability and unparalleled composability — making It the ideal platform for developers looking to build the next generation of dApps.</p><p>Would you like to become part of the community? Explore and join using the social channels below:</p><p><strong>Vara</strong></p><p><a href="https://vara.network/">Website</a> | <a href="https://twitter.com/VaraNetwork">X</a> | <a href="https://discord.gg/BhhqF6f8u9">Discord</a> | <a href="http://t.me/VaraNetwork_Global">Telegram</a></p><p><strong>Gear Protocol</strong></p><p><a href="https://gear-tech.io/">Website</a> | <a href="https://twitter.com/gear_techs">X</a> | <a href="https://discord.gg/x8ZeSy6S6K">Discord</a> | <a href="https://t.me/gear_tech">Telegram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3faf99fa7de" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>