1 2018-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?
  2 2018-09-10T00:02:49  <echeveria> ProcessMessage is where the magic happens.
  3 2018-09-10T00:03:17  <dongcarl> echeveria: I'm also seeing that CConnman is also important?
  4 2018-09-10T00:05:41  <sipa> echeveria: ProcessMessage is message processing, not network code
  5 2018-09-10T00:05:41  <dongcarl> Is... ProcessMessage a 1300-line function?
  6 2018-09-10T00:06:03  <sipa> sure
  7 2018-09-10T00:06:14  <echeveria> dongcarl: look at CConnman::ThreadSocketHandler, etc.
  8 2018-09-10T00:07:02  <dongcarl> Ahhhh... anything other than CConnman?
  9 2018-09-10T00:07:53  <sipa> echeveria: almost
 10 2018-09-10T00:08:02  <sipa> socket handling deals with connections that are already open
 11 2018-09-10T00:08:12  <echeveria> sipa: can we go back to 0.1 where things make sense?
 12 2018-09-10T00:08:19  <sipa> echeveria: they didn't
 13 2018-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?
 14 2018-09-10T00:09:27  <sipa> dongcarl: most basic is probably ConnectSocketDirectly in netbase.cpp
 15 2018-09-10T00:10:04  <sipa> dongcarl: then CConnman::ConnectNode is higher level
 16 2018-09-10T00:10:04  *** jarthur has joined #bitcoin-core-dev
 17 2018-09-10T00:10:24  <sipa> then OpenNetworkConnection on top of that
 18 2018-09-10T00:11:31  <echeveria> sipa: still fascinating that it worked at all.
 19 2018-09-10T00:14:16  <midnightmagic> I didn't like the interleaved logic, but I found the old code to be extremely legible.
 20 2018-09-10T00:14:27  <echeveria> hey at least bitcoin doesn't make HTTP requests using raw sockets now.
 21 2018-09-10T00:14:37  <dongcarl> ThreadOpenConnections -> OpenNetworkConnection -> ConnectNode -> ConnectSocketDirectly ?
 22 2018-09-10T00:15:27  <dongcarl> and Start -> ThreadOpenConnections ofc
 23 2018-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
 24 2018-09-10T00:26:58  <sipa> midnightmagic: turns out there was a callback from the script execution code into the wallet...
 25 2018-09-10T00:27:34  <sipa> but sure, things have gotten a lot more complicated since
 26 2018-09-10T00:27:39  <sipa> the code also does a lot more
 27 2018-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. :)
 28 2018-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?
 29 2018-09-10T00:32:35  <midnightmagic> sipa: tangentially, you ever detail your dev tools anywhere?
 30 2018-09-10T00:34:25  <dongcarl> midnightmagic: SuperCoder 2000 ofc
 31 2018-09-10T00:41:46  *** Victorsueca has quit IRC
 32 2018-09-10T00:42:57  *** Victorsueca has joined #bitcoin-core-dev
 33 2018-09-10T00:45:23  *** Dizzle has joined #bitcoin-core-dev
 34 2018-09-10T00:47:50  <sipa> midnightmagic: i only use git grep and mcedit :)
 35 2018-09-10T00:48:18  <sipa> dongcarl: i don't think the libconsensus api ever changed
 36 2018-09-10T00:48:33  <sipa> apart from the addition of tx amounts for segwit
 37 2018-09-10T00:51:21  <dongcarl> sipa: Is there a particular reason why there was lack of interest in the PRs?
 38 2018-09-10T00:55:00  <sipa> dongcarl: lack of agreement on approach, i think
 39 2018-09-10T00:57:20  <sipa> and refactorings that keep going on for a long time are annoying to other contributors
 40 2018-09-10T00:58:09  <dongcarl> sipa: are the conversations/discussions recorded somehwere?
 41 2018-09-10T00:59:15  <midnightmagic> sipa: lol dangit. I forgot you do the same sort of thing I do.
 42 2018-09-10T01:01:55  <sipa> dongcarl: irc and github...
 43 2018-09-10T01:02:01  *** DigiByteDev has quit IRC
 44 2018-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
 45 2018-09-10T01:13:04  <dongcarl> sipa: Makes sense... Would Tokyo be a good place to talk about this?
 46 2018-09-10T01:23:10  <sipa> maybe
 47 2018-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?
 48 2018-09-10T01:28:10  <jarthur> libboost 1.62.0.1 packages
 49 2018-09-10T01:35:55  <sipa> jarthur: have you tried reinstalling the boost packages?
 50 2018-09-10T01:36:01  <sipa> make sure they're all the same version
 51 2018-09-10T01:36:19  <sipa> if you have a locally installed version, point the configure script to it
 52 2018-09-10T01:38:13  *** Chris_Stewart_5 has joined #bitcoin-core-dev
 53 2018-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.
 54 2018-09-10T01:45:04  <sipa> also try clearing your config cache
 55 2018-09-10T01:45:22  <sipa> "git clear -dfx" wipes everything not committed in the source tree
 56 2018-09-10T01:48:46  <jarthur> Using the source tgz
 57 2018-09-10T01:49:06  <sipa> in that case, delete the build dir and extract again
 58 2018-09-10T01:49:20  <sipa> (but you should really consider building from git, if you do it repeatedly)
 59 2018-09-10T01:49:34  *** RubenSomsen has joined #bitcoin-core-dev
 60 2018-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.
 61 2018-09-10T02:02:52  <jarthur> s/libbost/libboost/
 62 2018-09-10T02:07:42  *** Chris_Stewart_5 has quit IRC
 63 2018-09-10T02:38:55  *** grubles has quit IRC
 64 2018-09-10T02:47:15  *** rex4539 has quit IRC
 65 2018-09-10T02:55:30  *** mdrollette has quit IRC
 66 2018-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.
 67 2018-09-10T03:03:49  *** phwalkr has joined #bitcoin-core-dev
 68 2018-09-10T03:19:46  *** itaseski has quit IRC
 69 2018-09-10T03:24:37  *** ken2812221_ is now known as ken2812221
 70 2018-09-10T03:25:52  <ken2812221> jarthur: libboost-program-options-dev is no longer required since #13482
 71 2018-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
 72 2018-09-10T03:26:40  <Dizzle> ken2812221: yep, you're so right
 73 2018-09-10T03:26:45  <Dizzle> thanks!
 74 2018-09-10T03:26:58  <jarthur> ty
 75 2018-09-10T03:53:55  *** phwalkr has quit IRC
 76 2018-09-10T03:56:00  *** phwalkr has joined #bitcoin-core-dev
 77 2018-09-10T04:09:30  *** phwalkr has quit IRC
 78 2018-09-10T04:48:52  *** miknotauro has quit IRC
 79 2018-09-10T05:03:14  *** Dizzle has quit IRC
 80 2018-09-10T05:12:32  *** Krellan has quit IRC
 81 2018-09-10T05:13:13  *** Krellan has joined #bitcoin-core-dev
 82 2018-09-10T05:26:42  *** rex4539 has joined #bitcoin-core-dev
 83 2018-09-10T05:32:18  <kallewoof> How do the recoverable ecsda signatures differ from the regular ones aside from the recid + compressed prefix byte?
 84 2018-09-10T05:37:27  <sipa> not
 85 2018-09-10T05:37:51  <sipa> they're literally a normal signature + recid
 86 2018-09-10T05:37:58  <kallewoof> Great! Thanks
 87 2018-09-10T05:38:05  <sipa> also, don't use them :)
 88 2018-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?
 89 2018-09-10T05:38:57  <kallewoof> +if not using recoverable sig
 90 2018-09-10T05:39:00  <kallewoof> Just brute force it?
 91 2018-09-10T05:39:20  <sipa> the script based stuff?
 92 2018-09-10T05:39:33  <sipa> script doesn't have any recoverable sigs
 93 2018-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.
 94 2018-09-10T05:39:50  <sipa> that makes no sense
 95 2018-09-10T05:40:00  <kallewoof> Because you can just brute force it?
 96 2018-09-10T05:40:05  <sipa> they whole point is that you can just reuse script
 97 2018-09-10T05:40:07  <sipa> no
 98 2018-09-10T05:40:20  <sipa> the signature can literally just be a witness
 99 2018-09-10T05:40:31  <sipa> which for a p2wpkh output contains a pubkey+sig
100 2018-09-10T05:40:34  <kallewoof> Doh. Yeah.
101 2018-09-10T05:40:46  <sipa> it's a bit longer, but meh
102 2018-09-10T05:41:02  <kallewoof> I got things mixed up. I somehow assumed I needed the pubkey
103 2018-09-10T05:41:07  <sipa> it's super flexible, and you don't need any script modifications at all
104 2018-09-10T05:41:13  <kallewoof> Yeah
105 2018-09-10T05:54:40  *** jarthur has quit IRC
106 2018-09-10T06:44:38  *** Krellan has quit IRC
107 2018-09-10T06:45:35  *** Krellan has joined #bitcoin-core-dev
108 2018-09-10T06:50:35  *** Victorsueca has quit IRC
109 2018-09-10T06:51:43  *** Victorsueca has joined #bitcoin-core-dev
110 2018-09-10T07:11:40  *** setpill has joined #bitcoin-core-dev
111 2018-09-10T07:17:03  *** setpill has quit IRC
112 2018-09-10T07:17:22  *** setpill has joined #bitcoin-core-dev
113 2018-09-10T07:22:13  *** setpill has quit IRC
114 2018-09-10T07:22:38  *** setpill has joined #bitcoin-core-dev
115 2018-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.
116 2018-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
117 2018-09-10T07:43:28  *** miknotauro has joined #bitcoin-core-dev
118 2018-09-10T07:46:08  *** Soligor has quit IRC
119 2018-09-10T07:46:55  *** setpill has quit IRC
120 2018-09-10T07:48:58  *** setpill has joined #bitcoin-core-dev
121 2018-09-10T07:55:05  <kallewoof> I was afraid to touch it. Anyone can resolve anything? That sounds broken
122 2018-09-10T08:38:10  *** Zenton has joined #bitcoin-core-dev
123 2018-09-10T08:44:27  *** phwalkr has joined #bitcoin-core-dev
124 2018-09-10T08:54:02  *** Victorsueca has quit IRC
125 2018-09-10T08:55:13  *** Victorsueca has joined #bitcoin-core-dev
126 2018-09-10T08:56:56  <wumpus> cannot find anything about this feature online
127 2018-09-10T08:57:57  <wumpus> provoostenator: how would one (hypothetically speaking) go and abuse this feature?
128 2018-09-10T09:04:21  *** timothy has joined #bitcoin-core-dev
129 2018-09-10T09:05:50  *** cisba has joined #bitcoin-core-dev
130 2018-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.
131 2018-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.
132 2018-09-10T09:56:45  *** setpill has quit IRC
133 2018-09-10T09:57:09  *** setpill has joined #bitcoin-core-dev
134 2018-09-10T10:13:16  *** ConTa has quit IRC
135 2018-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 :(
136 2018-09-10T10:46:36  *** Chris_Stewart_5 has joined #bitcoin-core-dev
137 2018-09-10T11:02:57  *** Krellan has quit IRC
138 2018-09-10T11:03:44  *** Krellan has joined #bitcoin-core-dev
139 2018-09-10T11:15:01  *** hebasto has joined #bitcoin-core-dev
140 2018-09-10T11:29:14  *** RubenSomsen has quit IRC
141 2018-09-10T11:35:40  *** AaronvanW has joined #bitcoin-core-dev
142 2018-09-10T11:38:52  *** AaronvanW has quit IRC
143 2018-09-10T11:41:18  *** AaronvanW has joined #bitcoin-core-dev
144 2018-09-10T11:43:58  *** setpill has quit IRC
145 2018-09-10T12:18:15  *** Chris_Stewart_5 has quit IRC
146 2018-09-10T12:29:37  *** prod_ has joined #bitcoin-core-dev
147 2018-09-10T12:39:37  *** promag has joined #bitcoin-core-dev
148 2018-09-10T12:52:21  *** promag has quit IRC
149 2018-09-10T12:52:54  *** promag has joined #bitcoin-core-dev
150 2018-09-10T12:57:08  *** promag has quit IRC
151 2018-09-10T12:59:19  *** Aaronvan_ has joined #bitcoin-core-dev
152 2018-09-10T13:00:06  *** Victorsueca has quit IRC
153 2018-09-10T13:01:14  *** Victorsueca has joined #bitcoin-core-dev
154 2018-09-10T13:02:31  *** AaronvanW has quit IRC
155 2018-09-10T13:18:02  *** phwalkr has joined #bitcoin-core-dev
156 2018-09-10T13:22:16  *** Chris_Stewart_5 has joined #bitcoin-core-dev
157 2018-09-10T13:41:35  *** Guyver2 has joined #bitcoin-core-dev
158 2018-09-10T14:02:19  *** Zenton has quit IRC
159 2018-09-10T14:02:34  *** Zenton has joined #bitcoin-core-dev
160 2018-09-10T14:16:29  *** Dizzle has joined #bitcoin-core-dev
161 2018-09-10T14:26:57  *** promag has joined #bitcoin-core-dev
162 2018-09-10T14:39:03  *** Victorsueca has quit IRC
163 2018-09-10T14:39:38  *** Chris_Stewart_5 has quit IRC
164 2018-09-10T14:40:15  *** Victorsueca has joined #bitcoin-core-dev
165 2018-09-10T14:42:05  *** michaelsdunn1 has joined #bitcoin-core-dev
166 2018-09-10T14:45:36  *** Chris_Stewart_5 has joined #bitcoin-core-dev
167 2018-09-10T14:49:09  *** belcher has joined #bitcoin-core-dev
168 2018-09-10T14:51:06  *** SopaXorzTaker has joined #bitcoin-core-dev
169 2018-09-10T15:07:07  *** promag has quit IRC
170 2018-09-10T15:17:38  *** RubenSomsen has joined #bitcoin-core-dev
171 2018-09-10T15:18:56  *** jarthur has joined #bitcoin-core-dev
172 2018-09-10T15:25:53  *** farmerwampum has joined #bitcoin-core-dev
173 2018-09-10T16:04:29  *** phwalkr has quit IRC
174 2018-09-10T16:07:25  *** timothy has quit IRC
175 2018-09-10T17:11:46  *** lnostdal has quit IRC
176 2018-09-10T17:21:07  *** grubles has joined #bitcoin-core-dev
177 2018-09-10T17:26:28  *** Krellan has quit IRC
178 2018-09-10T17:34:27  *** miknotauro has quit IRC
179 2018-09-10T17:36:07  *** spinza has quit IRC
180 2018-09-10T17:37:37  *** blackbaba has joined #bitcoin-core-dev
181 2018-09-10T17:41:24  *** blackbaba has quit IRC
182 2018-09-10T17:42:12  *** Zenton has quit IRC
183 2018-09-10T17:46:02  *** spinza has joined #bitcoin-core-dev
184 2018-09-10T18:29:17  *** grubles has quit IRC
185 2018-09-10T18:31:23  *** grubles has joined #bitcoin-core-dev
186 2018-09-10T18:31:47  *** grubles has quit IRC
187 2018-09-10T18:32:12  *** grubles has joined #bitcoin-core-dev
188 2018-09-10T18:41:33  *** owowo has quit IRC
189 2018-09-10T18:42:51  <instagibbs> um am i the only person getting importmulti rpc test failure on master, "bytes_to_hex_str" not defined?
190 2018-09-10T18:43:01  *** owowo has joined #bitcoin-core-dev
191 2018-09-10T18:43:16  <instagibbs> ok fixed just a bit ago, nvm
192 2018-09-10T18:44:28  *** spinza has quit IRC
193 2018-09-10T18:48:32  *** lnostdal has joined #bitcoin-core-dev
194 2018-09-10T18:49:49  *** SopaXorzTaker has quit IRC
195 2018-09-10T18:57:10  *** Krellan has joined #bitcoin-core-dev
196 2018-09-10T18:59:40  *** jarthur_ has joined #bitcoin-core-dev
197 2018-09-10T19:02:42  *** Dizzle has quit IRC
198 2018-09-10T19:02:58  *** jarthur has quit IRC
199 2018-09-10T19:06:17  *** grubles has quit IRC
200 2018-09-10T19:07:44  *** grubles has joined #bitcoin-core-dev
201 2018-09-10T19:07:50  *** grubles has quit IRC
202 2018-09-10T19:08:00  *** nehan has joined #bitcoin-core-dev
203 2018-09-10T19:10:15  *** StopAndDecrypt has quit IRC
204 2018-09-10T19:11:53  *** StopAndDecrypt has joined #bitcoin-core-dev
205 2018-09-10T19:16:21  *** Rootsudo has joined #bitcoin-core-dev
206 2018-09-10T19:17:09  *** jamesob has quit IRC
207 2018-09-10T19:17:25  *** jamesob has joined #bitcoin-core-dev
208 2018-09-10T19:18:31  *** StopAndDecrypt has quit IRC
209 2018-09-10T19:19:08  *** StopAndDecrypt has joined #bitcoin-core-dev
210 2018-09-10T19:23:40  *** spinza has joined #bitcoin-core-dev
211 2018-09-10T19:35:54  *** Zenton has joined #bitcoin-core-dev
212 2018-09-10T20:01:57  *** phwalkr has joined #bitcoin-core-dev
213 2018-09-10T20:06:18  *** phwalkr has quit IRC
214 2018-09-10T20:41:24  *** spinza has quit IRC
215 2018-09-10T20:44:06  *** grubles has joined #bitcoin-core-dev
216 2018-09-10T21:03:25  *** promag has joined #bitcoin-core-dev
217 2018-09-10T21:08:00  *** promag has quit IRC
218 2018-09-10T21:12:21  *** brianhoffman has joined #bitcoin-core-dev
219 2018-09-10T21:13:42  *** spinza has joined #bitcoin-core-dev
220 2018-09-10T21:22:34  *** spinza has quit IRC
221 2018-09-10T21:46:09  *** spinza has joined #bitcoin-core-dev
222 2018-09-10T21:57:35  *** phwalkr has joined #bitcoin-core-dev
223 2018-09-10T22:00:52  *** phwalkr has quit IRC
224 2018-09-10T22:00:58  *** phwalkr has joined #bitcoin-core-dev
225 2018-09-10T22:04:59  *** miknotauro has joined #bitcoin-core-dev
226 2018-09-10T22:11:18  *** spinza has quit IRC
227 2018-09-10T22:13:48  *** Chris_Stewart_5 has quit IRC
228 2018-09-10T22:17:56  *** spinza has joined #bitcoin-core-dev
229 2018-09-10T22:18:16  *** belcher has quit IRC
230 2018-09-10T22:26:43  *** miknotauro has quit IRC
231 2018-09-10T22:45:42  *** michaelsdunn1 has quit IRC
232 2018-09-10T22:46:34  *** Guyver2 has quit IRC
233 2018-09-10T23:05:46  *** hebasto has quit IRC
234 2018-09-10T23:28:20  *** phwalkr has quit IRC
235 2018-09-10T23:39:28  *** Aaronvan_ has quit IRC
236 2018-09-10T23:40:07  *** AaronvanW has joined #bitcoin-core-dev
237 2018-09-10T23:49:13  *** miknotauro has joined #bitcoin-core-dev