0

Provider creates a link between me and a node in the mainnet/testnet, right? What will happen if say, one or more nodes of infura for example goes down. My app would still like to use that node but it won't be able to connect, right? Then how does that guarantee high availability which is required in distributed systems, I am still relying on one node that my app connects to using the provider. Or do I understand it completely wrong?

Also in the courses of solidity nobody tells what actually happens when I call web3.eth.contract(....).deploy(...). I mean what does deploy do behind the scenes? It reaches the node then does that node advertise my contract to every miner's mempool? Basically, how do mempools get filled when information is initiated at one place?

1

There seems to be two questions:

First, INFURA is a centralized provider, in the backend INFURA runs it's own distributed network of parity/geth nodes, so it's unlikely that everything goes down. However you're right that if it were to happen, you would experience an outage. But this is only because you chose to connect a centralized service, the decentralized part of this is that you have the option of running your own node and arrive at the same conclusions as if you were connected to INFURA. There is no information private to INFURA that you as a user wouldn't be able to retrieve by running a node on the network.

It's up to you to design your application to have fallbacks in cases of outage, perhaps default back to your own private node or another service.

To answer your second question, when you deploy a contract you create and bundle the transaction. Assuming that you are using a centralized service like INFURA, your frontend client (MetaMask, Mist, etc...) bundles and signs the transaction and propagates it to the INFURA endpoint, which eventually ends up being propagated (via some node INFURA is running) to the Ethereum network via a gossip protocol.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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