LeanPocket Optimization Scales Nodes and Reduces Costs

Pokt Logo
POKT Network
Nov 19, 2023
LeanPocket Optimization Scales Nodes and Reduces Costs

Today marks another milestone moment for Pocket releases, as LeanPocket (or “The v0 Optimization”) has officially been adopted into the Pocket Network protocol! LeanPocket was built to radically reduce node running costs across Pocket Network, and has been a true case study in DAO collaboration and community engagement. From DAO proposal, to Forum debate, to beta and QA, and finally up to the release, the development of LeanPocket has already involved many of our node runners and brought the community together to get us to this point.(Note: this is a beta release that we will test for around 1 week until we have about 20% adoption, before upgrading to the full RC).Let’s take a closer look at how LeanPocket is bringing serious optimizations to v0, and how we got here.

What is LeanPocket?

LeanPocket, developed as an external contribution by the Thunderhead and PoktFund teams in collaboration with the Pocket Core team, is a major optimization to the Pocket Core Client. Put simply, this optimization enables multiple Pocket instances to run on a single process, allowing node runners to consolidate resources and achieve better scalability and reduced hardware costs.Under the normal client, if you want to run multiple Pocket nodes on the same server, each node, running its own isolated process, would each use their own resources: RAM, disk space, network throughput, etc. As many aspects of nodes use shared resources (copies of the blockchain, most notably) this can be very inefficient and resource-intensive.The release of LeanPocket enables a “massive consolidation” of nodes without sacrificing quality of service, which in turn drastically lowers the overall network costs and reduces node runner sell pressure from having to cover those costs. While the normal client only allows for one servicer per full node, early tests have shown that LeanPocket allows you to run up to 150 servicer nodes utilizing the same resource consumption as a single node., making node running much more scalable and efficient.

As described in the PR, LeanPocket allows nodes to leverage the same state cache and blockchain data, and no longer have to validate as many transactions in a block as the node set grows. This reduces the number of resources needed for multiple nodes to a constant number for memory, space, and networking.Addressing total network costs in a healthy way has been a major focus for both the community and the core team for quite some time now, and we are excited about LeanPocket’s prospects for doing just that.

How Did We Get Here?

As alluded to earlier, LeanPocket is the result of a long process of engaged community debate and serious external development efforts, and highlights exactly why we truly believe the Pocket DAO and our broader community are the best in the space.

Achieving 99% Cost Reductions

Back in June, PEP-35 was presented by the Thunderhead and PoktFund teams, and outlined the work that had been put in on a light client since February. As the debate around PEP-35 evolved, a desire to take LeanPocket from closed-source to open-source emerged, and by early August LeanPocket was indeed made open-source, allowing the community to take a closer look under the hood. At that time, while LeanPocket was in QA, the Thunderhead team was already seeing “98-99.3% reduction in the cost of a Pocket node.” Since then, LeanPocket has successfully moved through beta to make it to this release.Of course, managing network costs has been a hot topic since well before PEP-35. Even before that proposal, the Thunderhead team had presented their ambitions for a light client during Infracon Punta Cana in May, sharing with the community the massive potential for network-wide cost reductions.In fact, prior to Punta Cana, Thunderhead’s Addison shared his thoughts on optimizing the v0 client in a Forum post in March. In that post, the benefits of “abstracting the full node away from the servicer” were highlighted, including dramatic cost reductions, a clearer path to inflation control, and increased margins for node runners - all of which benefit the network as a whole. The post was well-received, and led to PEP-35 eventually hashing out the details of LeanPocket.It is truly exciting to see community efforts come together like this, and to produce results that have such a tangible impact on the Pocket ecosystem. If you are currently running multiple nodes, or wish to spin up more nodes, we highly encourage you to give LeanPocket a try. Configuration only takes a few commands, and we have detailed documentation available to step you through the process. You will see the reduced resource consumption immediately in your node farm.We're always interested to hear about your experiences, so please share your success with us in our Discord.Congratulations to all that were a part of making the LeanPocket release a reality!

Thank you! Your submission has been received!
Oops something went wrong.....