From eedab74bab0c62e6da4f30f73534889aa8392a26 Mon Sep 17 00:00:00 2001 From: kkkycocho Date: Wed, 15 Nov 2023 01:59:52 +0000 Subject: [PATCH] update news --- ...ce-with-unparalleled-speed-987d3bbb5a83.md | 48 ++++++ ...ostm-early-explorers-unite-256cce0e327b.md | 64 ++++++++ ...ting-the-next-wave-of-web3-3759db89eb8c.md | 147 ++++++++++++++++++ ...ew-high-performance-engine-a46ab81f8caf.md | 103 ++++++++++++ 4 files changed, 362 insertions(+) create mode 100644 content/news/post/flexidag-revolutionizing-blockchain-performance-with-unparalleled-speed-987d3bbb5a83.md create mode 100644 content/news/post/starcoin-2-0-sneak-peek-turbostm-early-explorers-unite-256cce0e327b.md create mode 100644 content/news/post/starcoin-2-0-tempus-navigating-the-next-wave-of-web3-3759db89eb8c.md create mode 100644 content/news/post/turbostm-starcoins-new-high-performance-engine-a46ab81f8caf.md diff --git a/content/news/post/flexidag-revolutionizing-blockchain-performance-with-unparalleled-speed-987d3bbb5a83.md b/content/news/post/flexidag-revolutionizing-blockchain-performance-with-unparalleled-speed-987d3bbb5a83.md new file mode 100644 index 0000000..26955f0 --- /dev/null +++ b/content/news/post/flexidag-revolutionizing-blockchain-performance-with-unparalleled-speed-987d3bbb5a83.md @@ -0,0 +1,48 @@ ++++ +title = "FlexiDAG: Revolutionizing Blockchain Performance with Unparalleled Speed" +date = "2023-05-30" +summary = "“FlexiDAG, technically not a direct manifestation of the Nakamoto consensus, serves as an intriguing expansion that pushes the..." +author = "Starcoin" +tags = [ + "Starcoin" +] +archives="2023" + ++++ + +![img](https://miro.medium.com/v2/resize:fit:1400/1*I8syF6d4YbKQm-BK_MfOPw.jpeg) + +FlexiDAG, technically not a direct manifestation of the Nakamoto consensus, serves as an intriguing expansion that pushes the boundaries of this concept. It goes beyond the traditional understanding by evolving the DAG (Directed Acyclic Graph) into a separate PoW-based cryptocurrency, aiming to unleash Nakamoto’s consensus potential from an external vantage point, while keeping the essence of generalization intact. + +The aforementioned DAG, in this context, represents a mathematical structure composed of directed edges, devoid of cyclic connections where a vertex, the fundamental building block of graphs, does not lead back to itself. + +Within the realm of distributed ledgers, a FlexiDAG emerges as a DAG where blocks are symbolized by vertices, and edges symbolize references from blocks to their predecessors. + +We already implemented GHOSTDAG protocol in FlexiDAG. The key is that honest blocks would exhibit strong connections to each other but not to adversarial blocks (even if adversarial blocks are well connected among themselves). Therefore, as long as an attacker possesses computational inferiority, the honest network will appear as a highly connected cluster of blocks encompassing the majority of blocks in the network. By identifying this cluster and giving precedence to its blocks, attacking the network while controlling only a minority of the block production becomes infeasible. + +![img](https://miro.medium.com/v2/resize:fit:1348/1*k5IKpe0YqX6V4U9YcHj9BA.png) + +A formal representation of the core algorithm of the protocol: + +1. Given a FlexiDAG represented by G = (V, E), where V is the set of vertices (blocks) and E is the set of edges (references from blocks to their predecessors). +2. Define the k value, which represents the number of clusters to be formed. +3. Initialize an empty set of clusters C = {}. +4. For each block v in V, perform the following steps: + +- Calculate the score of block v as the sum of the weights of its ancestors, denoted as score(v). +- Assign block v to the cluster with the highest score among its k nearest neighboring clusters. +- If there are fewer than k clusters, create a new cluster and assign block v to it. +- Repeat the assignment process until all blocks have been assigned to clusters. +- Compute the weights of the clusters by summing the scores of the blocks within each cluster. +- Select the cluster with the highest weight as the confirmed cluster for the consensus protocol. +- Use the blocks within the confirmed cluster as the reference set for determining the validity and precedence of transactions within the FlexiDAG. + +By implementing the k-cluster algorithm in FlexiDAG, the FlexiDAG protocol forms clusters based on block scores, allowing for efficient consensus on the precedence of blocks and transactions. The confirmed cluster serves as a reference point for maintaining the security and integrity of the ledger. + +The distinguishing feature of FlexiDAG lies in its exceptional scalability, facilitating higher throughput in terms of transactions per second (TPS) and blocks per second (BPS), while ensuring the preservation of security. Moreover, FlexiDAG introduces the capacity to validate multiple parallel blocks concurrently, further augmenting its scalability potential. + +While these advancements are implemented, FlexiDAG remains grounded in the PoW (Proof of Work) model, comprising elements such as PoW block creation, transaction fees, miner involvement, the role of full nodes, and deflationary block rewards. However, it deviates from the conventional longest-chain rule, also known as the heaviest valid chain, which is measured in terms of cumulative proof of work (difficulty). Instead, FlexiDAG embraces a novel rule that expedites consensus on the priority of parallel blocks, thus determining the validity of associated transactions. + +From the perspective of miners, the mining process remains largely consistent. Irrespective of the traditional PoW consensus, mining operations continue to be executed in parallel. If a miner becomes aware of a new block while in the mining process, they promptly abandon the ongoing block and shift their focus FlexiDAG, while technically not a Nakamoto consensus, represents a fascinating extension of it. Its development involves transforming the DAG (Directed Acyclic Graph) into a distinct PoW-based blockchain, aiming to push the boundaries of Nakamoto’s consensus from an external perspective. + +This challenge is overcome by FlexiDAG, leveraging its inherent resistance to 49% hash rate attacks inherited from Nakamoto Consensus, offering the highest level of security for a consensus protocol. The achieved result is the ability to scale up without sacrificing this security property. \ No newline at end of file diff --git a/content/news/post/starcoin-2-0-sneak-peek-turbostm-early-explorers-unite-256cce0e327b.md b/content/news/post/starcoin-2-0-sneak-peek-turbostm-early-explorers-unite-256cce0e327b.md new file mode 100644 index 0000000..39a0ee1 --- /dev/null +++ b/content/news/post/starcoin-2-0-sneak-peek-turbostm-early-explorers-unite-256cce0e327b.md @@ -0,0 +1,64 @@ ++++ +title = "Starcoin 2.0 Sneak Peek-TurboSTM.Early Explorers Unite!" +date = "2023-10-12" +summary = "“FlexiDAG, technically not a direct manifestation of the Nakamoto consensus, serves as an intriguing expansion that pushes the..." +author = "Starcoin" +tags = [ + "Starcoin" +] +archives="2023" + ++++ + +> ![img](https://miro.medium.com/v2/resize:fit:1400/1*LRqY9cnh5PNEIk_2ie_fBA.jpeg) +> +> Step into the future with us as we unveil a sneak peek of Starcoin 2.0’s TurboSTM! +> +> **You’re cordially invited to join the pioneers in our exclusive Sneak Preview, where you’ll experience the transformative power of TurboSTM firsthand. Don’t miss your chance to be at the forefront of blockchain innovation!** +> +> TurboSTM is an innovative technology developed by Starcoin, marking the commencement of the STARCOIN 2.0 phase, aimed at enhancing the execution of smart contracts on its mainnet. By introducing parallel processing, it overcomes the limitations of traditional single-threaded execution, enabling the simultaneous execution of multiple smart contracts and transactions. This advancement significantly boosts the throughput and efficiency of the entire blockchain system, especially in high-concurrency scenarios. +> +> The development of TurboSTM was initiated to tackle the bottlenecks presented by the conventional single-threaded execution of smart contracts. With the increase in complex transactions and heightened user demands, traditional methods have become insufficient. TurboSTM employs industry-standard parallelization technology and introduces innovative features like Multi-Version Concurrency Control (MVCC) and optimistic locking. These capabilities allow for the concurrent reading and updating of data records, reducing transaction execution time and enhancing overall system performance. +> +> The strengths of TurboSTM lie in its ability to lower transaction costs, increase processing capacity, and offer efficient and secure solutions for various blockchain applications, including DeFi, NFTs, and blockchain-based gaming. Upon the implementation of TurboSTM, STARCOIN 2.0 will undergo a significant performance boost, characterized by higher throughput, lower transaction latency, and enhanced security. This technology aligns with Starcoin’s vision to build a more robust blockchain ecosystem, deliver comprehensive solutions for blockchain applications, and foster digital economic growth. TurboSTM represents a crucial step towards achieving these objectives, furthering the mission to make blockchain technology more accessible and valuable. +> +> TurboSTM epitomizes a part of Starcoin’s continuous evolution, designed to meet the growing demands of users. The traditional methods of executing smart contracts are no longer sufficient to handle complex transactions and high-concurrency environments, making the emergence of TurboSTM vital. +> +> With the launch of TurboSTM, STARCOIN 2.0 will experience substantial performance enhancements, including increased throughput, reduced transaction delays, and bolstered security. **To further engage community members in the development of Starcoin, we invite you to be among the first to experience the TurboSTM preview on the Barnard network and share your valuable feedback. Your insights have the potential to earn rewards and positively influence the future of blockchain technology. Don’t miss the opportunity to participate in this blockchain revolution — explore TurboSTM today!** +> +> # Tutorial Link: +> +> https://github.com/starcoinorg/starcoin/discussions/3971 +> +> # Start Time: +> +> October 13, 2023, 9:00(UTC+8) October 12, 18:00 (PST) +> +> # End Time: +> +> October 23, 2023, 9:00(UTC+8) October 22, 18:00 (PST) +> +> # Reward Rules: +> +> 1. Within ten days of the event launch, execute transactions using TurboSTM’s multi-CPU capability. +> 2. Comment on the event’s Twitter page, leaving a screenshot of your use of TurboSTM & valuable suggestions for TurboSTM. +> 3. Submit an issue or PR on the Starcoin GitHub repository (optional). +> +> # Lottery Rules: +> +> This event will select 10 lucky participants: +> +> 1. Top 3: The first three users providing the most constructive feedback will receive mining experience rewards. +> 2. Retweet this Twitter and 7 users will be randomly selected to receive lucky NFT draw rewards. +> 3. Submit an issue or PR on the Starcoin GitHub repository (optional). +> +> # Lottery Time: +> +> Winners will be selected and rewards distributed within 5 days after the event ends. + +> # About Us: +> +> - [starcoin.org](https://starcoin.org/) +> - [Github](https://github.com/starcoinorg/starcoin) +> - [StarcoinZH Community](https://t.me/StarcoinZH) +> - [StarcoinSTC](https://t.me/Starcoin_STC) \ No newline at end of file diff --git a/content/news/post/starcoin-2-0-tempus-navigating-the-next-wave-of-web3-3759db89eb8c.md b/content/news/post/starcoin-2-0-tempus-navigating-the-next-wave-of-web3-3759db89eb8c.md new file mode 100644 index 0000000..72e3c94 --- /dev/null +++ b/content/news/post/starcoin-2-0-tempus-navigating-the-next-wave-of-web3-3759db89eb8c.md @@ -0,0 +1,147 @@ ++++ +title = "Starcoin 2.0 | Tempus: Navigating the Next Wave of Web3" +date = "2023-10-10" +summary = "“FlexiDAG, technically not a direct manifestation of the Nakamoto consensus, serves as an intriguing expansion that pushes the..." +author = "Starcoin" +tags = [ + "Starcoin" +] +archives="2023" + ++++ + +> ![img](https://miro.medium.com/v2/resize:fit:1400/1*53HwSbGvf733j8h2Y6B78Q.jpeg) +> +> ## **The Changing Times** +> +> In the ever-evolving world of blockchain, we’ve entered a groundbreaking phase to achieve substantial performance improvements: Starcoin 2.0, known as “Tempus”. +> +> “Tempus”, derived from Latin, translates to “time”. It embodies Starcoin’s unwavering commitment to continuous innovation in the blockchain arena, symbolizing our dedication to the rhythm of time, evolution, and persistent progress. +> +> As time marches on, blockchain technology matures, solidifying its position as a pioneering force in revolutionary advancements. +> +> The rapid evolution of this technology is both exhilarating and fraught with challenges that need to be addressed to continue propelling the blockchain industry forward. +> +> ## **What is Starcoin?** +> +> Starcoin is a blockchain project utilizing an improved version of Satoshi Nakamoto’s Proof of Work (PoW) consensus mechanism and the Move programming language for its smart contracts. +> +> Our mission is to provide a secure, high-performance, and inclusive public chain capable of catering to the massive demands of the future without compromising user asset security. We are deeply committed to constructing robust blockchain infrastructure, adhering to principles of security and decentralization, to deliver reliable and future-oriented blockchain solutions that propel the growth of the digital economy. +> +> Starcoin envisions crafting a secure and decentralized digital ecosystem that offers unprecedented opportunities for both individuals and businesses, shaping the future of Web3 infrastructure. +> +> ## **Starcoin’s Trajectory** +> +> Since its initial launch, Starcoin has seen over two years of growth, with profound gratitude owed to the enduring support from our community. As we face industry challenges, our focus remains on enhancing performance, and our ecosystem continues to garner increased backing. +> +> Central to Starcoin’s pledge is maximizing performance while ensuring user asset security. We’re perpetually refining our PoW model, unlocking the potential of the Move smart contract language, and crafting genuinely decentralized, efficient infrastructure. +> +> In the past year, total transactions exceeded 15 million, social media engagement surged by 308%, partnerships strengthened, and our community consistently grew. These figures underscore the vibrant growth of the Starcoin community. +> +> From a technical and ecosystem standpoint, Starcoin prioritizes scalability, security, and governance. With Move version upgrades, transparent management, cross-chain bridge integrations, and the development of Easy Gas, we’re holistically enhancing our infrastructure. +> +> ## **Web3 Industry Today** +> +> The blockchain sector grapples with challenges of scalability, speed, and security — often termed the ‘trilogy’ of blockchain dilemmas. Transaction speed, in particular, is pivotal, especially when forecasting large-scale future transaction demands; the current TPS (transactions per second) seems to fall short. +> +> TPS, gauging the number of transactions a blockchain network can process per second, is crucial for scalability, rapid transaction execution, enhanced user experience, and competitive edge. In an era characterized by swift information dissemination and accelerated development, speedy transaction processing is paramount for user satisfaction, ensuring they’re not hindered by congestion issues. +> +> While Solana is lauded for its impressive throughput, it has made certain trade-offs in decentralization. Concurrently, Ethereum’s Layer 1 performance constraints necessitate Layer 2 solutions to alleviate mainnet congestion and high transaction fees. Furthermore, the Eth2.0 upgrade introduces a PoS consensus mechanism to augment efficiency and scalability, albeit with potential implications for decentralization. +> +> The industry at large is fervently striving to address blockchain network challenges in scalability, security, and speed to achieve higher TPS, thereby fostering broader blockchain application and heightening efficiency. As a pivotal metric, TPS will determine a blockchain network’s standing and competitiveness in an intensely contested market. Starcoin must consistently address challenges in speed and efficiency to meet user demands and encourage wider adoption. +> +> ## **What Drives Starcoin?** +> +> With the digital realm’s relentless advancement, one truth is evident: blockchain technology is gradually cementing its role as a linchpin in the global financial and technological ecosystems. Throughout this progression, Starcoin remains steadfast in its ambition to serve as a formidable cornerstone of this pillar. +> +> **Security: Crafting an Impenetrable Line of Defense** +> +> From its inception, security has been paramount for Starcoin. We recognize that devoid of security, all functionalities and performance are ephemeral. Thus, we became the first permissionless blockchain adopting the Move language and virtual machine, utilizing the tried-and-true PoW consensus while continuously enhancing and updating our cryptographic algorithms. +> +> **Decentralization: Genuine Power Devolution** +> +> Decentralization isn’t just a core tenet for Starcoin; it’s our foundation. We firmly believe that to realize a genuinely decentralized vision, power and control must revert to users. Hence, besides embracing a truly decentralized PoW consensus, Starcoin has conceptualized a unique DAO governance model, enabling all community members to actively partake in decision-making, ensuring every voice resonates. +> +> By embracing user voting, community proposals, and transparent decision-making processes, Starcoin has offered truly decentralized services to global users. We further encourage developers and users to leverage the Starcoin platform, forging and employing decentralized applications to intensify the ecosystem’s decentralization. +> +> **Performance: Unparalleled Speed and Efficiency** +> +> While Starcoin’s initial design emphasized security and decentralization, we soon realized that to cater to the surging market demands, performance was key. Thus, we gradually integrated a myriad of technical optimizations, such as enhanced Nakamoto consensus, parallelized transaction technology TurboSTM, innovative DAG technology FlexiDAG, and tiered design to augment processing speed and minimize transaction costs. +> +> From its humble beginnings, envisioning the most secure decentralized blockchain, Starcoin has indefatigably pursued security, decentralization, and performance for years. With accumulated years of experience and the current landscape in view, we’ve executed groundbreaking performance enhancements, ushering in the era of Starcoin 2.0. +> +> ## Starcoin 2.0: “Tempus” +> +> **What is Starcoin 2.0?** +> +> Starcoin 2.0 signifies the major upgrade to the Starcoin mainnet, marking the project’s leap into its second crucial phase. The initiative primarily focuses on overcoming the scalability limitations of the PoW consensus while retaining its core principle of decentralization. +> +> As blockchain technology transitions from simple transactions to intricate digital interactions, it’s apparent that improving its efficiency is paramount. This gives rise to challenges in scalability. It is vital for Starcoin to enhance its system performance to keep up with the ever-growing demands of its users. +> +> **Why the name “Tempus”?** +> +> This phase of Starcoin 2.0 has been fondly dubbed the “Tempus” era. The term “Tempus,” derived from Latin, means “time.” This nomenclature reflects Starcoin’s commitment to blockchain industry innovation and progress, recognizing the essence of time in technological evolution. +> +> ## **Starcoin 2.0 Highlights** +> +> In the blockchain universe, technological advancements are ceaseless. Listening to our community, learning from past experiences, and contemplating future needs have all shaped the design of Starcoin 2.0. Here, our design mirrors our unique perspective on the vision of Web3.0. Allow us to elucidate the core components of Starcoin 2.0. +> +> Starcoin 2.0 has adopted industry-leading parallelization technology, delivering a notable enhancement in transaction efficiency. **In consistent testing environments, the introduction of the new TurboSTM parallelization method has allowed for a 17-fold increase in transaction processing over the 1.0 version.** Furthermore, with the implementation of the new consensus algorithm, **FlexiDAG, block generation speed (BPS) has improved by ten times compared to its predecessor.** +> +> 1. **Security: Fortified Defenses to Safeguard Assets** +> +> Security remains at the heart of Starcoin 2.0’s architecture. We’ve extensively refined our current safety protocols and upgraded Move to its V8 edition, establishing it as the industry’s most secure smart contract language and virtual machine. Furthermore, the Starcoin framework has been elevated to V11, maximizing Move’s latest security attributes, thereby ensuring assets are protected unyieldingly. +> +> **2. Decentralization: Power Decentralized for the Next Generation** +> +> Decentralization is ingrained in Starcoin’s DNA. With version 2.0, we’ve further amplified the capabilities of Starcoin DAO. The new governance model is more open, fair, and enables broader community participation. Stay tuned for further updates and interpretations. +> +> **3. Consensus: Advanced Technology for Stability and Efficiency** +> +> Starcoin 2.0 introduces FlexiDAG, a groundbreaking PoW consensus algorithm, which is not only more eco-friendly but also significantly boosts network responsiveness and transaction confirmation timings. Furthermore, the algorithm considerably reduces the prospects of a “51% attack,” further enhancing network security. +> +> **4. Performance: Harnessing State-of-the-Art Parallelization Techniques** +> +> Starcoin 2.0 employs leading parallelization techniques, offering a remarkable improvement in transaction performance. Under equivalent testing conditions, with the new TurboSTM parallelization method, transaction processing capability has surged 17-fold. Leveraging the new FlexiDAG directed acyclic graph consensus algorithm, block production speed (BPS) has also experienced a tenfold increase compared to its 1.0 predecessor. +> +> **4.1) FlexiDAG: Balancing Parallel Processing with Security** +> +> FlexiDAG is Starcoin’s innovative response to the challenges of performance and scalability under the PoW framework. It stands out with its capability to identify high-connectivity uncle blocks, ensuring only blocks with strong links are appended to the blockchain. This parallel approach significantly bolsters scalability while warding off malicious attacks. +> +> Furthermore, Starcoin’s Move is a resource-oriented programming language. It inherently protects users from vulnerabilities, facilitating secure digital asset transfers. +> +> **4.2) TurboSTM: Revolutionizing Smart Contract Execution Strategies** +> +> Conventional single-thread execution of smart contracts has always been a bottleneck for scalability. Peak transaction costs have often undermined the Web3 experience. +> +> TurboSTM is Starcoin’s avant-garde approach, transitioning smart contract execution into a parallel process. Integrating Multi-Version Concurrency Control (MVCC) with optimistic locking, TurboSTM ensures synchronous data record reading and prompt updates. +> +> **When paired with our affordable and adjustable transaction cost mechanism, Easy Gas, TurboSTM positions Web3 as the epitome of swift, cost-effective, and secure transactions.** +> +> **As the sole PoW public chain that supports Move smart contracts, Starcoin, after integrating FlexiDAG and TurboSTM, promises users enhanced throughput and transaction efficiency without compromising security.** +> +> ## **Starcoin 2.0’s Role in the PoW Ecosystem** +> +> The innovative practices during the Starcoin 2.0 era, which offer groundbreaking solutions to PoW mechanism’s scalability issues, present a highly efficient and viable approach to transcend the PoW ecosystem’s development boundaries. These advances not only boost adoption rates but also provide agile, high-throughput optimization solutions for the PoW ecosystem’s DeFi systems. They redefine performance standards for PoW consensus blockchains. +> +> ## **Starcoin 2.0 Community** +> +> Indeed, we’re commencing this new chapter in a decentralized manner. +> +> Through collective efforts from our community, we’ll stride into the Starcoin 2.0 Tempus era. +> +> Our journey is shared. Each step is dictated by the collaborative involvement of our supporters. Starcoin 2.0 is our pledge to the future, envisioning a blockchain world fused with speed, security, and decentralization. We are confident that the Tempus phase will not only enrich the experience for the Starcoin community but also set a new developmental precedent for the entire blockchain industry. +> +> **We’d like to extend our heartfelt gratitude to our community partners for their support! Thank you to the entire community for standing by us and continually offering your encouragement!** +> +> We’re on the cusp of initiating a new community phase, offering fresh organizational approaches for the proactive community of the future, urging community supporters to actively shape the prospects of the Starcoin project. +> +> ***So, how can everyone participate?\*** +> +> ## **Kick-off Starcoin 2.0** +> +> Join the Starcoin 2.0 launch event! **Starcoin 2.0 Sneak Peek: TurboSTM & FlexiDAG. \*Early Explorers, Unite!\*** +> +> We extend a warm invitation to our community and all blockchain enthusiasts to partake in the STARCOIN 2.0 Light Preview event! Witness and become part of a pivotal moment in blockchain history, where scalability breakthroughs in the PoW ecosystem come to life. Together, let’s usher Starcoin 2.0 into an era brimming with boundless potential! +> +> The Starcoin 2.0 Sneak Peek: TurboSTM & FlexiDAG is gearing up to launch its preview event! STC rewards await early explorers! Stay tuned! Let’s collectively embark on the Starcoin 2.0: Tempus era! \ No newline at end of file diff --git a/content/news/post/turbostm-starcoins-new-high-performance-engine-a46ab81f8caf.md b/content/news/post/turbostm-starcoins-new-high-performance-engine-a46ab81f8caf.md new file mode 100644 index 0000000..c0f55db --- /dev/null +++ b/content/news/post/turbostm-starcoins-new-high-performance-engine-a46ab81f8caf.md @@ -0,0 +1,103 @@ ++++ +title = "TurboSTM: Starcoin’s New High-Performance Engine" +date = "2023-06-15" +summary = "“FlexiDAG, technically not a direct manifestation of the Nakamoto consensus, serves as an intriguing expansion that pushes the..." +author = "Starcoin" +tags = [ + "Starcoin" +] +archives="2023" + ++++ + +![img](https://miro.medium.com/v2/resize:fit:1400/1*wvqlHM9ww64PL2hMCezxqQ.png) + +In this article, we introduce TurboSTM, an advanced high-performance multi-threaded in-memory computing parallel execution engine technology that will soon be implemented in Starcoin. It combines the advantages of various industry parallelization techniques while incorporating unique innovations. + +# Background + +As smart contracts evolve, blockchain systems are facing new challenges. Initially, blockchain systems could only provide basic functionalities such as simple transfers. However, with the introduction of virtual machines and smart contracts, users can execute more complex transactions, and the security and usability of the systems have greatly improved. + +However, smart contracts still have limitations. For example, due to their single-threaded execution nature, blockchain systems can only be modified by one smart contract at a time. Additionally, when multiple transactions are packed into a block, these transactions are usually executed sequentially. This sequential execution makes smart contracts a bottleneck for the overall throughput of the blockchain system, especially when there is a need to process thousands of transactions per second. + +To address this issue, we can consider applying parallel computing techniques to the parallel execution of blockchains. Nowadays, most servers are equipped with multiple cores, and parallel computing techniques in the field of multi-core programming can help reduce transaction execution time, thereby improving the throughput of blockchain systems. + +In simple terms, by utilizing multi-core and parallel computing techniques, we can execute multiple smart contracts and transactions simultaneously, enabling blockchain systems to efficiently process a large number of transaction requests. This parallel execution approach can enhance the overall performance of the system and make blockchain more capable of handling high-concurrency scenarios. + +**Starcoin is a blockchain based on an enhanced version of the Proof-of-Work (PoW) consensus mechanism and the Move programming language. It provides solutions for decentralized finance (DeFi), non-fungible tokens (NFTs), and blockchain-based gaming through a layered and flexible interoperability approach.** + +Starcoin utilizes the Move language and has developed secure digital asset protocols, including fungible tokens (FT) and non-fungible tokens (NFT), which ensure contract security and safeguard users’ on-chain assets. It replaces traditional contract audits with mature formal verification tools, ensuring the safety of contracts and the security of users’ assets on the chain. + +# **Sequential Transaction Execution Process** + +In the transaction execution process of Starcoin, a sequential transaction execution approach is adopted. Below is a brief introduction to each module: + +- **Executor Module:** Responsible for executing a transaction, this module receives transaction information inputs such as transaction payload. It is typically generated by front-end wallet plugins or DApp APIs. +- **Storage Module:** Usually used to store information generated during or after the transaction. +- **MoveVM Module:** A standard Move virtual machine executor used to execute Move code. It takes Move code as input, outputs the code execution result, and indicates the modifications made to the associated resources. This virtual machine is used by multiple blockchain projects based on Move. + +In the sequential transaction execution process, transactions are executed one by one in order, where the execution result of each transaction may affect the execution of subsequent transactions. This approach ensures the order consistency between transactions but can become a bottleneck for the system when facing a high volume of concurrent transactions. To improve system throughput, parallel transaction execution can be considered to process multiple transactions simultaneously, enhancing system performance and concurrency handling capabilities. + +In the aforementioned execution steps of the blockchain transaction process, the Executor module receives a list of transactions, each containing a segment of contract execution code. These code segments can include contract deployment, contract execution, or querying the state of an account within a contract. The Executor executes these transactions sequentially, following the steps below: + +1. The Executor module uses the Payload in the incoming transaction to locate the location of the contract code (referred to as “get_module”). Generally, contract code is stored in the code space of the publisher. +2. Once the Executor module finds the code, it calls the MoveVM module to parse and execute the bytecode of the on-chain contract. +3. The MoveVM then executes the instructions within the incoming transaction. +4. During execution, the MoveVM’s bytecode interpreter needs to access certain states (referred to as “get_resource”) during the code execution process. For example, when performing a transfer, it needs to know the balance of a specific account. It requests this account’s balance from the Storage module. Once the execution is completed, the MoveVM outputs a write-set result set, which the Executor applies to the Storage module to complete the write operation of a transaction. + +**Here you can see the flowchart of the sequential execution of transactions:** + +![img](https://miro.medium.com/v2/resize:fit:1400/1*SxSJEbcKhHgnFcyosJkmrg.jpeg) + +If the original approach is to execute transactions in parallel, several issues may arise. Specifically, when executing smart contract transactions, if two different transactions within the same block simultaneously modify the same location, it is considered a conflict. It is evident that the original parallel execution approach is unable to detect conflicts. + +# Parallel Transaction Execution Process + +# Solution Selection + +There are approximately two categories of available solutions: + +1. Pre-declaration-based solution: This solution is similar to Ethereum’s EIP-648 proposal. Its core idea is to declare in the execution code of transaction contracts which data will be read and written by the transaction. Transactions without cross-dependencies are then packaged into a block to facilitate easier parallel execution. This solution is mandatory, and in some implementations, if a transaction is found to interact with undeclared data, it will be revoked. +2. Dynamic detection solution based on MVCC (Multi-Version Concurrency Control) and optimistic locking: This solution draws inspiration from concepts in databases and distributed computing. During the execution of blockchain transactions, MVCC is used to record updates related to Locations (referred to as “version” later) and dynamically detect dependencies. During the verification process, the execution result of a transaction is validated by comparing the consistency of the read information with the MVCC data records. + +The first solution can achieve good performance, but it requires additional declaration work from users and complicates DApp development. Therefore, we prefer to develop a solution that is transparent, user-friendly, and seamless. + +**Starcoin has chosen the second solution and developed TurboSTM, a high-performance parallel execution engine with multi-threaded in-memory computing. This engine utilizes MVCC technology to record information for each Location, including transaction and execution counts, and uses optimistic locking to detect conflicts in transaction execution results. If conflicts are detected, the relevant transactions are re-executed to achieve efficient parallel execution.** + +# Solution Implementation — — TurboSTM + +**Overview** +There are a few key concepts that need to be explained before introducing the solution: + +**1.The version,** which is used to indicate the version number of a transaction, consists of two members. + +-TxnIndex indicates the position of the transaction in the block. + +-ExeCnt indicates the number of times the transaction has been executed. + +**2.MVCCMap,** a thread-safe multi-version data structure to store multi-version transactions, where the entry consists of ExeCnt and value. Its code is defined as follows: + +![img](https://miro.medium.com/v2/resize:fit:1400/1*K0SDdssCSWXq0Zg2Xgeatg.png) + +**3.Task types,** we define several different task types, ExecutionTask, ValidationTask, NoTask and Done. + +# Implementation process + +In order to achieve parallel execution, we divide the transaction into two queues: ExecutionTask queue and ValidationTask queue, as shown in the figure below: + +1. When executing a transaction in a block, we take the transaction out of the queue and generate an execution task to add to the execution task queue. Every time a transaction is executed, we write the Location generated by the transaction into the multi-version data structure, and record the data (read_set) corresponding to the Location read by the transaction to TxInputList. +2. When verifying the transaction task, we verify whether the Location version number read from the transaction read from TxInputList is consistent with the version number (ExeCnt) obtained from the multi-version data structure. + +![img](https://miro.medium.com/v2/resize:fit:1400/1*TLgd2lLkOdZmhgLI4q6KpQ.jpeg) + +The above description shows the main functions in the first version of TurboSTM, and there are more optimization methods in the second version to further improve performance. + +# Summary + +To sum up, Starcoin adopts the dynamic detection scheme of MVCC and optimistic locking to realize the high-performance, multi-threaded memory computing parallel execution engine TurboSTM. This solution does not require users to make additional declarations and is more transparent and friendly. This article describes the main parallelization functions and features in the first version of TurboSTM, and more optimizations will continue to be introduced in subsequent articles. + +The potential of parallel execution technology is huge. It can solve the limitations of smart contract execution in blockchain systems, improve processing capabilities, and provide efficient and secure solutions for DeFi, NFT, and blockchain games. This technology not only improves the performance and efficiency of the blockchain system, but also provides strong support for Starcoin’s vision. +Starcoin aspires to build a more powerful blockchain ecosystem, and provide comprehensive solutions for DeFi, NFT and blockchain games through the enhanced PoW consensus mechanism and the Move programming language. + +With the continuous optimization and improvement of the parallel execution engine, Starcoin will provide users with higher throughput, lower transaction latency and stronger security. Starcoin is also committed to promoting the widespread application of blockchain technology, facilitating the development of the digital economy, and creating more opportunities and value for users. +Through continuous innovation and hard work, Starcoin will make an important contribution to the realization of a sustainable blockchain ecosystem. \ No newline at end of file