Live data from Hacker News

Ethereum from scratch – Part 1: Ping

ocalog.com

41–50 of 134 posts

Re: Ethereum from scratch – Part 1: Ping

#41
post #38
post #34

Earlier quoted context omitted.

Difference being that a poorly written web app amounts to some leaked passwords and email addresses. A poorly written smart contract that handles real money, on the other hand...

...passwords that might be reused for the email addresses, and paypal, and... A web app might not touch real money, but a leak can still have real money consequences for the users.

Sure, but in theory I can change passwords and maintain separate credentials for my banking-related needs.

Short of auditing the Solidity contract code myself, there's nothing I can do to protect myself from the hacks themselves because the very mechanism by which money is transferred is riddled with bugs.

This is mostly just semantics anyway - I'm just trying to establish that writing money-transfer software in a poorly designed language is, one way or another, worse than writing a web app in one.

Re: Ethereum from scratch – Part 1: Ping

#42

Earlier quoted context omitted.

Ethereum allows you to write a program that executes on the blockchain. State variables are synchronized the same way that a Bitcoin blockchain synchronizes sums. (This means it's impossible to have private state that's also synchronized via a blockchain, but in many applications private state isn't needed.)

What does the code have access to other than the blockchain? Can it access the internet? The node's computer?

This is a good question, and it's one I've wondered about. There's nothing stopping you from designing and deploying a blockchain similar to Ethereum that does allow access to those things.

The problem is trust. It's helpful to remember that all the participants in an Ethereum network are adversarial. It doesn't matter how many bad actors there are as long as >50% of participants agree on the outcome. (This is a simplified explanation -- the real system is transitioning to proof of stake rather than proof of work.)

If you allow solidity to access the internet or the system compilers, you can't guarantee determinism anymore. For example, if you increment a counter by the result of accessing https://some-value.com (which returns a JSON value), you could program it to return a different result for everyone who accesses it. None of the nodes would agree what the true value of the counter should be. It'd also result in a central point of failure.

These same problems exist if you let Solidity access the system software. You could program it to give different results, so no one would agree.

The innovation of Solidity is that it's a set of operations where no matter what you do, the majority of nodes will converge to the same answer.

Re: Ethereum from scratch – Part 1: Ping

#43
post #40

Earlier quoted context omitted.

This criticism doesn't apply to Ethereum. Solidity is compiled to a VM. You can write other languages that meet your criteria that still use Ethereum.

I know, and I am very excited for those languages to exist and be usable, and thereby have been tracking a couple such efforts; until then, this is about as useful as pointing out that website development is theoretically possible using a computer. The person did not state that it would always be the case that smart contracts are hard: only that right now, on Ethereum, they are hard, and the comment even used "gotten…

I'm like a goalie. Defense is my game.

Actually, I didn't mean to come across as defensive. I just like to nerd out about tech.

Once you accept the inherent craziness of the proposal, and go "Ok, this is crazy. What now?" you end up concluding that the future is going to be very interesting. It'd be worth investing some amount (that you can afford to lose!) in ETH on the off-chance that it doesn't suffer a major disaster. There are quite a few interesting applications for this technology, and historically that's been a pretty solid bet.

Re: Ethereum from scratch – Part 1: Ping

#44

Earlier quoted context omitted.

There are no uses for turing complete smart contracts on a blockchain

Of course, us maximalists all know Bitcoin is the pinnacle and can never be improved on. /s

It can be improved on, but blockchain is REALLY REALLY hard

Re: Ethereum from scratch – Part 1: Ping

#45

Earlier quoted context omitted.

Ethereum allows you to write a program that executes on the blockchain. State variables are synchronized the same way that a Bitcoin blockchain synchronizes sums. (This means it's impossible to have private state that's also synchronized via a blockchain, but in many applications private state isn't needed.)

What does the code have access to other than the blockchain? Can it access the internet? The node's computer?

From my limited understanding, a smart contract essentially runs in a VM with a dedicated memory space that is unique to that contract (and copied along with the contract). However, there is a limited ability for it to interact with other contracts via their (hard-coded) addresses. So a contract can, for example, listen for events occurring with a specific contract, and invoke itself based on the results. It can do this because parts of a contract's memory space are private (I think this is how it works), and so a contract can have secret keys and manage money.

Moreover, a point that was not made clear to me when I first read about Ethereum, the programs are inherently limited in the number of steps that can be run, and the VM monitors this and terminates the program prematurely if it exceeds the limit. Moreover, longer programs cost the caller (the person or other contract asking the network to run this program) more money.

Re: Ethereum from scratch – Part 1: Ping

#47
post #39

Earlier quoted context omitted.

So? It's their money to lose. Yes, it's crazy, but it's also happening.

Agreed, and the massive hacks and losses will continue as long as smart contracts are written in Solidity.

The EVM is Turing-complete, so this will be a risk with any language that compiles into a smart contract.

Solidity doesn't appeal to me because its goal seems to be on-boarding JavaScript programmers. But new languages that compile to EVM can be easier to use "safely" and you will see several of these in the next few years.

I'm really excited that a project to embed Turing-complete behavior in a blockchain has actually taken off. It's completely insane from one perspective, but completely awesome from another.

Re: Ethereum from scratch – Part 1: Ping

#48

Though I meet the criteria as stated (knowledge level wise - I'm a retired IT Exec/long time geek), yet this still is a bit too esoteric for me. As one of the 'killer apps' for ethereum is smart contracts, I'd like to see this explained in a 'for dummies' high level way, then decomposed into the finer technical chunks needed to make it happen.

May I humbly suggest my Hello World tutorial for a quick overview of smart contracts in ethereum?

https://steemit.com/ethereum/@decentralised/hello-world-revi...

Re: Ethereum from scratch – Part 1: Ping

#49
post #26

Though I meet the criteria as stated (knowledge level wise - I'm a retired IT Exec/long time geek), yet this still is a bit too esoteric for me. As one of the 'killer apps' for ethereum is smart contracts, I'd like to see this explained in a 'for dummies' high level way, then decomposed into the finer technical chunks needed to make it happen.

professional etherem devs haven't even gotten to the point where they can write correct contracts themselves. but the concept is pretty simple. a "smart contract" is a script that runs on a blockchain to execute terms and manage funds. the problem is that the tools that you use to make these are basically garbage. you don't write fin-tech in what amounts to javascript y'know?

Solidity's relationship to JavaScript is negligible and way overplayed in its marketing. Similarities are entirely superficial.

Re: Ethereum from scratch – Part 1: Ping

#50
post #2

Hi all, I'm the author of the post, and also the creator of the website. I'm writing this series of posts to demonstrate the site. Do you guys get what the site's trying to do? Hope you enjoy the post. If you have any constructive criticism you'd like to give regarding either the post or the website, let me know!

You should add a button or some kind of subscription opt-in add the end. I just want to be notified for the future updates in this series.
Post reply on HN