The Pocket Network is a decentralized network of blockchain node providers that launched last month, which helps to solve some of the more pervasive problems faced by teams developing decentralized applications. Right now, Pocket gives application developers access to the Ethereum and Pocket blockchains, but in the future it may support many more chains.
As we’ve discussed before, managing Ethereum nodes is hard. Managing a highly available cluster of nodes requires a lot of expertise, expensive hardware, and quite a bit of time. So many teams opt to outsource their node management to teams like Rivet. The Pocket Network bring a new option to the table, where application developers don’t need the headache of hosting their own nodes, but also don’t have to rely on a centralized service provider.
How It Works
Developers using the Pocket Network to access Ethereum node infrastructure start out by buying and staking POKT tokens. The number of POKT tokens you stake determines the number of requests you can make in a given period of time. Once you stake your POKT tokens, you can make a fixed number of requests to the network every day in perpetuity, without having to pay again.
When you establish a session, you will be randomly assigned 5 pocket nodes to relay your requests. You have several options on how to route your requests across those 5 nodes:
- Send every request to all 5 nodes, and verify that they return consistent results. (This option minimizes your throughput, but maximizes secuirty).
- Load balance your request across all 5 nodes. (This option maximizes your throughput, but creates the biggest risk that bad information goes unnoticed).
- Benchmark the nodes and use the fastest ones.
The nodes that handle your requests are rewarded with newly minted POKT tokens for handling the requests.
Comparing Rivet & Pocket
So you may be thinking “Hey, aren’t you a centralized service provider? Why are you telling me about this decentralized option? It sounds like a pretty good deal.”
Yes, Rivet is a centralized service provider, but we’re also a Pocket node operator. We view the Pocket network as a sales channel for Rivet’s services that reflects OpenRelay’s values for decentralization. We can earn POKT tokens by doing what we do best — providing highly available node infrastructure to people who need it, while letting those application developers avoid a dependency on any centralized provider.
So if you’re an application developer, how do you decide whether to go with Rivet or Pocket? There are several things to consider:
-
Performance: Rivet is professionally managed, and while you might get a high performance Rivet node in your Pocket session, you might get a set of underpowered nodes running on the far side of the planet.
If you need consistently high performance, we’d recommend Rivet.
-
Features: Rivet offers a wider set of features than Pocket nodes do. Rivet offers Websockets, GraphQL, indexed logging and extended APIs with Flume.
If you’re happy with standard Web3 RPC methods over HTTPS, then Pocket can meet your needs.
-
Consistency: One of the early challenges we solved with Rivet was request consistency. If you run a query against Rivet and we tell you the current block is 12345, then your next request should never give you state from block 12344. We have tuned our systems to be able to provide high consistency across our large pool of replicas.
But with a Pocket session, you’re running your request against five different nodes that are each processing blocks independently. It’s entirely possible that one node could be a few blocks behind another node. If you load balance requests against all the nodes in your session, you probably will see consistency issues across requests.
You might have better luck running all of your requests against a single node from your session, but even that is no guarantee. If that Pocket node operator is operating not one Ethereum node but a load balanced pool of nodes, they may have consistency issues within their single node.
If you need strong consistency guarantees, Rivet is going to be your better option.
-
Privacy: This is an interesting one.
Both Rivet and Pocket nodes can see the queries you’re running, and could potentially correlate IP addresses with Ethereum addresses and track your blockchain interactions across time. At Rivet, we offer an Iron Clad Privacy Policy to protect you. With Pocket, that node operator could be anybody, and there’s no legally binding privacy policy that says what that operator can or can’t do with your data.
On the other hand, if a legally binding privacy policy isn’t sufficient for you to trust Rivet, Pocket may look more appealing. If you’re using Rivet, we handle every single request. If you’re using Pocket, no single node sees more than 20% of your request volume, which gives them less data to correlate, and when your session expires you move onto a completely different set of nodes. If you assume every provider is going to be spying on your requests, at least Pocket keeps that data from being concentrated in one place.
-
Cost: Again, this one isn’t clear cut.
Rivet has a free tier of 500,000 requests per month. With Pocket, you could get 500,000 requests per month by staking 416 POKT, at a one-time cost of $34. But where Rivet will let you use those 500,000 requests any time throughout the month, your POKT stake would entitle you to about 700 requests per hour; if your workload is lumpy (not spread evenly throughout the month) you’d need a bigger stake.
Some of our bigger customers at Rivet run several million requests per day. If you wanted to be able to run 1,000,000 requests a day through Pocket, the necessary stake would cost about $2,000. With Rivet, a month of 1,000,000 requests a day would cost $295. Over the course of 7 months, Pocket becomes cheaper on a per-request basis, but you’ve got to come up with the up-front capital to establish your stake.
One place where Pocket can especially shine is short term projects. For example, if you are running an ICO over the course of two weeks, you could buy POKT tokens, stake them, run your ICO, then after the 21 day application staking period completes you can unstake the POKT tokens and resell them, incurring very little infrastructure cost for the project.
In the long term, establishing a Pocket stake is a good investment that can lower your costs substantially, but if you’re operating on month-to-month revenues Rivet may be the more palatable option.
-
Enterpriseyness: If you’re developing an application for a traditional enterprise, good luck selling your CIO on the idea you’re going to “stake some tokens” and get the service you need. Unfortunately, the Pocket model is so far removed from what these organizations are used to that organizational politics will make it impossible to adopt anytime soon.
Conventional enterprises and governments want SLAs; they want someone responsible when things don’t work. In these enterprises, SaaS options like Rivet are familiar and increasingly comfortable. While we certainly look forward to a future where DAOs have proven themselves and a CIO won’t bat an eye at the prospect of getting services from one, the pragmatic enterprise answer today is the conventional SaaS model.
On the other hand, if you’re working with a DAO that recognizes the value of decentralization, the prospect of putting in a credit card linked to a traditional banking institution to pay fiat currency to a corporation with a state issued business license to access centrally managed servers may feel like you’re compromising your principles. We get it. If that’s you, the Pocket network is a great option.
At the end of the day, the choice of Pocket vs. Rivet comes down to your project’s needs and priorities. If you’re sensitive to consistency and performance, need some of Rivet’s advanced features, or find monthly budgeting easier than long term investments, Rivet is a great option. If the APIs available through Pocket meet your needs, your application isn’t terribly sensitive to performance variability or consistency, and you can afford the up front investment, Pocket could save you a lot of money in the long run.
The Pocket Gateway
The Pocket team also offers an RPC Gateway that you can use to run requests against the Pocket network as though it were a standard Ethereum RPC provider. Your application makes requests against the Pocket gateway, which in turn runs those requests against the Pocket network. The first 100 apps that sign up for the gateway will get up to 1,000,000 free daily requests for the first year.
While the Pocket gateway is easier to use than integrating your application with Pocket, it combines some of the disadvantages of centralized and decentralized providers. The performance, features, and consistency of the Pocket gateway will be comparable to using the Pocket network, while from a privacy angle both the gateway and the Pocket node operators see your traffic. The free requests for the first hundred signups are compelling, but otherwise the biggest advantages to Pocket come from decentralization, and if you’re going to a centralized gateway we think Rivet will offer a better experience.
The ETH Online Hackathon
Pocket is the official node service for the ETH Online Hackathon. If you’re hacking on the hackathon it’s a great opportunity to give Pocket a try.
A Note for Pocket Stakers
As of today, only about a third of Pocket holders have actually staked their nodes. If you’re a Pocket holder interested in staking a node, but lacking the technical expertise to do it right, reach out to us at pocket@rivet.cloud. The Rivet team has expertise at running Pocket nodes backed by Rivet’s world class Ethereum infrastructure, and we’d be happy to work with you to help you stake your nodes successfully.