News for hackers. Stuff that matters.
Re:Bitcoin – The Internet of Money by sillysaurus2 on Sunday November 24, 2013 @06:54PM (#6791756)
This is very interesting:

Bitcoin has a scripting language which enables more than a “send money from X to Y” transaction. A Bitcoin transaction can require M of N parties to approve a transaction. Imagine Wills that automatically unlock when most of the heirs agree that their parent has passed, no lawyer required. Or business accounts that require two of any three trusted signatures to approve an expenditure. Or wire escrows that go through when any arbiter agrees that the supplier sent the goods to the buyer. Or wallets that are socially secured by your friends and family. Or an allowance account accessible by the child and either of two parents. Or a crowdfunding of a Kickstarter project that pays out on milestones, based on the majority of the backers approving the next payment. The escrow in each case can be locked so that the arbiters can’t take the money themselves – only approve or deny the transaction.

The scripting language can also unlock transactions based on other parameters. Unlocking them over time can enable automatic mortgage, trust, and allowance payouts. Unlocking them on guessable numbers creates a lottery auditable by third parties. One can even design smart property – for example, a car’s electronic key so that when and only when a payment is made by the car buyer to the seller, the seller’s car key stops working and the buyer’s car key (or mobile phone) starts the car. Imagine your self-driving car negotiating traffic, paying fractional bitcoin to neighboring cars in exchange for priority.

I've been following Bitcoin since the beginning and had no idea it supported "transaction approved only when M of N participants agree."

How do you feel about those scenarios? Also, does anyone know of other little-known Bitcoin functionality?

Re:Bitcoin – The Internet of Money by nullc on Monday November 25, 2013 @03:03AM (#6792992)
Here is an exceptionally fun example of Script use: https://bitcointalk.org/index.php?topic=293382.0

Beyond script there isn't a whole lot— nlocktime lets you make transactions which cannot be mined until a specified time in the future. This lets you build protocols that have "refunds", so that they don't cause funds to get stuck if a participant walks away.

But even just using a few features of script and nlocktime is exceptionally powerful:

Securely and privately trading Bitcoins for other cryptocoins (including Bitcoins): https://bitcointalk.org/index.php?topic=321228.0

or

Buying computationally verifiable information in an environment of mutual distrust: https://en.bitcoin.it/wiki/User:Gmaxwell/why_hash_locked

One of the most important things script does is allows you to produce transactions which are bound into more complex protocols occurring outside of Bitcoin in a secure way. This allows you to extend Bitcoin's trustless decentralization into things which aren't part of Bitcoin proper.

Re:Bitcoin – The Internet of Money by tlrobinson on Sunday November 24, 2013 @07:25PM (#6791831)
Yes, this is the most exciting part of Bitcoin, IMHO. It's quite amazing what sort of problems you can solve.

I highly recommend watching this talk by Mike Hearn, as well as reading the links in NhanH's comment: https://www.youtube.com/watch?v=mD4L7xDNCmA

Re:Bitcoin – The Internet of Money by NhanH on Sunday November 24, 2013 @07:11PM (#6791795)
Bitcoin use a scripting language for the transactions, as described in here[0][1].

Interestingly, I believe that this is one of the case where "lazy programmers make best programmers": instead of implementing the transaction system, Satoshi decides that he couldn't be bothered and just put in a scripting system instead (I have no citation for this, and can't claim for certain that this is the case, it was just something I read a while ago).

However, due to security concerns, I think that most of the scripting ability is currently disabled.

[0]:https://en.bitcoin.it/wiki/Script

[1]:https://en.bitcoin.it/wiki/Contracts

Re:Bitcoin – The Internet of Money by topynate on Sunday November 24, 2013 @07:31PM (#6791847)
Provably Prune-able Outputs! See https://bitcoinfoundation.org/blog/?p=290. The idea is to support adding a little bit (80 bytes) of extra data to a transaction, while signalling to people who don't need to know about it (i.e. almost everyone) that they can happily ignore any such data and thus avoid downloading it.
Re:Bitcoin – The Internet of Money by taariqlewis on Sunday November 24, 2013 @07:50PM (#6791907)
This has the potential to allow new protocols to be built ontop of bitcoin. Mastercoin is one new protocol that uses the pruneable, provable outputs functionality. Learn more about Mastercoin here: https://github.com/mastercoin-MSC/
Re:Bitcoin – The Internet of Money by nwh on Sunday November 24, 2013 @08:12PM (#6791984)
For those uninformed, "MasterCoin" is an impossible attempt at pegging Bitcoin to the USD (among other things). It of course doesn't work because there's a limited supply, which means that the prices are raised and you're no longer pegged. The whole setup is essentially designed by the creator to make him and his "donators" rich (buy some now and get 10% more! was the original post).

Due to the ponzi-like setup, the people who paid 4 million dollars for "MasterCoin" are very, very vocal when it comes to promoting it.

https://blockchain.info/address/1EXoDusjGwvnjZUyKkxZ4UHEf77z...

Re:Bitcoin – The Internet of Money by cdash on Sunday November 24, 2013 @09:39PM (#6792222)
Kind of sounds like bitcoin.
Re:Bitcoin – The Internet of Money by jerguismi on Monday November 25, 2013 @02:41PM (#6796387)
Just another altcoin, with a twist.
Re:Bitcoin – The Internet of Money by gojomo on Sunday November 24, 2013 @07:08PM (#6791793)
The scripting language vision has been there from the beginning, but parts of it have been 'off' (in the reference client) because of incomplete implementation, or concern that the implications and potential bugs aren't sufficiently understood.

I wonder if a future Bitcoin offshoot might even use a more general standard language for in-ledger transactions. Javascript? LLVM?

Re:Bitcoin – The Internet of Money by ssadler on Sunday November 24, 2013 @07:19PM (#6791815)
They couldn't, because Javascript etc are turing complete, so you can't predict if they're going to end (halting problem). With bitcoin you know that the script will end and that the running time will correlate loosely with the size of the script, so you can't really use it to mess up network nodes. Butcoin scripts have no loops or goto.
Re:Bitcoin – The Internet of Money by gojomo on Sunday November 24, 2013 @07:40PM (#6791875)
A guarantee of completion isn't strictly necessary: you can cap the number of ticks/cycles a script is allocated on a deterministic reference machine.

Surely there'd be a number of technical and economic challenges to be overcome, but Bitcoin itself is an example of how a good-enough solution may be hiding in plain sight.

Re:Bitcoin – The Internet of Money by gst on Sunday November 24, 2013 @07:21PM (#6791821)
Actually you could. Just limit the max. number of instructions that are allowed to be executed in order for a script to be valid.
Re:Bitcoin – The Internet of Money by nullc on Monday November 25, 2013 @03:28AM (#6793048)
Indeed, you can, but then you have a very exact requirement on exactly how the interpreter is implemented which can never be optimized, and any disagreement between implementations can cause a world ending consensus failure.

By not having looping or recursion script naturally gets an operation limit by virtue of having a size limit, and this is _relatively_ easy to get right between implementations. (Though, so far several of the alt implementations have gotten it wrong).

Re:Bitcoin – The Internet of Money by topynate on Sunday November 24, 2013 @07:28PM (#6791838)
You could require all scripting to be done in a language supporting total functional programming, like Epigram. That would be fairly hilarious (also counterproductive, because the increased script size would cause blockchain bloat).
Re:Bitcoin – The Internet of Money by pcwalton on Sunday November 24, 2013 @09:55PM (#6792265)
LLVM would be exceedingly bad due to its undefined behavior. A malicious actor could easily fork the block chain.
Re:Bitcoin – The Internet of Money by ars_technician on Sunday November 24, 2013 @10:27PM (#6792338)
>LLVM would be exceedingly bad due to its undefined behavior. A malicious actor could easily fork the block chain.

There is nothing that indicates undefined behavior of LLVM would lead to a fork in the blockchain.

Re:Bitcoin – The Internet of Money by tlrobinson on Monday November 25, 2013 @12:09AM (#6792601)
Why not? The rules for validating Bitcoin transactions and blocks must be completely specified and followed exactly by all implementations of the client software, otherwise you risk forks.
Re:Bitcoin – The Internet of Money by nullc on Monday November 25, 2013 @02:58AM (#6792980)
Bitcoin is a consensus system. It is paramount that all participating nodes reach the exact same state.

If undefined behavior could make some nodes accept a transaction while others reject it the state would become inconsistent and potentially mutually exclusive. From one currency, you'd have two and every coin could be spent twice.

Re:Bitcoin – The Internet of Money by rms on Sunday November 24, 2013 @07:07PM (#6791792)
An important caveat is that Bitcoin Script isn't enabled in the current implementation of Bitcoin, for obvious security reasons. The immense possibility of Script is yet another reason I am long on Bitcoin.
Re:Bitcoin – The Internet of Money by tlrobinson on Sunday November 24, 2013 @07:33PM (#6791853)
Only parts of it aren't enabled. You can already do a lot with Script:

"This is a list of all Script words (commands/functions). Some of the more complicated opcodes are disabled out of concern that the client might have a bug in their implementation; if a transaction using such an opcode were to be included in the chain any fix would risk forking the chain."

https://en.bitcoin.it/wiki/Script

Re:Bitcoin – The Internet of Money by maaku on Sunday November 24, 2013 @07:51PM (#6791914)
What are you talking about? Every single transaction uses the bitcoin scripting language, and has since the genesis block. There are certain rules about which transactions are relayed based on the scripts they contain, but scripting certainly is an integral part of bitcoin as it exists today.
Re:Bitcoin – The Internet of Money by tedunangst on Sunday November 24, 2013 @08:04PM (#6791956)
Custom scripts aren't run. At this point, scripts are just exceptionally long identifiers for predetermined actions.
Re:Bitcoin – The Internet of Money by maaku on Sunday November 24, 2013 @08:10PM (#6791976)
Simply wrong. I suggest you actually look at the source code to bitcoind (start with script.cpp, and the validation methods in main.cpp/core.cpp which call it).
Re:Bitcoin – The Internet of Money by tedunangst on Monday November 25, 2013 @12:06PM (#6795264)
My mistake. I was under the impression the whitelist was quite restrictive, but maybe not.
Re:Bitcoin – The Internet of Money by nullc on Monday November 25, 2013 @03:16AM (#6793010)
Thats not correct. They're executed, and fancy scripts are sometimes used on the network.

Common wallet software just uses templates to create and decide which scripts are relevant to them— but the network itself absolutely does validate them.

Re:Bitcoin – The Internet of Money by skriticos2 on Monday November 25, 2013 @05:28AM (#6793346)
I have an issue with that particular scenario. What if your three hairs secretly hate you and just agree to declare you dead?

But I can see it working with some adjustments: make your contractually obliged lawyer part of the transaction and include his fees. This way he can't grab all the money for himself and your usurpers can't get to your money that easy.

I know, I'm pessimistic.

Re:Bitcoin – The Internet of Money by GotAnyMegadeth on Monday November 25, 2013 @08:05AM (#6793809)
If that's the case, give your money to a Cat charity rather than your hateful heirs