3

I want to understand how MetaMask works.

When a user connects to the main network using MetaMask, there are a few possibilities I can think of:

  1. MetaMask creates a dedicated full node (seems impossible) or a light node for every user.

  2. MetaMask runs a full node, letting users to connect to it via rpc.

In the second possibility, aren't we violating blockchain princples like depending on a remote single node a.k.a. a single point failure?

Maybe both of the above are wrong. I am not sure, please help me understand the MetaMask workflow.

2 Answers 2

3

Metamask connects through Infura (https://infura.io/) for the mainnet and testnet setting. Infura maintains those nodes.

Obviously, it also allows you to connect to a custom RPC by clicking the network name for the dropdown.

1

It should be (2). We connect to the Ethereum network via node that metamask provides or other nodes.

I think you misunderstand something. If we want to do something on the blockchain, we have to connect to a node so our transaction can be broadcasted to the entire network. After our transactions are broadcasted,they can be put into blocks and then the miners will do the PoW stuff. So choosing to a node is just the first step, it's just for connecting to the network.

If the node fails, we will get a message and we can easily switch to another one.

2
  • In that case there will be only two types of node, Miners nodes and one node from meta mask. Because no one would want to run a heavy node on there system if aĺl those services can be served by remote node(metamask). If there are less nodes running in a block chain there chances that more than 50 percent of node agree to a false transaction intentionally. May 10, 2018 at 16:56
  • I'm not sure what your question is. The 51% attack doesn't happen based on how many nodes agree on the block, it depends on whether where's a single mining node that controls 51% total hash power to create the longest chain by itself. So if the hash power is centralized, it's very risky for the whole network, adding regular full nodes cannot really help the network preventing such attack. May 11, 2018 at 9:50

Your Answer

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

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