Wrt transactions, I don't understand why you need to send yourself the unspent BTCs. Why does it make things significantly easier?
A peek under Bitcoin’s hood: Writing a client that can create a transaction
41–50 of 67 posts
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#42>> 0xFACEBEEF and sent it 0.0005 BTC.. 1 month later and someone had stolen my 0.0005 BTC! I guess people must occasionally trawl through addresses with simple/common private keys. This made it worth reading the article. Such cyberpunk!
For fun[1], you can occasionally trawl through addresses with any private key ! http://directory.io/ [1] For various definitions of "fun."
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#43Earlier quoted context omitted.
With the comfort of a public blockchain at hand why not eliminate this case at address-creation time?
Let's do some back-of-the-envelope calculations. Let's say the probability of someone cloning a Velociraptor within the next 20 years is 1 in 1 trillion. Let's say that given a Velociraptor has been cloned, it has a probability of 1 in 1 million of escaping. Let's say that given a Velociraptor is on the lam, it has a 1 in 100 billion chance of breaking into your house. Let's say that if there's a Velociraptor in your…
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#44Hi Sam, If you're reading the comments, can you do this treatment but for Ethereum and the smart contracts built on top of it? I find that your article gives a good explanation especially for beginner to understand from the code perspective.
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#45Wrt transactions, I don't understand why you need to send yourself the unspent BTCs. Why does it make things significantly easier?
Because the miner almost always expects a fee, so why not just infer how high it is and you don't need to spend block bytes on it?
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#46Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#47Earlier quoted context omitted.
Because the miner almost always expects a fee, so why not just infer how high it is and you don't need to spend block bytes on it?
Ok, but the unspent output takes space as well. I think you could just replace it with the fee. Not sure if I'm missing something or if it was just an arbitrary design decision.
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#48Article says > This is also why address reuse in Bitcoin is encouraged as to sign a transaction you need to reveal your public key. If you don't reuse an address after sending a transaction from the address, you don't need worry about the private key of that address being exposed. Shouldn't that say "address reuse in Bitcoin is discouraged "? Otherwise I don't think I understand what he's trying to say.
Address reuse only becomes a problem in the theoretical case that someone can determine the private key from a signature. This would only happen if there was some sort of breakthrough in cryptoanalysis of elliptic curve cryptography, which while theoretically possible, is unlikely.
Bitcoin can soft-fork, allowing address generation with a different algorithm. It's not any sort of existential threat to Bitcoin. But it does require that you move your coins to a new address if you reuse an address, else you are vulnerable.
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#49Earlier quoted context omitted.
Ok, but the unspent output takes space as well. I think you could just replace it with the fee. Not sure if I'm missing something or if it was just an arbitrary design decision.
It has to do with the way transactions and the blockchain ledger works, reread the transaction part of the article and it might make more sense. Basically, transaction outputs can either be spent or unspent, you can't half spend an output (or perhaps more accurately, you can't spend a previous output twice).
Re: A peek under Bitcoin’s hood: Writing a client that can create a transaction
#50Earlier quoted context omitted.
Ok, but the unspent output takes space as well. I think you could just replace it with the fee. Not sure if I'm missing something or if it was just an arbitrary design decision.
It has to do with the way transactions and the blockchain ledger works, reread the transaction part of the article and it might make more sense. Basically, transaction outputs can either be spent or unspent, you can't half spend an output (or perhaps more accurately, you can't spend a previous output twice).