How to Connect to Ethereum Nodes

Developing dApps (decentralized applications) or Web3 apps was, for a long time, a time-consuming endeavour. In fact, building dApps can still be hard if you do not have the right tools. For example, a crucial part of dApp development is that of connecting to nodes. Nodes are helpful in that they allow users to, e.g., deploy smart contracts, check user balances and even change MetaMask accounts between different networks. Connecting to nodes is most easily done through choosing one of the top blockchain node providers, such as Moralis. Furthermore, Moralis Speedy Nodes provide some of the fastest nodes available and offer support for multiple blockchains, one of which is Ethereum. Ethereum is arguably the most popular blockchain for dApp development, and this is precisely why we are going to take this article to look closer at the process of how to connect to Ethereum nodes with Moralis. 

To begin with, the process of how to connect to Ethereum nodes becomes dramatically easier with the help of Moralis Speedy Nodes. Speedy Nodes are fast and reliable, and they are also free for Moralis users. In fact, Moralis’ entry tier offers over five million requests per day – for free!  Moralis is, therefore, the best way to access nodes, and we will explain why in the following sections. 

However, Moralis is much more than just a node provider, and provides many other readily accessible development tools. Moralis’ infinitely scalable Web3 backend infrastructure makes the process of developing dApps a breeze, and lets you focus on frontend. What’s more, signing up with Moralis is entirely free – connecting to Ethereum nodes has never been easier! Read on for a full guide of how to connect to Ethereum nodes using Speedy Nodes.

What is Ethereum?

You will likely already know Ethereum as the second-largest cryptocurrency, just behind Bitcoin. However, Ethereum is also the single largest platform for dApp development. In fact, there are already thousands of dApps powered by Ethereum. This means that the Ethereum ecosystem is vast, and has produced some of the largest dApps available on the market. 

At its core, the Ethereum blockchain currently functions through a Proof-of-Work (PoW) consensus mechanism. This means that block validation happens through a trial and error process where miners race to find the right hash. However, Ethereum will soon change to a so-called “Proof-of-Stake” (PoS) consensus mechanism, with the launch of Ethereum 2.0. This comes as a solution to the congestion that has long plagued Ethereum’s Proof-of-Work consensus mechanism. Here are just some of the use cases that Ethereum addresses: 

  • Banking — A substantial portion of the world’s population remains unbanked, largely due to poor financial infrastructure. As a result, Ethereum could help democratize finance, by providing a DeFi ecosystem available to everyone through the decentralized web. 
  • Private Internet — Another current issue is the lack of privacy in Web2, which is something that decentralization can solve. Specifically, it isn’t necessary to provide personal information to use Ethereum applications. 
  • Cutting out the Middlemen — Ethereum is a P2P (peer-to-peer) network, which means that it is possible to make transactions directly from person to person. This means that intermediaries like companies can be excluded from the process. Instead, smart contracts handle transactions transparently and in a trustless manner.
  • No Censorship — Lastly, the Ethereum network is not controlled by one entity, meaning that no company or government can dictate if transactions are made. 

However, if you are interested in reading more about Ethereum, we recommend checking out Ethereum’s official website for more information.

How to Connect to Ethereum Nodes Using Moralis

So, you want to connect to Ethereum nodes? Well, the first part of how to connect to Ethereum nodes easily is to sign up with Moralis. This is entirely free, and it gives you access to more tools than just nodes. As soon as you are all signed up and logged in, we can move on to the process itself. 

Once you have access to the Moralis website and log in, you will be presented with a menu on the left side of your screen. This menu will feature several different alternatives, but the one we want to click on is the ”Speedy Nodes” tab. When you click this alternative, Moralis will provide you with four different networks to choose from. These networks are BSC, Polygon, Arbitrum, and, finally, ETH (Ethereum). As we are going to look at how to connect to Ethereum nodes, the alternative we are going to choose is the ETH network. As this is the case, we want to click the ”Endpoints” button beneath “ETH Network”, which will provide us with a selection of URLs. 

Moralis Speedy Nodes feature nodes for the Ethereum mainnet, along with several different alternatives such as Ropsten and Goerli. Moralis’ Speedy Nodes also feature an archive version of all their nodes along with the full nodes.

If you are unfamiliar with archive nodes, they are nodes that store past states of a blockchain. This means that they are very useful when we need to query information from the past as they can provide this information instantly. However, we will dive deeper into full archive nodes later on in the article. 

Connecting to Ethereum Nodes with Moralis Endpoints

To connect to the Ethereum nodes, we utilize the endpoints accessible at the Moralis webpage, but what exactly are these endpoints? The URLs we receive when clicking the ETH Speedy Node can be regarded as the node itself. We can then use these URLs to connect our dApp projects to the blockchain and interact with it in the command line. This essentially means that these URLs act as a gateway for our Moralis projects to communicate with the Ethereum blockchain. However, it does not really matter which of the endpoints we opt for; it is still possible to connect and communicate with the different blockchains through the nodes. Following the launch of WebSocket support for Moralis Speedy Nodes, you’ll now also be able to toggle WebSocket endpoints, rather than HTTP endpoints, for real-time communication support.

However, for a more in-depth tutorial of the process of connecting to Ethereum nodes with Moralis, we recommend that you take a closer look at the full Moralis documentation. Here you will find all the proper instructions needed to enable the communication between your dApps and the node that you opt to use. 

Furthermore, if you are interested in a visualization and walkthrough of the process, you can watch the following video on how to connect to Polygon nodes. Even though it is a different network, it is possible to follow the same steps using the Ethereum endpoints instead.

What are Moralis’ Speedy Nodes? 

A concept that we have mentioned continuously throughout the article is Moralis’ Speedy Nodes. However, this might be an unfamiliar term to some; we will therefore explain what this service provided by Moralis entails, and why they are helpful for dApp development. 

Moralis Speedy Nodes are helpful when developing dApps and changing MetaMask networks. However, as MetaMask is set to Ethereum as a default, the Ethereum node is quite unnecessary in this regard. However, for dApp development, all these nodes are highly attractive and part of the ecosystem of Moralis’s tools. So, why are they so attractive for development? 

The Speedy Nodes are highly developer-friendly, since they provide the same functionality as other nodes but with exceptional speed, reliability and are connected to Moralis. Furthermore, the Speedy Nodes does not only feature Ethereum nodes; there are other alternatives, such as BSC, Polygon, and Arbitrum support

In essence, Speedy Nodes make it more convenient to connect to and run a node. You are also provided with a vast selection of nodes where you can choose freely between test/mainnets and if the node should be a full archive node. This means that Moralis as a node provider is highly reliable and efficient for developers in need of running a node. 

If you want to learn more about Moralis’ Speedy Nodes, we recommend checking out the Moralis YouTube channel for more detailed guides on how they can be acquired and used in practice. Furthermore, here is a video featuring Ivan on Tech, where Speedy Nodes are explained in more detail: 

Connecting to Nodes

As we mentioned, Moralis’ Speedy Nodes provide nodes for several different networks. Therefore, it is not only possible to utilize these nodes for the Ethereum network but others as well. The process for accessing these nodes is just as simple for the other networks as for Ethereum. 

However, suppose you are interested in learning more about connecting the other nodes. In that case, the Moralis blog provides a guide for connecting to Polygon nodes and another one on how to connect to BSC nodes. These two articles not only feature how these nodes can be used for development but also how it is possible to use the Speedy Nodes to change MetaMask from Ethereum to another desired network. 

If you are unfamiliar with MetaMask, we also recommend the following article, which is a breakdown of what MetaMask is and how you set up your account. 

These articles (along with this one) demonstrates how easy it is to access all these different nodes and the convenience that Moralis is in the form of a node provider. However, this is just one of the many tools that Moralis offers its users. Signing up with Moralis provides you with a vast selection of tools useful in dApp development. 

Full Archive Nodes Explained

We are actually able to figure out parts of what an archive node is from the name. The operating word here is ”archive”, which – in a way – is what these nodes are. A full archive node is essentially a full node, but it also contains the history of the blockchain in question.

So, an archive node for, let’s say Ethereum, contains the history of the chain. This means that the archive node contains a snapshot of all the blockchains’ blocks since the chain’s origin. As the archive nodes contain all the previous states, it is possible to look back in time and see the state of the blockchain from, for example, three years ago. This means that we can query these nodes for historical information when developing dApps. 

However, how does this really differ from a full node, since they contain the whole blockchains and its transactions? A full node holds all the necessary information to validate all the blocks in the complete chain. However, since a full archive node contains a snapshot of all previous states, it is possible to query information from these nodes much faster than a regular full node. 

The reason for this is, when asking a full node about, for example, someone’s balance from two years ago, it must be calculated going back from the current block to the one we asked about. This is what takes time and computational power. However, we can acquire this information instantly with the full archive node since it is part of the snapshot. But as a result, the archive nodes are enormous in size if one compares with regular full nodes. 

Furthermore, if you are interested in learning more about full archive nodes, this article explains what full archive nodes are and when they are useful.

How to Connect to Ethereum Nodes – Summary

Nodes are great when it comes to building dApps. They help the development process tremendously since it is possible to use them to check balances of users, deploy contracts and change our MetaMask networks. However, getting your hands on a fully functioning node can, in some cases, be quite the challenge. Therefore, it is essential to find a great node provider, which is one of the areas in which Moralis shines. 

Moralis’ Speedy Nodes provides nodes for several different networks, one of which is Ethereum. These nodes are highly reliable and fast, meaning that the development process of Ethereum applications can be simplified. Furthermore, getting access to these nodes is an easy process that is entirely free. All you need to do is sign up with Moralis, and you can get going with developing dApps. 

Speedy Nodes directly provide you with URLs for several different networks. In fact, these URLs can be seen as the nodes themselves. Using these URLs, you can create a means of communication between your applications and the desired blockchain.

Furthermore, the Moralis’ Speedy Nodes will soon offer archive versions of all nodes, which can be highly useful for development. This means that it is possible to query the nodes for historical information and acquire it instantly. 

Moreover, connecting to Ethereum nodes is just one of the many valuable services that Moralis provides users. So, if you are interested in becoming a dApp developer, do not hesitate to sign up with Moralis to begin developing in just minutes. With Moralis, you can shorten the development process from months to mere hours!

Share on facebook
Share on twitter
Share on linkedin
Moralis Blog
Moralis Blog

Related Articles

The latest in Blockchain
Development

Subscribe to the Moralis Magazine, and be the first to find out about the latest Web3 tech!