Node Service
Your fast, reliable connection to the Sui blockchain.
What's included?
This guide summarizes why you need a Node service if you want to write data to the Sui blockchain and read from it. It covers why using Shinami's Node Service is a good choice and provides a comparison of the features of Shinami shared vs dedicated Nodes. It also shows an image of the high-level flow of a DeFi swap to help visualize the interactions involved. Finally, it summarizes our developer resources for getting started with Node Service.
Node Service Overview
Why do you need a Full node?
A blockchain is a public database that contains a record of the tokens, NFTs, and other items that users own. These items are owned at different chain addresses (wallets), and apps often need to look up what a user owns. Examples include determining whether a user has a specific character or item to be used in a game, or what tokens a user has available for making a swap in a DeFi app. A Full node is the intermediate service that sits between your app and the blockchain. It constantly keeps up-to-date with the latest version of this public database, and you ask it questions like "What does a specific user (wallet / address) own?".
A blockchain is also a public computer, containing bits of code that can be run. This code is called a smart contract, and some of it can be run by anyone while some is only useable by those with permission (such as code for your app that only you can run). When you want to execute some of this code to give a user an NFT representing an in-game character - or perform a token swap for a user - you need to create and execute a new transaction to update the public database (blockchain). Validator nodes are what verify and execute transactions, and Full nodes know how to talk to them. So, a Full node is also the intermediate service that sits between you and the validator nodes that maintain state on the blockchain. You ask a Full node to do things like "Run the code to give user 123 a new NFT" and the Full node talks to the validators to get it done.
Why use Shinami's Node service?
Why use a third-party vs building in-house
Running a Full node requires keeping it up 24/7, and quickly updating it during regular updates and bug fixes. This running and rebuilding process is expensive in terms of engineering time and computation. It requires coordination with the Mysten team on deployment timing and configuration settings. It also requires constant monitoring of performance.
Scalability and consistency also come into play as your app gains momentum and traffic. As you grow beyond a single full node's capacity, how do you ensure you can still serve traffic seamlessly to users as well as maintain consistency in results? With a third party provider like Shinami these issues are taken care of behind the scenes.
In the same way that AWS and GCP take care of managing your servers so that you can focus on building your application, a third party Full node provider manages all the day-to-day operations of maintaining a node to ensure it's always running at peak performance. It's not that your engineering team couldn't do it, it's that it would mean a lot of engineering hours spent not adding new features to your app. This can take up a large chunk of resources especially for a smaller team starting out.
Why use Shinami?
Shinami runs our Full nodes on hardware that's above the minimum required specs so that you get the best performance possible. We work closely with the Mysten team that creates the Full node software to fine tune our configuration for the best uptime and the lowest latency possible. We run multiple Full nodes behind our service, so that if one is briefly down - which can happen in rare cases due to network issues - you don't notice. Finally, our Node service seamlessly integrates with our Gas Station and Wallet Services. So, if you're thinking about sponsoring your users' transactions with our Gas Station or creating Shinami Invisible Wallets for them, using Shinami's Node Service is an easy choice.
Shinami shared vs dedicated nodes
Our Free plan (daily usage cap) and Pay-as-you-go plan (unlimited; pay per call after free daily usage cap) customers use the enhanced Shinami nodes described above. To get these benefits at a low (or free) cost, these users are on shared infrastructure used by multiple customers. But don't worry: we have rate limits and extra capacity in place so that you're unlikely to be impacted by other customers. For many apps, our shared nodes work well, especially when you're starting out and your app has a small user base. Other apps, however, need the following benefits that Shinami Dedicated Nodes offer:
Shinami Shared Node | Shinami Dedicated Node | |
---|---|---|
QPS | Up to 200/s | Starts at 400/s. Scales much higher. |
Location | United States | Deployment in your preferred geographic region so that you get the fastest reads possible. |
Node configuration | Default configuration. This includes storing transaction history for one day. | Custom configuration. This can, for example, give you a longer transaction history retention if your app needs access to historical data. |
Support | [email protected] email support | A dedicated Telegram or Slack channel with the Shinami team. |
End to end flow
Diagram
Summary of steps
- The user connects their wallet to your app.
- You ask Shinami's Node Service for the contents of the user's wallet so you can display it to them.
- The user decides to swap some of token A for token B
- You ask Shinami's Node Service to perform the swap on the Sui Blockchain. Optionally, you use Shinami's Gas Station to sponsor the gas fee for the user to drive more user activity (esp. if the user has no SUI).
Developer resources
- To view the different endpoints for reading and writing to the chain, see our JSON-RPC API docs.
- If you want to get started, see our Send Your First Request guide.
Updated 1 day ago