- Mysten Labs open-sources Sui Gas Pool to sponsor gas payments at scale, improving user onboarding.
- Sui Gas Pool enhances scalability and operational efficiency for high concurrency apps.
- Generic design allows seamless integration, making it easy to manage gas payments.
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.
The Significance of Sui’s Native Support for Sponsored Transactions
Sui’s built-in support for sponsored transactions enables a transaction to utilize a gas coin owned by an address different from the sender. This capability allows services to subsidize user transaction costs, 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:
- Client sends a
reserve_gas
request to reserve gas coins that meet the specified budget. - Client attaches the gas coins to the transaction and obtains the user’s signature.
- Client sends the user-signed transaction to the gas pool through the
execute_transaction
request. - Gas pool signs the transaction, sends it to a full node for execution, and releases the gas coins.
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.
Conclusion
The Sui Gas Pool, now open-sourced by Mysten Labs, presents a transformative opportunity for the Sui developer community. By sponsoring gas payments at scale, it addresses critical needs for user onboarding and high concurrency applications. Its scalable and generic design, combined with efficient management and integration capabilities, makes it a valuable asset for enhancing the user experience and operational efficiency of apps on Sui. The adoption of the Sui Gas Pool in production environments like Enoki underscores its potential and reliability, paving the way for widespread implementation and support across the Sui ecosystem.
Disclaimer
The information provided in this article is for informational purposes only and should not be considered financial advice. The article does not offer sufficient information to make investment decisions, nor does it constitute an offer, recommendation, or solicitation to buy or sell any financial instrument. The content is opinion of the author and does not reflect any view or suggestion or any kind of advise from CryptoNewsBytes.com. The author declares he does not hold any of the above mentioned tokens or received any incentive from any company.
image source