1

I am learning about the Ethereum network and I think I have a general understanding of how things work. One thing I am unsure about is the precise mechanism by which an external user that is not part of the network (not a node/client) communicates with a network node. What I don't understand is the point of entry to the network.

For example, if a random computer with an internet connection wants to send a simple JSON-RPC read request to the Ethereum network to get a transaction by its hash without using a node provider like Alchemy, Infura, etc. How does this communication happen exactly? Is the request received by one node or many nodes? What decides which nodes in the network receive the request?

2 Answers 2

1

Each computer needs to have a RPC node to communicate with. The node is responsible for updating the latest global Ethereum blockchain state and make it accessible over an API. Someone needs to pay for running these nodes.

As an author of an application, you decide which node of the following you are connecting to:

  • Run a local Ethereum node on the computer itself

  • Run a local node on a different computer in the same network, or privately behind a password

  • Use a node from any of commercial providers at ethereumnodes.com

  • Ask users to provide their own node (a common method is to hijack MetaMask node connection)

There is no P2P network for RPC requests. Any P2P activity is just distributing blocks and transactions to RPC nodes.

2
  • Thanks, that makes sense. So, to clarify, in order to communicate with the Ethereum network you either run a node yourself (i.e. become part of the network) or communicate with an existing node (i.e. the network) through some API (be that a provider or a wallet)?
    – Adham
    Jan 23, 2023 at 10:51
  • Yes. Nodes only communicate with each other by blocks and transactions. What your wallet or application communicates with needs to maintain the full state of Ethereum virtual machine, which is an additive process of processing all blocks one-by-one. When you have the state then you can do queries like "what is the balance of this account at the current block." Jan 23, 2023 at 11:08
0

The Nodes are the Ethereum network. So, you need some node that accepts your transaction and distributes it in the network. Some free and public can be used from https://eth.public-rpc.com That service can change in the future, but what is nice in a decentralized network, you will always find other nodes and other services to give you the network gateway, or you can run one yourself.

3
  • Note that sending transactions is easy. You will also need the historical data for any normal application functionality. For example, you want to see past transactions for your wallet. Free RPC endpoints often do not offer this information. Also there is no reason to give this information for free and it is not sustainable. One business model behind this kind of free nodes is that they analyse and sell your data e.g. to demask users. Jan 23, 2023 at 11:09
  • @MikkoOhtamaa Archive node is not always required. getBlock getTransaction and getPastLogs usually enough for most cases and they are usually supported in public/free tiers, though the rps are limited. Everything on the blockchain is public, so anybody can analyze and collect the data. Do you mean to deanonymize the user (demask)? Also, infura and other nodes could track users. The case with metamask collecting users' IPs
    – tenbits
    Jan 23, 2023 at 11:33
  • I am talking about full nodes, not archive nodes. Free RPC providers often do not provide logs, because it is too expensive. Jan 23, 2023 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.