Starknet Quantum Transition: Performance Improvement, Flying Experience

brief introduction We are pleased to announce the release of Starknet Alpha V0.12.0. This version is an important milestone for Starknet, marking the beginning of a significant leap in performance and scalability. This version is another major step in Starknet's expansion of Ethereum, with a focus on addressing throughput and latency issues. To address these challenges, we focus on Starknet's sequencer, as throughput is limited by performance. The development of Starknet Alpha V0.12.0 is largely a fruitful and enjoyable collaboration between LambdaClass and StarkWare over a year ago. We are proud to be able to build Starknet with the LambdaClass team. This version, as the main version, will be decided by community voting. We invite the community to participate in shaping Starknet's future. Performance - Significant improvement in throughput! This version focuses on performance, especially throughput improvement, significantly increasing by ten times. The throughput has skyrocketed from an average of 30000 Cairo steps per second (CSPS) in v0.11.0 to the latest version of 220000 CSPS, which is truly amazing. This extraordinary achievement is thanks to targeted optimizations, which are the foundation of the Starknet sorter's efficiency implementation, as we previously shared in the performance roadmap. The three key factors for improving Starknet performance are Cairo rs, Blockifier, and Papyrus, all of which benefit from Rust's powerful capabilities. The first improvement of the sorter is the integration of Cairo rs, an efficient Cairo runtime developed by LambdaClass and written in Rust. By leveraging the powerful features of Rust, Cairo rs enhances the execution of Cairo contracts, providing users with a more streamlined experience. In addition, the introduction of Rust based block execution logic Blockifier has also played a crucial role in improving throughput. By optimizing transaction execution time, this implementation scheme effectively reduces waiting time and alleviates network congestion. The addition of local storage solution Papyrus helps to efficiently manage the local state of the sorter. This enhancement further optimizes the overall performance and responsiveness of the system. This is just the first step The optimization of the sorter in this version is far from the end of the performance improvement path. Cairo_ Native Starknet will integrate cairo from LambdaClass_ Native compiler, which will enable Cairo contracts to be executed in a more efficient manner. By allowing contracts to run in "native code" such as Rust instead of executing in the Cairo environment, we expect Starknet to achieve higher efficiency and performance improvements. Parallelization The Python version of the sorter before Starknet introduced transaction parallelism, significantly improving performance. However, it is worth noting that the initial implementation of the sorter in Rust included in version V0.12.0 has not yet implemented parallel transactions. The focus of continuous development work is to execute transactions in parallel within blocks in the spirit of block-STM. Drawing on the successful demonstration implemented in Python, this optimization will further improve Starknet's throughput and enable it to effectively handle increased transaction volume. Transactions no longer pending In previous versions, the PENDING state represented valid blocks that had been executed by the sorter but were not yet full, and additional transactions could still be added. However, in this latest version, the PENDING status has been replaced with ACCESSED_ ON_ L2 reflects the final state of the transaction. This change simplifies the transaction confirmation process and makes the user experience smoother. Get_ Block_ Hash system call Another new feature in Starknet Alpha V0.12.0 is the introduction of get_ Block_ Hash system call. This new system call allows developers to retrieve the hash value of a specific Starknet block within the range of [first_v0_1d_0_Block, current_Block-10]. The signature of the system call is fn get_ Block_ Hash (u64 block_number) ->felt252. The error message related to this scenario is: 'The block number is out of range.' To implement this change, the operating system will write a map at the beginning of each block, located under address=0x1, where current_ Block -10 is the key, with its corresponding hash value as the value. By getting_ Block_ Hash system calls allow developers to easily retrieve block hashes, which are an important component of building and verifying storage proofs. These proofs can achieve efficient cross chain data access and enhance the credibility of blockchain data, without even relying on third-party oracle machines. By obtaining the block hash value through this system call, developers can accurately reference the status, transactions, or any other information submitted in the block header of a specific block. Cairo - Improved Contract Grammar In this version, we have made significant improvements to the smart contract syntax. The new grammar emphasizes security and lays the foundation for scalability. In this case, security means a clearer understanding of the external components (interfaces/storage/events) of the contract, which allows developers to better understand what happens when interacting with the contract. The scalability will be finalized in subsequent versions, allowing contracts to use components from external libraries. This is a key feature of any smart contract language and will address a major issue in the Starknet development community. For a detailed understanding of the motivation for grammar improvement and the content of grammar changes, please refer to Cairo Roadmap blog articles and community forum articles. Although there are significant changes to the new compiler version, you can continue to use the old compiler version (v1.1.0) and deploy the generated contract on Starknet over the next 6 months. This reflects a significant change in our new compiler upgrade protocol: with the release of the new compiler version, contracts compiled from the old compiler version can continue to be used for more than six months for community adjustments. Of course, once the Cairo contract is declared on Starknet (not Cairo 0), it can continue to be available for deployment and interaction. What is the next plan? Short term goal: Version 0.12.1 In the short term, Starknet's focus is on enhancing user experience and transaction reliability. The next version 0.12.1 will introduce another significant improvement: incorporating failed transactions into the block. So far, the failed transactions have not been included in the block, so the sorter cannot charge fees and adds nonce. This brings user experience issues to developers. Developers cannot rely on nonce sequences, which forces them to continuously monitor transaction status before sending new transactions. This change can also protect the sorter from sending spam transactions to the system with failed transactions without payment. This update aims to provide users with a smoother and more seamless experience when interacting with Starknet. Long term vision: throughput, latency, and cost Looking ahead, Starknet's overall vision is to achieve significant scalability in terms of scale and cost. The next priority in the roadmap is to significantly reduce transaction costs. By reducing costs, Starknet aims to make transactions more cost-effective and inclusive, enabling a wider range of use cases and empowering developers and users. The commitment to cost reduction is consistent with Starknet's mission to provide scalable, flexible, and cost-effective infrastructure for decentralized applications. Starknet Alpha V0.12.0 Voting The focus of the first phase of Starknet governance is mainly on upgrading the Starknet protocol. Each major Starknet version upgrade will first be deployed on the testing network, providing a few days for the Starknet community to review and test the upgraded version. During this review period, snapshot proposals will be opened for the community to vote on whether to approve the upgraded version for main network deployment. If the proposal receives a majority of YES votes during the voting period, it will be approved and the Starknet main network will be upgraded accordingly. Starknet Alpha V0.12.0 voting is now online! Welcome everyone to register for notification services on the Starknet Snapshot space. View the Delegate Profile Thread and Delegate Discovery to become or choose a delegate, and discuss the Starknet alpha v0.12.0 version proposal on a community forum. summary Starknet Alpha V0.12.0 focuses on enhancing performance and user experience. The new version introduces a Rust based sorter implementation, which increases throughput tenfold and reduces transaction latency. Other features include new compiler versions, deleting pending transaction states, and adding block hash system calls. Starknet developers have the right to write influential solutions. Start your Cairo development journey, read Cairo documentation, register for Cairo Basecamp, or browse tutorials. Want to know the update information for all versions? Subscribe to our Starknet developer Newsletter.