{"issue":{"state":"open","created_at":"2011-11-28T22:10:12Z","updated_at":"2011-12-03T02:21:44Z","comments":2,"user":{"gravatar_id":"66f4207463fc19e65675b67f75d494ee","id":331997,"url":"https://api.github.com/users/gavinandresen","login":"gavinandresen","avatar_url":"https://secure.gravatar.com/avatar/66f4207463fc19e65675b67f75d494ee?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"This implements BIPS 11, 12, and 13 :\r\n\r\n* OP_CHECKMULTISIG transactions supported, for up to 3 public keys, as 'standard' transactions\r\n* OP_EVAL (same opcode as OP_NOP1) as a new opcode\r\n* New OP_EVAL-based 'standard' transaction type and Bitcoin address\r\n* Blocks mined with this patch will have the string \"OP_EVAL\" in the coinbase scriptSig, so we can tell when a majority of miners support it.\r\n* New RPC command to add a multisignature-required address to the wallet: addmultisigaddress <nrequired> <'[\"key\",\"key\"]'> [account]  (enabled only for use on the -testnet for now)\r\n* The 'validateaddress' RPC command shows the full public key of addresses in your wallet\r\n* Internal changes so if you own all the public keys of a multisignature transaction, then you are able to spend the transaction (and the amount shows up in your balance, and the transaction is listed in listtransactions output)\r\n\r\nThere is still a lot of work to be done to get multi-device transaction authorization or multi-party escrow; in particular, this pull doesn't include any support for gathering transaction signatures from multiple places or showing the user transactions that they are involved in but can't spend without getting more signatures from other devices/people.  It just implements the lowest-level support, along with the bare minimum needed to test to make sure the lowest-level stuff is working properly.\r\n\r\nTo test / play with:\r\n\r\n1. Run bitcoind -daemon -testnet\r\n2. Get public keys from 2 or 3 new bitcoin addresses-- e.g. run this twice:  ./bitcoind -testnet validateaddress $(./bitcoind getnewaddress)\r\n3. Generate a new multisignature address using the public keys from validateaddress-- ./bitcoind addmultisigaddress 2 '[\"...public_key_1...\",\"...public_key_2...\"]\r\n4. Send funds to that address --  ./bitcoind sendtoaddress ...result of addmultisigaddress... 11.11\r\n\r\nStep (4) can be done from another ./bitcoind, either on another machine or same machine, different -datadir, as long as it is running this patch. The coins should show up in the wallet, be listed in listransactions, and you should be able to spend them as if they were single-signature transactions.\r\n\r\nStep (2) could be done on two or three different machines, but without more work you'll have no way to spend coins sent to the resulting multisignature address.\r\n\r\n","assignee":null,"id":2374142,"pull_request":{"patch_url":"https://github.com/bitcoin/bitcoin/pull/669.patch","html_url":"https://github.com/bitcoin/bitcoin/pull/669","diff_url":"https://github.com/bitcoin/bitcoin/pull/669.diff"},"number":669,"labels":[],"title":"Multisignature and OP_EVAL support","html_url":"https://github.com/bitcoin/bitcoin/issues/669","closed_at":null,"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/669","milestone":null},"action":"created","comment":{"created_at":"2011-12-03T02:21:44Z","updated_at":"2011-12-03T02:21:44Z","user":{"gravatar_id":"66f4207463fc19e65675b67f75d494ee","id":331997,"url":"https://api.github.com/users/gavinandresen","login":"gavinandresen","avatar_url":"https://secure.gravatar.com/avatar/66f4207463fc19e65675b67f75d494ee?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Nice catch on the listtransactions regression.","id":2998553,"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/2998553"}}