1021
|
Alternate cryptocurrencies / Altcoin Discussion / Re: What do alt coin developers think about BIP 11/12/13 ?
|
on: November 04, 2011, 09:10:38 PM
|
I will look into adding this to Litecoin. Gavin, what are the gotchas? Is there a possibility of a chain fork from this change? And what I should I pay attention to when testing this on the testnet. And let me know if you want to help test it.
See BIP 12, the Backwards Compatibility section, for gotchas-- block chain forks are possible if you're not careful. They won't happen by accident, but if you assume there is an attacker that just wants to cause inconvenience by forking the chain then you have to roll-out the change carefully. To test on testnet: Apply the patch. Then use the extended 'validateaddress' RPC command that is part of the patch to get public keys for several of your bitcoin addresses (use getnewaddress to generate new ones if you need to). Combine those public keys into multi-signature addresses using the new addmultisig RPC command: addmultisigaddress <nrequired> <'["key","key"]'> [account] So for a 2-of-3 escrow you'd call: addmultisigaddress 2 '["...pkey1...","...pkey2...","...pkey3..."]' It returns a multisignature bitcoin address. You'd do that on all the machines involved in the escrow transaction. To fund that multisignature address, you just use the normal sendtoaddress (or sendmany or sendfrom) RPC commands, using the address returned from addmultisigaddress. To spend those funds... more patches are needed. You CAN actually spend them if you have ALL the private keys in your wallet; if you do, then the multisignature transaction is treated just like any other transaction you've received, and will show up as part of your wallet's balance, in listtransactions output, etc. Modifying the patch so that you can spend them if you have <nrequired> keys is probably the right thing to do, although the security implications of that for shared-wallet providers needs to be carefully thought through. And in almost all of the real multisignature use cases, a RPC calls to create and sign partially-signed transactions is the right thing to do, NOT importing private keys from the other people involved in the transaction. See: https://gist.github.com/1321518 and https://bitcointalk.org/index.php?topic=39471.msg597785#msg597785 for a proposal on how to do that.
|
|
|
1024
|
Bitcoin / Pools / Re: Mining pool support for multisignature transactions
|
on: November 03, 2011, 03:45:30 PM
|
The next release of poolserver, due in a few days, will be generating blocks internally but using a bitcoind as a trusted source of verified transactions. So pool ops using PSJ will be able to make the choice by running a daemon that does or doesn't accept these transactions.
Great! My only concern is whether bitcoinj will have a fit trying to parse these new transaction types.
Unless Mike messed up his implementation of the OP_NOP1 and made it do something other than be a no-op, there should be no problem (OP_EVAL re-defines OP_NOP1 to do stuff instead of doing nothing, but all OP_EVAL transactions are valid if the OP_EVAL is interpreted as a no-op). What would make things easier though would be if someone could publish a set of test transactions both for testnet and production.
Publish how? I already made a couple of testnet transactions using OP_EVAL; I will make a few on main net (assuming Luke doesn't change Eligius to reject OP_NOP1 transactions). And I wrote thorough unit tests that create valid/invalid OP_EVAL transactions. And also if there was some kind of automated script broadcasting some sample transactions on testnet everytime there's a block change.
What do you mean by "everytime there's a block change" ? Can you ensure that there's no rules that mandate 'OP_EVAL string as a vote' should be put in a particular part the coinbase input script. MM headers have to appear in the 1st 20 bytes (why I don't know) and that space is getting a little cramped already so it would be much better if it could be put at the end of the script.
"OP_EVAL" can be anywhere in the coinbase, I'll probably write a little tool using bitcointools to look at OP_EVAL adoption over time will make sure it doesn't care where the string appears.
|
|
|
1025
|
Bitcoin / Development & Technical Discussion / Re: BIPs 11, 12 and 13: multisig txns, OP_EVAL, and OP_EVAL addresses
|
on: November 03, 2011, 02:46:11 PM
|
I propose 3 step phase plan:
step 1. Protocol specifics are definitively agreed upon. No going back after this step. Takes as long as it has too, but ideally 1 month. step 2. Implementations are all synchronised and ready with branch/patches ready to accept the new changes. Testing needs to be done. 1 month. step 3. A date is set for the switch-over. Packages are released and all merchants/users/vendors/miners are given a switch-over date before the change becomes live. Enough time needs to be give for everybody to change over. I propose 2 months.
After this and with enough testing, the OP_EVAL can be introduced into the GUI and such after a while. This puts the total timeframe at around under 6 months.
The beauty of OP_EVAL is it is backwards-compatible with old merchants/users/vendors/miners; there is no reason to require that they all switch over at the same time, they can continue to operate with their old software for as long as they like (assuming all this happens, there will be increasing pressure over time for them to upgrade so they can pay to newfangled BIP 13 bitcoin addresses).
|
|
|
1026
|
Bitcoin / Development & Technical Discussion / Re: BIPs 11, 12 and 13: multisig txns, OP_EVAL, and OP_EVAL addresses
|
on: November 03, 2011, 02:36:52 PM
|
I thought I'd transplant Gavin's post to here, rather than derail the original thread. What's the timeline for enabling relaying of OP_EVAL transactions and for a client that can generate OP_EVAL transactions?
Good question. The timeline for clients is less critical, as long as a majority of hashing power will properly interpret OP_EVAL clients that relay/generate those transactions can be rolled out anytime after Feb 1. So I'd suggest releasing a 0.5.something or 0.6 after the Jan 15 "are the big miners on board" evaluation that turns on OP_EVAL support Feb 1. Also, when will clients be patched to start rejecting blocks with the OP_NOP1 interpretation of OP_EVAL?
Same time. I presume that, if all goes well, then on the 1st of Feb 2012, blocks containing OP_EVAL will suddenly be interpreted in the new stricter fashion than when it was OP_NOP1. We know that GetTime() seems to return widely disparate results over the bitcoin network. Are we confident that problems are not going to arise because of the pseudorandomly timed nature of the change of interpretation of the opcode?
Another very good question. The timestamp in the block will be used to determine whether OP_NOP1s in the block are interpreted as no-ops or OP_EVAL when checking block validitity (wall-clock GMT time will be used to figure out if the node should relay/mine OP_EVAL transactions). I'll double-check my code, I think I did NOT code it that way. Majority hashpower support for OP_EVAL is required before changeover. It's conceivable that something might go wrong after OP_EVAL transactions are mainstream which might make miners revert to interpreting OP_EVAL as OP_NOP1. If OP_EVAL loses majority hashpower support then the bitcoin system keeps going but with considerable damage to reputation, prospects and some people's wallets. Has there been any consideration of this possibility?
That seems exceedingly unlikely; once the big mining pools switch, there is a very strong incentive for the smaller pools to switch, too.
|
|
|
1028
|
Bitcoin / Development & Technical Discussion / Re: Tons of non-standard scripts!
|
on: November 02, 2011, 08:45:07 PM
|
OP_0 pushes an empty array of bytes onto the stack, so you should RIPEMD160(SHA256([])).
(thanks go genjix for setting me straight, I'd been thinking OP_0 pushed a 0x00 onto the stack, and that isn't right. The scripting engine knows that an empty array is 'False', and FIPS standards make sure hashing empty strings/arrays is well-defined...)
|
|
|
1029
|
Bitcoin / Pools / Mining pool support for multisignature transactions
|
on: November 02, 2011, 07:56:40 PM
|
I just sent this email to several of the top mining pools; I'm also putting it here to get wider feedback from "the mining community":
I'm writing to the top mining pools to see if you will support Bitcoin Improvement Proposals 11, 12, and 13: https://en.bitcoin.it/wiki/BIP_0011 https://en.bitcoin.it/wiki/BIP_0012 https://en.bitcoin.it/wiki/BIP_0013I think they are critical to making Bitcoin more secure for people who have never heard of GPG or AES. They don't solve the wallet security problem, but they put in place low-level mechanisms that will allow higher-level services that DO solve the "computer virus stole my bitcoins" problem. Once multi-signature transactions are supported by the network, Bitcoin wallets can be coded to contact "Wallet Protection Services" to get a second signature/authorization before coins can be spent (details of exactly how the Wallet Protection Service and the client communicate will be in future BIPs). They will also make it possible to create escrow services that cannot spend the bitcoins in escrow among other interesting use cases. This same feature might be used to keep your pool's bitcoin balances more secure, also-- you could run your own Wallet Protection Code on a separate machine that (perhaps) required manual intervention before providing a second signature on pool payouts if some unusual payout activity was occurring because somebody managed to break your security and get access to the pool's wallet. I'm proposing extreme caution rolling out support for multi-signature transactions, and, especially, supporting the OP_EVAL feature that allows more secure bitcoin addresses-- and that is why I'm asking you whether or not you're willing to patch your mining pool software sometime in the next two months to support the new 'standard' transaction types. I've already written an implementation for Bitcoin 0.5 that will soon become a PULL request. The new features are backwards-compatible with existing miners and clients, but we do have to be careful when rolling out OP_EVAL because an attacker could create non-standard transactions and try to split the block-chain. Here is the timeline I've proposed in BIP 0012 : Now until Jan 15, 2012 : miners update their software, start including CHECKMULTISIG and OP_EVAL transactions in blocks they mine, and indicate support by including the string "OP_EVAL" in the blocks they produce. Jan 15, 2012: we assess support for the new feature by looking at the percentage of blocks that contain "OP_EVAL". If a majority of miners are not supporting it, then deployment will be delayed or cancelled (a setting in bitcoin.conf controls the switchover date, with the default being Feb 1, 2012). Feb 1, 2012: assuming there was majority support on Jan 15, OP_EVAL is fully supported/validated. -------------- Questions I have for you: Is there anything I can do to make it easier for you to support these new features? For example, would patches against an earlier version of bitcoind be useful? (if so, what version?) Is the timeline reasonable? Questions you might have: What happens if you don't support these new transaction types but a majority of other miners do? If you do not put non-standard transactions in your blocks, then nothing will happen. If you DO put non-standard transactions in your blocks, then you would be vulnerable to an "invalidate blocks under the new rules" attack, where somebody sends you a transaction that is valid under the old interpretation of the OP_EVAL opcode (which is a no-op) but not valid under the new rules. Your miner would put that transaction in blocks that you mine, and all of your blocks would be rejected by the majority of miners. What happens if you DO support these new transaction types but a majority of other miners do not? All transactions that you put into blocks will be valid under both the old rules and the new rules, so there is no danger that blocks you create will be rejected by the network. There IS a danger that the rest of the network will accept a block under the old rules that you consider invalid under the new rules; that is why I am proposing that we evaluate acceptance of the new rules on January 15. Can you support one of the BIPs but not all of them? Yes-- supporting CHECKMULTISIG as a standard transaction type (BIP 11) can safely be deployed right now, there is no danger of a block-chain-split, etc. BIPs 12 and 13 will let users (or mining pools) use short bitcoin payment addresses to have bitcoins go directly into secure, multi-authentication-required-to-spend wallets.
|
|
|
1033
|
Bitcoin / Development & Technical Discussion / Re: Tons of non-standard scripts!
|
on: November 01, 2011, 05:55:21 PM
|
1. TxOut scripts are not evaluated until they are spent-- those are probably unspendable TxOuts.
2. The inputs must be valid (you're looking at coinbase txns with no inputs though). Again, TxOuts aren't evaluated until they are used as inputs in another transaction; as long as they deserialize properly they'll be accepted.
3. I don't know of any other bugs in the scripts ops, but I don't know that anybody has written thorough unit tests for them (anybody looking for a good get-your-feet-wet project that could be a good one to tackle; there are already unit tests for CHECKMULTISIG in the repostitory....).
|
|
|
1034
|
Bitcoin / Development & Technical Discussion / Re: 0.5 release progress update
|
on: November 01, 2011, 05:40:40 PM
|
Another quick update:
Wladimir figured out what was breaking the Win32 cross-compiled builds (one of the 'hardening' gcc flags is apparently busted for mingw32 cross-compiles), so Linux and Win32 binaries of a rc2 should be available soon.
Yet another hurdle was thrown in my way by Mother Nature Saturday night; we got over a foot of snow, and my house and home office still have no power. Mac builds won't be available until my main machine has power...
|
|
|
1035
|
Bitcoin / Bitcoin Discussion / Re: Motley Fool's new Bitcoin Article
|
on: November 01, 2011, 05:25:36 PM
|
"Following a 1,000,000% Gain" as a headline is still a fault. I suppose if you can document that someone bought 3000 Bitcoins for $.10 early and then someone sold 3000 bitcoins for $100,000 at a peak that could be a fair statement...
One million percent is a 10,000 times rise in price. The first trades on bitcoinmarket.com were at a price of something like 0.001 US dollars; 10,000 times that would be $10, and lots of bitcoins traded over $10 earlier this year. So I think the Fool got it right.
|
|
|
1036
|
Bitcoin / Development & Technical Discussion / Re: Time for another testnet reset?
|
on: October 31, 2011, 05:36:18 PM
|
Auto-reset once a month... very interesting idea.
It'd make a mess of peoples' testnet wallets-- they'd be full of orphaned 0-confirmation transactions. But deleting your testnet wallet once a month wouldn't be that big a burden, and that should prevent people from trading testnet coins as if they were worth something.
Somebody who wanted to be annoying could still drive up difficulty after every reset and make life miserable for anybody testing their new exchange or merchant software, though.
The problem with just doing more frequent difficulty adjustments is somebody with lots of hashing power can still over-write huge parts of the chain whenever they like. I suppose you could argue that bitcoin services should be written so that they can handle suddenly getting a 600-block-long chain-reorg... but that just does NOT happen on the real bitcoin network.
More hare-brained thoughts: could automatic block-chain lock-ins for the testnet be implemented somehow? Fetch a block depth/hash pair from a website somebody volunteers to create (auto-updated once a day...) ?
|
|
|
1037
|
Bitcoin / Development & Technical Discussion / Time for another testnet reset?
|
on: October 29, 2011, 03:08:04 AM
|
I'm starting this thread to brainstorm rule changes for -testnet and talk about a possible testnet reset for the next release.
The testnet isn't currently usable, because hashing power on it is unpredictable. Difficulty shoots up because somebody decides to throw lots of machines at it, then they leave and it takes MONTHS for difficulty to drift back down.
Here's a shot at hair-brained rules for the testnet:
+ Fix the difficulty at 1.0, no matter how many people are mining.
+ Clients reject new blocks with timestamps more than 1 minute different from their time (implies: you have to have an accurate system clock to play with the other nodes on the testnet, otherwise you'll be on your own fork).
+ Clients reject new blocks if their timestamp is less than 2 minutes after the previous best-block's timestamp.
+ Clients prefer to build on blocks that include more memory-pool transactions, instead of taking first-block-they-receive.
Goals behind those rules: Always easy to mine Limit block-chain growth (max 1 new block every 2 minutes)
So: could a griefer make life miserable for the rest of us under those rules? What would happen if there were five or six people with a fair bit of hashing power all trying to mine as fast as possible on testnet? (lots of block chain splits, I think, but that's probably just fine on testnet)
|
|
|
1040
|
Bitcoin / Development & Technical Discussion / 0.5 release progress update
|
on: October 28, 2011, 06:32:50 PM
|
Quick update on why there is no final 0.5 release out yet: Short answer: because I'm really paranoid about bitcoin binary builds, and the switch to Qt means a change in the way the builds are done. Long answer: Linux builds should be all set; the 'gitian' trusted build process works nicely. Windows builds are being difficult; we need a gcc expert to help debug the 'gitian' cross-compile (see https://github.com/bitcoin/bitcoin/pull/587 ). Unless somebody steps forward and says "I'll support compiling bitcoin-qt/bitcoind with Visual Studio) I'm going to remove src/makefile.vc and make sure the readmes say that only the mingw toolchain is supported. Mac builds were slightly broken for the 0.4 release (they don't run on OSX 10.5-- you need 10.6 or greater). I'm "recompiling the world" to hopefully fix that, and hope to have mac binaries available soon (let me know if you can help test, especially if you have a 32-bit Intel mac running 10.5). On my wish list for builds (anybody want to volunteer?): I think it'd be spiffy to have a .pro file to compile bitcoind; maintaining N different makefiles is annoying and error-prone.
|
|
|
|