5 ms·
Any other "gentle introductions" out there? Something with a complete walk-through both from contract creator's perspective and from some random node on the net
by huhtenberg 9y ago
Any other "gentle introductions" out there? Something with a complete walk-through both from contract creator's perspective and from some random node on the network.
This one failed to explain how contract calls are executed - is it by a single node, by multiple nodes, do nodes compete with each other for the execution, what's their incentive, etc.
- benchaney 9y agoI don't have a better article, but I can try to answer your question. Ethereum contracts are executed everywhere that the blockchain is downloaded and verified. They are deterministic, so every execution should return the same result.
- tmlee 9y agoContract calls are executed by all the nodes in the network. And they will all update the contract state onto their own blockchain then broadcast the result and compete via proof of work.
- posedge 9y agoI wonder how they can ever expect a system like this to scale given that every node has to execute every instruction in every called smart contract...
- gibybo 9y agoScaling is definitely a serious concern and is a large focus of Ethereum developers at the moment. I don't understand much about the proposed solutions, but they generally think the Ethereum network can be sharded in a way that allows only a small subset of the network to run any given contract and still guarantee reliability similar to as if the whole network had run it.
- jacquesm 9y agoYou'll need some very hard guarantees that that 'small subset' can never be under the control of a single entity.
- DennisP 9y agoThat's a good point. Bear in mind though that each subset can be larger than today's entire Ethereum or Bitcoin network.
- zodiac 9y agoIt doesn't work like that - a working sharding scheme should not fail if one shard is taken over. This is the most recent description of ethereum sharding if you want to learn more -> https://youtu.be/9RtSod8EXn4?t=3h12m30s https://youtu.be/9RtSod8EXn4?t=3h12m30s . In particular look at step 4 where the fork choice rule is changed so that shards with invalid blocks cannot exist on a valid base chain.
- DennisP 9y agoAlso various more specialized schemes to run things offchain, and submit to the chain only the results and some kind of assurance that you ran them correctly. (E.g. Raiden, Plasma, TrueBit)
- alx 9y agohttp://decypher.tv/series/ethereum-development http://decypher.tv/series/ethereum-development
- albertgoeswoof 9y agoI like to think of Ethereum as a giant virtual machine that shares it's CPU (contracts are the instructions) and Storage (the ethereum blockchain) across all nodes that participate. Every node re-runs everything locally to validate and move the state of the machine forward. And of course you get paid to do that through mining. When you view it like that it's obviously very costly to execute code & store outputs, so alternative solutions are needed for lower value code. Breakthroughs in these areas could make Ethereum a viable platform for computing, and it honestly feels like we could be entering a new computing paradigm with it.
- jashmenn 9y agoYes, I have a free intro to writing DApps with Ethereum course over here: https://www.newline.co/ https://www.newline.co/ Contract calls are executed by every node on the network -- if you've heard of "embarrassingly parallel", Ethereum is "embarrassingly serial". That is, every function call, on every contract, is run by every (full) node on the network. The calls are deterministic which means that the nodes can verify that their peers calculated the outcome correctly and didn't try to cheat. It sounds expensive (and it is) but that's the (current) cost of decentralized, trustless computation.
- jklepatch 9y agoI hav started a youtube channel to teach ethereum and solidity: https://m.youtube.com/channel/UCZM8XQjNOyG2ElPpEUtNasA https://m.youtube.com/channel/UCZM8XQjNOyG2ElPpEUtNasA Contract call can be broken down into 2 categories: state changing vs read-only. If its a state changing contract call, it will be executed by every node on the network. In this case its considered a transaction. This transaction has to be mined in a block and cost ether. The new state will be stored on the blockchain only after the transaction has been succesfully mined. The other kind of method call is read-only. Its free, ,is executed only by a single node, and does not alter the blockchain state.