<?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 Avax Developers on Medium]]></title>
        <description><![CDATA[Stories by Avax Developers on Medium]]></description>
        <link>https://medium.com/@avaxdevelopers?source=rss-fa17a6b289be------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JCjTgHIIc1svbxOVH_YHuw.jpeg</url>
            <title>Stories by Avax Developers on Medium</title>
            <link>https://medium.com/@avaxdevelopers?source=rss-fa17a6b289be------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 06 Apr 2026 00:00:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@avaxdevelopers/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[Avalanche C-Chain Throughput Increases as Validators Signal Higher Gas Targets]]></title>
            <link>https://medium.com/@avaxdevelopers/avalanche-c-chain-throughput-increases-as-validators-signal-higher-gas-targets-fb48b7125821?source=rss-fa17a6b289be------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb48b7125821</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[evm]]></category>
            <category><![CDATA[avalanche]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[validator]]></category>
            <dc:creator><![CDATA[Avax Developers]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 22:01:09 GMT</pubDate>
            <atom:updated>2025-08-20T22:01:09.052Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NBlw9Ey_kiKY6AeTPtG40g.png" /></figure><h3>Quick Take</h3><ul><li>Positions Avalanche well to become one of the lowest latency, highest throughput EVM L1 experiences in the ecosystem.</li><li>Avalanche validators increased the C-Chain’s target gas consumption by 30% from 1.6M to 2.1M gas/second</li><li>The dynamic adjustments were enabled by the Octane upgrade that activated in April 2025.</li><li>The Avalanche Foundation plans to continue signaling for incremental increases, as network performance metrics allow</li><li>Future improvements like Streaming Asynchronous Execution (SAE) and Firewood Database integration aim to enable even larger increases</li></ul><p>Avalanche’s C-Chain has seen its throughput capacity increase by over 30% following validator action to raise the target gas consumption from 1.6 million to 2.1 million gas per second. The increase was made possible by the Octane upgrade that went live on April 6th, 2025.</p><p>The gas target determines how much computational work the network can process per second, directly affecting how many transactions and smart contract operations can be executed. For users of the chain, higher gas targets mean higher potential transactions per second, and also lower transaction fees. For validators and node operations, higher gas targets can mean increased demands on hardware and network infrastructure, which is closely monitored to ensure stability and reliability.</p><h3>Dynamic Gas Target Adjustment</h3><p>The Octane upgrade introduced the ability for Avalanche Primary Network validators to dynamically update the network’s target utilization through signaling their preferences. This mechanism allows the network to adjust capacity parameters without requiring hard forks or governance votes.</p><h3>How Validator Signaling Works</h3><p>Under the new mechanism, validators can explicitly set their preferred gas target values. Validators that do not set a preference effectively abstain from influencing the network’s gas target by defaulting to whatever the current value is. The network calculates the effective gas target based on the preferences of participating validators.</p><p>Since the upgrade’s activation, validators run by the Avalanche Foundation have iteratively increased their gas target preferences, resulting in the 30% throughput increase observed across the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ds3UqA1-zw96b129" /></figure><p>The Avalanche Foundation plans to continue gradually increasing their validator preferences while monitoring network performance metrics. This approach aims to maximize C-Chain utilization within current infrastructure constraints. Upcoming optimizations like Streaming Asynchronous Execution and the Firewood Database integration are expected to enable further increases.</p><p>Other validator operators can set their gas target preferences to participate in determining the network’s effective throughput capacity. This allows scaling decisions to reflect the technical assessment of the broader validator community.</p><h3>Network Health Monitoring</h3><p>Several key performance indicators are closely monitored consistently through changes to the target gas consumption to ensure network stability:</p><ul><li><strong>Block verification times</strong> — to ensure consensus remains stable</li></ul><p>As the gas target increases, so does the maximum amount of gas able to be consumed in a given block. The more gas in a block, the longer time that block will potentially take to execute. It’s important that block execution times remain within an acceptable range to ensure that consensus is able to proceed successfully.</p><p>Because blocks can have significantly different sizes depending on the time they are produced and gas capacity available at that instant, a holistic way of viewing the amount of time spent in block execution is by looking at the percentage of time that a node uses to execute blocks during consensus. We had earmarked less than or equal to 5% of time spent in block execution as a key performance indicator of consensus, and though a small initial increase was observed, validator nodes were able to stay below that threshold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i8-CwKyITLDL0_cu" /></figure><ul><li><strong>Disk usage and state growth rates</strong> — to monitor storage requirements</li></ul><p>The higher the gas usage, the higher potential for state growth, and because all validators currently must maintain the full state of the chain on disk, the more storage validators may need to have available to use.</p><p>Of course the larger the chain grows, the more disk space it will require to store it, but in increasing the gas target we wanted to ensure that the <em>rate</em> of disk growth didn’t become unsustainable, and in fact observed that disk usage continued to grow at a relatively constant rate of around 3 to 4 GB per day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3pB9dl7KYkBrh2a6" /></figure><p>Interestingly, since the increases to the gas target, we have observed a slight <em>decrease</em> in the amount of data added to disk per gas used. Meaning that as more gas became available, a smaller percentage of the total gas was used to write new values to state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q9KHAoCZvUD93P8h" /></figure><ul><li><strong>Peer-to-peer network health</strong> — to monitor connectivity between all validator nodes</li></ul><p>A key indicator of the health of the network as a whole is the percentage of successful queries made to peers. If any significant number of validator nodes were to not be able to process the increased utilization level of the chain, they would not be able to respond to their peer’s queries about block proposals. Throughout the iterative increases to the gas target in June and July, we did not observe any noticeable decrease in the observed percentage of successful queries, indicating that on the whole, the vast majority of nodes are still stable and able to keep up with the increased processing demands created by the higher gas targets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TQ7ypHbnDh-1_UlH" /></figure><p>These metrics remained within acceptable parameters throughout the increase, indicating the network can handle the higher throughput without stability issues.</p><h3>Scaling Optimization Ahead</h3><p>The 30% increase represents just the beginning of Avalanche’s throughput expansion plans. Two major technical upgrades are in development that could enable even more significant capacity improvements:</p><h3>Streaming Asynchronous Execution (SAE)</h3><p>As outlined in Avalanche Community Proposal ACP-194, SAE introduces a fundamental architectural change by separating block execution from the consensus process. This allows for a continuous execution thread that operates independently of consensus, enabling gas targets to align with average-case execution times rather than being constrained by worst-case scenarios.</p><p>The separation means the network can maintain higher throughput targets without risking consensus delays during computationally intensive blocks.</p><h3>Firewood Database Integration</h3><p>The upcoming Firewood database integration is designed to significantly improve performance of blockchain database operations, and also reduce validator node storage requirements through optimized data layout and state pruning. By maintaining only recent state data and improving storage efficiency, Firewood will reduce the operational burden on validators, potentially enabling support for higher gas targets.</p><h3>Looking Ahead</h3><p>A combination of upcoming performance improvement efforts as well as continued iteration to dynamically determine the maximum chain capacity possible at any given point in time positions Avalanche well to become one of the lowest latency, highest throughput EVM L1 experiences in the ecosystem.</p><p>Head to the Builders Hub to access everything you need to know about building on Avalanche: <a href="https://build.avax.network/">https://build.avax.network/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb48b7125821" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use Subnet-EVM Stateful Precompiles on Avalanche to Rapidly Deploy Your High Performance dApp]]></title>
            <link>https://medium.com/@avaxdevelopers/subnet-evm-stateful-precompiles-on-avalanche-1806c9ec273?source=rss-fa17a6b289be------2</link>
            <guid isPermaLink="false">https://medium.com/p/1806c9ec273</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[evm]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[avalanche]]></category>
            <category><![CDATA[precompile]]></category>
            <dc:creator><![CDATA[Avax Developers]]></dc:creator>
            <pubDate>Thu, 03 Aug 2023 20:37:10 GMT</pubDate>
            <atom:updated>2023-08-08T18:18:23.000Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gIQqMAz2Xs4BeKM49qKpyg.png" /></figure><h3>Introduction</h3><p>Avalanche is a platform that powers the execution transactions for decentralized applications. It’s comprised of subnetworks called Subnets consisting of custom virtual machines (VMs) and complex validator rulesets. One such VM is Subnet-EVM. This technical deep-dive reviews how Subnet-EVM can customize the VM’s deployment via Stateful Precompiles, allowing for Subnets to adapt to all of your dApp’s needs.</p><h3>Subnet-EVM</h3><p>Avalanche is a network composed of many blockchains. Each blockchain is an instance of a VM, much like an object is an instance of a class in an object-oriented language. That is, the VM defines the behavior of the blockchain.</p><p><a href="https://github.com/ava-labs/subnet-evm">Subnet-EVM</a> is a simplified version of <a href="https://github.com/ava-labs/coreth">Coreth, the VM of the Contract Chain (C-Chain)</a>. It implements the Ethereum Virtual Machine (EVM) and supports Solidity smart contracts, as well as most other Ethereum client functionality, and is compatible with many of EVM toolchains and wallets.</p><h3>EVM Precompile</h3><p>Originally defined in Appendix E of the <a href="https://ethereum.github.io/yellowpaper/paper.pdf">Ethereum Yellowpaper</a>, precompiled contracts are written in low-level code and are responsible for implementing operations or computations that are used by smart contracts. These precompiled contracts provide efficient and optimized implementations of cryptographic operations. They’re included in the EVM protocol to enable smart contracts to perform complex computations, without the need for developers to write custom code.</p><h4>PrecompiledContract</h4><p>All Precompiles must implement the <a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L51-L57">PrecompiledContract interface</a></p><pre>// PrecompiledContract is the basic interface for native Go contracts. <br>// The implementation requires a deterministic gas count based on the <br>// input size of the Run method of the contract.<br>type PrecompiledContract interface {<br>    RequiredGas(input []byte) uint64<br>    Run(input []byte) ([]byte, error)<br>}</pre><p>PrecompileContract has 2 functions which need to be implemented. RequiredGas calculates the contract gas use and Run runs the precompiled contract.</p><p><strong>NOTE</strong> the PrecompiledContract is different than the StatefulPrecompiledContract listed below.</p><p>These precompile addresses start from 0x0000000000000000000000000000000000000001 and increment by 1.</p><p>EVM Precompiled contracts include the following. The numbering is the address of the contract:</p><ol><li>Recovery of ECDSA signature</li><li>Hash function SHA256</li><li>Hash function RIPEMD160</li><li>Identity</li><li>Modular exponentiation (<a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md">EIP 198</a>)</li><li>Addition on elliptic curve alt_bn128 (<a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-196.md">EIP 196</a>)</li><li>Scalar multiplication on elliptic curve alt_bn128 (<a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-196.md">EIP 196</a>)</li><li>Checking a pairing equation on curve alt_bn128 (<a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-197.md">EIP 197</a>)</li><li>BLAKE2b hash function (<a href="https://eips.ethereum.org/EIPS/eip-152">EIP 152</a>)</li></ol><p>Precompiles are shortcuts to execute a function implemented by the EVM itself, rather than an actual contract. They’re useful when the desired functionality would be cumbersome and awkward to implement in Solidity, such as cryptographic functions. Here’s the RIPEMD160 cryptographic function implemented as a precompile. Note that it implements the RequiredGas and Run functions per the PrecompiledContract interface.</p><h4>RIPEMD160 Implementation</h4><pre>// RIPEMD160 implemented as a native contract.<br>type ripemd160hash struct{}<br><br>// RequiredGas returns the gas required to execute the pre-compiled contract.<br>//<br>// This method does not require any overflow checking as the input size <br>// gas costs<br>// required for anything significant is so high it&#39;s impossible to pay for.<br>func (c *ripemd160hash) RequiredGas(input []byte) uint64 {<br> return uint64(len(input)+31)/32*params.Ripemd160PerWordGas + params.Ripemd160BaseGas<br>}<br><br>func (c *ripemd160hash) Run(input []byte) ([]byte, error) {<br> ripemd := ripemd160.New()<br> ripemd.Write(input)<br> return common.LeftPadBytes(ripemd.Sum(nil), 32), nil<br>}</pre><p>Developers can leverage precompiles by invoking the keywords:</p><pre>return ripemd160hash(input)</pre><p>Behind the scenes, precompiles are triggered through CALL opcodes utilizing specific addresses. These CALL opcodes, including CALL, STATICCALL, DELEGATECALL, and CALLCODE, have the ability to invoke a precompile. Typically, these opcodes are employed to call a smart contract, with the input representing encoded parameters for the smart contract call. However, when a precompile is involved, the input is passed to the precompile, allowing it to execute the operation and deduct the necessary gas from the transaction&#39;s execution context.</p><p>Here are the original 9 cryptographic functions implemented as precompiles:</p><ol><li><a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L199-L235">Recovery of ECDSA signature</a></li><li><a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L237-L250">Hash function SHA256</a></li><li><a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L252-L266">Hash function RIPEMD160</a></li><li><a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L268-L280">Identity</a></li><li><a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L305-L438">Modular exponentiation</a></li><li><a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L684-L712">Addition on elliptic curve alt_bn128</a></li><li><a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L714-L748">Scalar multiplication on elliptic curve alt_bn128</a></li><li><a href="https://file+.vscode-resource.vscode-cdn.net/Users/gabriel/go/src/github.com/ava-labs/developer-relations-long-form-content/docs/overview/getting-started/TODO">Checking a pairing equation on curve alt_bn128</a></li><li><a href="https://github.com/ava-labs/subnet-evm/blob/master/core/vm/contracts.go#L608-L667">BLAKE2b hash function</a></li></ol><p>We can see these precompile mappings from address to function <a href="https://github.com/ava-labs/coreth/blob/master/core/vm/contracts.go#L147-L156">here in Coreth</a>:</p><pre>// PrecompiledContractsBanff contains the default set of pre-compiled Ethereum<br>// contracts used in the Banff release.<br>var PrecompiledContractsBanff = map[common.Address]precompile.StatefulPrecompiledContract{<br>	common.BytesToAddress([]byte{1}): newWrappedPrecompiledContract(&amp;ecrecover{}),<br>	common.BytesToAddress([]byte{2}): newWrappedPrecompiledContract(&amp;sha256hash{}),<br>	common.BytesToAddress([]byte{3}): newWrappedPrecompiledContract(&amp;ripemd160hash{}),<br>	common.BytesToAddress([]byte{4}): newWrappedPrecompiledContract(&amp;dataCopy{}),<br>	common.BytesToAddress([]byte{5}): newWrappedPrecompiledContract(&amp;bigModExp{eip2565: true}),<br>	common.BytesToAddress([]byte{6}): newWrappedPrecompiledContract(&amp;bn256AddIstanbul{}),<br>	common.BytesToAddress([]byte{7}): newWrappedPrecompiledContract(&amp;bn256ScalarMulIstanbul{}),<br>	common.BytesToAddress([]byte{8}): newWrappedPrecompiledContract(&amp;bn256PairingIstanbul{}),<br>	common.BytesToAddress([]byte{9}): newWrappedPrecompiledContract(&amp;blake2F{}),</pre><p>By utilizing these precompiled contracts, smart contracts can perform cryptographic computations more efficiently and with reduced gas costs. Developers can call these precompiled contracts directly from their own smart contracts, saving computational resources and simplifying the development process.</p><p>Precompiled contracts are an integral part of any EVM ecosystem, providing optimized implementations of cryptographic operations for smart contracts.</p><h4>Stateful Precompile</h4><p>Avalanche enables precompiles to have greater functionality by adding state access. There are 5 stateful precompiles which can be enabled via ChainConfig in genesis or as an upgrade.</p><ul><li>Restricting Smart Contract Deployers</li><li>Restricting Who Can Submit Transactions</li><li>Minting Native Coins</li><li>Configuring Dynamic Fees</li><li>Changing Fee Reward Mechanisms</li></ul><h4>AllowList</h4><p>Permissions can be enforced by a stateful precompile on an address via the AllowList interface. The AllowList is not a contract itself, but a helper structure to provide a control mechanism for wrapping contracts. It provides an AllowListConfig to the precompile so that it can take an initial configuration from genesis/upgrade.</p><p>Each Precompile, which is using AllowList , has 3 permission levels. Admin lets you create and remove other Admins in addition to using the precompile. Enabled lets you use the precompile. None prevents you from using the precompile.</p><pre>pragma solidity ^0.8.0;<br><br>interface IAllowList {<br>  // Set [addr] to have the admin role over the precompile<br>  function setAdmin(address addr) external;<br><br>  // Set [addr] to be enabled on the precompile contract.<br>  function setEnabled(address addr) external;<br><br>  // Set [addr] to have no role the precompile contract.<br>  function setNone(address addr) external;<br><br>  // Read the status of [addr].<br>  function readAllowList(address addr) external view returns (uint256 role);<br>}</pre><h4>ContractDeployerAllowList</h4><p>AllowList adds adminAddresses and enabledAddresses fields to precompile contract configurations. For instance, configure the contract deployer precompile contract configuration by adding the following JSON to your genesis or upgrade JSON.</p><p>ContractDeployerAllowList enables restricting which accounts can deploy a smart contract to your instance of Subnet EVM. Configure by adding the following JSON to your genesis or upgrade JSON.</p><pre>&quot;contractDeployerAllowListConfig&quot;: {<br>    &quot;adminAddresses&quot;: [<br>        &quot;0x41B3E74d0dC7c5f573c8cFB007C45a494B1B10F7&quot;<br>    ],<br>    &quot;enabledAddresses&quot;: [<br>        &quot;0x7326165202aed51E8dd3750Ff59a048F73579960&quot;<br>    ],<br>    &quot;blockTimestamp&quot;: 0<br>},</pre><p>The Stateful Precompile contract, which powers the ContractDeployerAllowList, adheres to the AllowList Solidity interface at 0x0200000000000000000000000000000000000000 (you can load this interface and interact directly in Remix).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGyyD2Ut1Ks3_x-DfDKSTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bTS2Gm5G3Um4B2fKxab6Ug.png" /></figure><h4>ContractNativeMinter</h4><p>ContractNativeMinter enables restricting, which accounts can mint native(gas) coins. Configure this by adding the following JSON to your genesis or upgrade JSON.</p><pre>&quot;contractNativeMinterConfig&quot;: {<br>    &quot;adminAddresses&quot;: [<br>        &quot;0x717b7948AA264DeCf4D780aa6914482e5F46Da3e&quot;<br>    ],<br>    &quot;enabledAddresses&quot;: [<br>        &quot;0x3287591FC6C6Ef2E7AcF9293f458ECAA6Ed9bc63&quot;<br>    ],<br>    &quot;blockTimestamp&quot;: 0<br>},</pre><p>The Stateful Precompile contract powering the ContractNativeMinter adheres to the following Solidity interface at 0x0200000000000000000000000000000000000001 (you can load this interface and interact directly in Remix):</p><pre>pragma solidity ^0.8.0;<br>import &quot;./IAllowList.sol&quot;;<br><br>interface INativeMinter is IAllowList {<br>// Mint [amount] number of native coins and send to [addr]<br>  function mintNativeCoin(address addr, uint256 amount) external;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLBvmlfueEISRNMIdLlDMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5x9zVxeYitMX__xDkOERhg.png" /></figure><h4>TxAllowList</h4><p>TxAllowList enables restricting which accounts can submit a transaction to your instance of Subnet EVM. Configure this by adding the following JSON to your genesis or upgrade JSON.</p><pre>&quot;txAllowListConfig&quot;: {<br>    &quot;adminAddresses&quot;: [<br>        &quot;0xB79FFB4eCaAb0135062c86F24dd2ff75112b646C&quot;<br>    ],<br>    &quot;enabledAddresses&quot;: [<br>        &quot;0xCa0F57D295bbcE554DA2c07b005b7d6565a58fCE&quot;<br>    ],<br>    &quot;blockTimestamp&quot;: 0<br>},</pre><p>The Stateful Precompile contract powering the TxAllowList adheres to the AllowList Solidity interface at 0x0200000000000000000000000000000000000002 (you can load this interface and interact directly in Remix):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TyIwmdIYdDSEMke5ldnpJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1K96oav73HcYPHowyiEaDA.png" /></figure><h4>FeeManager</h4><p>FeeManager enables configuring the parameters of the dynamic fee algorithm. Configure this by adding the following JSON to your genesis or upgrade JSON.</p><pre>&quot;feeManagerConfig&quot;: {<br>    &quot;adminAddresses&quot;: [<br>        &quot;0x99ef71E554E54a7135d032ab30FC476DC55f9315&quot;<br>    ],<br>    &quot;enabledAddresses&quot;: [<br>        &quot;0x7B137BB4704b977a23Cc8055C2C87674B730aa0a&quot;<br>    ],<br>    &quot;blockTimestamp&quot;: 0<br>},</pre><p>The Stateful Precompile contract powering the FeeConfigManager adheres to the following Solidity interface at 0x0200000000000000000000000000000000000003 (you can load this interface and interact directly in Remix).</p><pre>pragma solidity ^0.8.0;<br>import &quot;./IAllowList.sol&quot;;<br><br>interface IFeeManager is IAllowList {<br>// Set fee config fields to contract storage<br>  function setFeeConfig(<br>    uint256 gasLimit,<br>    uint256 targetBlockRate,<br>    uint256 minBaseFee,<br>    uint256 targetGas,<br>    uint256 baseFeeChangeDenominator,<br>    uint256 minBlockGasCost,<br>    uint256 maxBlockGasCost,<br>    uint256 blockGasCostStep<br>  ) external;<br><br>// Get fee config from the contract storage<br>  function getFeeConfig()<br>    external<br>    view<br>    returns (<br>      uint256 gasLimit,<br>      uint256 targetBlockRate,<br>      uint256 minBaseFee,<br>      uint256 targetGas,<br>      uint256 baseFeeChangeDenominator,<br>      uint256 minBlockGasCost,<br>      uint256 maxBlockGasCost,<br>      uint256 blockGasCostStep<br>    );<br><br>// Get the last block number changed the fee config from the contract storage<br>  function getFeeConfigLastChangedAt() external view returns (uint256 blockNumber);<br>}`</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HeU_Hl6yunA50nuGKZ-S3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hLuclbHY4q8D-yF8IdFIyQ.png" /></figure><h4>RewardManager</h4><p>RewardManager enables configuring the fee reward mechanism, including burning fees, sending fees to a predefined address, or enabling fees to be collected by block producers. Configure this by adding the following JSON to your genesis or upgrade JSON.</p><pre>&quot;rewardManagerConfig&quot;: {<br>    &quot;adminAddresses&quot;: [<br>        &quot;0x99ef71E554E54a7135d032ab30FC476DC55f9315&quot;<br>    ],<br>    &quot;enabledAddresses&quot;: [<br>        &quot;0x7B137BB4704b977a23Cc8055C2C87674B730aa0a&quot;<br>    ],<br>    &quot;blockTimestamp&quot;: 0,<br>    &quot;initialRewardConfig&quot;: {<br>        &quot;allowFeeRecipients&quot;: true,<br>        &quot;rewardAddress&quot;: &quot;0x0000000000000000000000000000000000000000&quot;<br>    }<br>},</pre><p>The Stateful Precompile contract powering the RewardManager adheres to the following Solidity interface at 0x0200000000000000000000000000000000000004 (you can load this interface and interact directly in Remix).</p><pre>pragma solidity ^0.8.0;<br>import &quot;./IAllowList.sol&quot;;<br><br>interface IRewardManager is IAllowList {<br>// setRewardAddress sets the reward address to the given address<br>  function setRewardAddress(address addr) external;<br><br>// allowFeeRecipients allows block builders to claim fees<br>  function allowFeeRecipients() external;<br><br>// disableRewards disables block rewards and starts burning fees<br>  function disableRewards() external;<br><br>// currentRewardAddress returns the current reward address<br>  function currentRewardAddress() external view returns (address rewardAddress);<br><br>// areFeeRecipientsAllowed returns true if fee recipients are allowed<br>  function areFeeRecipientsAllowed() external view returns (bool isAllowed);<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZGwcQt07maa4R8HRBN4IRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7LD79Mi9Wyckq_sWL68DA.png" /></figure><h4>CALL</h4><p>The CALL opcode (CALL, STATICCALL, DELEGATECALL, and CALLCODE) allows us to invoke this precompile.</p><p>The function signature of CALL in the EVM is as follows:</p><pre>Call(<br>    caller ContractRef,<br>    addr common.Address,<br>    input []byte,<br>    gas uint64,<br>    value *big.Int,<br>)(ret []byte, leftOverGas uint64, err error)</pre><p>When a precompile is called, the EVM checks if the input address is a precompile address. If the input address is a precompile address, it executes the precompile. Otherwise, it loads the smart contract at the input address and runs it on the EVM interpreter with the specified input data.</p><h4>Calling a Precompile from Solidity</h4><p>Remix comes with a simple contract called Storage.sol, which lets you write/read a number to/from the blockchain. Open Storage.sol and add the following hashNumber function.</p><pre>/**<br>     * @dev Return hash <br>     * @return hash<br>     */<br>    function hashNumber() public view returns (bytes32 hash) {<br>        (bool ok, bytes memory out) = address(2).staticcall(abi.encode(number));<br>		require(ok);<br>        hash = abi.decode(out, (bytes32));<br>        return hash;<br>    }</pre><p>hashNumber returns the sha256 hash of number by calling the sha256 precompile located at address(2) or 0x000000000000000000000000000000000002.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bmH76WJEWPRos9jf80VwBw.png" /></figure><p>The complete Storage.sol contract should look like this:</p><pre>// SPDX-License-Identifier: GPL-3.0<br><br>pragma solidity &gt;=0.7.0 &lt;0.9.0;<br><br>/**<br> * @title Storage<br> * @dev Store &amp; retrieve value in a variable<br> * @custom:dev-run-script ./scripts/deploy_with_ethers.ts<br> */<br>contract Storage {<br><br>    uint256 number;<br><br>    /**<br>     * @dev Store value in variable<br>     * @param num value to store<br>     */<br>    function store(uint256 num) public {<br>        number = num;<br>    }<br><br>    /**<br>     * @dev Return value <br>     * @return value of &#39;number&#39;<br>     */<br>    function retrieve() public view returns (uint256){<br>        return number;<br>    }<br><br>    /**<br>     * @dev Return hash <br>     * @return hash<br>     */<br>    function hashNumber() public view returns (bytes32 hash) {<br>        (bool ok, bytes memory out) = address(2).staticcall(abi.encode(number));<br>  require(ok);<br>        hash = abi.decode(out, (bytes32));<br>        return hash;<br>    }<br>}</pre><p>Alternatively, you can interface with the sha256 interface directly. First, create a new file called Isha256.sol and paste in the following contents and save the file.</p><pre>// SPDX-License-Identifier: MIT<br><br>pragma solidity &gt;=0.8.0;<br><br>interface ISHA256 {<br><br>    // Computes the SHA256 hash of value<br>    function run(string memory value) external view returns (bytes32 hash);<br>}</pre><p>Switch to the “Deploy &amp; Run Transactions” view in the left sidebar. Select the Injected Provider as the environment, let Core connect to Remix, and paste this precompile address below in the “At Address” field: 0x0000000000000000000000000000000000000002</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fJD7ngpcFm_aeRinO_1kZw.png" /></figure><p>Next, click the blue ”At Address” button. A new compiled contract appears below. Click the small arrow next to <strong>SHA256</strong> and call the function with any string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*uJNS_DAVRZsgHH4HC6uggQ.png" /></figure><p>You can see the return value of the hash function below the input field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*IQw54J7M8IeQZVyQJhgW1Q.png" /></figure><h3>Avalanche Stateful Precompile</h3><p>A stateful precompile builds on a precompile and adds state access. Stateful precompiles are not available in the default EVM, and are specific to Avalanche EVMs such as <a href="https://github.com/ava-labs/coreth">Coreth</a> and <a href="https://github.com/ava-labs/subnet-evm">Subnet-EVM</a>.</p><p>A stateful precompile follows this <a href="https://github.com/ava-labs/subnet-evm/blob/helloworld-official-tutorial-v2/precompile/contract/interfaces.go#L17-L20">interface</a>:</p><pre>// StatefulPrecompiledContract is the interface for executing a <br>// precompiled contract<br>type StatefulPrecompiledContract interface {<br>    // Run executes the precompiled contract.<br>    Run(accessibleState PrecompileAccessibleState,<br>    caller common.Address,<br>    addr  common.Address,<br>    input []byte,<br>    suppliedGas uint64,<br>    readOnly bool)<br>    (ret []byte, remainingGas uint64, err error)<br>}</pre><p><strong>NOTE</strong> the StatefulPrecompiledContract is different than the PrecompiledContract listed above.</p><h4>Precompile-EVM</h4><p>Precompile-EVM is a repository for registering precompiles to Subnet-EVM without forking the Subnet-EVM codebase. Subnet-EVM supports registering external precompiles through precompile/modules package. By importing Subnet-EVM as a library, you can register your precompiles to Subnet-EVM and build it together with Subnet-EVM.</p><p>HelloWorld is an example stateful precompile that ships with Precompile-EVM. Here we’re going to configure and deploy that precompile. Next, create a new precompile using code generation scripts that ship with Precompile-EVM. The example precompile will have the same functionality as HelloWorld and will serve primarily as example steps for using the code generation scripts.</p><h4>Clone the Repo</h4><p>1. Clone the Precompile-EVM GitHub repo to your local machine.</p><pre>git clone &lt;https://github.com/ava-labs/precompile-evm.git&gt;<br>cd precompile-evm/</pre><h4>Checkout the hello-world-example Branch</h4><p>2. Once you have the Precompile-EVM repo, check out the appropriate branch.</p><pre>git checkout hello-world-example</pre><h4>Install Dependencies</h4><p>3. Next, you have to cd contracts/ and run npm install to get the dependencies. You’ll need the latest version of <a href="https://nodejs.org/en">NodeJS</a> installed which comes bundled with npm.</p><pre>cd contracts/<br>npm install<br>cd ../</pre><h4>Config the HelloWorld Precompile</h4><p>The configuration file for the HelloWorld precompile is located at tests/precompile/genesis/hello_world.json. In addition to the HelloWorld precompile, you can add config for any existing precompiles. You can also config the Subnet’s tokenomics, which include initial coin allocation. By default, it’s configured to airdrop 1M of your Subnet’s gas token to 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC, which is the address derived from 0x56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027 which is a private key that we share publicly in our docs and use for airdropping tokens onto new networks.</p><p>You can also add any other addresses and balances which you want to airdop on your new subnet.</p><pre>&quot;alloc&quot;: {<br>    &quot;8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC&quot;: {<br>      &quot;balance&quot;: &quot;0x52B7D2DCC80CD2E4000000&quot;<br>    }<br>  },</pre><p>Additionally, you can config additional precompiles. Let’s update hello_world.json to enable the 0x8db from above to be able to mint additional gas tokens.</p><pre>&quot;contractNativeMinterConfig&quot;: {<br>      &quot;adminAddresses&quot;: [<br>          &quot;0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC&quot;<br>      ],<br>      &quot;blockTimestamp&quot;: 0<br>    }</pre><p>You also want to enable and configure the HelloWorld precompile.</p><pre>&quot;helloWorldConfig&quot;: {<br>      &quot;blockTimestamp&quot;: 0,<br>      &quot;adminAddresses&quot;: [<br>        &quot;0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC&quot;<br>      ]<br>    },</pre><h4>Start a Local Network</h4><p>Using the Avalanche Network Runner, fire up a server</p><pre>avalanche-network-runner server</pre><p>In a different tab, start a 5 node network</p><pre>avalanche-network-runner control start \\<br>  --number-of-nodes=5 \\<br>  --blockchain-specs &#39;[{&quot;vm_name&quot;: &quot;subnetevm&quot;, &quot;genesis&quot;: &quot;./tests/precompile/genesis/hello_world.json&quot;}]&#39;</pre><p>After the network is finished building, you should see RPC URIs in the logs</p><pre>[07-25|17:02:18.113] INFO server/network.go:649 [blockchain RPC for &quot;srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy&quot;] &quot;&lt;http://127.0.0.1:9650/ext/bc/2RQiKekQrhAR7maFz1PSF9MCs6kH3SyMAMLWVP4zossXkq6SDJ&gt;&quot;</pre><h4>Connect a Wallet to the Subnet</h4><p>In MetaMask, on the network dropdown, select “Add network”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZmJ93FbJg8vSd-QXv3jCQ.png" /></figure><p>On the next page, select “Add a network manually”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I2vyeoHtX0XGYVx3WsRKLA.png" /></figure><p>On the last page, enter the RPC information. Note you want to add /rpc at the end of the RPC uri from the Avalanche Network Runner logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1gzMG9jN_98CQlDVVkBxzQ.png" /></figure><p>Now, you should be successfully able to join</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*jbvvxpY6C45C2HYDLjDzRQ.png" /></figure><h4>Import Funded Account</h4><p>In hello_world.json , we allocated 1m gas tokens to the 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC <a href="http://address.To">address.</a> To import the key, select the dropdown menu from the first account and select “Import amount”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*0to2ooLwhD03ny6EnFp2CA.png" /></figure><p>Next, paste in the private key 0x56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*foJqEICMixYIuhG65Y2qdA.png" /></figure><p>Once the account is imported, it will have a 1M token balance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*-FLQxjf8dJbDvTV4uU9H4w.png" /></figure><h3>Remix</h3><p>Now, connect Remix to the wallet to interact with the precompiles on the Subnet. Head to <a href="https://remix.ethereum.org/">Remix</a> and under the “Deploy and Run Transactions” tab along the left select the “Environment” drop-down menu, select <strong>Injected Provider</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uU34kptOJZ9j3G0tKxvKOA.png" /></figure><p>A MetaMask popup will ask which accounts to connect to Remix. Select both addresses so that either can interact with the blockchain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*NcOoR0pu5dRoOUkfP1qa-g.png" /></figure><p>You can now mint additional HW tokens. As mentioned above, you can interface with the ContractNativeMinter precompile at 0x0200000000000000000000000000000000000001. In the “File Explorer” tab, open INativeMinter.sol or create a new file and paste into the INativeMinter interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Nup6IYKy5xpXWv_N3V4HQ.png" /></figure><p>Once open, compile the interface in the “Deploy and Run Transactions” tab and paste the address for the INativeMinter interface, 0x0200000000000000000000000000000000000001 into the “Add Address” input field and click “Add Address.”</p><p>Remix will show a form with input fields, that match the Solidity interface. First, paste the address into the readAllowList input field and note it returns “role 2” which signifies that address has admin permissions for the precompile.</p><p>Enter the address of the account you want to mint more tokens to, in this case, 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC, and the amount of tokens to mint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*t90J3lmroYqzVmyK2lW3gQ.png" /></figure><p>We’ve minted 1234 new tokens and the balance shows in Metamask.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*xOzqsBGLHcpK8nmhmQjRug.png" /></figure><h4>HelloWorld Precompile</h4><p>Now, we can interface with the HelloWorld precompile. Head over to Remix and create a new .sol file. Paste the IHelloWorld.sol interface</p><pre>pragma solidity &gt;=0.8.0;<br>import &quot;@avalabs/subnet-evm-contracts/contracts/interfaces/IAllowList.sol&quot;;<br><br>interface IHelloWorld is IAllowList {<br>  // sayHello returns the stored greeting string<br>  function sayHello() external view returns (string calldata result);<br><br>  // setGreeting  stores the greeting string<br>  function setGreeting(string calldata response) external;<br>}</pre><p>The HelloWorld precompile is located in the helloworld/ directory. In helloworld/module.go , look for the ContractAddress variable to see at what hex address the precompile is deployed.</p><pre>var ContractAddress = common.HexToAddress(&quot;0x0300000000000000000000000000000000000000&quot;)</pre><p>Also, look in plugin/main.go and confirm that helloworld is being imported.</p><pre>_ &quot;github.com/ava-labs/precompile-evm/helloworld&quot;</pre><p>Open IHelloWorld.sol in Remix and compile it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hSOsZHF3lYgTwVOr29DcAA.png" /></figure><p>In the “Deploy and Run Transactions” tab, enter 0x0300000000000000000000000000000000000000 into the “At Address” input field to bring up a GUI for interacting with HelloWorld. Next, click sayHello and you will see the string “Hello World.” This is being read from the stateful precompile!</p><p>Now, enter “hola mundo” into the setGreeting field and submit that transaction. Once it’s successful, click sayHello again and you will see the string “hola mundo.” This has successfully wrote and read to the blockchain via the stateful precompile! 🏆</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A_tPkkUy4Ncn0OVbVOzvvA.png" /></figure><h3>Conclusion</h3><p>EVM Precompiles provides an API for developers to create optimized and efficient implementations of functionality in Go, as opposed to implementing the functionality in Solidity. Avalanche Stateful Precompiles go one step further by providing access to State.</p><p>We introduced precompiles and their history going all the way back to the Ethereum Yellow paper. We also introduced Stateful Precompiles and showed how to interface with the 5 stateful precompiles which come bundled with Subnet EVM. Using those learnings, we then showed you how to clone Precompile EVM and interact with the HelloWorld stateful precompile.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1806c9ec273" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Avalanche Subnets, Polygon Supernets, & Cosmos App Chains: Research Report]]></title>
            <link>https://medium.com/@avaxdevelopers/avalanche-subnets-polygon-supernets-cosmos-app-chains-research-report-35b0a6cb830f?source=rss-fa17a6b289be------2</link>
            <guid isPermaLink="false">https://medium.com/p/35b0a6cb830f</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[subnet]]></category>
            <category><![CDATA[polygon]]></category>
            <category><![CDATA[cosmos]]></category>
            <category><![CDATA[avalanche]]></category>
            <dc:creator><![CDATA[Avax Developers]]></dc:creator>
            <pubDate>Mon, 31 Jul 2023 20:12:50 GMT</pubDate>
            <atom:updated>2023-08-01T22:12:47.539Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An Examination of the Scalability, Interoperability, and Customizability Provided across Avalanche Subnets, Polygon Supernets, and Cosmos App Chains.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OsYIx6BtCxSlipH5HwDM_A.png" /></figure><p>In the current blockchain development environment, there is a large amount of technology being built to solve the issue of scalability present within blockchain-based networks. As the demand for blockspace in traditional blockchain networks escalates, so does the network traffic, resulting in reduced performance, higher transaction fees, and increased congestion, all of which render the network less effective. In response to this, the industry has evolved to address these challenges and build forward.</p><p>This has led to a mass influx of new solutions being built and broadly speaking, these solutions tend to fall into one of three categories: <strong>Layer 2 Scaling Solutions, Application Specific Environments, and Modular Focused Development.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HweYgnZcbFtT2L5NmjLShQ.png" /></figure><ul><li><strong>Layer 2 Scaling Solutions</strong>: These systems aim to alleviate the stress on the main blockchain network, referred to as Layer 1, by handling transactions off-chain. Examples include Lightning Network for Bitcoin and Zero Knowledge and Optimistic Rollups for Ethereum. By conducting transactions off the main chain, these solutions allow for higher transaction throughput and lower fees, while still ensuring a level of security and decentralization.</li><li><strong>Application Specific Environments</strong>: These are intricately tailored platforms designed for dedicated applications — taking the load off the primary network and offloading to a dedicated chain. This offers a high degree of customization to optimize and align with the requirements of a specific use case, with the intent of bolstering both performance and operational efficiency. The flexibility and targeted nature of these environments allow them to deliver high throughput and enhanced user experiences, potentially revolutionizing the way blockchain technology is applied across various sectors.</li><li><strong>Modular Focused Development:</strong> This approach emphasizes the creation of modular, reusable components. By allowing developers to focus on individual modules, this model promotes flexibility, efficiency, and easier maintenance, speeding up development and ensuring robustness in the face of changing requirements or technological landscapes.</li></ul><p>Each of these strategies presents its own advantages, offering unique solutions to the scalability issue, and contributing to the ongoing evolution and refinement of blockchain technology. However, our exploration doesn’t stop there. A fourth category is emerging, paving a new path in this dynamic landscape and representing a different approach to scalability and customization in blockchain technology.</p><p>In the pursuit of addressing inherent challenges with blockchains surrounding scalability and customization, we reviewed 3 different platforms and architectures, each with its own solutions that allow developers or groups to launch and operate their individual blockchains.</p><p><strong>These three solutions are:</strong></p><ul><li>Avalanche Subnets</li><li>Polygon Supernets</li><li>Cosmos Zones</li></ul><p><em>(Note: We acknowledge that this list is not exhaustive and future work will focus on other app chain scaling solutions and architectures)</em></p><p>In this analysis, we have reviewed each solution and will specifically comment on the following variables:</p><ul><li><strong>Core Architecture/Technology:</strong> This refers to the fundamental design and structure of the blockchain network, including the algorithms and protocols used for transaction processing, consensus, and security. Different architectures can lead to significant differences in the capabilities and characteristics of a blockchain.</li><li><strong>Scalability:</strong> Scalability is the ability of a blockchain to handle a growing amount of work or its potential to accommodate growth. Scalability is a major concern for many blockchains, as increased usage can lead to slower transaction times and higher costs.</li><li><strong>Speed:</strong> This refers to the rate at which transactions are processed and confirmed on the blockchain. Speed is a crucial factor for many applications of blockchain technology, especially those that require real-time or near-real-time transaction processing.</li><li><strong>Customizability: </strong>This refers to the extent to which a blockchain system can be tailored or modified to meet specific needs or requirements. Some blockchains are designed to be highly customizable, allowing developers to create their own smart contracts or applications on top of the blockchain. Customizability can be a key factor for businesses or developers looking to use blockchain technology for specific use cases.</li><li><strong>Security: </strong>Security in a blockchain context refers to the measures and features that protect the blockchain and its users from different types of attacks or fraudulent activities, including cryptographic techniques, consensus mechanisms, and other protective measures.</li></ul><h3>Core Network Architecture</h3><h4><strong><em>Avalanche</em></strong></h4><p>Fundamentally, Avalanche is an open-source, permissionless protocol that anyone can leverage to establish their own distinct blockchain network powered by a novel consensus mechanism. The Avalanche family of consensus protocols enables Avalanche to provide sub-second, immutable finality.</p><p>This consensus mechanism is a significant improvement over previous consensus protocols. By combining the best features of Classical and Nakamoto consensus mechanisms, Avalanche consensus sets a new standard for powering high throughput, enabling near-instant finality, maintaining energy efficiency, and providing the ability to scale to infinite validators.</p><p>This efficiency is achieved through a process called “random subsampling,” where nodes in the network query a random subset of other nodes in the network to accept or reject a proposed transaction.</p><p>Random subsampling allows for sub-second transaction finality — meaning that transactions are finalized on the Avalanche blockchain in under 1 second before being propagated into the block, which has block times of less than 2 seconds, ensuring that transactions are quickly confirmed and irreversible. This also allows Avalanche to theoretically handle thousands of transactions per second, as the nodes can reach consensus faster and more efficiently, enabling the network to scale to an infinite number of participants. You can learn more about the novel Avalanche Consensus<a href="https://docs.avax.network/learn/avalanche/avalanche-consensus"> here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*GXe6TnkTSBA1hy_t_Mgz6g.png" /></figure><p>On top of that consensus mechanism lies the Avalanche Primary Network, which is composed of 3 primary blockchains, each of which serves a unique purpose within the chain.</p><p><strong>The Platform Chain (P-Chain)</strong> is responsible for coordinating validators, managing Subnets (custom validator sets), and handling the creation of new blockchains within the Avalanche ecosystem. It also handles the staking provisions for validators to participate in Avalanche Consensus.</p><p><strong>The Contract Chain (C-Chain</strong>) runs an instance of the Ethereum Virtual Machine (EVM) running on the Avalanche Network. It is compatible with Ethereum’s Solidity smart contracts and tooling, allowing developers to easily deploy Ethereum-based decentralized applications dApps) on Avalanche while utilizing Avalanche’s robust consensus. Smart contract execution with a high level of security, speed, and scalability.</p><p><strong>The Exchange Chain (X-Chain)</strong> is the default asset chain on Avalanche for creating, issuing, or transferring assets. It powers asset transfers internally across the Avalanche ecosystem and externally to bridge to networks like Bitcoin and Ethereum.</p><p><strong><em>Subnets:</em></strong><em> </em>A subset of the Primary Network validators that agree to validate and host one or many blockchains.</p><p>The unique design of Avalanche Subnets allows for a highly personalized set of validators, with the ability to define their governing rules, facilitating the creation of a network of blockchains capable of running any virtual machine, and configured in either a permissioned or permissionless way. <strong>Learn more about Subnets </strong><a href="https://docs.avax.network/learn/avalanche/subnets-overview"><strong>here</strong></a><strong>.</strong></p><p>At the virtual machine level, this flexibility allows developers to run a dedicated instance of the Ethereum Virtual Machine (EVM) for specific applications or as a scalability solution for Ethereum. Alternatively, they can operate a modified version of the EVM, equipped with <a href="https://medium.com/avalancheavax/customizing-the-evm-with-stateful-precompiles-f44a34f39efd">stateful precompiles</a>, to tailor its functionalities to their needs, such as adding allow lists, ensuring KYC/AML compliance, or enabling gasless relayers.</p><p>Developers also have the freedom to launch entirely custom non-EVM virtual machines. This could include complete smart contract virtual machines such as <a href="https://twitter.com/asimfiles/status/1648087375539765248">MoveVM</a> or Solana VM, or even application-specific VMs, such as <a href="https://github.com/ava-labs/hypersdk/tree/main/examples/tokenvm">TokenVM</a> or <a href="https://github.com/ava-labs/indexvm">IndexVM</a>, designed to cater to specific use cases.</p><p>At the validator level, this flexibility supports both permissionless and permissioned building models. Projects can set restrictions based on various parameters such as geographical locations and KYC compliance for validators or opt for a completely permissionless configuration with their native staking token through <a href="https://medium.com/avalancheavax/banff-elastic-subnets-44042f41e34c">Elastic Subnets</a>. All of these diverse setups are interconnected seamlessly through Warp Messaging, enhancing the overall network efficiency and scalability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*XegsGldUCz39md3TE-ja-A.png" /></figure><p>Paired with a managed blockchain service platform like <a href="https://avacloud.io/">AvaCloud</a>, the suite of tooling surrounding the Subnet ecosystem is growing.</p><h4><strong><em>Polygon</em></strong></h4><p><em>(As of the time of writing this, the latest information is based on developments up to May of 2023. At this point, there has not been any announcement regarding a significant update or evolution such as a “Polygon 2.0.” Consequently, some of the details and insights shared here may have evolved or become outdated after this date. Please consult the most recent resources or directly visit the official Polygon website for the latest and most accurate information.)</em></p><p>Polygon is a scaling solution built to improve the performance of the Ethereum blockchain by using “sidechains,” which are separate blockchain networks that run parallel to the Ethereum main chain. These side chains handle computations and transactions off of the Ethereum main chain, which reduces the load on the main chain. The side chains periodically provide the main chain with a summary of their activity through their ‘plasma bridge’.</p><p>Polygon employs a Proof of Stake (PoS) consensus algorithm for securing its side chain. In this system, validators actively participate in the network and voluntarily lock up or ‘stake’ their tokens as a form of collateral, making their role involves validating transactions and appending new blocks to the blockchain.</p><p>Polygon pairs this approach with the use of the Istanbul Byzantine Fault Tolerance (IBFT) consensus protocol. IBFT is a variation of the Practical Byzantine Fault Tolerance (PBFT) algorithm, specifically designed to cope with adverse conditions in public networks and provides a certain level of finality. IBFT limits permissionless participation, meaning that validators have to be explicitly specified, and only those specified can participate in the consensus process. This design might seem at odds with the decentralized ethos of blockchain, as it establishes a certain level of central control in the system. While this model enables effective consensus even in the presence of faulty nodes, it does so at the cost of limiting open network participation.</p><p>The Polygon network consists of three main layers:</p><ol><li><strong>Ethereum Layer: </strong>This layer consists of a series of smart contracts deployed on the Ethereum mainnet, which oversee critical functions such as staking management, rewards distribution, and validator registration, serving as essential components for the network&#39;s operation and security.</li><li><strong>Heimdall Layer:</strong> This layer consists of the PoS Heimdall nodes that run in parallel to the Ethereum mainnet. The nodes monitor the staking contracts on Ethereum’s mainnet and commit checkpoints of the network’s state to Ethereum - this periodic snapshot allows for a checkpoint into the network’s state and helps ensure data availability and finality. Heimdall nodes employ Tendermint consensus</li><li><strong>Bor Layer: </strong>This layer hosts the block-producing nodes, which are periodically rearranged by nodes operating on the Heimdall layer. The primary function of the Bor nodes is to compile transactions into blocks within the Polygon sidechain infrastructure. These nodes function utilizing GoEthereum, a widely recognized implementation of the Ethereum protocol.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*KTBijp6hbARFgSQo1V3IXQ.png" /></figure><p>On top of this architecture, Polygon has a suite of different services it offers to developers, with many different product offerings. These offerings include Polygon Supernets, PolygonID, Polygon Hermes, Polygon Edge (which is being sunsetted into a new offering), and Polygon zkEVM. For this report, we will focus on their primary scaling solution — Polygon Supernets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*kYOoHyT1X3vjiNzW_HFGRQ.png" /></figure><p><a href="https://wiki.polygon.technology/docs/supernets/get-started/what-are-supernets/">Supernets</a> are Polygon’s version of the infrastructure required to spin up application-specific blockchain networks. These networks allow applications to separate themselves from Ethereum and the main Polygon Sidechain by becoming their own chain. They are designed to increase the block space on the root chain, enhancing scalability and interoperability for decentralized applications. You can learn more about Supernets <a href="https://wiki.polygon.technology/docs/supernets/get-started/what-are-supernets">here</a>.</p><h4><em>Cosmos</em></h4><p>The Cosmos Network is a network of different blockchains that are interoperable with each other. The blockchains are built using the Cosmos SDK, which is an open-source framework designed for building application-specific blockchains, either public and permissionless (PoS) or permissioned running Proof of Authority.</p><p>The primary objective of the Cosmos SDK is to allow developers to create application-specific blockchains from scratch while allowing these blockchains to interoperate with one another, similar to those mentioned above.</p><p>This vision is achieved through a modular architecture, where SDK-based blockchains are constructed using composable modules, which are open source and readily available for use. Modules are essentially self-contained pieces of code that encapsulate specific functionality for a blockchain application and are designed to be composable, meaning they can be used and combined in various ways to create a custom blockchain application. Each module defines its own state and transactions and contains its own message handlers, and they also expose an interactable interface for other modules. This allows developers to build complex applications by composing simple modules together, creating their own modules, and easily integrating them into their blockchain applications.</p><p>Cosmos introduces a concept known as the Object-Capability Model, a form of Capability-Based Security. This is an approach to managing access to the state that avoids hardcoding permissions into the state machine. Instead, the state machine is initialized with a set of capabilities. These capabilities, which are defined by the references an object holds, determine what the state machine can and cannot do, including its core functionalities and limits. This model is designed to address the threat of faulty or malicious modules in a Cosmos SDK ecosystem, favoring modularity in code design and ensuring reliable encapsulation in code implementation.</p><p>All of this operates on top of the CometBFT consensus engine, a state replication engine designed for the “interchain ecosystem and beyond.” It was initially a fork of Tendermint Core but ended up succeeding Tendermint Core as the official replication engine for the interchain stack. CometBFT’s long-term vision is to become the primary choice for a replication engineer that powers application-specific blockchains.</p><p>The network is designed around a unique architecture that consists of Hubs and Zones, which work together to facilitate inter-blockchain communication and ensure the overall security of the system.</p><ol><li><strong>Zones:</strong> Independent blockchains that are connected to one or more Hubs. Each Zone operates as its own blockchain network, runs its own consensus protocol, and maintains its own ledger. This allows each Zone to be tailored for specific use cases or applications, providing the flexibility to meet different needs within the ecosystem. For example, one Zone might be optimized for high-speed transactions, while another might be designed to handle complex smart contracts. Zones are not isolated and can communicate and interact with each other by passing messages through Hubs, enabling the transfer of assets and data across different blockchains.</li><li><strong>Hubs: </strong>Blockchains that are specifically designed to connect different Zones and serve as the central connection point for Zones, facilitating communication and interoperability between them. Hubs maintain the security of the network by tracking the state of each connected Zone and managing the inter-zone communication process. The Cosmos Hub, the first hub in the Cosmos Network, is an example of such a blockchain. However, the architecture of Cosmos is designed to support multiple Hubs, with the intent of creating a network of interconnected blockchains.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Zi5uzy8QEM4WwW75iYF6GQ.png" /></figure><p>Having delved into the fundamental architecture of these platforms and explored the diverse capabilities they offer, it&#39;s time to assess their real-world applicability. Ultimately, these solutions are tools, and their value lies in their ability to meet the needs of those who wield them. Developers, whether they&#39;re part of large enterprises or independent innovators, have specific requirements when it comes to building their blockchains.</p><p>The main areas we will assess:</p><ul><li>Scalability</li><li>Customizability</li><li>Speed</li><li>Security</li></ul><h4><strong>Scalability</strong></h4><p>Scalability is a critical aspect to consider when building a blockchain network. Traditional blockchain networks often face significant challenges as they expand, leading to issues such as high transaction fees, network congestion, and an overall inability to cope with increased demand. These challenges can render a blockchain network practically inoperable at scale, posing a significant concern for any developer or enterprise aiming to launch their blockchain. In light of these challenges, it’s crucial to select a platform that can scale effectively without succumbing to these common obstacles. It’s advisable to choose a platform that not only supports growth but also maintains performance and usability even as demand escalates.</p><p>The scalability of such a platform primarily hinges on two factors:</p><ul><li><strong>Ability to Scale to Infinite Validators:</strong> The platform should be able to support an increasing number of validators without compromising on performance or security. This means that as the network grows, it should be able to accommodate more validators to maintain the decentralization and security of the network.</li><li><strong>High Throughput: </strong>The platform should have a high transaction throughput, meaning it can process a large number of transactions per second. This is crucial for maintaining fast and efficient operations, especially as the network grows, and the number of transactions increases.</li></ul><p><em>Scalability Considerations in Supernets</em></p><p>Supernets, with their independent blockchains for transaction processing, initially appear to offer a scalable solution compared to a primary network. However, upon closer examination, there are significant technical considerations that could potentially impact their scalability.</p><p><strong>Limited Validators:</strong> Supernets use the PolyBFT consensus mechanism, which imposes a cap of 100 on the total number of validators across the network. This cap can have significant implications for both scalability and decentralization. Having a limited number of validators can make the consensus process more efficient, as fewer nodes need to communicate with each other to reach consensus. This can lead to faster transaction processing times, especially when the network is not heavily loaded.</p><p>This cap can limit the network’s ability to scale. As the number of Supernets and the volume of transactions increase, these 100 validators may not be able to process transactions quickly enough to keep up with the demand. This could lead to network congestion, slower transaction processing times, and potentially higher transaction fees. Moreover, the cap on validators also has implications for the decentralization of the network. Fewer validators mean that control of the network is concentrated in fewer hands, which could lead to centralization. This could potentially make the network more vulnerable to attacks or manipulation by a small group of validators.</p><p><strong>High Throughput: </strong>Supernets operate on the Ethereum Virtual Machine (EVM) and zkEVM. While the EVM is robust and widely adopted, it has faced challenges with network congestion and high transaction fees during periods of high demand. zkEVM, on the other hand, uses zero-knowledge proofs to improve scalability, but it is still in its early stages of development.</p><p>The ability of a platform to process a large number of transactions per second, known as transaction throughput, is a critical factor in assessing its scalability. High throughput is essential for maintaining fast and efficient operations, especially as the network grows, and the number of transactions increases.The transaction throughput is influenced by several factors, including the consensus mechanism, the cap on validators, and the limitations of EVM and zkEVM.</p><p><em>Scalability Considerations in Cosmos Hubs and Zones:</em></p><p>Cosmos, with its unique architecture of Hubs and Zones, offers a distinct approach to scalability. The Cosmos network is structured around a Hub, a blockchain that connects to multiple other blockchains known as Zones. This structure allows each Zone to operate independently, processing its transactions and maintaining a separate ledger, and can potentially offer significant scalability advantages, as each Zone can process transactions concurrently with others.</p><p>However, there are important considerations to bear in mind. The consensus mechanism of Cosmos, known as CometBFT, also limits the active validator set. According to the Cosmos documentation, the Cosmos Hub has 180 validators, (but it’s important to mention that over time the number of validators can be increased with governance proposals). The validators are determined by the total number of ATOM tokens delegated to them — the top 180 validator candidates with the most voting power are the current Cosmos validators.</p><p><strong>Limited Validators: </strong>The cap on validators can have implications for both scalability and decentralization. Having a limited number of validators can make the consensus process more efficient, as fewer nodes need to communicate with each other to reach consensus. This can lead to faster transaction processing times, especially when the network is not heavily loaded.</p><p>This cap can limit the network&#39;s ability to scale. As the number of Zones and the volume of transactions increase, these validators may not be able to process transactions quickly enough to keep up with the demand. This could lead to network congestion, slower transaction processing times, and potentially higher transaction fees. Moreover, the cap on validators also has implications for the decentralization of the network. Fewer validators mean that control of the network is concentrated in fewer hands, which could lead to centralization. This could potentially make the network more vulnerable to attacks or manipulation by a small group of validators.</p><p><strong>High Throughput: </strong>Cosmos uses the Inter-Blockchain Communication (IBC) protocol to allow different Zones to communicate with each other. This means that while you can have multiple Zones operating concurrently, there is a built-in mechanism for these Zones to communicate and share load. This could potentially lead to efficiencies and increased scalability as the network scales.</p><p>Since the Cosmos network is not solely EVM-based, it does not suffer from the same scalability issues as Ethereum. This also means that it may not be fully compatible with Ethereum&#39;s tooling and ecosystem, potentially creating additional challenges for developers. The ability of a platform to process a large number of transactions per second, known as transaction throughput, is a critical factor in assessing its scalability. High throughput is essential for maintaining fast and efficient operations, especially as the network grows and the number of transactions increases. With Cosmos, the transaction throughput is influenced by several factors, including the consensus mechanism, the cap on validators, and the use of the IBC protocol.</p><p><em>Scalability Considerations in Avalanche Subnets:</em></p><p>Avalanche employs a unique approach to scalability through the use of Subnets, which are essentially sub-networks within the larger Avalanche network. Each Subnet is a collection of validators working together to achieve consensus on the state of a set of blockchains. Each Subnet can have its own set of validators, and these validators can be a subset of the validators of the Avalanche network.</p><p><strong>Unlimited Validators</strong>: Unlike some other blockchain networks, the Subnets in Avalanche are not limited by a cap on the number of validators. This allows for potentially unlimited scalability as the network can continue to grow with the addition of more validators. This is a significant advantage for large-scale applications that require high transaction throughput. The absence of a cap on validators not only enhances scalability but also promotes decentralization. With more validators, the control of the network is distributed among a larger group, reducing the risk of centralization and making the network more resilient to attacks or manipulation.</p><p><strong>High Throughput: </strong>Avalanche employs a unique consensus protocol known as Avalanche Consensus, which allows for rapid finality of transactions and scales well as the network grows. This consensus protocol is highly efficient and enables high transaction throughput, further enhancing the scalability of the network. The ability of a platform to process a large number of transactions per second, known as transaction throughput, is a critical factor in assessing its scalability.</p><p>High throughput is essential for maintaining fast and efficient operations, especially as the network grows and the number of transactions increases. The transaction throughput is influenced by the consensus mechanism and the absence of a cap on validators. Avalanche&#39;s Subnet model also provides a high degree of flexibility and customization. Developers can create Subnets tailored to their specific needs, taking advantage of the best attributes from the initial Avalanche network. In addition to this, Avalanche&#39;s architecture allows for the creation of custom VMs. This means that developers can create VMs that are specifically designed to handle the requirements of their applications, further enhancing the scalability and efficiency of the network.</p><h4><strong>Customizability</strong></h4><p>In today’s rapidly evolving world, one size does not fit all. Different applications have different needs, and a blockchain network that works well for one use case may not be suitable for another. This is where the concept of customizability comes into play.</p><p>Blockchain customizability refers to the ability to tailor the network&#39;s features and functionalities to meet specific requirements. This can include aspects such as the consensus mechanism, the transaction validation process, the structure of the network, and even the programming language used for smart contracts. The ability to customize a blockchain network is crucial for developers and enterprises. It allows them to build solutions that are perfectly suited to their needs, rather than having to adapt their applications to fit the constraints of a pre-existing network. This can lead to more efficient, effective, and innovative solutions.</p><p>This adaptability hinges primarily on two factors:</p><p>1.<strong> Control Over Validator Sets:</strong> Developers should have the capacity to manage and regulate the validator sets. This includes the ability to decide whether the validation process is permissioned or permissionless, whether there are geographical restrictions or freedoms, and whether there are Know Your Customer (KYC) or Anti-Money Laundering (AML) compliance requirements. This level of control is vital as it directly influences the network&#39;s consensus mechanism, and consequently, its security and performance.</p><p>2. <strong>Technical Flexibility: </strong>Developers should have the freedom to construct any state machine or application as per their requirements. This encompasses the ability to create custom virtual machines, design unique smart contracts, gas token customization, and more. However, it&#39;s important to note that while this technical flexibility can drive innovation, it also requires a deep understanding of blockchain technology to ensure that the resulting applications are secure, efficient, and effective.</p><p><em>Customizability Considerations in Polygon Supernets:</em></p><p><strong>Control Over Validator Sets:</strong> Polygon Supernets employ a consensus mechanism known as PolyBFT, which uses the Istanbul Byzantine Fault Tolerance (IBFT) 2.0 consensus engine. This engine is responsible for validating candidate blocks proposed by a randomly selected block proposer from the validator pool. The frequency of selection is proportional to the voting power of the validator. However, PolyBFT caps the number of validators at around 100 to maintain the system’s security and prevent it from becoming economically vulnerable. The validator set in PolyBFT does not update with each block but is fixed during block periods known as epochs. At the end of an epoch, a special state transaction is emitted to the validatorSetManagementContract, notifying the system about the validators’ uptime during the epoch. The smart contract then rewards validators based on their uptime and updates the validator set for the next epoch.</p><p><strong>Technical Flexibility: </strong>In terms of technical freedom, Polygon Supernets only supports the Ethereum Virtual Machine (EVM). There have been discussions about integrating a variant of the zkEVM into Supernets, which would provide developers with a choice between the traditional EVM or the zkEVM. However, no projects have confirmed successful launches with this feature. This limitation could pose a significant constraint for developers interested in launching blockchains with custom virtual machines not specifically tied to the EVM.</p><p>Please note that the information provided here is based on the current state of Polygon Supernets and may change as the platform evolves. For the most accurate and up-to-date information, please refer to the official Polygon documentation and announcements.</p><p><em>Customizability Considerations in Cosmos Zones:</em></p><p><strong>Control Over Validator Sets: </strong>Cosmos operates with a unique consensus mechanism known as Tendermint, which allows developers to have a significant degree of control over validator sets. Validators in Cosmos are chosen based on the amount of ATOM tokens they have staked, with the top 125 candidates by total voting power becoming validators. This process is not entirely permissionless, as it requires staking ATOM tokens and being among the top candidates in terms of total voting power. The number of validators can be increased through governance proposals, providing some flexibility in the network&#39;s consensus mechanism.</p><p>The Cosmos Hub operates with a designated set of validators, currently capped at 180, who shoulder the responsibility of committing new blocks to the blockchain. These validators engage in the consensus protocol by broadcasting cryptographically signed votes, authenticated with each validator&#39;s private key. The selection of validators is primarily based on the total delegation of ATOM tokens they receive, with the top 175 candidates, in terms of total voting power, becoming the active validators for the Cosmos Hub. Validators, along with their delegators, earn ATOM through block provisions and transaction fees. Validators have the discretion to set a commission rate on the fees their delegators receive. But, validators who engage in double signing or remain offline for an extended duration risk having their staked ATOM slashed, with the severity of the penalty contingent on the nature of the violation.</p><p><strong>Technical Flexibility: </strong>Cosmos provides developers with a high degree of technical flexibility through the use of Cosmos SDK and the ability to create Cosmos Zones. The Cosmos SDK allows developers to build custom state machines and applications, with each module providing a specific piece of functionality. This could include account management, token transfers, or governance, among other things. Cosmos Zones, on the other hand, are independent blockchains that can be designed for specific purposes or applications, and they can communicate with each other by passing messages through Hubs.</p><p><em>Customizability Considerations in Avalanche Subnets:</em></p><p><strong>Control Over Validator Sets: </strong>With Avalanche Subnets, developers have a high degree of control over their validator sets, allowing them to tailor the network to their specific needs. A Subnet is essentially a subset of validators, and developers can set any criteria they wish for validators to meet to participate in their network. This could range from creating a permissionless network where anyone can participate and validate transactions, to a permissioned network where only validators, who have undergone KYC (Know Your Customer) procedures, can participate and process transactions.</p><p>If a developer wants validators to be from certain geographical locations, Avalanche Subnets can accommodate this requirement. This level of customization and control is particularly beneficial for enterprises that need to operate their private blockchain network, providing them with the ability to set rules and parameters that best align with their business needs and regulatory requirements.</p><p>At the same time, it empowers individual developers to build open and distributed applications, fostering innovation and inclusivity in the blockchain space. This is possible due to the flexibility in Avalanche’s novel consensus protocol. Unlike other blockchain networks that have a fixed set of validators, Avalanche allows for the creation of multiple, dynamic validator sets (Subnets). Each Subnet operates its blockchain, or blockchains, and can have its own unique properties and validation rules. This design enables a high degree of customization and scalability.</p><p><strong>Technical Flexibility: </strong>Avalanche provides developers with an unparalleled level of flexibility, enabling them to deploy virtually any application or virtual machine tailored to their specific use cases. This flexibility is largely due to Avalanche’s fluid consensus mechanism, which allows for the seamless integration of various virtual machines. Developers can launch their instances of a modified Ethereum Virtual Machine (EVM), or even deploy complete Layer 1 virtual machines such as MoveVM or SolanaVM. They can also create application-specific virtual machines - using tools like the HyperSDK or RustSDK to create VMs like a TokenVM for token operations, an IndexVM for indexing data, or a SocialMediaVM for social media applications.</p><h4><strong>Speed</strong></h4><p>Speed, particularly in terms of time to finality, is a crucial factor in the performance and usability of a blockchain network. Time to finality refers to the amount of time it takes for a transaction to be confirmed and finalized on the blockchain, meaning it cannot be reversed or altered. This metric is important because it directly impacts the user experience: the faster the time to finality, the quicker users can be confident that their transactions have been securely processed.</p><p>Speed also affects the scalability of a blockchain network. A network that can process transactions quickly is better equipped to handle larger volumes of transactions, which is a key aspect of scalability. A fast time to finality can enhance the security of a blockchain network. The quicker a transaction is finalized, the less opportunity there is for malicious actors to attempt to double-spend or otherwise manipulate the transaction.</p><p>Achieving a fast time to finality can be a complex task. It requires a well-designed consensus mechanism that can quickly and efficiently validate and finalize transactions, while also maintaining the security and decentralization of the network. Therefore, when evaluating a blockchain platform, it&#39;s important to consider not only its current time to finality but also how it plans to maintain or improve this metric as the network scales.</p><p><em>Speed in Polygon Supernets:</em></p><p>Polygon Supernets utilize the Istanbul Byzantine Fault Tolerance (IBFT) 2.0 consensus engine, which plays a crucial role in adding new blocks to the blockchain. The validator pool in IBFT 2.0 is responsible for validating candidate blocks proposed by a randomly selected block proposer who is part of the validator pool. The frequency of selection is proportional to the voting power of the validator. In an ideal scenario, the validator pool reaches consensus on a candidate block in the first round of voting, allowing the block to be added to the blockchain without the need for additional rounds of voting. This efficient process enables the network to continue processing transactions and adding new blocks to the chain promptly.</p><p>While the specific time to finality for Polygon Supernets is not explicitly mentioned, it&#39;s worth noting that the finality time for Polygon&#39;s Proof of Stake (PoS) system is approximately 2 seconds. Additionally, their Zero-Knowledge Ethereum Virtual Machine (zkEVM) has a finality of <a href="https://www.quicknode.com/guides/other-chains/polygon/what-is-polygon-zkevm">2-3 seconds.</a></p><p><em>Speed in Cosmos Zones:</em></p><p>The Cosmos Network, including the Cosmos Hub and various Zones, are built on the Tendermint consensus algorithm. This algorithm is known for its fast finality, typically ranging from 1 to 6 seconds. This means that once a transaction is included in a block and that block is committed, the transaction is considered final and cannot be reversed. This is a significant improvement over many other blockchain networks, where finality can take minutes or even hours.</p><p>It&#39;s important to note that the finality time in Cosmos can vary depending on the specific configuration of each Zone or Hub. Factors that can influence finality time include the block time (i.e., the time it takes to create a new block) and the number of validators (i.e., the nodes that participate in the consensus process). A larger number of validators might increase the time it takes to reach consensus, while a shorter block time might decrease the finality time. In addition, while the Tendermint consensus algorithm offers fast finality in theory, practical considerations can introduce slight delays. Network latency, which is the delay caused by the time it takes for a data packet to travel from one point to another in the network, can affect the finality time. Other factors, such as hardware performance and network congestion, can also introduce delays. Therefore, while Cosmos offers fast finality times compared to many other blockchain networks, the actual finality time can vary depending on a variety of factors. It&#39;s always important to consider these factors when evaluating the performance of a blockchain network.</p><p><em>Speed in Avalanche Subnets:</em></p><p>Avalanche Subnets run an instance of the Avalanche consensus mechanism which is a novel approach to achieving consensus in a distributed network. It&#39;s designed to offer high scalability and speed, with a particular emphasis on achieving sub-second finality. The Avalanche consensus protocol operates on a principle of repeated sub-sampling and voting. In this process, a small, random subset of validators is sampled, and each validator in the sample votes on the state (or color) of a transaction. This process is repeated multiple times, with each validator updating its preference based on the votes it observes. Over time, the system converges towards a single color, achieving consensus. This repeated sub-sampling and voting process is what allows the Avalanche consensus protocol to achieve sub-second finality.</p><p>Because each round of voting brings the system closer to consensus, and because these rounds can be conducted very quickly, the system can confirm and finalize transactions in less than a second. This is a significant improvement over many other blockchain networks, which can take much longer to finalize transactions. The Avalanche consensus protocol also provides strong safety guarantees. It ensures that two correct nodes may make conflicting decisions, but with an infinitely small probability. This probabilistic safety guarantee allows Avalanche to provide a high degree of security while also maintaining fast transaction speeds and high scalability.</p><p>It&#39;s worth noting that while the Avalanche consensus protocol is effective, Avalanche recommends using the upgraded version of Avalanche consensus. Snowman++ is an optimized version of the Avalanche consensus protocol, designed to offer improved performance and efficiency. It maintains the same safety and liveness properties as the original Avalanche consensus but is more efficient in terms of computational and communication overhead.</p><h4><strong>Security</strong></h4><p>Security is a cornerstone of blockchain technology and plays a pivotal role in the performance and reliability of blockchain networks. It is the safeguard that ensures transactions are processed accurately, assets are stored securely, and the network remains resilient against potential threats. Without robust security measures, a blockchain network becomes vulnerable to a variety of attacks, such as double-spending, Sybil attacks, and 51% attacks, which can lead to significant losses and undermine the network&#39;s credibility. In the context of our discussion on scalability, customizability, and speed, security takes on an even more critical role.</p><p>As blockchain networks scale to handle larger volumes of transactions, they must also enhance their security measures to protect against increased threats. Similarly, as networks offer greater customizability and technical flexibility, they must ensure that these features do not compromise the network&#39;s security. Lastly, as networks strive to achieve faster transaction speeds and lower times to finality, they must also maintain robust security to prevent attacks that could exploit these efficiencies. Security in a blockchain network is achieved through a combination of cryptographic techniques, consensus mechanisms, and network architecture.</p><p>Cryptographic techniques, such as hashing and digital signatures, ensure the integrity and non-repudiation of transactions. Consensus mechanisms, like the PolyBFT in Polygon Supernets, the Tendermint-based consensus in Cosmos, or the Snow consensus protocol in Avalanche, ensure that all nodes in the network agree on the state of the blockchain. Network architecture, including the use of peer-to-peer networks and decentralization, helps to prevent single points of failure and increases the resilience of the network.</p><p>Achieving a high level of security is not a static task. It requires ongoing vigilance, regular updates, and continuous improvements to stay ahead of potential threats. As the blockchain ecosystem continues to evolve and grow, so too do the potential security risks. Therefore, when evaluating a blockchain platform, it&#39;s important to consider not only its current security measures but also how it plans to maintain and enhance its security in the future. This is particularly relevant when considering the trade-offs between scalability, customizability, speed, and security in different blockchain platforms.</p><p><em>Security in Polygon Supernets:</em></p><p>Polygon Supernets employ Polygon Byzantine Fault Tolerance (PolyBFT) which is composed of two key components: a consensus engine and a consensus protocol. PolyBFT leverages the Istanbul Byzantine Fault Tolerance (IBFT 2.0) consensus engine and a Proof-of-Stake architecture to seal blocks, provide network capabilities, and govern the network. The core smart contracts work in conjunction with the consensus engine to define all the network&#39;s Proof-of-Stake rules.</p><p>The IBFT 2.0 protocol, which forms the basis of the PolyBFT consensus engine, is responsible for sealing blocks on the blockchain. This protocol ensures the integrity of the network even in the presence of malicious or dishonest nodes. To achieve fault tolerance, IBFT allows for f faulty nodes in a 3f + 1 network, as long as two-thirds of the nodes are honest. This algorithm is also known as a &quot;super-majority rules&#39;&#39; algorithm. The PolyBFT consensus protocol is implemented through a set of core smart contracts. These contracts serve multiple purposes, including enabling staking functionality, defining an incentivization scheme for validators on the network, managing the validator set, and facilitating cross-chain communication through a native bridge.</p><p>The bridge is a critical component of the network&#39;s interoperability, transferring assets and data between a Supernet and an external EVM-compatible blockchain (root chain). Two predicate contracts, one on the Supernet and one on the rootchain, implement the core bridge functionality and use the associated core contracts to deposit, withdraw, and verify cross-chain bridge transactions. In terms of security, the PolyBFT consensus mechanism, coupled with the Proof-of-Stake architecture and the use of core smart contracts, provides a robust framework for maintaining the integrity and security of the Polygon Supernets. The use of a super-majority rules algorithm in the consensus protocol, further enhances the network&#39;s resilience against malicious activities.</p><p>The security of Polygon Supernets is dependent on the behavior of its validators. The capped number of validators (around 100) in the PolyBFT mechanism is a measure to maintain the system&#39;s security and prevent it from becoming economically vulnerable. Butthis also means that the security of the network is concentrated in these validators, making the network potentially more susceptible to collusion or malicious activities by a small number of validators. While Polygon Supernets have robust security measures in place, like any other blockchain network, they are not immune to potential security risks. Therefore, users and developers must understand these risks and consider them when choosing to build on or use Polygon Supernets.</p><p><em>Security in Cosmos Zones and Hubs:</em></p><p>Cosmos, with its unique architecture of Hubs and Zones, has implemented a variety of security measures to ensure the safety and integrity of its network. The Cosmos Hub, which is the first hub in the Cosmos Network, is secured by a set of validators that are responsible for committing new blocks in the blockchain. These validators participate in the consensus protocol by broadcasting votes that contain cryptographic signatures signed by each validator’s private key.</p><p>Validator candidates can bond their ATOM and have ATOM delegated to them by token holders. The Cosmos Hub has a set number of validators (currently 175), but over time the number of validators can be increased with governance proposals. Validators are determined by the total number of ATOM tokens delegated to them. The top 175 validator candidates with the most voting power are the current Cosmos validators.</p><p>Validators and their delegators earn ATOM as block provisions and tokens as transaction fees through the execution of the Tendermint consensus protocol. Validators can set a commission percentage on the fees their delegators receive as an additional incentive. If validators double sign or are offline for an extended period, their staked ATOM (including ATOM of users that delegated to them) can be slashed. The penalty depends on the severity of the violation.</p><p>In terms of technical security, Cosmos uses the CometBFT consensus engine, a state replication engine designed for the interchain ecosystem. This consensus engine provides a high degree of security and reliability, ensuring that all transactions are accurately replicated across the network.</p><p>Shared Security, also known as Interchain Security, is a feature in development within the Cosmos network that aims to bolster the security of individual chains or &quot;zones&quot;. The concept revolves around the idea that multiple chains within the Cosmos network can pool their security resources. Newer or smaller chains can benefit from the security provided by the validators of more established chains like the Cosmos Hub.</p><p>This is achieved through a shared security model where individual zones can connect to the Cosmos Hub and utilize its validators and staking tokens to secure their own chains. A shared security model can significantly enhance the overall security of individual zones by leveraging the established security resources of the Cosmos Hub. However, it also introduces potential risks.</p><p>If a large number of zones are connected to the Cosmos Hub and rely heavily on its validators and staking tokens, it could create a central point of failure. This centralization could potentially be exploited by malicious actors, thereby posing a risk to the entire network. Moreover, the security of individual zones can vary based on their implementation and validator set. Zones with a small or centralized set of validators may be more susceptible to attacks, even with Shared Security in place.</p><p>It&#39;s important to note that Shared Security is still a feature in development within the Cosmos network, and its implementation may evolve over time. For the most accurate and up-to-date information, please refer to the official Cosmos documentation.</p><p><em>Security in Avalanche Subnets:</em></p><p>This protocol is designed to provide robust security while maintaining high performance and scalability. Avalanche Consensus employs a probabilistic safety model, which means that while it&#39;s theoretically possible for a conflicting decision to be made, the probability of such an event is infinitesimally small. This model allows Avalanche to provide a high degree of security while maintaining fast transaction speeds and high scalability.</p><p>The security model is further enhanced by the ability to customize the validator set. Developers can specify any criteria they wish for validators to meet in order to participate in their network. This could include KYC/AML checks, geographic restrictions, or other requirements. This flexibility allows developers to tailor the security model of their Subnet to their specific needs. Each Subnet in Avalanche operates its own blockchain, or blockchains, and can have its own unique properties and validation rules. This design enables a high degree of customization and scalability, while also providing isolation between Subnets.</p><p>If one Subnet were to be compromised, the impact would be contained within that Subnet and would not affect the rest of the Avalanche network. It&#39;s important to note that while Avalanche provides these robust security features, the security of individual Subnets ultimately depends on their specific implementation and validator set. Developers need to carefully consider their security requirements and design their Subnet accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*81d1_d3inwU19JjM.png" /></figure><h3><strong>Conclusion</strong></h3><p>The advent of scalability solutions like Polygon Supernets, Cosmos, and Avalanche Subnets is reshaping the way we perceive scalability, customizability, and security in the blockchain sphere. These platforms bring unique strengths to the table, offering a diverse array of solutions for developers and enterprises alike. Polygon Supernets, with their PolyBFT consensus mechanism, provide a robust platform for developers, particularly those already familiar with the Ethereum ecosystem. The integration of the Ethereum Virtual Machine (EVM) offers a familiar environment for developers to build upon. However, the platform’s scalability and customizability are somewhat constrained by the fixed validator set and the lack of support for custom virtual machines beyond the EVM.</p><p>Cosmos introduces a novel approach to blockchain architecture with its Hub and Zone model. This design offers a high degree of scalability and customizability, allowing developers to create application-specific blockchains that can interoperate seamlessly. The planned implementation of Shared Security or Interchain Security promises to enhance the security of individual zones, although the security of each zone can still vary based on its specific implementation and validator set. Cosmos stands as a beacon of innovation in the blockchain space, pushing the boundaries of what’s possible with blockchain technology.</p><p>Avalanche distinguishes itself with its Subnets, which offer strong customizability and scalability. Developers can specify custom validator sets and deploy virtually any application or virtual machine, opening up a world of possibilities for blockchain development. Coupled with Avalanche’s consensus protocol, which provides sub-second finality times and robust security, Avalanche Subnets represent a significant leap forward in blockchain technology.</p><p>The security of individual Subnets depends on their specific implementation, underscoring the importance of careful planning and design. The choice between these platforms will hinge on the specific needs and objectives of the developers and the use case at hand. Each platform offers unique advantages and potential challenges, underscoring the importance of careful evaluation and consideration.</p><p>As we continue to witness the evolution and maturation of these platforms, we can anticipate a future filled with even more innovative solutions and applications in the blockchain space. The journey of blockchain technology is just beginning, and platforms like Polygon Supernets, Cosmos, and Avalanche are paving the way towards a future where blockchain technology is an integral part of our digital lives.</p><p><em>Written by Usman Asim</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35b0a6cb830f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Avalanche: Kicking of the new Avax Developers Blog Series]]></title>
            <link>https://medium.com/avalancheavax/introduction-to-avalanche-the-devrel-blog-b38257fc0c07?source=rss-fa17a6b289be------2</link>
            <guid isPermaLink="false">https://medium.com/p/b38257fc0c07</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[avalanche]]></category>
            <dc:creator><![CDATA[Avax Developers]]></dc:creator>
            <pubDate>Wed, 31 May 2023 18:01:35 GMT</pubDate>
            <atom:updated>2023-05-31T20:58:37.527Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction to Avalanche: Kicking Off the New Avax Developers Blog Series</h3><p><em>From Snowflake to Avalanche through consensus to the stars.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ItvuR1rDGvzFprgu3yPVw.jpeg" /></figure><h3>Getting Started Building on Avalanche</h3><p>Avalanche is an open-source platform for building decentralized applications in one interoperable, highly scalable ecosystem. It is the first ecosystem designed to accommodate the scale of global finance, with near-instant transaction finality. That means that after issuing a transaction to the network it will be included in the chain within about two seconds and is immutable from there on. Ethereum has a finality of about 15 minutes and Bitcoin has a finality of about one hour.</p><p>Avalanche is a global financial network for the issuing and trading of all digital goods. The Avalanche network enables potentially millions of validators to process thousands of transactions per second using a protocol which is completely green and quiescent. This high-throughput and fast finality protocol has been paired with an architecture that can meet the needs of unique financial services and decentralized apps.</p><p>This is accomplished through the notion of Subnets. Subnets allow anyone, anywhere to spin up a taylor-made network with custom virtual machines and complex validator rulesets. Avalanche is a network of networks. It’s a platform of platforms where we invision thousands and thousands of public and private Subnets all emerging into this global marketplace which we call The Internet of Finance.</p><h3>Unique Features</h3><p>Avalanche has 3 unique features which set it apart from competitors. Consensus, Virtual Machines and Subnets.</p><p>Consensus is the process of getting a set of computers to agree on something and it’s a rich field of computer science dating back 40 years. Avalanche Consensus represents the 3rd major paradigm in the field of consensus and is a metastable consensus protocol inspired by epidemic protocols and gossip networks. Avalanche Consensus enables tens of thousands of transactions per second, with sub-second immutable and irreversible finality validated by potentially millions of validators globally. Here is an <a href="https://tedyin.com/archive/snow-bft-demo/#/snow">Avalanche Consensus Demo</a> created by Ava Labs’ Ted Yin.</p><p>A Virtual Machine is the blueprint for a custom blockchain on the Avalanche network. VMs contain the application-level logic for your blockchain and are akin to a class in object-oriented programming. A VM can be instantiated into many different instances of blockchains — each completely independent and with it’s own state. VMs aren’t limited to existing blockchain tech use cases such as P2P payments or defi and can be any use case which requires decentralization and consensus. VMs can be implemented in any language which can implement a GRPC API which enables developers to leverage modern tools and workflows which they’re familiar with.</p><p>A Subnet is a dynamic set of Validators working together to achieve consensus on the state of a set of blockchains. Subnets can compose their constituent validator sets via powerful rulesets. Subnets can be permissioned or permissionless — public or private. Subnets are used for scaling by enabling developers to launch application-specific-blockchains on different Subnets as opposed to many apps sharing the same blockchain. Subnets can communicate via Avalanche Warp Messaging.</p><h3>Consensus</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekX6sCqfp7XbLBerFUtg5A.png" /></figure><p>As previously mentioned, Avalanche Consensus is the 3rd major paradigm in the field of consensus. The first was called Classical Consensus and it goes back to the 80s. Classical Consensus has low latency and very high throughput. It’s lightweight and green. However it isn’t very scalable nor robust and it performs poorly in adversarial conditions.</p><p>In 2008/2009 when Satoshi Nakamoto released Bitcoin the world was introduced to the 2nd major paradigm in the field of consensus, what ultimately became known as Nakamoto Consensus. Nakamoto Consensus is very scalable, robust and decentralized but it doesn’t have low latency, it takes around an hour to be sure your transaction is sufficiently settled that you won’t experience a reorg. It doesn’t have high throughput, Bitcoin only does a handful of transaction per second. It’s not lightweight or green, Bitcoin burns more energy each day than some nation states. Lastly, Nakamoto Consensus performs ok in adversarial conditions up to the famous 51% attack.</p><p>In 2018 a pseudonymous group going by the name “Team Rocket” released a white paper on the InterPlanetary File System (IPFS) describing a 3rd major paradigm shift in the field of consensus. This new breakthrough was known as Avalanche Consensus. Avalanche Consensus is the perfect storm of features from Classical and Nakamoto Consensus.</p><p>It’s very scalable, robust and decentralized. There are currently around 1500 full block and vertex producing validators on the Avalanche network. The protocol theoretically enables millions of validators so it’s very decentralized. Avalanche consensus has low latency with subsecond immutable and irreversible finality. There is no notion of a reorg on Avalanche. Within a literal blink of an eye your transaction has settled completely. Avalanche has high throughput with 10s of thousands of transactions per second. It’s very lightweight and green and can be run on a PC, a Macbook, a VPS droplet on the cloud and in the future on Internet of Things devices. And Avalanche consensus is parameterizable so it performs very well in adversarial conditions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2AG6HrNErZYiw304a3IONw.png" /></figure><h3>Virtual Machines</h3><p>Traditional blockchain networks, such as Bitcoin and Ethereum, consist of a single virtual machine and set of validators. Avalanche is a network of many different virtual machines all deployed on Subnets and communicating with each other as needed. This architecture leads to network effects on the individual blockchains and compound network effects between subnets and blockchains.</p><p>A Virtual Machine is a state machine. It specifies the blockchain’s state, state transition function, transactions, and the API through which users can interact with the blockchain. Every blockchain on Avalanche is an instance of a VM.</p><p>The way to think of a VM is like a class in OOP. A class is a description or an object. It’s a template from which you can instantiate as many objects as you wish. Each of these objects, though derived from a common template, are unique and logically separate entities with their own state. Similar to a class, a VM is a blueprint or template from which you can instantiate as many different instances of a blockchain as you wish. Each of these blockchains, though derived from a common template, are unique and logically separate entities with their own state.</p><p>As a developer when you write a VM, you don’t need to concern yourself with lower-level logic like networking, consensus, or the structure of the blockchain. Avalanche does this behind the scenes so you can focus on the thing you would like to build.</p><p>On Avalanche you can build your VM in any language that you choose. To see examples of existing Virtual Machines check out:</p><h3>Golang</h3><ul><li><a href="https://github.com/ava-labs/coreth">Coreth</a> An implementation of the EVM that powers the Avalanche C-Chain that supports Solidity smart contracts.</li><li><a href="https://github.com/ava-labs/subnet-evm">Subnet-EVM</a> An implementation of the EVM that can be deployed to a custom Subnet to support Solidity smart contracts</li><li><a href="https://github.com/ava-labs/spacesvm">SpacesVM</a> An authenticated, hierarchical key-value store w/EIP-712 compatibility, state expiry, and fee-based metering</li><li><a href="https://github.com/ava-labs/blobvm">BlobVM</a> A content-addressable key-value store w/EIP-712 compatibility and fee-based metering</li><li><a href="https://github.com/ava-labs/timestampvm">TimestampVM</a> A decentralized timestamp server</li><li><a href="https://github.com/ava-labs/xsvm">XSVM</a> An example of Avalanche Warp Messaging that implements Cross-Subnet asset transfers</li></ul><h3>Rust</h3><p>The following VMs were built using Rust via the <a href="https://crates.io/crates/avalanche-types">Avalanche Rust SDK</a></p><ul><li><a href="https://github.com/ava-labs/timestampvm-rs">TimestampVM RS</a> A Rust implementation of TimestampVM</li><li><a href="https://github.com/ava-labs/spacesvm-rs">SpacesVM RS</a> A Rust implementation of SpacesVM</li></ul><p>For more information on building VMs check out:</p><ul><li><a href="https://docs.avax.network/subnets/create-a-vm-timestampvm">How to Build a Simple Golang VM</a></li><li><a href="https://docs.avax.network/subnets/create-a-vm-blobvm">How to Build a Complex Golang VM</a></li><li><a href="https://docs.avax.network/subnets/create-a-simple-rust-vm">How to Build a Simple Rust VM</a></li></ul><h3>Subnets</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W4bXYPK1OUbLi1l3W7RGIg.png" /></figure><p>A Subnet is a sovereign network which defines its own rules regarding its membership and token economics. Subnets are independent, they specify their own execution logic, determine their own fee regime, maintain their own state, facilitate their own networking, and provide their own security. They don’t share execution thread, storage or networking with other Subnets including the Primary Network, effectively allowing the network to scale up easily while enabling lower latency, higher transactions per second (TPS), and lower transaction costs provided by the Avalanche Consensus.</p><p>A Subnet manages its own membership, it can create its own token economics and rules, and may require that its constituent validators have certain properties.</p><h3>Independent Token Economics</h3><p>Subnets can have their own token economics with their own native tokens and fee markets. They can launch their own blockchains with customized virtual machines.</p><h3>Compliance</h3><p>Avalanche’s Subnet architecture makes regulatory compliance manageable. As mentioned above, a Subnet may require validators to meet a set of requirements.</p><p>Some examples of requirements include:</p><ul><li>Validators must be located in a given country</li><li>Validators must pass a KYC/AML checks</li><li>Validators must hold a certain license</li></ul><h3>Application-Specific Requirements</h3><p>Different blockchain-based applications may require validators to have certain properties. Suppose there is an application that requires large amounts of RAM or CPU power. A Subnet could require that validators meet certain hardware requirements so that the application doesn’t suffer from low performance due to slow validators.</p><h3>Support for Private Blockchains</h3><p>You can create a Subnet where only certain pre-defined validators may join and create a private Subnet where the contents of the blockchains would be visible only to those validators. This is ideal for organizations interested in keeping their information private. See here for more info.</p><h3>Separation of Concerns</h3><p>In a heterogeneous network of blockchains, some validators will not want to validate certain blockchains because they simply have no interest in those blockchains. The Subnet model allows validators to only concern themselves with blockchains that they care about. This reduces the burden on validators.</p><h3>Tools and Resources</h3><p>Following is a list of tools and resources to help developers onramp onto the Avalanche Platform. This should include running a node, sending it queries, SDKs for sending transactions, creating virtual machines and Subnets and the associated documentation.</p><h3>Avalanche Docs</h3><p>Here are the <a href="https://docs.avax.network/">official Avalanche docs</a>. These are the canonical Avalanche platform docs.</p><h3>AvalancheGo</h3><p>AvalancheGo is a full Avalanche node. It’s written in Golang and required for running local networks for development or for running a node and connecting to the Fuji testnet or the mainnet.</p><p>The minimum recommended hardware specification for nodes connected to Mainnet is:</p><ul><li>CPU: Equivalent of 8 AWS vCPU</li><li>RAM: 16 GiB</li><li>Storage: 1 TiB</li><li>OS: Ubuntu 20.04/22.04 or macOS &gt;= 12</li><li>Network: Reliable IPv4 or IPv6 network connection, with an open public port.</li></ul><h3>Binary Install</h3><p>Download the <a href="https://github.com/ava-labs/avalanchego/releases/latest">latest build</a> for your operating system and architecture. The Avalanche binary to be executed is named avalanchego.</p><p>You can also <a href="https://github.com/ava-labs/avalanchego#building-from-source">build from source</a>, <a href="https://github.com/ava-labs/avalanchego#binary-repository">install with </a><a href="https://github.com/ava-labs/avalanchego#binary-repository">apt</a> and <a href="https://github.com/ava-labs/avalanchego#docker-install">install with docker</a>.</p><h3>Connect to the Network</h3><pre>./path/to/avalanchego --http-host=my.http.host --network-id=fuji --public-ip=my.ip.address</pre><p>By default avalanchego will connect to the mainnet which will require significantly more time to bootstrap than the fuji network. Configure which network the node should bootstrap by passing in the --network-id flag. You can get funds for the Testnet from <a href="https://faucet.avax.network/">the faucet</a>.</p><p>To be able to make API calls to your node from other machines, when starting up the node include the --http-host= flag. In order to ensure your node is well-connected, make sure that your node can receive and send TCP traffic on the staking port (9651 by default) and that you started your node with config flag --public-ip=[YOUR NODE&#39;S PUBLIC IP HERE]. Failing to do either of these may jeopardize your staking reward.</p><p>Starting a full node this way is fine if you’re doing short-term experimental work. For instances where you intend to keep your node online for longer you should set up a system service. The <a href="https://docs.avax.network/nodes/build/set-up-node-with-installer">installer script</a> can do that for you.</p><p>AvalancheGo is a core software component needed for developing dapps and VMs for Avalanche. It’s required for running an individual node and a local test network. More info: <a href="https://github.com/ava-labs/avalanchego">Github Repo</a>.</p><h3>Avalanche Network Runner</h3><p>While AvalancheGo is useful for running a single node the Avalanche Network Runner (ANR) is a tool to run and interact with a local Avalanche network and is especially useful for development and testing.</p><h3>Installation</h3><p>To download a binary for the latest release, run:</p><pre>curl -sSfL &lt;https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh&gt; | sh -s</pre><p>The binary will be installed inside the ~/bin directory. To add the binary to your path, run</p><pre>export PATH=~/bin:$PATH</pre><p>To add it to your path permanently, add an export command to your shell initialization script (ex: .bashrc or .zshrc). You can also <a href="https://github.com/ava-labs/avalanche-network-runner#build-from-source-code">build from source</a>.</p><h3>Run a 5 Node Local Network</h3><p>The easiest way to run a local network with the ANR is to use the example script to fire up a 5 node network.</p><pre>git clone &lt;https://github.com/ava-labs/avalanche-network-runner.git&gt;<br>cd avalanche-network-runner<br>go run examples/local/fivenodenetwork/main.go</pre><pre>[03-29|18:18:35.873] INFO fivenodenetwork/main.go:93 waiting for all nodes to report healthy...<br>[03-29|18:18:35.873] INFO local/network.go:631 checking local network healthiness {&quot;num-of-nodes&quot;: 5}<br>[03-29|18:18:44.886] INFO fivenodenetwork/main.go:98 All nodes healthy. Network will run until you CTRL + C to exit...</pre><p>You can now send curl requests to the nodes on localhost</p><pre>curl --location &#39;&lt;http://127.0.0.1:9650/ext/info&gt;&#39; \\<br>--header &#39;Content-Type: application/json&#39; \\<br>--data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot;     :1,<br>    &quot;method&quot; :&quot;info.isBootstrapped&quot;,<br>    &quot;params&quot;: {<br>        &quot;chain&quot;: &quot;X&quot;<br>    }<br>}&#39;</pre><pre>{<br>    &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>    &quot;result&quot;: {<br>        &quot;isBootstrapped&quot;: true<br>    },<br>    &quot;id&quot;: 1<br>}</pre><p>More info on the <a href="https://github.com/ava-labs/avalanche-network-runner">ANR Github Repo</a>.</p><h3>AvalancheCLI</h3><p>The Avalanche Network Runner is very helpful for launching a local network running the primary Subnet. This is great for interacting with the X, P or C-chains. However, if you want to deploy and test Subnets then you want to use AvalancheCli. Avalanche CLI is a command line tool that gives developers access to everything Avalanche. This release specializes in helping developers develop and test subnets.</p><h3>Installation</h3><p>The tool has been tested on Linux and Mac. Windows is currently not supported. To download a binary for the latest release, run:</p><pre>curl -sSfL &lt;https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh&gt; | sh -s</pre><p>The binary will be installed inside the ~/bin directory.</p><p>To add the binary to your path, run</p><pre>export PATH=~/bin:$PATH</pre><p>To add it to your path permanently, add an export command to your shell initialization script (ex: .bashrc or .zshrc).</p><p>You can also <a href="https://github.com/ava-labs/avalanche-cli#building-locally">build locally</a> or install <a href="https://github.com/ava-labs/avalanche-cli#docker">via docker</a>.</p><h3>Quickstart</h3><p>After installing, launch your own custom subnet:</p><pre>avalanche subnet create &lt;subnetName&gt;<br>avalanche subnet deploy &lt;subnetName&gt;</pre><p>Shut down your local deployment with:</p><pre>avalanche network stop</pre><p>Restart your local deployment (from where you left off) with:</p><pre>avalanche network start</pre><p>More info on AvalancheCli in the <a href="https://github.com/ava-labs/avalanche-cli">Github Repo</a>.</p><h3>AvalancheJS</h3><p>AvalancheJS is a JavaScript Library for interfacing with the Avalanche Platform. It is built using TypeScript and intended to support both browser and Node.js. The AvalancheJS library allows you to issue commands to the Avalanche node APIs.</p><p>The APIs currently supported by default are:</p><ul><li>Admin API</li><li>Auth API</li><li>AVM API (X-Chain)</li><li>EVM API (C-Chain)</li><li>Health API</li><li>Index API</li><li>Info API</li><li>Keystore API</li><li>Metrics API</li><li>PlatformVM API (P-Chain)</li><li>Socket</li></ul><h3>Installation</h3><p>Avalanche is available for install via yarn:</p><pre>yarn add avalanche</pre><p>You can also pull the repo down directly and build it from scratch:</p><pre>yarn build</pre><h3>Examples</h3><p>AvalancheJS has dozens of example scripts in the examples/ directory.</p><pre>ts-node examples/info/isBootstrapped.ts<br>true</pre><p>More info on AvalancheJS in the <a href="https://github.com/ava-labs/avalanchejs">Github Repo</a></p><h3>Glacier</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g4lntWe8ODcv0g9s-igQhg.png" /></figure><p>The Glacier API is a developer’s one-stop-shop for all enriched blockchain data from Avalanche and Ethereum and the official API service indexing Avalanche Subnets.</p><p>The Glacier API Beta gives developers a wide range of useful data for explorer and wallet services, token transfers and more. Originally created to power the Avalanche Subnet Block Explorer, Glacier also powers Core Wallet — providing balances, transfers, and associated metadata for native assets, ERC-20 tokens and NFTs.</p><p>With Glacier, application developers can easily build products that leverage real-time and historical transaction data — all served through highly performant APIs. Developers that join the Glacier API Beta will get access to the platform’s service for free and have the opportunity to shape future feature development.</p><p>Glacier’s capabilities as a powerful indexed blockchain data provider will expand to include additional raw and derived transaction data as user feedback helps guide this process.</p><p>There is a public <a href="https://glacier-api.avax.network/">Swagger UI</a> for quickly testing out the Glacier API and customizing requests POST body and copying curl statements for easily sharing requests.</p><p>For example, first let’s GET the list of chains supported by the api. At the time of writing is 14 chains including the following:</p><ul><li>Avalanche C-Chain (Fuji and Mainnet)</li><li>Ethereum</li><li>DFK Subnet (Fuji and Mainnet)</li><li>Swimmer Network Subnet (Fuji and Mainnet)</li><li>Dexalot Subnet (Fuji and Mainnet)</li><li>Loco Legends Subnet (Fuji and Mainnet)</li><li>D-Chain</li><li>WAGMI Subnet</li><li>Green Dot Subnet</li></ul><h3>Request</h3><p>/v1/chains</p><pre>curl -X &#39;GET&#39; \\<br>  &#39;&lt;https://glacier-api.avax.network/v1/chains&gt;&#39; \\<br>  -H &#39;accept: application/json&#39;</pre><h3>Response</h3><p><strong>NOTE</strong> that the response is truncated after one chains object.</p><pre>{<br>  &quot;chains&quot;: [<br>    {<br>      &quot;chainId&quot;: &quot;43114&quot;,<br>      &quot;chainName&quot;: &quot;Avalanche (C-Chain)&quot;,<br>      &quot;description&quot;: &quot;The Contract Chain (C-Chain) runs on an Ethereum Virtual Machine and is used to deploy smart contracts and connect to dapps.&quot;,<br>      &quot;platformChainId&quot;: &quot;2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5&quot;,<br>      &quot;subnetId&quot;: &quot;11111111111111111111111111111111LpoYY&quot;,<br>      &quot;vmId&quot;: &quot;mgj786NP7uDwBCcq6YwThhaN8FLyybkCa4zBWTQbNgmK6k9A6&quot;,<br>      &quot;vmName&quot;: &quot;EVM&quot;,<br>      &quot;explorerUrl&quot;: &quot;&lt;https://snowtrace.io&gt;&quot;,<br>      &quot;rpcUrl&quot;: &quot;&lt;https://api.avax.network/ext/bc/C/rpc&gt;&quot;,<br>      &quot;wsUrl&quot;: &quot;wss://api.avax.network/ext/bc/C/ws&quot;,<br>      &quot;isTestnet&quot;: false,<br>      &quot;utilityAddresses&quot;: {<br>        &quot;multicall&quot;: &quot;0xed386Fe855C1EFf2f843B910923Dd8846E45C5A4&quot;<br>      },<br>      &quot;networkToken&quot;: {<br>        &quot;name&quot;: &quot;Avalanche&quot;,<br>        &quot;symbol&quot;: &quot;AVAX&quot;,<br>        &quot;decimals&quot;: 18,<br>        &quot;description&quot;: &quot;&quot;,<br>        &quot;logoUri&quot;: &quot;&lt;https://glacier-api.avax.network/proxy/chain-assets/cb14a1f/chains/43114/token-logo.png&gt;&quot;<br>      },<br>      &quot;chainLogoUri&quot;: &quot;&lt;https://glacier-api.avax.network/proxy/chain-assets/cb14a1f/chains/43114/chain-logo.png&gt;&quot;<br>    },<br>    ...<br>}</pre><p>Next let’s take that returned chainId and get the latest blocks indexed for that chain.</p><h3>Request</h3><p>/v1/chains/{chainId}/blocks?pageSize=&amp;pageToken=</p><p><strong>NOTE</strong> that this request has 1 URL required URL parameter and 2 optional query string parameters.</p><ul><li><strong>chainId</strong> <em>string</em> (path): A supported evm chain id. Use the /chains endpoint to get a list of supported chain ids.</li><li><strong>pageSize</strong> <em>integer</em> (query): The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.</li><li><strong>pageToken</strong> <em>string</em> (query): A page token, received from a previous list call. Provide this to retrieve the subsequent page.</li></ul><pre>curl -X &#39;GET&#39; \\<br>  &#39;&lt;https://glacier-api.avax.network/v1/chains/43114/blocks?pageSize=10&gt;&#39; \\<br>  -H &#39;accept: application/json&#39;</pre><h3>Response</h3><p><strong>NOTE</strong> that the response is truncated after one blocks object.</p><pre>{<br>  &quot;blocks&quot;: [<br>    {<br>      &quot;blockNumber&quot;: &quot;27398610&quot;,<br>      &quot;blockTimestamp&quot;: 1678738466,<br>      &quot;blockHash&quot;: &quot;0x15a9fa15115f43f41844a718ded08e959a237dc6168fdb29736489edded081bc&quot;,<br>      &quot;txCount&quot;: 9,<br>      &quot;atomicTxCount&quot;: 0,<br>      &quot;baseFee&quot;: &quot;25000000000&quot;,<br>      &quot;gasUsed&quot;: &quot;6544183&quot;,<br>      &quot;gasLimit&quot;: &quot;8000000&quot;,<br>      &quot;gasCost&quot;: &quot;400000&quot;,<br>      &quot;parentHash&quot;: &quot;0xf152746ab4aea61d8db992a1953e3d379633eaaac4291d29b56cf957f8be64e3&quot;,<br>      &quot;feesSpent&quot;: &quot;173650909164332187&quot;,<br>      &quot;cumulativeTransactions&quot;: &quot;222464194&quot;<br>    },<br>    ...<br>  ],<br>  &quot;nextPageToken&quot;: &quot;eyJzayI6eyJTIjoiMDAwMDAwMDAwMWEyMTFiZiJ9LCJpc0Jsb2NrIjp7Ik4iOiIxIn0sInBrIjp7IlMiOiJCIzB4OGRhYjQwZTAxMDFhZTdkNzJhNmQyYjE1M2Q0ZWI5NWE4MDQyOGZjMzcwYmYwYzgyZjFkMjczM2M5NTI1NGM1YSJ9LCJibG9ja1NrIjp7IlMiOiJCIzAwMDAwMDAwMDFhMjExYmYifX0&quot;<br>}</pre><h3>Postman Collection</h3><p>Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle. The Avalanche Postman collection supports the full JSON RPC.</p><h3>Installation</h3><ol><li>Download Postman</li><li>Import Avalanche Postman Collection. Import -&gt; Upload Files -&gt; Avalanche.postman_collection.json</li><li>Import the Example Avalanche Postman Environment. Settings -&gt; Import -&gt; Choose Files -&gt; Example_Avalanche_Environment.postman_environment.json</li><li>Call any Avalanche RPC endpoint</li></ol><h3>Usage</h3><pre>curl --location &#39;&lt;https://api.avax.network/ext/info&gt;&#39; \\<br>--header &#39;Content-Type: application/json&#39; \\<br>--data &#39;{<br>   &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>   &quot;id&quot;     :1,<br>   &quot;method&quot; :&quot;info.isBootstrapped&quot;,<br>   &quot;params&quot;: {<br>       &quot;chain&quot;: &quot;X&quot;<br>   }<br>}&#39;</pre><pre>{<br>   &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>   &quot;result&quot;: {<br>       &quot;isBootstrapped&quot;: true<br>   },<br>   &quot;id&quot;: 1<br>}</pre><p><a href="https://github.com/ava-labs/avalanche-postman-collection">Github Repo</a></p><p>~Written by Gabriel Cardona</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b38257fc0c07" width="1" height="1" alt=""><hr><p><a href="https://medium.com/avalancheavax/introduction-to-avalanche-the-devrel-blog-b38257fc0c07">Introduction to Avalanche: Kicking of the new Avax Developers Blog Series</a> was originally published in <a href="https://medium.com/avalancheavax">Avalanche</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>