--- Day changed Sat Jan 07 2017 00:00 < jcorgan> and it did seem that bitcoind was checking for $HOME/.bitcoin/bitcoin.conf before parsing the cmdline for -conf 00:01 < sqltest> so I guess i need to set datadir and conf on command line unless I decide to move bitcoin.conf to datadir. I have a bunch of confs for daemons and wanted to keep them all in /etc/bitcoin 00:01 -!- dcousens [~anon@c110-22-219-15.sunsh4.vic.optusnet.com.au] has quit [Ping timeout: 272 seconds] 00:01 < jcorgan> that's not an unreasonable way of doing things 00:02 < sqltest> well, thanks. I guess I'll have to work around that. The docs seems to say you can set conf on cmdline but that's incorrect unless datadir also provided. 00:02 < gmaxwell> sqltest: yes. you can't even put a datadir in the config of many of the altcoins. 00:04 < gmaxwell> you can set a conf on the commandline. but what you're trying to do is override the conf and datadir at the same time and there is some interaction there it seems. 00:05 < sqltest> Ok. I added datadir so both are provided to start-start-daemon exec args and it works ok like that. I'm creating an install script for my sqlchain daemon and this will work ok. Just need extra arg. 00:06 < sqltest> Thanks for help. 00:08 -!- sqltest [65332216@gateway/web/freenode/ip.101.51.34.22] has left #bitcoin-core-dev [] 00:27 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-gjffkdclkfcjqgow] has joined #bitcoin-core-dev 01:12 -!- Squidicuz [~squid@pool-173-48-116-49.bstnma.fios.verizon.net] has quit [Ping timeout: 264 seconds] 01:13 -!- Squidicuz [~squid@pool-173-48-116-49.bstnma.fios.verizon.net] has joined #bitcoin-core-dev 01:29 -!- windsok [~windsok@45.63.59.8] has quit [Ping timeout: 256 seconds] 01:41 -!- Squidicuz [~squid@pool-173-48-116-49.bstnma.fios.verizon.net] has quit [Ping timeout: 264 seconds] 01:44 -!- Squidicuz [~squid@pool-173-48-116-49.bstnma.fios.verizon.net] has joined #bitcoin-core-dev 01:57 -!- windsok [~windsok@45.63.59.8] has joined #bitcoin-core-dev 02:38 -!- fanquake [~fanquake@unaffiliated/fanquake] has joined #bitcoin-core-dev 02:46 -!- MarcoFalke [~marco@2a02:778:100:ea01:2225:64ff:fe3b:d4ca] has joined #bitcoin-core-dev 02:57 -!- Squidicuz [~squid@pool-173-48-116-49.bstnma.fios.verizon.net] has quit [Ping timeout: 264 seconds] 02:57 -!- Squidicuz [~squid@pool-173-48-116-49.bstnma.fios.verizon.net] has joined #bitcoin-core-dev 03:10 -!- jtimon [~quassel@197.red-88-0-200.dynamicip.rima-tde.net] has joined #bitcoin-core-dev 03:11 -!- fanquake [~fanquake@unaffiliated/fanquake] has quit [Quit: Leaving.] 04:11 -!- AaronvanW [~ewout@207pc74.sshunet.nl] has joined #bitcoin-core-dev 04:11 -!- AaronvanW [~ewout@207pc74.sshunet.nl] has quit [Changing host] 04:11 -!- AaronvanW [~ewout@unaffiliated/aaronvanw] has joined #bitcoin-core-dev 04:25 -!- MarcoFalke [~marco@2a02:778:100:ea01:2225:64ff:fe3b:d4ca] has left #bitcoin-core-dev [] 04:36 -!- jtimon [~quassel@197.red-88-0-200.dynamicip.rima-tde.net] has quit [Ping timeout: 272 seconds] 05:40 -!- dcousens [~anon@c110-22-219-15.sunsh4.vic.optusnet.com.au] has joined #bitcoin-core-dev 06:06 -!- dcousens [~anon@c110-22-219-15.sunsh4.vic.optusnet.com.au] has quit [Ping timeout: 240 seconds] 06:07 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 06:13 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Quit: laurentmt] 06:13 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 06:19 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Quit: laurentmt] 06:21 -!- Guyver2 [~Guyver2@guyver2.xs4all.nl] has joined #bitcoin-core-dev 06:57 < Chris_Stewart_5> jonasschnelli: Wow, faster than I expected. Very nice. 07:02 < Chris_Stewart_5> also, it isn't possible to run in parallel is it? 07:07 -!- pavel_ [~paveljani@79.98.72.176] has joined #bitcoin-core-dev 07:07 -!- paveljanik [~paveljani@unaffiliated/paveljanik] has quit [Read error: Connection reset by peer] 07:09 -!- cdecker [~cdecker@mail.snyke.net] has joined #bitcoin-core-dev 07:09 < gmaxwell> not really without hacks. 07:10 -!- cdecker [~cdecker@mail.snyke.net] has quit [Remote host closed the connection] 07:11 -!- cdecker [~cdecker@mail.snyke.net] has joined #bitcoin-core-dev 07:14 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has quit [Ping timeout: 245 seconds] 07:24 -!- LeMiner2 [~LeMiner@5ED1AFBF.cm-7-2c.dynamic.ziggo.nl] has joined #bitcoin-core-dev 07:27 -!- LeMiner [~LeMiner@5ED1AFBF.cm-7-2c.dynamic.ziggo.nl] has quit [Ping timeout: 260 seconds] 07:27 -!- LeMiner2 is now known as LeMiner 07:30 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has joined #bitcoin-core-dev 07:51 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 07:51 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Client Quit] 08:20 -!- TomMc [~tom@unaffiliated/tommc] has joined #bitcoin-core-dev 08:26 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 08:33 -!- TomMc [~tom@unaffiliated/tommc] has quit [Ping timeout: 240 seconds] 08:42 -!- jtimon [~quassel@197.red-88-0-200.dynamicip.rima-tde.net] has joined #bitcoin-core-dev 08:43 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Quit: laurentmt] 08:47 -!- LeMiner2 [~LeMiner@5ED1AFBF.cm-7-2c.dynamic.ziggo.nl] has joined #bitcoin-core-dev 08:49 < bitcoin-git> [bitcoin] TheBlueMatt opened pull request #9486: Make peer=%d log prints consistent (master...2017-01-peer-log-consistency) https://github.com/bitcoin/bitcoin/pull/9486 08:50 -!- LeMiner [~LeMiner@5ED1AFBF.cm-7-2c.dynamic.ziggo.nl] has quit [Ping timeout: 260 seconds] 08:50 -!- LeMiner2 is now known as LeMiner 09:24 -!- norotartagen [~norotarta@71-89-76-184.dhcp.bycy.mi.charter.com] has quit [K-Lined] 09:50 < bitcoin-git> [bitcoin] droark opened pull request #9487: Remove stray semicolon (Fix empty body warning) (master...9319Fix) https://github.com/bitcoin/bitcoin/pull/9487 09:59 -!- visitor [2e69f33d@gateway/web/freenode/ip.46.105.243.61] has joined #bitcoin-core-dev 10:03 -!- visitor is now known as visitor50 10:04 -!- visitor50 [2e69f33d@gateway/web/freenode/ip.46.105.243.61] has quit [Client Quit] 10:06 -!- haakonn [~haakonn@146.185.155.218] has joined #bitcoin-core-dev 10:07 -!- haakonn is now known as Guest43877 10:08 -!- DrHendrik [2e69f33d@gateway/web/freenode/ip.46.105.243.61] has joined #bitcoin-core-dev 10:09 < DrHendrik> Are the last 2 thursday meet-ups skipped because of holidays? or just not updated @ https://bitcoincore.org/en/meetings/ 10:09 -!- Guest43877 [~haakonn@146.185.155.218] has quit [Ping timeout: 240 seconds] 10:09 < sipa> DrHendrik: last thursday there was a meeting 10:09 < DrHendrik> ok 10:09 < sipa> but i think it just has not yet been websiteiified 10:10 < gmaxwell> sipa: it would be nice if this was merged soon, addnode is currently broken in master: https://github.com/bitcoin/bitcoin/pull/9487 10:12 < gmaxwell> I'd really like us to stop using unbraced ifs. This is the kind of error that results from them, it was my screwup for sure, but getting things right is hard enough without a coding style that includes a predictable source of bugs. 10:25 -!- so [~so@unaffiliated/so] has joined #bitcoin-core-dev 10:27 -!- haakonn [~haakonn@146.185.155.218] has joined #bitcoin-core-dev 10:27 < bitcoin-git> [bitcoin] MarcoFalke pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/46b249e578e8...25720fc394e2 10:27 < bitcoin-git> bitcoin/master cc05896 Douglas Roark: Remove stray semicolon (Fix empty body warning)... 10:27 < bitcoin-git> bitcoin/master 25720fc MarcoFalke: Merge #9487: Remove stray semicolon (Fix empty body warning)... 10:28 < bitcoin-git> [bitcoin] MarcoFalke closed pull request #9487: Remove stray semicolon (Fix empty body warning) (master...9319Fix) https://github.com/bitcoin/bitcoin/pull/9487 10:28 -!- haakonn is now known as Guest53948 10:29 -!- typingmonkey_ [~user@ip121-12-176-143.adsl2.static.versatel.nl] has joined #bitcoin-core-dev 10:31 -!- DrHendrik [2e69f33d@gateway/web/freenode/ip.46.105.243.61] has quit [Quit: Page closed] 11:00 < luke-jr> gmaxwell: not sure if I mentioned, but I also came to that opinion following consideration of your arguments for it some months ago (always using braced blocks) 11:00 < luke-jr> and as such have been using/adding them where appropriate 11:09 -!- windsok [~windsok@45.63.59.8] has quit [Ping timeout: 240 seconds] 11:12 -!- protomar [~protomar@109.232.227.133] has joined #bitcoin-core-dev 11:38 -!- Squidicc [~squid@pool-173-48-116-49.bstnma.fios.verizon.net] has joined #bitcoin-core-dev 11:42 -!- Squidicuz [~squid@pool-173-48-116-49.bstnma.fios.verizon.net] has quit [Ping timeout: 264 seconds] 11:42 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 11:42 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Client Quit] 11:42 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 11:42 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Client Quit] 11:42 -!- afk11 [~afk11@unaffiliated/afk11] has quit [Read error: Connection reset by peer] 11:47 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-gjffkdclkfcjqgow] has quit [Quit: Connection closed for inactivity] 11:47 -!- afk11 [~afk11@176.61.67.182] has joined #bitcoin-core-dev 11:47 -!- afk11 [~afk11@176.61.67.182] has quit [Changing host] 11:47 -!- afk11 [~afk11@unaffiliated/afk11] has joined #bitcoin-core-dev 12:18 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has quit [Ping timeout: 255 seconds] 12:18 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has joined #bitcoin-core-dev 12:22 -!- typingmonkey_ [~user@ip121-12-176-143.adsl2.static.versatel.nl] has quit [Remote host closed the connection] 12:23 -!- windsok [~windsok@45.63.59.8] has joined #bitcoin-core-dev 12:26 < gmaxwell> luke-jr: yea, I see you've been using it. 12:26 < gmaxwell> I've been inconsistent in my use in Bitcoin Core, I've slipped some in but worry about getting nagged about the coding style. 12:39 -!- btcdrak [uid165369@gateway/web/irccloud.com/x-vfjscqeglycdzyon] has quit [Quit: Connection closed for inactivity] 12:40 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-tocjcaepxckdqzar] has joined #bitcoin-core-dev 12:48 -!- jtimon [~quassel@197.red-88-0-200.dynamicip.rima-tde.net] has quit [Ping timeout: 246 seconds] 12:50 -!- afk11 [~afk11@unaffiliated/afk11] has quit [Ping timeout: 245 seconds] 12:54 < phantomcircuit> gmaxwell, unbraced if's are just wrong 12:55 < gmaxwell> Unfortunately, I don't think any of the autoformaters or linter tools can enforce them. (they certantly can't enforce my preferred style: unbraced only if the whole statement is one line and there is no else. 13:16 -!- btcdrak [uid165369@gateway/web/irccloud.com/x-suxnsdefkfbqizoo] has joined #bitcoin-core-dev 13:30 < Chris_Stewart_5> If I am trying to use the 'deserializing constructor' for CTransaction, what am I suppose to be passing in as 'deserialize_type'? 13:30 < Chris_Stewart_5> https://github.com/bitcoin/bitcoin/blob/master/src/primitives/transaction.h#L346 13:39 -!- Sosumi [~Leon@bl10-113-190.dsl.telepac.pt] has quit [Quit: Bye] 13:42 -!- Guyver2 [~Guyver2@guyver2.xs4all.nl] has quit [Quit: :)] 13:55 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has quit [Ping timeout: 240 seconds] 13:57 -!- max4307 [b032b1f9@gateway/web/freenode/ip.176.50.177.249] has joined #bitcoin-core-dev 13:58 -!- max4307 [b032b1f9@gateway/web/freenode/ip.176.50.177.249] has quit [Client Quit] 14:00 -!- Cheeseo [~x@unaffiliated/cheeseo] has joined #bitcoin-core-dev 14:12 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has joined #bitcoin-core-dev 14:29 -!- max4307 [b032b1f9@gateway/web/freenode/ip.176.50.177.249] has joined #bitcoin-core-dev 14:30 < max4307> how to reset the password forgot it 14:36 < kadoban> max4307: Password to what? Alse this probably belongs in #bitcoin, at a guess. 14:37 < max4307> the purse has created a password and forgot, you can't work Sneem 14:40 < max4307> encrypted wallet and forgot my password now how to work the ck 14:44 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has quit [Ping timeout: 240 seconds] 14:45 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has joined #bitcoin-core-dev 14:48 -!- protomar [~protomar@109.232.227.133] has quit [Quit: Leaving] 14:52 -!- max4307 [b032b1f9@gateway/web/freenode/ip.176.50.177.249] has quit [Quit: Page closed] 14:54 < adam3us> phantomcircuit unbraced if's are very wrong. 14:54 < adam3us> very awesome security defects in other crypto applications have been created by them and poor formatting. 14:55 < sipa> yeah, unfortunately, in some parts of the codebase they're still common 14:55 < sipa> and people tend to (and have been advised to) mimick the style of the code surrounging what is being touched 14:58 -!- max4307 [b032b1f9@gateway/web/freenode/ip.176.50.177.249] has joined #bitcoin-core-dev 14:58 < max4307> encrypted wallet and forgot password bitcoincore? 14:59 < sipa> max4307: this channel is not for support 14:59 < sipa> max4307: perhaps try the forums or stackexchange, or #bitcoin (but beware of scammers) 15:01 < max4307> And channel support don't know 15:01 -!- max4307 [b032b1f9@gateway/web/freenode/ip.176.50.177.249] has quit [Client Quit] 15:06 -!- juscamarena__ [~justin@47.148.176.74] has joined #bitcoin-core-dev 15:16 -!- RoyceX [~x@unaffiliated/cheeseo] has joined #bitcoin-core-dev 15:20 -!- Cheeseo [~x@unaffiliated/cheeseo] has quit [Ping timeout: 260 seconds] 15:26 -!- RoyceX [~x@unaffiliated/cheeseo] has quit [Read error: Connection reset by peer] 15:38 < luke-jr> BlueMatt: we are de facto including wallet/rpcwallet.h in the build already (and forever afaik) with --disable-wallet; how else would you suggest I do that? 15:40 < BlueMatt> oh? where from? 15:41 < BlueMatt> note: I'm ok with a little duplication of the headers with comments noting "this should go away - do not use in new code, yada yada" 15:41 < luke-jr> Makefile.am 15:43 < BlueMatt> you mean via BITCOIN_CORE_H? 15:43 < luke-jr> yeah 15:43 < BlueMatt> afaiu that just informs autotools that if this header changes it may need to recompile some files 15:43 < BlueMatt> it doesnt actually compile/include/etc it in any way 15:45 < luke-jr> it figures out dependencies automatically. although admittedly, I do not know what that reference actually does do 15:46 < luke-jr> in any case, so basically you want me to duplicate the header in src/rpc/? 15:49 -!- windsok [~windsok@45.63.59.8] has quit [Ping timeout: 240 seconds] 15:55 < BlueMatt> that would be my preference 15:59 < gmaxwell> phantomcircuit: hm. I thought we had written style mandates that prohibited braces on single line statements. But looking, I can't find that. 15:59 < gmaxwell> phantomcircuit: so I've been thinking that I was being naughty every time I added one. 16:00 < sipa> https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md 16:01 < sipa> it gives an example that include a one-line unbraced indendented conditional 16:01 < sipa> -den 16:01 < BlueMatt> gmaxwell: I thoguht the same, but sipa corrected me 16:01 < BlueMatt> oh, wait, prohibited on single line statements? no 16:01 < BlueMatt> i knew that one 16:01 < BlueMatt> i thought we had a style guide (or someone had a preference) for the open-brace /always/ being on the line after the if 16:03 < gmaxwell> BlueMatt: thank you so much for commenting on #9484 16:03 < gribble> https://github.com/bitcoin/bitcoin/issues/9484 | Introduce assumevalid setting to skip validation presumed valid scripts. by gmaxwell · Pull Request #9484 · bitcoin/bitcoin · GitHub 16:03 < gmaxwell> sipa: yea, I think that should be prohibited. But even if it's just permitted to not do that, I'd be much happier. 16:05 < gmaxwell> I'm fine with "if (!something) return false;" too; but we've accepted patches that do nothing but add line breaks to code like that. 16:07 < gmaxwell> but from working on software with that as a coding style, I recall that there was no way to get any of the existing formatters to enforce that rule. 16:08 -!- juscamarena [~justin@47.148.176.74] has joined #bitcoin-core-dev 16:11 < gmaxwell> it would be neat if someone made a formater autoconfiguration tool that finds the formater settings that minimize the changes to your code base, then prompts you for all the settings that have no effect. 16:17 < gmaxwell> hm actually clang-format has AllowShortIfStatementsOnASingleLine so it can do that, I was mistaken. 16:24 -!- windsok [~windsok@45.63.59.8] has joined #bitcoin-core-dev 17:14 -!- GAit [~GAit@unaffiliated/gait] has quit [Read error: Connection reset by peer] 17:27 -!- GAit [~GAit@unaffiliated/gait] has joined #bitcoin-core-dev 17:29 -!- wvr [~wvr@215.red-83-59-62.dynamicip.rima-tde.net] has quit [Quit: Leaving] 19:07 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-tocjcaepxckdqzar] has quit [Quit: Connection closed for inactivity] 19:17 < Chris_Stewart_5> It is possible to have a tx with no outputs right? It would just pay all inputs to miner fees? 19:18 < luke-jr> Chris_Stewart_5: i don't think so 19:19 < Chris_Stewart_5> Trying to get my generators right on #8469 it is important that they allow every possible value 19:19 < gribble> https://github.com/bitcoin/bitcoin/issues/8469 | [POC] Introducing property based testing to Core by Christewart · Pull Request #8469 · bitcoin/bitcoin · GitHub 19:22 < gmaxwell> it is not possible. 19:22 -!- dcousens [~anon@c110-22-219-15.sunsh4.vic.optusnet.com.au] has joined #bitcoin-core-dev 19:22 < gmaxwell> (I mean you can create such an encoding, but the transaction could never be valid.) 19:22 < Chris_Stewart_5> gmaxwell: Valid in the policy sense? 19:23 < gmaxwell> no, in the consensus rules sense. 19:23 < gmaxwell> the word 'never' should have tipped you off. :) 19:24 < Chris_Stewart_5> gmaxwell: I'm not sure i'm ready to believe you yet, why isn't it valid? Some where in validation.cpp there is a check for vout.size() > 0? 19:25 < gmaxwell> yes. 19:25 < Chris_Stewart_5> like you said, enocding/script wise it should be fine I think 19:26 < Chris_Stewart_5> and is it just a thing satoshi did, or is there an actual attack that would be possible 19:28 < gmaxwell> well it does simplify validation code when it doesn't have to check the count before accessing the first one... but no there isn't any special attack. 19:28 < Chris_Stewart_5> gmaxwell: Thanks for the explanation :-) 19:35 < bitcoin-git> [bitcoin] TheBlueMatt opened pull request #9488: Parallel ThreadMessageHandler (master...2017-01-parallel-processmessages) https://github.com/bitcoin/bitcoin/pull/9488 19:41 < gmaxwell> #7871 is sometihng I probably should have mentioned for a 0.14 target in the last meeting, it is highly complementary with importmulti. 19:41 < gribble> https://github.com/bitcoin/bitcoin/issues/7871 | Manual block file pruning. by mrbandrews · Pull Request #7871 · bitcoin/bitcoin · GitHub 19:44 < gmaxwell> though the fact that one works based on time and the other based on height is a little awkward. 19:47 < gmaxwell> oh weee. thats a bug. 19:55 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #bitcoin-core-dev 19:58 -!- OfficialLeibniz [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 256 seconds] 20:19 < bitcoin-git> [bitcoin] gmaxwell opened pull request #9489: Make FindLatestBefore use GetMedianTimePast instead of GetBlockTime. (master...fix_find_latest_before) https://github.com/bitcoin/bitcoin/pull/9489 20:25 < luke-jr> Chris_Stewart_5: you *could* have a single output with zero value, note 20:39 < Chris_Stewart_5> luke-jr: Or even negative value 20:40 < Chris_Stewart_5> I think? 20:40 < Chris_Stewart_5> BuildCreditingTransaction uses that inside of transaction_test.cpp any way... 20:45 < sipa> wut? 20:46 < sipa> negative value outputs? 20:54 < bitcoin-git> [bitcoin] gmaxwell closed pull request #9489: Make FindLatestBefore use GetMedianTimePast instead of GetBlockTime. (master...fix_find_latest_before) https://github.com/bitcoin/bitcoin/pull/9489 20:55 < gmaxwell> sipa: will I be hated if I make the entries in CBlockIndex 8 bytes larger? :( 20:58 < gmaxwell> I need a 'highest timestamp seen so far in this chain' for this FindLatestBefore. 21:00 < gmaxwell> obvious way to do that is to just have a maxTime in the CBlockindex which = max(nTime,prev->maxtime). sorry 4 bytes, I guess our time there is only 32bits. 21:03 < luke-jr> Chris_Stewart_5: I am relatively certain that negative value outputs are always invalid. 21:10 -!- chosafine [~cc@unaffiliated/technoticraccoon] has joined #bitcoin-core-dev 21:53 < BlueMatt> gmaxwell: IIRC there are a good chunk more than 8 bytes available in CBlockIndex just from better packing 21:53 < BlueMatt> so..... 21:58 < kallewoof> I always thought bitcoin was supposed to pick the chain with the most work, not the longest chain. I did some testing, and with a split network bitcoin picked the longest chain, even though the shorter-by-one chain had a much lower hash. 21:59 < kallewoof> I.e. (1) 5b6aab3f > 3d697a37 > 4ea2f338. (2) 5b6aab3f > 0000000b. On connecting nodes, result was (1) not (2). 22:03 < kadoban> kallewoof: Wouldn't the difficulty at that point matter, not the actual hashes generated? Or did I make that up? 22:03 < kallewoof> You mean nBits? 22:04 < gmaxwell> kadoban: correct. 22:04 < kadoban> I don't know the block format amazingly well, I only remember some parts at a conceptual level. nBits sounds possibly right though 22:04 < kadoban> Ah good 22:04 < gmaxwell> kadoban: other than sufficiency, the hash value doesn't have anything to do with the work that went into it. 22:05 < gmaxwell> though nbits doesn't tell you the total work, it tells you how much work was required for a particular block. 22:06 < gmaxwell> the total work is represented as nChainWork in the bitcoin codebase, it isn't seralized as part of the block. 22:06 < kallewoof> So what is the point with the whole 'most work not longest chain' talk? Nbits is network-widely defined so there will not be a difference ever, will there? 22:06 < gmaxwell> kallewoof: difficulty changes over time. 22:06 < kallewoof> I mean, it's retargeted, but that's it 22:06 < kallewoof> One client will not have one nbits value while another has a different one, hardly ever. 22:07 < gmaxwell> ... 22:07 < gmaxwell> nbits is a property of the _chain_ not the client. 22:08 < kallewoof> I mean... the work done to a chain is dependent on the accumulated difficulties (which are the nbits values, right?). I just can't think of a case where you would have a shorter chain being chosen due to more work. 22:09 < gmaxwell> kallewoof: I can trivially go fork at block 100,000 and then hand you a chain with way more blocks then the current chain but massively less work. 22:10 < gmaxwell> it's a trivial attack, and utterly devistating to most-blocks. 22:11 < kallewoof> Ahh.. so that's what the whole 'most work' thing is about. I get it. Thanks. 22:11 < gmaxwell> absent attacks, whenever there is a chain fork around a retarget, the two sides can have different amounts of work; which makes a difference though not a terribly critical one. 22:11 < gmaxwell> no problem. 22:11 < gmaxwell> kallewoof: lots of people miss that one, the bitcoin software was originally most blocks. 22:12 < kallewoof> It is super obvious now that you've described it. I wish someone had worded it that way somewhere. 22:13 < gmaxwell> it's the sort of thing that would have been described in the whitepaper, if it were known at the time. :) 22:14 < gmaxwell> also, consider yourself fortunate: the worst position to be in is having never been surprised by anything; from that vantage you can't tell how subtle this stuff is... because it's all obvious when presented clearly. 22:17 < kallewoof> gmaxwell: True enough. :) 22:21 < kallewoof> Here's the log of my fine-but-failed experiment in case anyone wants to see it, btw: https://gist.github.com/kallewoof/9b0e541366941e08e41ab1bf3e03f017 22:27 -!- chosafine [~cc@unaffiliated/technoticraccoon] has left #bitcoin-core-dev ["Textual IRC Client: www.textualapp.com"] 23:00 -!- dermoth [~thomas@dsl-66-36-158-182.mtl.aei.ca] has quit [Read error: Connection reset by peer] 23:00 -!- dermoth [~thomas@dsl-66-36-158-182.mtl.aei.ca] has joined #bitcoin-core-dev 23:04 -!- Alopex [~bitcoin@cyber.dealing.ninja] has quit [Remote host closed the connection] 23:05 -!- Alopex [~bitcoin@cyber.dealing.ninja] has joined #bitcoin-core-dev 23:08 -!- dmrche [0e8ba051@gateway/web/freenode/ip.14.139.160.81] has joined #bitcoin-core-dev 23:23 < bitcoin-git> [bitcoin] gmaxwell opened pull request #9490: Replace FindLatestBefore used by importmuti with FindEarliestAtLeast. (master...fix_find_latest_before) https://github.com/bitcoin/bitcoin/pull/9490 23:34 -!- Alopex [~bitcoin@cyber.dealing.ninja] has quit [Remote host closed the connection] 23:35 -!- Alopex [~bitcoin@cyber.dealing.ninja] has joined #bitcoin-core-dev 23:35 -!- dcousens [~anon@c110-22-219-15.sunsh4.vic.optusnet.com.au] has quit [Ping timeout: 248 seconds]