12018-09-10T00:02:18 <dongcarl> Hi all, would like to learn about how the p2p code in bitcoind is structured... I'm guessing src/net* are the files to look at, but I can't find an "entry point" that handles and initiates TCP connections, could someone point me to the right place?
22018-09-10T00:02:49 <echeveria> ProcessMessage is where the magic happens.
32018-09-10T00:03:17 <dongcarl> echeveria: I'm also seeing that CConnman is also important?
42018-09-10T00:05:41 <sipa> echeveria: ProcessMessage is message processing, not network code
52018-09-10T00:05:41 <dongcarl> Is... ProcessMessage a 1300-line function?
62018-09-10T00:06:03 <sipa> sure
72018-09-10T00:06:14 <echeveria> dongcarl: look at CConnman::ThreadSocketHandler, etc.
82018-09-10T00:07:02 <dongcarl> Ahhhh... anything other than CConnman?
92018-09-10T00:07:53 <sipa> echeveria: almost
102018-09-10T00:08:02 <sipa> socket handling deals with connections that are already open
112018-09-10T00:08:12 <echeveria> sipa: can we go back to 0.1 where things make sense?
122018-09-10T00:08:19 <sipa> echeveria: they didn't
132018-09-10T00:08:54 <sipa> or did you really prefer having the wallet code mixed with the network code and gui calls in main.cpp?
142018-09-10T00:09:27 <sipa> dongcarl: most basic is probably ConnectSocketDirectly in netbase.cpp
152018-09-10T00:10:04 <sipa> dongcarl: then CConnman::ConnectNode is higher level
162018-09-10T00:10:04 *** jarthur has joined #bitcoin-core-dev
172018-09-10T00:10:24 <sipa> then OpenNetworkConnection on top of that
182018-09-10T00:11:31 <echeveria> sipa: still fascinating that it worked at all.
192018-09-10T00:14:16 <midnightmagic> I didn't like the interleaved logic, but I found the old code to be extremely legible.
202018-09-10T00:14:27 <echeveria> hey at least bitcoin doesn't make HTTP requests using raw sockets now.
212018-09-10T00:14:37 <dongcarl> ThreadOpenConnections -> OpenNetworkConnection -> ConnectNode -> ConnectSocketDirectly ?
222018-09-10T00:15:27 <dongcarl> and Start -> ThreadOpenConnections ofc
232018-09-10T00:26:35 <sipa> midnightmagic: i agree, it was readable... or at least so it seemed until i tried to figure out how the wallet ever learned a particular output was being spent
242018-09-10T00:26:58 <sipa> midnightmagic: turns out there was a callback from the script execution code into the wallet...
252018-09-10T00:27:34 <sipa> but sure, things have gotten a lot more complicated since
262018-09-10T00:27:39 <sipa> the code also does a lot more
272018-09-10T00:30:33 <midnightmagic> sipa: I don't think it's more complicated in the comprehension sense, just.. harder to navigate with my preferred terminal tools is all. cscope is required (for me) now due to the logic spreading across multiple files. I don't think it's a problem, just I think peeps take some other types of tools for granted these days I guess. :)
282018-09-10T00:32:32 <dongcarl> Looking into libconsensus as well... I'm wondering if the API detailed in https://github.com/bitcoin/bitcoin/issues/6714 still holds... Seems like jtimon and NicolasDorier did a bunch of work that's been closed due to inactivity?
292018-09-10T00:32:35 <midnightmagic> sipa: tangentially, you ever detail your dev tools anywhere?
302018-09-10T00:34:25 <dongcarl> midnightmagic: SuperCoder 2000 ofc
312018-09-10T00:41:46 *** Victorsueca has quit IRC
322018-09-10T00:42:57 *** Victorsueca has joined #bitcoin-core-dev
332018-09-10T00:45:23 *** Dizzle has joined #bitcoin-core-dev
342018-09-10T00:47:50 <sipa> midnightmagic: i only use git grep and mcedit :)
352018-09-10T00:48:18 <sipa> dongcarl: i don't think the libconsensus api ever changed
362018-09-10T00:48:33 <sipa> apart from the addition of tx amounts for segwit
372018-09-10T00:51:21 <dongcarl> sipa: Is there a particular reason why there was lack of interest in the PRs?
382018-09-10T00:55:00 <sipa> dongcarl: lack of agreement on approach, i think
392018-09-10T00:57:20 <sipa> and refactorings that keep going on for a long time are annoying to other contributors
402018-09-10T00:58:09 <dongcarl> sipa: are the conversations/discussions recorded somehwere?
412018-09-10T00:59:15 <midnightmagic> sipa: lol dangit. I forgot you do the same sort of thing I do.
422018-09-10T01:01:55 <sipa> dongcarl: irc and github...
432018-09-10T01:02:01 *** DigiByteDev has quit IRC
442018-09-10T01:05:50 <sipa> dongcarl: but really, there just wasn't enough momenentum i think - those kinds of changes need many people to agree on a plan first
452018-09-10T01:13:04 <dongcarl> sipa: Makes sense... Would Tokyo be a good place to talk about this?
462018-09-10T01:23:10 <sipa> maybe
472018-09-10T01:27:27 <jarthur> Hey, I'm able to reproduce this on both Debian jessie and Debian stretch - https://github.com/bitcoin/bitcoin/issues/8749 - any of you run into it yet?
482018-09-10T01:28:10 <jarthur> libboost 1.62.0.1 packages
492018-09-10T01:35:55 <sipa> jarthur: have you tried reinstalling the boost packages?
502018-09-10T01:36:01 <sipa> make sure they're all the same version
512018-09-10T01:36:19 <sipa> if you have a locally installed version, point the configure script to it
522018-09-10T01:38:13 *** Chris_Stewart_5 has joined #bitcoin-core-dev
532018-09-10T01:43:53 <jarthur> sipa: using the apt packages. Will double check all the versions now. One thing I did was install the libs first, then the -dev packages.
542018-09-10T01:45:04 <sipa> also try clearing your config cache
552018-09-10T01:45:22 <sipa> "git clear -dfx" wipes everything not committed in the source tree
562018-09-10T01:48:46 <jarthur> Using the source tgz
572018-09-10T01:49:06 <sipa> in that case, delete the build dir and extract again
582018-09-10T01:49:20 <sipa> (but you should really consider building from git, if you do it repeatedly)
592018-09-10T01:49:34 *** RubenSomsen has joined #bitcoin-core-dev
602018-09-10T01:58:25 <jarthur> sipa: confirmed all libboost pkgs show same version. Re-extracted, autogenned and such. Maybe it's an issue with using --no-install-recommends when installing the libbost-*-dev pkgs. Doing this for a large-scale docker deployment, so keeping things minimal.
612018-09-10T02:02:52 <jarthur> s/libbost/libboost/
622018-09-10T02:07:42 *** Chris_Stewart_5 has quit IRC
632018-09-10T02:38:55 *** grubles has quit IRC
642018-09-10T02:47:15 *** rex4539 has quit IRC
652018-09-10T02:55:30 *** mdrollette has quit IRC
662018-09-10T03:01:12 <jarthur> sipa: yea, seeing it on Ubuntu as well. If we didn't need libboost-program-options-dev before, maybe this is a new autogen macro issue. Looked back at old debs and never saw libboost-program-options-dev being pulled in as a dep or recommends.
672018-09-10T03:03:49 *** phwalkr has joined #bitcoin-core-dev
682018-09-10T03:19:46 *** itaseski has quit IRC
692018-09-10T03:24:37 *** ken2812221_ is now known as ken2812221
702018-09-10T03:25:52 <ken2812221> jarthur: libboost-program-options-dev is no longer required since #13482
712018-09-10T03:25:53 <gribble> https://github.com/bitcoin/bitcoin/issues/13482 | Remove boost::program_options dependency by ken2812221 · Pull Request #13482 · bitcoin/bitcoin · GitHub
722018-09-10T03:26:40 <Dizzle> ken2812221: yep, you're so right
732018-09-10T03:26:45 <Dizzle> thanks!
742018-09-10T03:26:58 <jarthur> ty
752018-09-10T03:53:55 *** phwalkr has quit IRC
762018-09-10T03:56:00 *** phwalkr has joined #bitcoin-core-dev
772018-09-10T04:09:30 *** phwalkr has quit IRC
782018-09-10T04:48:52 *** miknotauro has quit IRC
792018-09-10T05:03:14 *** Dizzle has quit IRC
802018-09-10T05:12:32 *** Krellan has quit IRC
812018-09-10T05:13:13 *** Krellan has joined #bitcoin-core-dev
822018-09-10T05:26:42 *** rex4539 has joined #bitcoin-core-dev
832018-09-10T05:32:18 <kallewoof> How do the recoverable ecsda signatures differ from the regular ones aside from the recid + compressed prefix byte?
842018-09-10T05:37:27 <sipa> not
852018-09-10T05:37:51 <sipa> they're literally a normal signature + recid
862018-09-10T05:37:58 <kallewoof> Great! Thanks
872018-09-10T05:38:05 <sipa> also, don't use them :)
882018-09-10T05:38:50 <kallewoof> I'm writing a BIP for the sign|verifymessage proposal from ML from awhile back. How would the verifier extract pubkey?
892018-09-10T05:38:57 <kallewoof> +if not using recoverable sig
902018-09-10T05:39:00 <kallewoof> Just brute force it?
912018-09-10T05:39:20 <sipa> the script based stuff?
922018-09-10T05:39:33 <sipa> script doesn't have any recoverable sigs
932018-09-10T05:39:33 <kallewoof> Was gonna just say "include a 1 byte 'flags' whose lower 2 bits are the recid and upper 6 bits reserved for future flags". Yeah.
942018-09-10T05:39:50 <sipa> that makes no sense
952018-09-10T05:40:00 <kallewoof> Because you can just brute force it?
962018-09-10T05:40:05 <sipa> they whole point is that you can just reuse script
972018-09-10T05:40:07 <sipa> no
982018-09-10T05:40:20 <sipa> the signature can literally just be a witness
992018-09-10T05:40:31 <sipa> which for a p2wpkh output contains a pubkey+sig
1002018-09-10T05:40:34 <kallewoof> Doh. Yeah.
1012018-09-10T05:40:46 <sipa> it's a bit longer, but meh
1022018-09-10T05:41:02 <kallewoof> I got things mixed up. I somehow assumed I needed the pubkey
1032018-09-10T05:41:07 <sipa> it's super flexible, and you don't need any script modifications at all
1042018-09-10T05:41:13 <kallewoof> Yeah
1052018-09-10T05:54:40 *** jarthur has quit IRC
1062018-09-10T06:44:38 *** Krellan has quit IRC
1072018-09-10T06:45:35 *** Krellan has joined #bitcoin-core-dev
1082018-09-10T06:50:35 *** Victorsueca has quit IRC
1092018-09-10T06:51:43 *** Victorsueca has joined #bitcoin-core-dev
1102018-09-10T07:11:40 *** setpill has joined #bitcoin-core-dev
1112018-09-10T07:17:03 *** setpill has quit IRC
1122018-09-10T07:17:22 *** setpill has joined #bitcoin-core-dev
1132018-09-10T07:22:13 *** setpill has quit IRC
1142018-09-10T07:22:38 *** setpill has joined #bitcoin-core-dev
1152018-09-10T07:30:32 <provoostenator> Not sure how much people rely on the "mark as resolved" feature on Github, but I've already seen it vandalized at least once by drive-by-resolvers.
1162018-09-10T07:34:09 <wumpus> I didn't even know such a feature existed, it's curious that it allows for drive-by-resolvers and not only the opener to resolve it as on most sites
1172018-09-10T07:43:28 *** miknotauro has joined #bitcoin-core-dev
1182018-09-10T07:46:08 *** Soligor has quit IRC
1192018-09-10T07:46:55 *** setpill has quit IRC
1202018-09-10T07:48:58 *** setpill has joined #bitcoin-core-dev
1212018-09-10T07:55:05 <kallewoof> I was afraid to touch it. Anyone can resolve anything? That sounds broken
1222018-09-10T08:38:10 *** Zenton has joined #bitcoin-core-dev
1232018-09-10T08:44:27 *** phwalkr has joined #bitcoin-core-dev
1242018-09-10T08:54:02 *** Victorsueca has quit IRC
1252018-09-10T08:55:13 *** Victorsueca has joined #bitcoin-core-dev
1262018-09-10T08:56:56 <wumpus> cannot find anything about this feature online
1272018-09-10T08:57:57 <wumpus> provoostenator: how would one (hypothetically speaking) go and abuse this feature?
1282018-09-10T09:04:21 *** timothy has joined #bitcoin-core-dev
1292018-09-10T09:05:50 *** cisba has joined #bitcoin-core-dev
1302018-09-10T09:52:34 <provoostenator> Marking a comment as resolved hides the thread for other reviewers by default. So basically you should always unfold them to see if you agree a comment was addressed.
1312018-09-10T09:53:33 <provoostenator> It's a rather stupid feature IMO, only the person raising an issue should be able to mark it as resolved, if anyone.
1322018-09-10T09:56:45 *** setpill has quit IRC
1332018-09-10T09:57:09 *** setpill has joined #bitcoin-core-dev
1342018-09-10T10:13:16 *** ConTa has quit IRC
1352018-09-10T10:31:05 <aj> provoostenator: repo owners being able to makes sense too... i keep getting worried about misclicking on those buttons when reading reviews now :(
1362018-09-10T10:46:36 *** Chris_Stewart_5 has joined #bitcoin-core-dev
1372018-09-10T11:02:57 *** Krellan has quit IRC
1382018-09-10T11:03:44 *** Krellan has joined #bitcoin-core-dev
1392018-09-10T11:15:01 *** hebasto has joined #bitcoin-core-dev
1402018-09-10T11:29:14 *** RubenSomsen has quit IRC
1412018-09-10T11:35:40 *** AaronvanW has joined #bitcoin-core-dev
1422018-09-10T11:38:52 *** AaronvanW has quit IRC
1432018-09-10T11:41:18 *** AaronvanW has joined #bitcoin-core-dev
1442018-09-10T11:43:58 *** setpill has quit IRC
1452018-09-10T12:18:15 *** Chris_Stewart_5 has quit IRC
1462018-09-10T12:29:37 *** prod_ has joined #bitcoin-core-dev
1472018-09-10T12:39:37 *** promag has joined #bitcoin-core-dev
1482018-09-10T12:52:21 *** promag has quit IRC
1492018-09-10T12:52:54 *** promag has joined #bitcoin-core-dev
1502018-09-10T12:57:08 *** promag has quit IRC
1512018-09-10T12:59:19 *** Aaronvan_ has joined #bitcoin-core-dev
1522018-09-10T13:00:06 *** Victorsueca has quit IRC
1532018-09-10T13:01:14 *** Victorsueca has joined #bitcoin-core-dev
1542018-09-10T13:02:31 *** AaronvanW has quit IRC
1552018-09-10T13:18:02 *** phwalkr has joined #bitcoin-core-dev
1562018-09-10T13:22:16 *** Chris_Stewart_5 has joined #bitcoin-core-dev
1572018-09-10T13:41:35 *** Guyver2 has joined #bitcoin-core-dev
1582018-09-10T14:02:19 *** Zenton has quit IRC
1592018-09-10T14:02:34 *** Zenton has joined #bitcoin-core-dev
1602018-09-10T14:16:29 *** Dizzle has joined #bitcoin-core-dev
1612018-09-10T14:26:57 *** promag has joined #bitcoin-core-dev
1622018-09-10T14:39:03 *** Victorsueca has quit IRC
1632018-09-10T14:39:38 *** Chris_Stewart_5 has quit IRC
1642018-09-10T14:40:15 *** Victorsueca has joined #bitcoin-core-dev
1652018-09-10T14:42:05 *** michaelsdunn1 has joined #bitcoin-core-dev
1662018-09-10T14:45:36 *** Chris_Stewart_5 has joined #bitcoin-core-dev
1672018-09-10T14:49:09 *** belcher has joined #bitcoin-core-dev
1682018-09-10T14:51:06 *** SopaXorzTaker has joined #bitcoin-core-dev
1692018-09-10T15:07:07 *** promag has quit IRC
1702018-09-10T15:17:38 *** RubenSomsen has joined #bitcoin-core-dev
1712018-09-10T15:18:56 *** jarthur has joined #bitcoin-core-dev
1722018-09-10T15:25:53 *** farmerwampum has joined #bitcoin-core-dev
1732018-09-10T16:04:29 *** phwalkr has quit IRC
1742018-09-10T16:07:25 *** timothy has quit IRC
1752018-09-10T17:11:46 *** lnostdal has quit IRC
1762018-09-10T17:21:07 *** grubles has joined #bitcoin-core-dev
1772018-09-10T17:26:28 *** Krellan has quit IRC
1782018-09-10T17:34:27 *** miknotauro has quit IRC
1792018-09-10T17:36:07 *** spinza has quit IRC
1802018-09-10T17:37:37 *** blackbaba has joined #bitcoin-core-dev
1812018-09-10T17:41:24 *** blackbaba has quit IRC
1822018-09-10T17:42:12 *** Zenton has quit IRC
1832018-09-10T17:46:02 *** spinza has joined #bitcoin-core-dev
1842018-09-10T18:29:17 *** grubles has quit IRC
1852018-09-10T18:31:23 *** grubles has joined #bitcoin-core-dev
1862018-09-10T18:31:47 *** grubles has quit IRC
1872018-09-10T18:32:12 *** grubles has joined #bitcoin-core-dev
1882018-09-10T18:41:33 *** owowo has quit IRC
1892018-09-10T18:42:51 <instagibbs> um am i the only person getting importmulti rpc test failure on master, "bytes_to_hex_str" not defined?
1902018-09-10T18:43:01 *** owowo has joined #bitcoin-core-dev
1912018-09-10T18:43:16 <instagibbs> ok fixed just a bit ago, nvm
1922018-09-10T18:44:28 *** spinza has quit IRC
1932018-09-10T18:48:32 *** lnostdal has joined #bitcoin-core-dev
1942018-09-10T18:49:49 *** SopaXorzTaker has quit IRC
1952018-09-10T18:57:10 *** Krellan has joined #bitcoin-core-dev
1962018-09-10T18:59:40 *** jarthur_ has joined #bitcoin-core-dev
1972018-09-10T19:02:42 *** Dizzle has quit IRC
1982018-09-10T19:02:58 *** jarthur has quit IRC
1992018-09-10T19:06:17 *** grubles has quit IRC
2002018-09-10T19:07:44 *** grubles has joined #bitcoin-core-dev
2012018-09-10T19:07:50 *** grubles has quit IRC
2022018-09-10T19:08:00 *** nehan has joined #bitcoin-core-dev
2032018-09-10T19:10:15 *** StopAndDecrypt has quit IRC
2042018-09-10T19:11:53 *** StopAndDecrypt has joined #bitcoin-core-dev
2052018-09-10T19:16:21 *** Rootsudo has joined #bitcoin-core-dev
2062018-09-10T19:17:09 *** jamesob has quit IRC
2072018-09-10T19:17:25 *** jamesob has joined #bitcoin-core-dev
2082018-09-10T19:18:31 *** StopAndDecrypt has quit IRC
2092018-09-10T19:19:08 *** StopAndDecrypt has joined #bitcoin-core-dev
2102018-09-10T19:23:40 *** spinza has joined #bitcoin-core-dev
2112018-09-10T19:35:54 *** Zenton has joined #bitcoin-core-dev
2122018-09-10T20:01:57 *** phwalkr has joined #bitcoin-core-dev
2132018-09-10T20:06:18 *** phwalkr has quit IRC
2142018-09-10T20:41:24 *** spinza has quit IRC
2152018-09-10T20:44:06 *** grubles has joined #bitcoin-core-dev
2162018-09-10T21:03:25 *** promag has joined #bitcoin-core-dev
2172018-09-10T21:08:00 *** promag has quit IRC
2182018-09-10T21:12:21 *** brianhoffman has joined #bitcoin-core-dev
2192018-09-10T21:13:42 *** spinza has joined #bitcoin-core-dev
2202018-09-10T21:22:34 *** spinza has quit IRC
2212018-09-10T21:46:09 *** spinza has joined #bitcoin-core-dev
2222018-09-10T21:57:35 *** phwalkr has joined #bitcoin-core-dev
2232018-09-10T22:00:52 *** phwalkr has quit IRC
2242018-09-10T22:00:58 *** phwalkr has joined #bitcoin-core-dev
2252018-09-10T22:04:59 *** miknotauro has joined #bitcoin-core-dev
2262018-09-10T22:11:18 *** spinza has quit IRC
2272018-09-10T22:13:48 *** Chris_Stewart_5 has quit IRC
2282018-09-10T22:17:56 *** spinza has joined #bitcoin-core-dev
2292018-09-10T22:18:16 *** belcher has quit IRC
2302018-09-10T22:26:43 *** miknotauro has quit IRC
2312018-09-10T22:45:42 *** michaelsdunn1 has quit IRC
2322018-09-10T22:46:34 *** Guyver2 has quit IRC
2332018-09-10T23:05:46 *** hebasto has quit IRC
2342018-09-10T23:28:20 *** phwalkr has quit IRC
2352018-09-10T23:39:28 *** Aaronvan_ has quit IRC
2362018-09-10T23:40:07 *** AaronvanW has joined #bitcoin-core-dev
2372018-09-10T23:49:13 *** miknotauro has joined #bitcoin-core-dev