As I have been reading about smart contracts, I've learned that every node on the network executes every contract. So is a contract considered executed only after all nodes have verified it? What if I have a node that is really slow and takes a while to execute contracts (because that node is the resurrection of that Pentium III -- "Intel Inside!" -- box I resuced from my parents basement)? Does that adversely hold up the folks who are waiting on that contract?
1 Answer
It's more like that slow "Pentium III" node, won't have a the updated state of blockchain, and affects only clients connected to that node. But not the network as a whole.
Each miner will execute the transaction against the current state, computing the new updated state, before attempting to include it in a block; including invalid transactions would result in not getting the mining subsidy reward, so they are economically incentivized to make sure state changes are valid.
If they win the block, they announce the new state to the network. Each node receives that new state and verifies the state changes are correct. Once the state change has been verified, the node will respond to queries with the new updated state. Until the new state is verified, it would still respond with the previous state.
So a "slow" node only affects its own clients, not the network. The network's view of the state will update as fast as it can, and any connected peer can update only as fast as the node it is connected to.
-
What do you mean by "its own clients"? I thought a client is a full node, at least according to this -- ethereum.stackexchange.com/questions/269/…– DaveMar 12, 2018 at 2:32
-
@Dave In that case, they are using the word client to refer to an Ethereum node; with P2P systems, there is lots of room for these terms to collide. By client in the above answer, I am referring to Web3/ethers.js instances or a MetaMask instance connected to the node, issuing queries. That said, other nodes that are connected to the slow node would likely also be connected to faster nodes, so they would get more up-to-date information from those neighbours, and so the slow node is only affecting itself and dapps (maybe a better word than my use of client) directly connected to it.– RicMooMar 19, 2018 at 6:46