Transcript for #bitcoin-dev 2017/11/04

01:35 emers2n Hey
01:37 emers2n Does the channel include web apps?
03:28 nicedice hello! what do you guys think about hashgraph? This technology is proprietary, but the description is publicly available. Is this agreement protocol as good as its creators advertise? are there any flaws?
14:12 nicedice hello! what do you guys think about hashgraph? This technology is proprietary, but the description is publicly available. Is this consensus protocol as good as its creators advertise? are there any flaws? (asking here because hashgraph devlopers loudly proclaim that, basically, the PoW protocol is dead (which isn't believable).
14:13 paulo_ hello
14:13 nicedice hello
14:13 paulo_ in the source code, what is cs_main?
14:14 nicedice oh, i'm here to ask questions myself ))
14:14 nicedice I donno
14:14 paulo_ https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L1257
14:19 nicedice you have to look for explanation in the code under #include's
14:19 nicedice as it seems to me
14:24 RafieMY hello
14:26 RafieMY i had problem using Nicehash Miner, i cant finish benchmark cuz it always failed. Do u know how to fix it
14:27 paulo_ hi
14:27 RafieMY hi
14:28 paulo_ "There is no from address" - what does that mean?
14:29 arubi paulo_, it's an answer to the question "how do I know which address sent me the coins"
14:30 paulo_ why can't we? isn't a transaction signed, therefore the public keys are the from addresses?
14:35 arubi a public key and signature on stack in the funding transaction doesn't tell you what the scriptpubkey was in the funding transaction. most of the times you can guess
14:36 arubi s/funding/current
14:36 arubi and some transactions don't show the pubkeys at all, say p2pk or multisig
14:37 paulo_ what are the advanta
14:37 paulo_ what are the advantages of tracking unspent transactions instead of keeping a database of address balances?
14:38 paulo_ let's say we transactions actually have from addresses and to addresses.
14:38 paulo_ *let's say transactions
14:40 arubi well it doesn't sound like your database supports just arbitrary scripts, only defined scripts like ones that have addresses
14:41 paulo_ ahh that's true.
14:44 RafieMY why my miner doesnt detect my graphic card ?
14:47 RafieMY babi babun bontot besa, taik hijau, muke mintak kaki, kaki kipas, muke taik
14:47 RafieMY tetek gleber
15:00 RafieMY FREE Bitcoin --> https://plu.sh/3kg7v
15:00 paulo_ ugh.
15:02 RafieMY see you got urself
15:38 paulo_ hello
15:38 paulo_ would you know where ProcessNewBlockHeaders is defined?
16:15 achow101 paulo_: validation.cpp
16:15 achow101 paulo_: use grep
17:18 paulo_ is the block height encoded in the header?
17:20 arubi that would've been so much better
17:20 arubi but no
17:57 paulo_ how is work defined again? the sum of the hashes?
17:58 paulo_ or the sum of the targets?
17:59 esotericnonsense targets
18:00 paulo_ s/defined/calculated
18:01 paulo_ https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L104
18:01 paulo_ I don't think the targets can sum to such a low hash...
18:03 paulo_ oh wait, i think i got something wrong
18:21 paulo_ it looks life a block's work is defined as 2^256/target. why is that?
18:21 paulo_ *like
18:22 eck to make the target fit into 256 bits
18:22 eck how woudl you define it?
18:27 paulo_ I think I understand now, it calculates the number of hashes (on average) required to calculate a hash lower than the target
18:27 paulo_ hence, it's called work
18:29 paulo_ yay math
18:35 Sentineo what is the base of that number here? consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000723d3581fe1bd55373540a");
18:35 Sentineo on that line paulo_ pasted here?
18:36 paulo_ Sentineo: it's hexadecimal
18:37 paulo_ the work is calculated here: https://github.com/bitcoin/bitcoin/blob/master/src/chain.cpp#L120
18:37 paulo_ the work is summed here: https://github.com/bitcoin/bitcoin/blob/master/src/validation.cpp#L2671
18:39 arubi ;;calc log([base 16 10 000000000000000000000000000000000000000000723d3581fe1bd55373540a])/log(2)
18:39 gribble 86.8359126796
18:43 Sentineo I meant why that number, not base as mathematical base :D
18:44 arubi it's how much work was done to mine the chain up to that point
18:45 arubi more or less how many bitcoin hashes, hash256, were done by miners
18:49 arubi Sentineo, if you follow debug.log, you can see log2_work increasing each time a block arrives. it's just counting that same number and displays the log2 of it like ^
18:50 Sentineo yeah I saw that
18:50 arubi not sure how accurate it it really is when we know asicboost was used, miners re-using work and all :)
18:50 Sentineo ok so it seems that snippet of code is for some softfork activation, so making sure it has at least as much work as a the moment of definition makes sense
18:51 arubi it makes sense because it's reality right, not technical
18:51 Sentineo yep
18:52 Sentineo first I though it is some technical - math thing ... than the question of course was why that number? :)
18:53 arubi yea, chain work is pretty much the only thing that can't change even if reorgs are made, so we don't have to point at a block
18:53 arubi just say, it's been this much work before this event. we all know it, it's obvious
18:53 Sentineo yeah ... easy, compact, robust