Discover What’s New in Starcoin Move v7

Starcoin
4 min readAug 29, 2024

--

Starcoin, as the first permissionless blockchain based on Move, has its Move version rooted in Diem, a permissioned blockchain implementation. As the industry progressed, Move has diverged into several de facto versions, including Aptos, Sui, and Starcoin’s Diem-based Move V6.

The Move programming language undergoes continuous evolution, leveraging its modular design and resource type system. With the introduction of new features in Move by various vendors, accessible through Move GitHub, DApp developers gain enhanced efficiency in building applications and can harness Move’s security and concurrency controls with greater flexibility.

Building upon Move V6, the integration of these cutting-edge features offers improved support for developers and ensures long-term value for Starcoin. Starcoin Move v7 introduces the following significant new features:

  • Smart contract annotations: Adds extra functionality support for users.
  • Code formatting tool: Similar to gofmt and rustfmt, this tool ensures a consistent format for all code.
  • Code linter tool: Inspired by rust clippy, it helps developers write safer and more efficient code.
  • Bytecode decompiler tool: Functions like Java’s javap, allowing Move bytecode to be decompiled into source code for easier auditing.
  • Improved receiver syntax: Offers a more intuitive syntax, enabling receiver.fun(args) instead of the traditional func(receiver, args) style, reducing code verbosity.
  • Enums and match functions: Introduces a functional programming style, simplifying code writing.
  • Array subscript access: Supports direct array access by index, minimizing redundant code.
  • Closures and references: Adds support for closures and references to enhance coding flexibility.
  • User-defined abilities: Expands upon Move’s native abilities (copy, key, store, drop) with a user-defined Iterator function, facilitating element search through iteration.
  • Global storage reference return: Now supports returning Global Storage References, addressing previous versions’ limitations where contract code required type hard-coding.

Starcoin’s Upgrade to Move v7

To support these new and Aptos-compatible features in Starcoin Move v7, we use the following methods.

The Aptos-compatible Move version is based on aptos-node-v1.15.1, and we will continue to monitor and follow up on any major new updates. During the upgrade process, our StarcoinVM workflow remains unchanged while adapting to the new Move version interface using the corresponding functions (traits), structs, and enums. Starcoin Framework implements these Move functions based on the aptos-stdlib and aptos-framework, with some modifications to ensure compatibility.

The Move resources associated with Starcoin 1.0 will undergo a data and resource migration to align with the new Move version once it is live.

The upgrades involve several components, including the Move compiler, StarcoinVM, and Starcoin Framework:

Move Compiler

  • Upgrade to Move v7: The compiler has been updated to Starcoin Move v7, based on the Aptos repository commit hash cea6cf84416a651ffb458469b80da2da885fe1f5. We will continue to monitor and implement any new improvements.
  • Support for Module Meta Functionality: Allows customized annotations in conjunction with the blockchain.
  • Separation of Compiler and Prover: The Move compiler and Move prover are now separate components, enhancing modularity and flexibility.

StarcoinVM

  • Compatibility with Move v7: The VM adapts to the new Move v7 interface while maintaining compatibility with blocks generated by older versions through a feature mechanism.
  • Optimized Transaction Validation: Moves transaction validation from the compiler to on-chain processing, streamlining the validation process.
  • Enhanced Gas Fee Implementation: Improves system scalability and enables on-chain objects to work more effectively with smart contracts.

Starcoin Framework

  • Integration of Aptos Object Standard: Incorporates the Aptos Object standard into the Starcoin Framework, ensuring compatibility with the Aptos Framework features.
  • Facilitates Cross-Platform Migration: Projects developed on Aptos can be migrated to Starcoin with minimal changes. Conversely, new projects on Starcoin can be ported to Aptos with reduced costs due to this compatibility upgrade.
  • Compatibility for Existing Projects: Projects developed on StarcoinFramework 1.0 will need to update to be compatible with the newly introduced Object model for future releases.

Summary

This upgrade to Starcoin’s Move is not just a response to the new features in Move but also a significant step toward enhancing the Starcoin ecosystem. By improving compatibility with the latest version of Move, optimizing performance, and providing more flexible development support, Starcoin offers developers a broader space for innovation. As more features are rolled out, Starcoin will continue to drive blockchain technology forward, delivering a richer and more reliable on-chain experience for both users and developers.

We encourage all developers to explore these new features and start experimenting with them in their projects. Stay updated with our latest developments by following the Starcoin GitHub repository and joining our community discussions to shape the future of blockchain technology.

About Starcoin

Starcoin provides the utmost security from the origin via its enhanced PoW consensus and Secure smart contract, using the language of Move. Through layered and flexible interoperability, it optimizes the building of ecosystems such as DeFi, NFTs, Gaming, etc., with higher efficiency and convenience. This process redefines value by empowering every participant in the ecosystem to enjoy the multiplication of values.

Follow Starcoin on social media to stay up to date with all the latest developments.

Website | StarStack | Twitter | Medium | Telegram | Linktr.ee

--

--

Starcoin
Starcoin

Written by Starcoin

Starcoin is a proof-of-work blockchain that enables secure smart contracts based on Move to power services in Web 3.0

No responses yet