1

When one deploys a smart contract onto the Ethereum blockchain, is the smart contract deployed on all nodes or just a few nodes? In short. where is the specified location that the smart contract is deployed?

The context of this question is to understand the resiliency of a smart contract in the event the node that contains the smart contract fails.

2

The contract is (delivered as) transaction data (the payload) which is known to all full nodes.

Contracts are part of the blockchain "state" which is a logical arrangement of data agreed on by all nodes. It might help to think of the "state" as something ethereal, like the "facts" ... quite independent from storage details but easily represented in documents.

The official "state" is whatever a majority of nodes say it is. So, yes. Many thousands of copies of the bytecode for the contract and the contract's internal state. It's quite resilient.

Hope it helps.

  • Hi rob thanks!! Let me try to understand you - What you are saying is the smart contract is not deployed on a full node or most of the full state per se. The SC is like a state/global variable on the blockchain where all full nodes have a copy to. Is this understanding correct? Many thanks. – Nathan Aw Apr 4 '18 at 11:57
  • It's one and the same. "Deploy" bytecode is a transaction send to address 0x0 ... like shipping it the binary. From that point on it's treated like any other immutable transaction. The "fact" of it is known/stored by all nodes. Contracts tend to compact compared to other software. – Rob Hitchens - B9lab Apr 4 '18 at 15:52

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.