Stellar (XLM) Protocol 21 Goes Live, Enhancing Network Efficiency
On June 18, 2024, Stellar (XLM) public network validators officially voted to upgrade the network to Protocol 21, as announced by Stellar. This significant update activates five new Core Advancement Proposals (CAPs) aimed at boosting the efficiency and cost-effectiveness of the Stellar Mainnet.
Key Enhancements in Protocol 21
Among the five new CAPs, CAP-0053 introduces two separate host functions to extend the Time to Live (TTL) for both contract instances and contract code. This change allows users to manage the TTL of contract components independently, enhancing rent fee distribution and state archival functionality. Notably, CAP-0053 was developed by Stellar community member Tommaso De Ponti.
CAP-0054 refines the virtual machine (VM) instantiation cost model, which previously linked CPU costs to transaction fees. The new model aims to charge fees that reflect actual usage more accurately, thereby lowering overall costs and improving network scalability.
CAP-0055 streamlines the linking process during VM instantiation by reducing the number of host functions linked to each contract. Before Protocol 21, all host functions were linked, but now only the functions explicitly imported by the contract are linked. This reduction lowers CPU costs per transaction, allows more transactions per ledger, and enhances overall network performance.
CAP-0056 introduces intra-transaction module caching for Soroban, Stellar's smart contract platform. Prior to this update, invoking the same contract multiple times in a single transaction required repeated parsing. The new module cache ensures that contracts are parsed only once per transaction, regardless of the number of invocations. This change improves throughput and performance by eliminating redundant parsing.
Impact on the Stellar Network
These updates are expected to significantly enhance the Stellar network's efficiency, making it more cost-effective and scalable. The improvements in VM instantiation, module caching, and host function linking collectively contribute to a more robust and performant blockchain ecosystem.
For more detailed information about Protocol 21, visit the official Stellar blog here.