Bitcoin Forum
May 25, 2024, 10:43:00 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 [66] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 ... 195 »
1301  Bitcoin / Development & Technical Discussion / Re: How does wallet.dat work? on: January 15, 2013, 06:03:06 PM
so basically, when you create the address there is a private key created that is stored in the wallet? how are addresses created?

First, you pray.  Then you pull 256 bits at random from the entropy source that you just prayed to.  These 256 bits are your private key.  You check that the private key is not in excess of the modulus of the field, which would make it insecure, if it is, you start over.  Otherwise, the private key gets encrypted (you have encryption enabled, right?) and stored in your wallet.  Then, an operation called EC point multiplication is done using that private key and a well known constant.  The result of that multiplication is a pair of 256 bit numbers (x and y), the pair together known as the public key.*  The public key is put into a special representational form and stored in the wallet.  Finally, the pubkey representation is hashed, and then hashed again.  The second hash is then encoded with a checksum (more hashes!), and the result is an address.

* side note, the y-coordinate can be reconstructed, so it isn't needed, and can be discarded, but we have to store 2 different flags.  This changes the representation, and thus the hash, meaning that a private key can have two different addresses.  One flag is a marker along with the private key, telling the software which of the two possible addresses to use, and the other flag is a parity indication, coded into the public key representation to resolve the ambiguity of the quadratic used to reconstruct y.
1302  Bitcoin / Development & Technical Discussion / Re: Is there a tutorial on how to fork bitcoin? on: January 15, 2013, 05:25:58 PM
Heh.  Forking is easy.  Just change anything important, and you will no longer be compatible with bitcoin.

If you want to be sure right from the beginning, just throw out the checkpoints and change the genesis hash.
1303  Bitcoin / Development & Technical Discussion / Re: Best chain / work definition/calculation? on: January 15, 2013, 05:20:45 PM
Each block has a target.  The target is the largest possible hash value that is considered valid for that block.  In work terms, it takes about (uint256_max-target) hashes to create that block.

Note that this is calculated based on the acceptable hash values that the block could have had, not the actual hash value.

Each block has a prevHash field in the header that tells what block it is building on.  Each block can only have one parent, but it can have many children.  Consider all of the blocks in a tree structure, leading up to the genesis block at the root of the tree.  That block is actually special, because it doesn't point to another block.  (Instead, it points to a newspaper headline.)

For each leaf node in the tree, calculate the sum of the work values (target inverse) for each block starting from the leaf and going to the genesis block.  The highest sum you get is the longest path through the tree, and that is the "best chain value", and the chain that corresponds to that is the best chain.

Note that there may be two paths (rarely more than two) with equal value.  In that case, the one you saw first is your best chain.  The ambiguity will be resolved shortly, as one chain or the other will grow faster.

In the log messages, new best is the start of the hash of the block that it considers to be the head of the best chain, height is the length of the path through the tree, and work is the sum of the work embedded in that path.
1304  Bitcoin / Development & Technical Discussion / Re: Double-Spending effects with accounts on: January 15, 2013, 05:00:26 PM
If the node reorganizes its chain, it rolls back everything in the removed fork, and then applies whatever it finds in the new fork.
If I bring up a new node, I assume that all the transactions that are not yet in a block are relayed to my node after it connects to a peer.  Somehow that peer knows about these transactions even though they are not yet in a block.  I assume this is because the peer holds transactions that it hears about in its memory pool.  Then if a block comes along that has these transactions in it, there is no longer a need to relay the transactions from the memory pool because they can be found in the relayed blockchain.  Does this mean that they are removed from the memory pool and no longer relayed to new nodes?

Now if that block is orphaned, and one of those valid (not double-spent) transactions from that orphaned block are not included in the new blockchain, how do new nodes learn about the transaction?

I've assumed that each node loads all the transactions from the orphaned blocks back into their memory pool and then compares those transactions against the blocks in the new blockchain to see which to remove (leaving behind in the memory pool all the transactions that were in the orphaned block but not in the new blockchain).  Is this an accurate view of what happens?

Yes, unconfirmed transactions are stored in a memory pool.  And yes, when a transaction ends up in a block, it is removed from the memory pool.  The block contains the transactions, so in a sense, relaying the block relays the transactions, but they aren't sent as transactions any more.

If the block is orphaned, the transactions in it will be added to the memory pool , and then the new chain will remove some fraction of them right back out.  I'm actually not sure if the node will then try to relay the transactions it has in memory.  It doesn't matter in the long run though, because each node checks its own wallet, and will try now and then to resend anything that it thinks it has spent, but hasn't seen yet in a block.  So, the sender is ultimately responsible for getting their stuff out, and if any other nodes help, that is nice, but not necessary.  If a node goes offline, eventually their stuff will expire.

The actual code may optimize things a bit by building intermediate sets or whatever, but you have the net effect right.  Any transactions that were valid before the reorg and are still valid after the reorg, but were not included in the new blocks, will still be valid, and should end up in the memory pool.  But it turns out that it would be just as valid to throw them away, because the original node will resend them.
1305  Bitcoin / Development & Technical Discussion / Re: Double-Spending effects with accounts on: January 15, 2013, 04:35:42 PM
The account balance stuff is really just a sum of individual entries.  If the node reorganizes its chain, it rolls back everything in the removed fork, and then applies whatever it finds in the new fork.  This happens pretty often actually, but has no net effect, because for the most part, the two branches involved are very similar.  In a double spend, one of the removed parts will not be found in the new branch, and will not come back.

In short, the numbers are always correct relative to the node's current idea of what the "best chain" is.  And yes, it has been tested extensively, both on the testnet, and in reality.
thanks, so im asuming that bitcoind is matching tx's to an account and calculates the sum of it for the balance, what happens if i used move to transfer part of the funds? these things are stored in the wallet.dat therefor these shouldnt be invalidated right?
is there some documentation about this?

move does not involve the network at all, it just creates entries in the internal ledger.  As such, they are not subject to rollback.

This could be troublesome for you if you are using move in response to unconfirmed, or barely-confirmed, transactions.  But it should be fine to use it for your own transactions.

Example.  I get a bunch of small payments from p2pool, but want to de-clutter my wallet.  So, I use the raw API to gather a bunch of them up and send them back to their own address.  But I use an account to keep track of my p2pool earnings, and now the system thinks I've just been paid again, so I use move to reduce my p2pool account by the same amount as the transaction that I just sent myself.  This is safe because I know that I'm not going to double spend against myself.
1306  Economy / Economics / Re: Regression theorem & Bitcoin revisited on: January 15, 2013, 03:55:26 PM
Regression is useful when you are trying to understand how we got from barter with useful objects to where we are today.

Now that we are here, it hardly seems necessary to theorize on why we would want to switch from less useful monopoly money to more useful monopoly money.
1307  Economy / Speculation / Re: in the future: sha256 gets cracked on: January 15, 2013, 03:47:55 PM
... Ok everyone uses it (the exploit) and difficulty rises by 1000x.

That is everyone except the ones with non-programmable asic chips.

True but there will be a very large incentive for an ASIC developer to release a chip which takes the crytographic flaw into effect.  Until that happens you could see (hypothetically) a period of time where the average GPU can out hash a high end ASIC.  

I'm doubtful that an ASIC developer would release a chip that makes use of a broken hash function. The chance would be too high that Bitcoin would switch to a new algorithm, rendering their new (and old) chips worthless.

Really so it would be better to see their product instantly become worthless, sales plummet to zero overnight, and all miners revert to using (cryoptographic flaw enhanced) GPU?  That is better than a (essentially 0.0%) chance that Bitcoin will switch to a new algorithm.  Note the clumsiness of the saying "Bitcoin will switch".  Is Bitcoin a person?  a corporation?  Who exactly would switch?  EVERYONE?  Nobody would decide to keep using "original bitcoin".  Imagine the confusion and chaos if for example MtGox supported original Bitcoin but bitpay supported "new bitcoin" and there were two incompatible forks of the reference client each supporting one version of the protocol and users had coins on both versions with initial balances at the point the blockchain permenently and irrevocably split.  Think that chaos might be bad for Bitcoin?  Think that might be worse than the non-problem of miners calculating hashes faster?

The hashing algorithm isn't going to change.  Anyone who understands the decentralized consensus that is Bitcoin understands that.   A flaw which allows someone to hash 1000x, 1,000,000x, hell 50 quadrillion times faster presents absolutely no risk to Bitcoin.  It simply means everyone will end up using the "flaw" (either back on CPU/GPU/FPGA or on some future ASICs) and difficulty will increase by an equivalent amount.  

When weaknesses like that are found, the world generally takes it as a warning sign.  It means that future weaknesses are very likely to be coming, and worse.  In that scenario, everyone would have a strong incentive to change.  But we'd also have lots of time to do it.

Look at MD4.  It is considered to be totally broken, and should not be used for anything, ever.  But really, none of the attacks on MD4 are even remotely useful for mining.  If we were using MD4 for mining, we would have years, probably decades really, to engineer a switch.

And a switch can be relatively painless.  As an example, we could all agree that ~2 years is plenty of time for everyone to upgrade their software, and ~4 years is enough to upgrade hardware.  That would mean that starting with block 3,150,000 the network would accept blocks with valid hashes under either SHA or the new algorithm, whatever we decide that may be.  And starting with block 4,200,000 the network would stop accepting blocks with SHA.
1308  Bitcoin / Development & Technical Discussion / Re: Double-Spending effects with accounts on: January 15, 2013, 03:16:22 PM
The account balance stuff is really just a sum of individual entries.  If the node reorganizes its chain, it rolls back everything in the removed fork, and then applies whatever it finds in the new fork.  This happens pretty often actually, but has no net effect, because for the most part, the two branches involved are very similar.  In a double spend, one of the removed parts will not be found in the new branch, and will not come back.

In short, the numbers are always correct relative to the node's current idea of what the "best chain" is.  And yes, it has been tested extensively, both on the testnet, and in reality.
1309  Bitcoin / Development & Technical Discussion / Re: Multi-party Transactions on: January 15, 2013, 03:06:43 PM
The actual signature prep stage is complicated, but basically with SIGHASH_ALL alone, you can't change any important part of the transaction without invalidating the signature.  You can neither add, nor remove, nor reorder the inputs.  Ditto with the outputs.

Keep in mind that the hash flags are a property of the signature, not properties of the transaction.
1310  Bitcoin / Development & Technical Discussion / Re: How does wallet.dat work? on: January 15, 2013, 12:35:07 PM
But how does then the addresses work:

1) I have 1Eu6P1eRSewoqf8GZcYoBtMtXG1865Umjh, it has never received any money. How do I prove ownership of this address? Why can't somebody just claim to own this address?

2) If I receive money on this address without having bitcoin client running, will that money just magically appear when I launch the bitcoin client in the future (IE is it the ownership of the address that is stored in the wallet or the transactions/coins?)

Anyone can claim to own the address.  Smiley

But if you really have the private key for it, only you can spend coins sent to it, and only you can sign messages using that key.  Those are really the same thing.  A bitcoin transaction is really just a special message to be signed.

Yes.  The important thing is knowing the private key.  The way the client works internally isn't so important, but basically those coins are yours as soon as the transactions is confirmed.  When your client gets back online and catches up on the block chain, then it will update the balance that it shows you.
1311  Bitcoin / Development & Technical Discussion / Re: How did this address come into being 1BitcoinEaterAddressDontSendf59kuE? on: January 15, 2013, 05:16:22 AM
. . . Start with a 256 bit counter, set to any number you like.  On the secp256k1 curve, do an EC multiply of the value in the counter by the point at (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8).  Now hash that result in RIPE-MD160.  If you got 0x759d6677091e973b9e9d99f19c68fbf43e3f05f9 as the result, you found the pubkey for the bitcoin eater address.  If not, increment the counter and try again . . .
I think you missed a step.  After determining the public key from the private key, isn't the resulting public key hashed using SHA-256, and then that result is hashed using RIPEMD-160 to generate the address?

So isn't this more accurate?

. . . Start with a 256 bit counter, set to any number you like.  On the secp256k1 curve, do an EC multiply of the value in the counter by the point at (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8).  Now hash that result in SHA-256.  Now hash that result in RIPE-MD160.  If you got 0x759d6677091e973b9e9d99f19c68fbf43e3f05f9 as the result, you found the pubkey for the bitcoin eater address.  If not, increment the counter and try again . . .

Oh, probably.  I didn't check my notes on the process, I just happened to have the file with the curve constants open.  It doesn't change anything fundamental either way.  And no one is reading this thread for a tutorial on how to create addresses, they already know to look elsewhere.

. . . figure we double the amount of work done in each year.  That means one bit per year, which means 90 years between today and 2160 . . .
While you might be able to imagine that the speeds necessary to calculate hashes and/or perform EC multiplication might double each year, you'll eventually find that you run into a limit in the amount of energy required to change a binary state.  When you multiply the minimum possible amount of energy required by the number of bits that have to have their state changed to perform the necessary calculations, you encounter a situation where you can't increase speed any further because all the available energy is used at the current speed.  When that energy requirement is higher than the total energy output of the sun, you can feel pretty secure in saying that it won't be possible to calculate any faster.

For the next 50 or 100 years or whatever, the issue is going to be engineering more than physics.

The Schneier quote is here if you want to read it.  The problem really is in the 2160.  A Dyson sphere around the sun for a year is plenty to iterate 2160, because 160 is puny compared to 256.  In physics terms, I'm not sure how many operations are required for the other parts of finding an address.  At the limits, the resources in our solar system appear to be capable of breaking 160 bit systems, but we are far, far from approaching those limits.  Maybe our grandchildren, or great-grandchildren will ask us some day if saving 16 bytes was worth it.  But I'm not worried about it tonight.
1312  Bitcoin / Development & Technical Discussion / Re: How did this address come into being 1BitcoinEaterAddressDontSendf59kuE? on: January 15, 2013, 03:12:47 AM
Don't wanna discuss more with same sort of people that not so long ago claimed human flying and space travel are impossible.

This is different.

Start with a 256 bit counter, set to any number you like.  On the secp256k1 curve, do an EC multiply of the value in the counter by the point at (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8).  Now hash that result in RIPE-MD160.  If you got 0x759d6677091e973b9e9d99f19c68fbf43e3f05f9 as the result, you found the pubkey for the bitcoin eater address.  If not, increment the counter and try again.

Do that 2160 times, and you have a decent chance* at finding it.  And every other address.

Of course, the entire bitcoin network has done less than 270 hashes since it started.  We can't expect to do much better than ol' Gordy predicted so long ago, but figure we double the amount of work done in each year.  That means one bit per year, which means 90 years between today and 2160.

Except that EC multiplication is harder than hashing.  And that we are very unlikely to beat Moore's law in the long run.

Still, the 160 bit hash is by far the weakest link in bitcoin, by a factor of 296 and I suspect that they will gradually fade from favor over the next 50-100 years.

* Only a chance.  We don't have know that the output of RIPE-MD160 is evenly distributed.  It is possible that there is no input that gives that output, and more likely, it is possible that no bitcoin pubkey gives that output.
1313  Bitcoin / Bitcoin Discussion / Re: Bitcoin: A Technical Introduction, by Brian Warner on: January 14, 2013, 07:03:41 PM
Starting on slide 7, he goes into the steps needed to make bitcoin.  He moves from a centrally issued ledger system into cryptographic currency, and then into decentralization.  After that, he covers the block chain.

He very clearly groks bitcoin and the history of electronic and cryptographic currency systems, enough so that I wish there was a video.  If he's even a halfway decent speaker, the presentation that goes with these slides is probably excellent.

Ahh, here it is:  http://vimeo.com/27177893.  I haven't watched it yet, going to now.
1314  Bitcoin / Bitcoin Discussion / Re: Bitcoin: A Technical Introduction, by Brian Warner on: January 14, 2013, 12:25:12 PM
Excellent slide show, covers a lot of important stuff.
1315  Bitcoin / Bitcoin Discussion / Re: The 9 principles in Bitcoin on: January 13, 2013, 02:04:34 AM
Are you saying the Linux foundation is the "central authority" of the Linux platform?

Yes? Well at least the kernel. It was actually my point. Linus does decide the direction of Linux.

http://www.oss-watch.ac.uk/resources/benevolentdictatorgovernancemodel

Ugh.  Linus is benevolent dictator for life of the project that bears his name.  However, if anyone doesn't like his decisions, they can fork.

In bitcoin, the situation is totally opposite.  If anyone wanted to make a big change, they would be the fork, and they'd have to convince all of us to switch.  Bitcoin is decentralized in the sense that no one has the capacity to make big decisions for the network.
1316  Bitcoin / Bitcoin Discussion / Re: The best Bitcoin cold storage? on: January 12, 2013, 10:37:58 PM
. . . You would be able to fashion your own x-ray machine using parts from old microwaves.
Huh

This seems unlikely.

As I understand it, microwaves have a wavelength of between 1 millimeter and 1 meter (longer wavelength than visible light). x-rays have a wavelength between 10 nanometers and 0.01 nanometers (shorter than visible light).  Microwaves mostly tend to be absorbed by the body resulting in a build up of heat.  X-rays mostly tend to pass through a body allowing an image to be captured on a film placed on the opposite side (and not building up much heat). I doubt you could fashion an x-ray machine from a microwave anymore than you could cook your food with an x-ray machine.

More energy needed for the higher wavelength of x-rays. You can make x-rays in a similar fashion to how a microwave works. ie by smashing electrons against a metal target.
Just need to up the potential used in your accelerator.
Do this by altering the coil windings or using two transformers etc. Just make sure your rectifier can handle the voltage increase.

A cathode ray TV might make more sense actually since the voltages are already alot higher.

Think a microwave is only about 2000 volts. A TV might be like 20,000 v I guess. In fact TV's have leaded glass in their screen for this reason. It can be dodgy to turn up the voltage too high when adjusting things inside due to x-ray dangers.

Hiding your bitcoin internally would keep it from the man. A laser could be used to burn the code into your retina!

Dude.  That is NOT how a magnetron works.  Magnetrons are oscillators, not accelerators.  And the frequency is controlled by the geometry of the resonant cavities, not the voltage.  If you increase the gate voltage, you might kill yourself, but you won't get x-rays.

Shut up before someone gets hurt.
1317  Economy / Economics / Re: us fiscal cliff: what is it? on: January 12, 2013, 03:11:36 PM
. . . When consumer spending slows, the government must step in to prevent the end of the world.  And governments don't have assets, they borrow.
If this is the reason behind borrowing, then why would they continue to borrow in times when consumer spending is growing?  Seem like there must be more to it than this.

Because spending free money is addictive.  If you could get fame, power and women by spending other people's money, would you stop doing it?
1318  Bitcoin / Bitcoin Technical Support / Re: Help with windows 8 sleep mode on: January 11, 2013, 09:38:25 PM
You are correct, I just disabled sleep mode and set it to turn off the screen only.
that still uses electricity for the monitor; it just sends a blank signal

http://en.wikipedia.org/wiki/VESA_Display_Power_Management_Signaling
1319  Bitcoin / Development & Technical Discussion / Re: New vulnerability: know your peer public addresses in 14 minutes on: January 11, 2013, 02:49:57 PM
Dan Kaminsky demonstrated that it is pretty easy to tie bitcoin addresses to IP addresses by watching the network last year.

In practice this is difficult to do accurately due to network latency and the fact that many nodes don't accepting incoming coming connections.

Using Sergio's method you could for example log the first 10 nodes to relay a transaction then pole each node with a penny flood transaction in order to accurately determine which one was the true sender. I may have a go implementing this to improve blockchain.info's relayed by accuracy.

No, the conditional probability that a node was the origin of a transaction given that you first saw it from that node is rather small, even when you have a large number of connections.

I've checked the transactions first seen by blockchain.info from my personal node, and virtually none of the transactions that you first received from me are actually from me.

As an aside, this attack wouldn't find my wallet anyway because I run multiple nodes, and the one node that talks to the outside world has an empty wallet.
1320  Economy / Service Announcements / Re: BitBet open beta. on: January 11, 2013, 12:14:05 PM
You should really get the financial statements and releases marked as free articles so that people can read more than a few of them each week.

Interesting IPO, by the way.  It was pretty obvious which guys had done their math up front, but I wasn't expecting it to get anywhere near 1.03177.

I don't think anyone did. At least not as far as I know.

Anyway: Trilema allows five free reads a week. In general this should be enough for anyone to read such announcements for free (in the average month there's the MPOE statement, that's one, and possibly a couple others such as an IPO, some tech announcement, w/e). Obviously if you use those free credits to read something else you're on the hook, but it's not really proper to say you're being asked to pay for the announcements.

I made the mistake of reading some old financial statements this week.  I guess from now on, I'll just have to make copies of them.  I thought about paying a buck for 1000 credits, but I can't find any mention anywhere of how many credits each article costs.
Pages: « 1 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 [66] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 ... 195 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!