This distinction might be eliminated in Serenity. Open chain vs ethereum action on the Ethereum block chain is set in motion by transactions fired from externally owned accounts. Every time a contract account receives a transaction, its code is executed as instructed by the input parameters sent as part of the transaction.
The contract code is executed by the Ethereum Virtual Machine on each node participating in the network as part of their verification of new blocks. This execution needs to be completely deterministic, its only context is the position of the block on the blockchain and all data available. The blocks on the blockchain represent units of time, the blockchain itself is a temporal dimension and represents the entire history of states at the discrete time points designated by the blocks on the chain. All ether balances and values are denominated in units of wei: 1 ether is 1e18 wei.
Ethereum to refer to the signed data package that stores a message to be sent from an externally owned account to another account on the blockchain. One unit of gas corresponds to the execution of one atomic instruction, i. Messages are virtual objects that are never serialized and exist only in the Ethereum execution environment. They can be conceived of as function calls. Essentially, a message is like a transaction, except it is produced by a contract and not an external actor. Like a transaction, a message leads to the recipient account running its code. Thus, contracts can have relationships with other contracts in exactly the same way that external actors can.
Every node participating in the network runs the EVM as part of the block verification protocol. They go through the transactions listed in the block they are verifying and run the code as triggered by the transaction within the EVM. When a contract is executed as a result of being triggered by a message or transaction, every instruction is executed on every node of the network. This has a cost: for every executed operation there is a specified cost, expressed in a number of gas units.