Bitcoin isn't something that you can learn in a few hours. Practically all of the mainstream media has "explained" bitcoin wrong, and this post is aimed at providing a somewhat technical read of how bitcoin works under the hood. So, let's get started!
Transaction At it's core, Bitcoin is about transactions. Transactions simply send bitcoins from inputs to outputs. What are inputs and outputs? Let's say I have 5 bitcoins. I send 4 BTC to an address, 1GLadosEkeAsLReqS3yQ51E1R3wVtbJCDF.
There is one input. It's the transaction ID of my 5 BTC, along with a signature. The signature is like a passphrase - only the person who knows the private key (password, generated and stored automatically in your wallet) to an address can spend it. It works because the bitcoin software verifies that the signature is valid before accepting a transaction, otherwise it goes straight to /dev/null.
There's two outputs. A 4 BTC output to the 1GLados [..] address I sent to. The second output is 0.9995 BTC, to another address I just newly generated - a change address. Inputs can be only fully spent, so if I want to spend 4 BTC, I will have to spend my full 5 BTC and send the rest back to me.
What about the 0.0005 BTC? The difference between input and output sum is the transaction fee. In this case, the 0.0005 BTC goes to the miner who minted this block.
The transaction ID? It is a hash of the entire transaction. Hashes are a one way cryptography function - they're effectively a random mapping function. Two different transactions will never have the same transaction ID - really.
What are inputs? They're former outputs! If I want to spend all of the 0.9995 BTC I have left, then my input would be the transaction ID of my first transaction, plus the output ID 2. (In this case, ID 1 is my 4 BTC to 1Glados, ID 2 is my change).
So an input is sent to an output which is then later referred to as the input when you want to spend the coins.
Blocks Blocks are simply a list of transactions. Miners run programs that tries to create blocks. They listen to the network, put the new transactions they heard about, and if they have a fee they're happy with, include it in the block they are working on. Now, to successfully mine a block, the hash (remember, hashes are basically random and unpredictable) of the block needs to start with a number of zeroes. Like this: 0000000000efc2r [..]. So a miner just repeatably tries to make a block with a hash that starts with a lot of zeroes.
How many zeroes? That is determined by the difficulty. The difficulty is automatically determined, and it's how fast the last 2016 blocks where mined. The difficulty makes sure that there's on average, a block every 10 minutes - regardless of how many people are mining for stability reasons. As hashing / mining for blocks is just luck, sometimes there might be four blocks in a minute, sometimes there might be no blocks for a hour.
When a transaction is included in a block, it gets 1 confirmations. The miner also gets a block subsidy to reward them (and distribute the remaining bitcoins), currently 25 BTC which halves every four years until it gets to zero. After a block is minted and announced to the network, miners will now try to build blocks off that block - referring to the previous block. This is how the blockchain works.
[Block 22730] -> [Block 22731] -> [Block 22732] [ORPHANED BLOCK] ...............\-> [Block 22731] -> [Block 22732] -> [Block 22733] [LONGEST CHAIN]
Huh? Let's say the latest block generated is 22730. We know it, not because it has an ID, but because it refers to a previous block (22729) which refers to a previous block which refers to a previous block... and if you go all the way back - you count 22731 blocks. That's how blocks are given numbers.
Now, the latest block generated is 22730. A miner generates 22731, with the 25 BTC subsidy going to them and transactions they heard about. Another miner also generates a block referring to 22730 as it's parent, with their own subsidy address and their own transactions they know. So now we have two blocks at height 22731. The blockchain now has a fork.
Some clients heard about the first block, while some clients heard about the second block. Now, a portion of miners are building upon the first block 22731, while the other portion is building upon (referring to) the second block 22731. A transaction included in the 'first 22731' isn't included in the other block. Some clients now see that transaction with 1 confirmation, while others see it as unconfirmed (0 confirmations).
Soon, a miner generated block 22732 with it's parent being the first block! The transaction included in that earlier block now has 2 confirmations to some users and services. Now, since this blockchain is longer (22732 > 22731), clients will now update their latest block to 22732. However - just then, another miner had some good luck and generated blocks 22732 (referring to the second block) and 22733 in less than a second. Clients see that 22733 > 22732, and moves to the second blockchain. That now becomes the main blockchain, with the first being orphaned.
So what happens? That transaction included in one block but not another? 2 confirmations to 0 (unconfirmed). Now, assume the person sending the TX is malicious, and has got a double spend (spend the same inputs, to a different output controlled by the attacker) into the second block which is now the main chain. Services or users who accepted the "2 confirmations" transaction.. just lost those coins. This is the danger with accepting transactions with few confirmations.
Generally speaking, it's safe to accept TXes with at least 6 confirmations. Of course, if you know someone personally or if it's from a reputable service, then you can accept it even when it's unconfirmed.
|
|
|
How can one enable to light / client mode in bitcoind referenced in issue #7?
|
|
|
This is a poll for Community Cryptocurrency Foundation's new coin. Regarding the mining aspect, do you want a coin that is CPU & GPU & ASIC friendly (same hashing algorithm as Bitcoin, ?), CPU & GPU friendly (scrypt, ?), or just CPU friendly (GPU hostile algorithm, tweaked parameters, or as dreamwatcher suggested, increased network hashrate would result in increased parameters, ?). I'm aware that ASICs can be made by scrypt, thanks, but it is much harder and existing ASICs will not be able to mine there.
|
|
|
This thread is for open discussion of the Community Cryptocurrency Foundation's coin. Ideas and proposals that are improvements or localized changes can be more easily implemented and tested, versus complete overhauls. Please keep this in mind when suggesting & discussing changes. Everyone is welcome, this coin would be decided upon by community consensus. Also, this is not just about proposing your ideas, but also discussing others. Feel free to +1 those you like, point out flaws that you can see, or stuff you don't want. LinksFoundation topic
|
|
|
Want to discuss ideas for the coin? See here!About the Community Cryptocoin FoundationThe Community Cryptocoin Foundation (C3) is a virtual entity that will develop and maintain a open source alternate cryptocurrency. The goals of the foundation are to solicit feedback from the community and create a coin that is designed based on consensus and in an open way - with changes that would not be compatible with the normal network. Foundation members are not directly compensated, but they and everyone benefit from contributing to a new alternate cryptocurrency. The Alt Coin CreatedThe goal of this alt coin isn't to be a quick clone and benefit the early adapters who mine at a difficulty of 1. It's have changes and improvements that are not compatible with the bitcoin network. The goal is something that improves upon (not completely changing) bitcoin via changes that would require a hard fork on the bitcoin network. Stages1. Brainstorming and Draft (current stage) 2. Implementation 3. Substantial testing on testnet 4. Launch 5. Continued development and support Joining the foundationThe foundation is currently looking for experienced C++ developers who have experience with the bitcoin codebase, as well as a limited number of community members. The development of this won't be closed - even if you are not a foundation member, you can contribute, but we'd need some organization to prevent chaos. To apply, please reply here with software projects you have worked on (+ github) and your skills, particularly cryptography. This thread is for discussion of the foundation itself. It is not a place to discuss this cryptocurrency.
|
|
|
If you have decent knowledge of the bitcoind codebase and would be interested in working on a alt coin that has some interesting changes, send me a PM.
EDIT: Please only PM if you have a decent knowledge of the Bitcoin code base!
|
|
|
Bytecoin Dice: (Because I'm too lazy to code a site for this). Largest win so far: 525 BTEAs soon as you send the coins, please also reply here with a payback address (because of an issue with newly mined coins), or if you are not registered email to admin@glados.ccLessthan 1 (6.25% odds, win 12.64x your bet) 8bmKwMYHK5Y7p4CogkSmcpngsaNSPdo9p1Lessthan 4 (25% odds, win 3.16x your bet) 8VWXQEbHaBjCUiQTJKnMH1M2VvTePdLLm3Lessthan 8 (50% odds, win 1.75x your bet) 8SqHS5PNyNdCbYby2H1YFuwjxm1Mi4tAbuLessthan 15 (93.75% odds, win 1.05x your bet) 8R24VQy7Gmdx85VVyLeN9GDHYR9p1LHvZ4Secret hash: 897a7ccc6a1f7a926da949b03e1ad6d11458436d82eab2b581eb2c40963205b8 Lucky number calculation: sha256(txid + my secret), first character (0-9 = number, a = 10, f = 15) Current bet limits: Min bet: 1 25 BTE Max bet: 100 200 BTE
|
|
|
Ian Bakewell runs the BAKEWELL mining asset on bitfunder. Information: https://bitcointalk.org/index.php?topic=104489.msg1145458#msg1145458This debt is for an asset loan to ian bakewell. 5906 BTC-BOND 59 bASIC-MINING 7,737 G.SDICE Interest was agreed upon at 3.5% weekly. Values obviously depend on the value of the assets loaned, but after interest it should be around ~130 BTC. Last conversation I obtained from March 16th: [1:46:03 PM] Ian James Bakewell: yeah im still alive, been out in the field. Home for the weekend, then back out. Ahh, what do you do? if you dont mind me asking Some ppl were concerned about you due to something with btcjam may or may not being late [1:47:14 PM] Ian James Bakewell: im a carpenter / scaffolder ... so usually I am working maintenenca on the rigs or out in the oilsands, working out on a friends farm right now modifying some trailers I hadnt seen you post lately so I just wanted to make sure you were alright. [1:48:23 PM] Ian James Bakewell: yeah i fucked up on the btcjam thing, didnt realize the payments would start immediately, so some see me as in default Obviously there is a risk of him not paying back, but if you believe ~30BTC in profit is worth this risk then send me a PM and I'll sell this debt. He has Avalon orders, which should mean he won't have any trouble paying back if he is honest.
|
|
|
You're playing a simple dice game, where the site generates a lucky number for each bet. The problem is, how do you know the site is generating random numbers fairly? How do you know they're not cheating or rigging the game? They could be secretly making you lose more often. The solution: Provably Fair games. HashingA hash is a message digest. It summarizes a message one way - you can't find out what the original message was from a hash, unless you brute force everything. Take "hello", the sha256 (an hashing algorithm) hash of that is "2cf24dba5fb0a30e [..]". Add a space to the end, "hello " and you get "5e3235a8346e5a4585f8c5 [..]". So you can see changing a tiny part makes it completely different - random mapping. The important part is hashes are one way, and are unpredictable. If I give you a hash of a very long string of numbers (say, 30 digits), you can't tell me what the original numbers are from the hash. (You actually theoretically can, by trying out all the numbers from 0000..00 to 9999..99, but it's implausible with a large search space). Hashes are also tamper resistant. I can't find another number that gives the same hash. So you know I can't change my responses. (You actually can, it's called hash collisions, but the chances of that happening are 8.64e-78 which means it won't happen in real life for all intents and purposes.) Provably FairnessLet's say I run a blackjack game. [Ad: play blackjack on bitzino] I could provide a hash of the deck. But that only tells the player I haven't changed the deck after showing the hash, I could swapped cards in the deck beforehand. To solve this, the player needs to be able to influence the results of the deck. Here's where provably fairness comes in. Outcome = hash(dealerSecret + playerSecret) Outcome can be determined in any way, as long as it's public. Maybe first four pairs of numbers in the outcome are winning lotto numbers. Maybe first bit == 0 means heads, first bit == 1 means tails. Doesn't matter, because SHA256 is effectively a random mapping function. The site hashes their randomly generated secret (they can generate it any way they wish, but if it is not random then the player will be able to beat the house and the site goes bankrupt) and shows it to the player. This way, the player knows the site isn't changing their secret after the player sends their secret to the site. The dealer secret sometimes is hashed and presented before each play (eg bitZino, BitVegas), or it is generated well in advance - one secret for each day. The hashes of each day's secrets are published, and the actual secret is revealed after the day is over (so players can't cheat). This is used on sites like satoshiDICE. For the player's secret, it could be generated in the browser via javascript, with an option for the player to specify it for themselves, or for blockchain games it uses the transaction ID. The transaction ID is just a hash of the transaction sent. The player needs to be able to change their secret (which you can do with transactions, by not sending a TX with a secret you don't like for some odd reason). No player secretsSome types of games don't need player secrets. They just need to hash their outcome and show you that before you play. Take coin flipping - IF you can bet on heads or tails. Sure, the site might have heads come up 55% of the time, but players will be able to perform statistical analysis and start betting on heads all the time and the house goes bankrupt. (Nitpick: Site can actually rig it, by giving heads more often if you bet more often on tails for example and vice versa, but that can be exploited with different bet amounts by the player -> site goes bankrupt) Another example is minesweeper/minefield. Mines are predetermined. You choose which squares to dig. In either of those examples, you don't need to influence the result with a secret - you already are influencing the result by deciding which square to click or heads/tails to bet upon. So those sites are provably fair without requiring secrets exchange.
|
|
|
Due to growing regulatory attention on Bitcoin, CoinLenders regrettably has decided to close it's service. As detailed on the site, everything was fictional. We have a demo instance of the coinlenders script available at https://coinlenders.com - it is fully functional and is the exact same script it was before.
|
|
|
This thread is not self moderated, so people can actually express their opinions! AMC is selling shares for at least 1 BTC with a 0.01 btc early bird special. Net Estimated Revenue/Year/Share 0.00708687 BTC That is 0.7% a year if you buy it for 1 BTC. Developing their own "Fast-Hash-240" miners Asset issuer ran a company that has being administratively dissolved Topic is self moderated
|
|
|
Just a warning: Trade Fortress (skype name: tradefortress) is not me. Has made a trade of Walmart GCs that is OK so far. He is apparently Wardrick (registered March 11st). While my name isn't unique, it's kinda shady to ride on someone else's rep. Not saying he's a scammer, but don't think it's me
|
|
|
Is anyone interested in a pictorial guide of various aspects of bitcoin - transactions, signing, how the blockchain works, cold storage wallets..
Might make a nice introduction to bitcoin
|
|
|
Currently, accessing moved topics require clicking on the (moved) link and then clicking on a link to the new location of the topic. It doesn't add more information (as people already know the topic is moved), so why not just redirect it instead of requiring another click?
|
|
|
Virtual currency makes Bitcoin sound inferior. People think digital currency are their bank accounts. Decentralized currency will confuse many people. Cryptocurrency has a "shady" connection to Joe Public. How about the term 'network currency' which brings in the point that it is maintained by the network?
|
|
|
When you write a book on LibreOffice Writer, you don't have to give 80% of your royalties to the developers. A currency that comes solely from a central issuing agency is no different to a forced, once off 100% tax. This applies even if the currency is currently being given away for free, because the issuing agency has said that they plan to sell the other half they're keeping themselves to pay CERTAIN developers (aka part of their company)... of an "open" and decentralized payments service.
|
|
|
|