Alternative way to host your Blockchain node service- Chainstack

胡家維 Hu Kenneth
Singapore Blockchain-Dapps
6 min readMay 19, 2019

Should I run my own node?

After developing several projects, I found that basically every blockchain project still needs at least one node to ensure the stability of the project service. Although Ethereum has infura and Bitcoin have bitcore , they do not charge at present and it also means they will not provide any services 、support or deal with them in a timely manner when there is a problem with the service.

Chainstack is a Singapore company that provides blockchain node services. Chainstack provides Ethereum, Hyperledger, MultiChain and Quorum node services! Chainstack deploy blockchain nodes on GCP (Google), AWS or Azure. Especially, they provide the full node of mainnet. For more detail, please read it on here.

GCP, AWS and Azure also offer Ethereum or Hyperledger nodes!! But today (2019/5/18) they only provide you to set a private chain node by yourself. If you want a public chain, you have to set up a fully synced the blockchain node by yourself. The syncing process is very long. The syncing speed depends on your internet speed, peers count, and writing speed of your storage drive. Ethereum will takes about a week to sync. The data is about 230GB (2019/5/18, the amount of data will continue to grow). As the data are stored in blocks and linked together, corruption in one block can corrupt the whole chaindata. This can potentially waste your effort in waiting days for the node to sync. Chainstack can be your choice.

How to use it?

Register with their website first, they are available for free, but only have a 14-day trial period (too short!!)

Fill in the email and the password you want, then click Sign up

After clicking Sign up, you will receive an email with a verification code, which will be automatically taken to the next step.

Fill in your information and click Continue

Enter your credit card details and click Continue

Click Get started to create a project

I will build a project for our community — Blockchain&Dapps and choose Public chain

Once you’re done, go to the main page and click on the project — BlockchainAndDapps.

There are currently no nodes, so click on “Get started

Join network:

Here you can choose Ethereum or Bitcoin, I choose Ethereum

Ethereum can choose the main network or test network, but I can only choose the main network, the test network is not available.

Then choose where to deploy blockchain node, I choose Google Cloud Platform.

Choose Asia-Pacific

Finally step, all my settings are displayed. After confirming, click “Join network”.

It will be deployed in a few minutes.

Try to add nodes, but because I am in developer plan, I can’t add nodes.

Choose node

Can see the details of your node, the key points are the RPC endpoint address, WS endpoint address, and API. The API only supports net, eth, and web3, and hopefully it is enough.

How to use?

You can set it on the Metamask to point to the RPC endpoint of Chainstack. Click on the network and switch to “Custom RPC

Fill in the NEW RPC URL and take a network name, then click “SAVE

After closing the window, verify that your account is the same as the Main Ethereum network option.

How to use WS point ?

You can use the following code to verify your WS endpoint

const Web3 = require('web3');let ws = 'wss://ws-nd-xxx-xxx-xxx.xxxx.com';var web3 = new Web3(ws);web3.eth.subscribe('pendingTransactions',(error, txhash) =>{if(!error){
     web3.eth.getTransaction(txhash,(error, tx) =>{
       if(tx!=null){
         //filter transaction >= 1 ether
         if(tx.value >= 1000000000000000000){   
          console.log(txhash);              
          console.log(web3.utils.fromWei(tx.value, 'ether')," ether");
         }
       }
     })
   }
 else{
console.log("error :", error);
   }
})

result:

Finally, do we need to hold and maintain a node ourselves?

The advantages of executing your own node:

  • Only trust yourself
  • Choice autonomy — When choosing a third party provider, you may be worried about whether the third party will perform hard forks and soft forks and be forced to follow a third party provider. If you maintain it yourself, you can choose which chain to choose.
  • Security and privacy — When you choose a third party provider, usually the other party asks you to provide personal data. Is this data related to your wallet or transaction? This third party will have access to information about your transactions, as well as any personal data you give them as service providers. Third parties also can analyze your services and materials through your link, in order to eliminate such doubts It is recommended that you still own and maintain the node.

The disadvantages of executing your own nodes:

  1. Eats disk space and RAM — running a full node does require significant disk space. Initial synchronization with the network requires you download the entire blockchain data — from the very first block to the latest. Bitcoin Core and Ethereum require around 200 GB of free disk space to perform this process.
  • Bandwidth use — Bitcoin’s recommended minimum bandwidth use is 5 GB/day — upload and 500 MB/day — download.
  • You have to keep it on — Once you start, you can’t stop unless your service stops. You have to run node 24/7. In additional, hosting your node on someone else’s servers comes with two cons: you have to pay rent and you have to trust your third party provider.

The above is my personal thought, if you have better or have different opinions, please leave a message to discuss.

I do this because I love it, but if you want me to buy me a cup of coffee I won’t say no :O )Thanks ^^

donation :

XEM : NCWZSUF4FPXJY3L3Y7657QNVBIUZ5D54F4TNJ64S

Ether : 0xf2d15dEAf62b8c4AFC0343006579E8E662c120D9

Bitcoin : 332UiyAfSXyvhqCYgDgBkNLFSf25ccNV9i

*Do CLAP, COMMENT and SHARE! I also welcome any business opportunities that arises**

Connect:

LinkedIn

Telegram

Facebook

--

--

胡家維 Hu Kenneth
Singapore Blockchain-Dapps

撰寫任何事情,O型水瓶混魔羯,咖啡愛好者,Full stack/blockchain Web3 developer,Founder of Blockchain&Dapps meetup ,Udemy teacher。 My Linktree: https://linktr.ee/kennethhutw