Home  >  Article  >  Mysten Labs Open-Sources the Sui Gas Pool to Empower the Sui Developer Community

Mysten Labs Open-Sources the Sui Gas Pool to Empower the Sui Developer Community

王林
王林Original
2024-07-19 20:07:01298browse

Mysten Labs has taken a significant step by open-sourcing the Sui Gas Pool to the Sui developer community. This forward-thinking initiative aims to sponsor gas payments for transactions on Sui at scale, addressing crucial needs for user onboarding in apps requiring high concurrency.

Mysten Labs Open-Sources the Sui Gas Pool to Empower the Sui Developer Community

Mysten Labs has taken a crucial step by open-sourcing the Sui Gas Pool to the Sui developer community. This initiative aims to sponsor gas payments for transactions on Sui at scale, addressing critical needs for user onboarding in apps requiring high concurrency. Here's a deeper look at the significance of Sui's native support for sponsored transactions and how the Sui Gas Pool benefits high concurrency applications.

The Significance of Sui’s Native Support for Sponsored Transactions

Sui's built-in support for sponsored transactions allows a transaction to utilize a gas coin owned by an address different from the sender. This capability enables services to subsidize user transaction costs, which is especially crucial for enhancing the onboarding experience for Web3 newcomers. By removing the need for users to initially fund a wallet, the process becomes more flexible and user-friendly. However, managing gas payments at scale poses challenges for app developers.

Benefits of the Sui Gas Pool for High Concurrency Applications

The Sui Gas Pool provides an efficient solution for apps with high concurrency needs. It streamlines user onboarding by sponsoring gas payments at scale and alleviates the operational burden for apps handling numerous concurrent transactions. This efficient management of gas sponsorship allows for smoother operations and enhanced user experiences.

How the Sui Gas Pool Operates

Scalable and Generic Sui Gas Pool Design

Developed with scalability and generality in mind, the Sui Gas Pool can easily scale by adding more instances to accommodate higher transaction volumes. Its generic design allows seamless integration and operation as a standalone service or within an existing system.

Initialization and Management

Upon initializing a gas pool, the system queries all gas coins dedicated to sponsoring transactions owned by the sponsor address. These coins are then split into smaller units with a configurable target initial balance, added to the gas pool database, and managed for reservations.

Funding the Gas Pool

Funding the gas pool is straightforward. A large balance gas coin sent to the sponsor address is automatically detected and processed by the system. The gas pool periodically checks for any large gas coin owned by the sponsor, splits it, and adds it to the pool to maintain funding.

RPC Server Operation

The gas pool service operates an RPC server, with permission control managed via a secret bearer token in HTTP requests. The interaction workflow includes:

Scaling the Sui Gas Pool

Automated Gas Coin Splitting

The automated splitting of gas coins into smaller objects facilitates increased throughput. This method ensures efficient handling of large transaction volumes.

Controlled Transaction Execution

With full control over transaction execution, the gas pool can promptly release gas coins without needing conservative waiting heuristics. This control streamlines the transaction process.

Centralized Data Persistence

Data persistence is managed through central Redis storage, allowing gas pool servers to run without local data persistence requirements or crash recovery. This setup minimizes overhead and supports running multiple gas pool servers per sponsor address.

Multiple Sponsors and Services

The system can scale further by incorporating multiple sponsors and deploying multiple gas pool services. This flexibility ensures robust handling of sponsored transactions.

Get Started with the Sui Gas Pool

The Sui Gas Pool offers a robust, scalable solution that enhances user experience and operational efficiency for apps on Sui. Enoki, Mysten Lab’s customer experience platform, already utilizes the Sui Gas Pool for its sponsored transaction feature, showcasing its reliability and efficiency in a production environment. By open-sourcing this component, Mysten Labs empowers the entire Sui community to effectively scale sponsored transactions and support new apps with large user bases.

The above is the detailed content of Mysten Labs Open-Sources the Sui Gas Pool to Empower the Sui Developer Community. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn