According to The Sui Blog, the Sui Gas Pool service developed by Mysten Labs provides a groundbreaking solution for developers to sponsor gas payments for large transactions. The service aims to solve significant challenges related to user onboarding and transaction management for applications with high concurrency requirements.
Mysten Labs has made Sui Gas Pool open source so that the Sui developer community can take advantage of this innovative service. By sponsoring gas payments, the service improves the onboarding experience for new Web3 users by allowing them to get started without having to fund their wallets, while providing greater flexibility and ease of use. Despite these benefits, developers often struggle to manage large gas payments, which is what Sui Gas Pool aims to solve.
How the Sui Gas Pool Works
Sui Gas Pool was built with two main goals: horizontal scalability and generality. It can be easily scaled to meet higher throughput demands by adding more instances, and is designed to be flexible enough for any developer to integrate and operate as a standalone service or part of a system.
To initialize a gas pool, the system queries all gas coins owned by sponsor addresses that are committed to sponsor transactions and splits them into smaller gas coins with configurable initial balances. These gas coins are then maintained in the gas pool database. Funding a gas pool is simple. Simply send large balance gas coins to the sponsor address and the gas pool will automatically detect and process them. The system periodically checks for large gas coins owned by sponsors and splits them as needed.
The gas pool service operates an RPC server with authorization control managed via secret bearer tokens in HTTP requests. The interaction workflow includes reserving gas coins, attaching them to transactions, obtaining user signatures, and executing transactions through the gas pool.
Sui gas pool expansion
Sui Gas Pool scales efficiently through several mechanisms.
- Automatic Gas Coin Splitting: This creates a large number of small gascoin objects, increasing throughput.
- Controlled transaction execution: Gas pools maintain full control over trade execution, ensuring fast withdrawals of Gas Coins.
- Centralized data persistence: Data is stored centrally via Redis, allowing you to run a gas pool server without local data persistence requirements or crash recovery.
- Various sponsors and services: The system can be further scaled by securing multiple sponsors and deploying multiple gas pool services.
start
Sui Gas Pool significantly improves the user experience and operational efficiency of apps in Sui. Enoki, a customer experience platform by Mysten Labs, has already leveraged Sui Gas Pool for its sponsorship transaction functionality, demonstrating its stability and efficiency in a production environment.
Mysten Labs has made Sui Gas Pool open source to ensure that the entire Sui community can effectively scale sponsorship transactions and support new apps with a large user base. For more information, visit the GitHub repository or contact an engineer for assistance.
Image source: Shutterstock