Tag: distributed systems

  • Day 9 — If Ethereum Is a Computer, Who Actually Runs It?

    Independent computers executing the same Ethereum Virtual Machine instructions

    Yesterday we described Ethereum as a blockchain that can hold both value and logic. That description sounds impressive, but it also hides a practical problem. A program cannot execute itself. On a normal website, code runs on a server owned by a company. If Ethereum has no central server, which computer actually runs a smart contract?

    The answer is not one special machine. Ethereum defines a small, standardised computing environment called the Ethereum Virtual Machine, usually shortened to the EVM. Developers write smart contracts and compile them into instructions that the EVM understands. Those instructions are stored on the blockchain along with the contract’s address and data.

    A useful way to imagine the EVM is as a calculator whose design has been copied onto thousands of computers. Give every copy the same starting numbers and the same operation, and each should produce the same answer. When someone sends a transaction to a smart contract, Ethereum nodes execute the relevant instructions and calculate the resulting changes. One node may be in Mumbai and another in London, but the rules of the virtual machine are the same.

    The result is a shared state. This state includes account balances, contract storage and other information that Ethereum currently recognises as true. A transaction proposes a change to that state. The network checks the signature, executes the contract, and agrees on the new result before it becomes part of a block. A person cannot simply change the answer on their own computer because their version would disagree with everyone following the protocol.

    For this agreement to work, the EVM has to be deterministic. The same input must always lead to the same output. A smart contract therefore cannot casually ask one computer for its local time, read a private file, or browse a website while it is running. Different machines might receive different answers. Contracts operate inside a controlled sandbox and can use only information supplied in a form the network can verify.

    This repetition sounds wasteful because many computers perform the same work. In one sense it is. Ethereum deliberately trades ordinary server efficiency for independent verification. The benefit is that no single server owner can secretly change the program’s result, switch off the database or rewrite a balance. The cost is that shared computation is scarce.

    That leads to the next question. If thousands of machines may need to check a computation, what prevents someone from submitting an enormous program or an infinite loop and making everybody work for free? Ethereum’s answer is a meter attached to every instruction: gas.