h1169583mvrhtnet

Schwarzbaer and mentazoom on BTC and ETH

Jun 23rd, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.21 KB | None | 0 0
  1. 1. Hashing and SHA
  2.  
  3. Hashing takes any input and obfuscates it, creating a hash. When you mine Bitcoin, you essentialy hash some inputs hoping that the pseudorandom outcome matches the current mining difficulty (more on that below).
  4.  
  5. [21:19:06] <Schwarzbaer> SHA2 is a family of algorithms, with SHA256 being the member of that family that creates 256 bit outputs.
  6.  
  7.  
  8. 2. MINING
  9.  
  10. A Bitcoin transaction has to be "mined" to process. More miners means more competition for the mining rewards, but not shorter transaction times! That's because mining difficulty adjusts to the network's hash rate.
  11.  
  12. [21:21:18] <Schwarzbaer> Okay. Someone wants to mine a block. For that purpose, he takes a bunch of transactions (if he wants to), and creates a Merkle tree (I can explain later; for the moment, just think "he hashes them"), and creates a header for the block: a bunch of metadata, the hash of the last block, the root of the Merkle tree (the hash of the txs), and so on. Also, a nonce, with for the purposes of this explanation is just a
  13. [21:21:18] <Schwarzbaer> random number.
  14. [21:21:31] <Schwarzbaer> All in all it's 80 byte of data, I think.
  15. [21:22:36] <Schwarzbaer> There is a difficulty that has been set by the last block, which is a number between 0 and 2^256 (I think; not 100% sure if that's exact, but it's sufficiently exact).
  16. [21:23:07] <Schwarzbaer> A block is only valid if the hash of its header is smaller or equal to that difficulty.
  17. [21:24:25] <Schwarzbaer> So to mine, you set the nonce to some random number, hash the header, check if the block is valid (in this regard), and if it is, congratulation, you have mined a block. If it isn't, because the hash is greater than the difficulty, you try again with another nonce. And another, and another, and another,...
  18. [21:25:32] <Schwarzbaer> Basically, you're buying lottery tickets with your computing time, and continue to do so until you've gotten a winning ticket.
  19. [21:26:28] <Schwarzbaer> And... that's how you mine. It's that simple. Shall we move on to transactions, or do you have questions?
  20. [21:28:49] <Schwarzbaer> When you mine a block, you are alloed to add *one* transaction to it, that creates a defined amount of BTC from thin air.
  21. [21:30:16] <Schwarzbaer> That "from thin air" transaction is, BTW, called the coinbase.
  22.  
  23.  
  24. 3. TRANSACTIONS
  25.  
  26. [21:47:45] <Schwarzbaer> A transaction consists of inputs and outputs. An output is an amount of BTC, plus a cryptographic signature. Anyone who can prove that he has the corresponding private key can spend that output's BTC. (There's a bit more to it, in particular multisig, but never mind that for now).
  27. [21:50:11] <Schwarzbaer> So in all, a transaction is "I'll take this, this and that money, here's the proof that I'm allowed to, and I'll put that money into this and that new pile."
  28. [21:51:06] <Schwarzbaer> If there's a difference between the amount of BTC going into the tx, and the amount that's coming out of it, then the difference is the fee, and goes to the miner who has mined that block.
  29.  
  30.  
  31. 4. Confirmations
  32.  
  33. [22:12:29] <mentazoom> One block after x transaction is 1 confirmation, two blocks after x transactions are 2 confrimations etc
  34. [22:12:33] <Schwarzbaer> A transaction's first confirmation is that it has been put on a block. Each block that has been attached to the blockchain after that is another confirmation.
  35. [22:11:24] <mentazoom> The block time is often used as false advirtisement, bitcoin can easily lower it's block time too. But each confirmation on bitcoin is much stronger than eth 20 sec block
  36.  
  37. [22:13:48] <POJO> the "magic" number of confirmations for BTC is 6
  38. [22:13:51] <POJO> what's the deal with that?
  39. [22:14:18] <POJO> how is 6 any different from 4 or 7?
  40. [22:14:49] <Schwarzbaer> Satoshi said that he considers that the number that's sufficient to assume that it's locked in.
  41. [22:14:54] <Schwarzbaer> It's a guesstimate.
  42. [22:15:38] <mentazoom> Usually 1 confrimations are enough, but each businesses decide what they feel comfortable with
  43. [22:16:46] <Schwarzbaer> I'd be willing to bet that there's at least one historical example of a block with two confirmations having been abandoned, but I have no way to check that assumption.
  44. [22:17:40] <mentazoom> maybe but coinbase and many other feel comfortable with 1 confirmation, even for big transactions
  45.  
  46.  
  47. 5. On Ethereum, DAPPS and contracts
  48.  
  49. [22:06:18] <Schwarzbaer> Okay... DAPPS, distributed apps, are programs written in a bytecode the Ethereum miners can execute. When you put a transaction on the Ethereum blockchain, you are buying "gas" as a fee. That gas is used to pay for running your dapp. The result of that execution is put on the blockchain.
  50. [22:25:12] <Schwarzbaer> A contract is a form of DAPP that is used to encode, well, a contract on the Ethereum blockchain. Like a transfer of some material good, for instance.
  51.  
  52. [22:28:35] <POJO> and "smart" contract is just a buzzword?
  53. [22:29:11] <Schwarzbaer> Weeeeell, yes and no. It's a very popular term, and few people know the specific meaning of it, so yes, it's a buzzword.
  54.  
  55.  
  56. 6. Wallets
  57. [22:44:13] <POJO> if BTC is spent by using private keys, what are wallets?
  58. [22:44:47] <Schwarzbaer> POJO, secured repositories for private keys, and the software needed to utilize them.
  59.  
  60.  
  61. ##econometrics @ irc.freenode.net
Add Comment
Please, Sign In to add comment