News for hackers. Stuff that matters.
Re:Learn Ethereum smart contract programming by staticelf on Monday July 24, 2017 @06:19AM (#14837212)
Ok but that raises a lot of technical questions. Do I myself host that logic or is the logic itself distributed? While creating a crowdfunding contract, I am the host in my mind so assuming that the smart contract is hosted on my machines this must mean that when people are sending Ethereum to my wallet the logic does it's thing?

Another version of that could be that the logic is sent out to all interested peers and they only actually send Ethereum to the correct wallet after the logic in the contract they got sent is executed.

This is the parts of Ethereum that is so very confusing. People are simply swinging around with words like "smart contracts" but there are little to no actual description on how it actually works.

Re:Learn Ethereum smart contract programming by jononor on Monday July 24, 2017 @06:23AM (#14837221)
The logic exists on the block chain. It is executed on each and every machine that follows the chain. This is how executions are verified, 'everyone' has to agree on the outcome.
Re:Learn Ethereum smart contract programming by staticelf on Monday July 24, 2017 @06:41AM (#14837299)
Sorry for being so uninformed but what happens if there is an error in the logic? Doesn't that mean that it's not possible to update the smart contract?
Re:Learn Ethereum smart contract programming by rst on Monday July 24, 2017 @07:48AM (#14837640)
There have already been multiple incidents involving bugs in "smart contract" code being exploited to steal funds, one within the past few days[1]. A particularly nasty case involved something called "the DAO", which was an attempt to do something like a distributed VC fund, but had a bug which allowed any participant to steal all funds contributed. That one got backed out by a hard fork of the Ethereum blockchain, but that's obviously not a stable or scalable solution to dealing with these types of situations going forward.

[1] https://www.theregister.co.uk/2017/07/20/us30_million_below_...

Re:Learn Ethereum smart contract programming by mbrock on Monday July 24, 2017 @06:54AM (#14837353)
Basically yes, and this is reasonable from a security perspective, otherwise every smart contract would basically have a trusted administrator.

But in many cases you do want some ability to upgrade the code, and then you simply program in that ability by creating a repointable proxy with whatever authorization logic you want.

Re:Learn Ethereum smart contract programming by ym705 on Monday July 24, 2017 @06:46AM (#14837321)
Yes the block chain is by definition immutable. So no means to update the contract the only way if it is a ENORMOUS mistake would be to fork it: read about DAO hack FYI
Re:Learn Ethereum smart contract programming by na85 on Monday July 24, 2017 @07:07AM (#14837423)
>what happens if there is an error in the logic?

If you are a big name in the Ethereum community, they will soft fork Ethereum so that your mistake is rolled back.

Re:Learn Ethereum smart contract programming by Diti on Monday July 24, 2017 @07:46AM (#14837629)
That isn’t true. Nowadays you can’t fork Ethereum like that by fear of losing legitimate transactions.
Re:Learn Ethereum smart contract programming by na85 on Monday July 24, 2017 @06:13PM (#14843217)
>That isn’t true

Precedent seems to indicate otherwise.

Re:Learn Ethereum smart contract programming by mbrock on Monday July 24, 2017 @06:59AM (#14837375)
Of course there are a lot of technical questions. To answer this one, the logic is distributed and executed on every full node. It's like one big distributed database where a transaction can also create a stored procedure.
Re:Learn Ethereum smart contract programming by ym705 on Monday July 24, 2017 @06:22AM (#14837215)
No the smart contract is on the blockchain and executed by the nodes. Never on your specific host alone
Re:Learn Ethereum smart contract programming by decentralised on Monday July 24, 2017 @07:45AM (#14837621)
When you write a smart contract, the natural route is to deploy it into the Ethereum public network. Otherwise, your contract is only accessible to your own private channel and uses your own tokens (as opposed to Ether), etc.

Some clarifications: Ethereum = the project or the foundation itself Ether = unit of (crypto)currency used in Ethereum