1 2017-02-10T00:17:06  *** mnk has quit IRC
  2 2017-02-10T00:17:35  *** airbreather has joined #bitcoin-dev
  3 2017-02-10T00:25:26  *** Starduster has quit IRC
  4 2017-02-10T00:30:34  *** JackH has quit IRC
  5 2017-02-10T00:40:52  *** Guyver2 has quit IRC
  6 2017-02-10T00:42:22  *** harai has quit IRC
  7 2017-02-10T00:48:43  *** Burrito has quit IRC
  8 2017-02-10T00:59:55  *** wasi has quit IRC
  9 2017-02-10T01:00:05  *** Elglobo has quit IRC
 10 2017-02-10T01:01:41  *** abpa has quit IRC
 11 2017-02-10T01:02:30  *** robink has quit IRC
 12 2017-02-10T01:02:30  *** oleganza has quit IRC
 13 2017-02-10T01:02:40  *** mnk has joined #bitcoin-dev
 14 2017-02-10T01:02:55  <bsm117532> Another regtest monkey wrench...I need a segwit only wallet.  But at block 0 on regtest segwit isn't enabled.  Is there a way to get it enabled from block zero?
 15 2017-02-10T01:02:57  *** robinak has joined #bitcoin-dev
 16 2017-02-10T01:04:07  *** wasi has joined #bitcoin-dev
 17 2017-02-10T01:10:50  *** Elglobo has joined #bitcoin-dev
 18 2017-02-10T01:13:08  *** agricocb has quit IRC
 19 2017-02-10T01:20:08  *** NewLiberty has quit IRC
 20 2017-02-10T01:32:05  *** mnk has quit IRC
 21 2017-02-10T01:32:19  *** Newyorkadam has joined #bitcoin-dev
 22 2017-02-10T01:35:11  *** Giszmo has quit IRC
 23 2017-02-10T01:36:45  *** Elglobo has quit IRC
 24 2017-02-10T01:43:29  *** Newyorkadam has quit IRC
 25 2017-02-10T01:44:01  *** Elglobo has joined #bitcoin-dev
 26 2017-02-10T01:44:24  *** Newyorkadam has joined #bitcoin-dev
 27 2017-02-10T01:54:46  *** harai has joined #bitcoin-dev
 28 2017-02-10T01:55:13  *** mnk has joined #bitcoin-dev
 29 2017-02-10T01:57:35  *** agricocb has joined #bitcoin-dev
 30 2017-02-10T01:59:01  *** mnk has quit IRC
 31 2017-02-10T02:00:08  *** harai has quit IRC
 32 2017-02-10T02:02:08  *** harai has joined #bitcoin-dev
 33 2017-02-10T02:02:45  *** harai has quit IRC
 34 2017-02-10T02:15:35  *** Elglobo has quit IRC
 35 2017-02-10T02:15:57  *** Elglobo has joined #bitcoin-dev
 36 2017-02-10T02:16:51  *** da2ce7 has quit IRC
 37 2017-02-10T02:17:43  *** cyphase has joined #bitcoin-dev
 38 2017-02-10T02:18:07  *** blueness has quit IRC
 39 2017-02-10T02:19:02  *** da2ce7 has joined #bitcoin-dev
 40 2017-02-10T02:24:58  *** blueness has joined #bitcoin-dev
 41 2017-02-10T02:30:49  *** da2ce7 has quit IRC
 42 2017-02-10T02:37:34  *** Newyorkadam has quit IRC
 43 2017-02-10T02:44:36  *** Diablo-D3 has quit IRC
 44 2017-02-10T02:53:44  *** HostFat__ has joined #bitcoin-dev
 45 2017-02-10T02:57:05  *** HostFat_ has quit IRC
 46 2017-02-10T02:59:42  *** Diablo-D3 has joined #bitcoin-dev
 47 2017-02-10T03:15:02  *** Delta_ has joined #bitcoin-dev
 48 2017-02-10T03:16:08  *** Newyorkadam has joined #bitcoin-dev
 49 2017-02-10T03:19:12  *** Subo1977 has quit IRC
 50 2017-02-10T03:37:30  *** jtimon has quit IRC
 51 2017-02-10T03:44:27  *** HostFat__ has quit IRC
 52 2017-02-10T03:56:40  *** rodarmor has joined #bitcoin-dev
 53 2017-02-10T04:10:52  *** ThomasV has joined #bitcoin-dev
 54 2017-02-10T04:12:10  *** oleganza has joined #bitcoin-dev
 55 2017-02-10T04:19:52  *** TheSeven has quit IRC
 56 2017-02-10T04:22:18  *** TheSeven has joined #bitcoin-dev
 57 2017-02-10T04:27:17  *** twistedline has joined #bitcoin-dev
 58 2017-02-10T04:48:41  *** mountaingoat has quit IRC
 59 2017-02-10T04:55:54  *** btiefert has quit IRC
 60 2017-02-10T04:56:19  *** btiefert has joined #bitcoin-dev
 61 2017-02-10T05:02:16  *** mountaingoat has joined #bitcoin-dev
 62 2017-02-10T05:17:02  *** ThomasV has quit IRC
 63 2017-02-10T05:18:40  *** Sosumi has quit IRC
 64 2017-02-10T05:23:26  *** goksinen has joined #bitcoin-dev
 65 2017-02-10T05:26:59  *** impulse has quit IRC
 66 2017-02-10T05:28:45  *** goksinen has quit IRC
 67 2017-02-10T05:30:17  *** mountaingoat has quit IRC
 68 2017-02-10T05:40:12  *** cannon-c has joined #bitcoin-dev
 69 2017-02-10T05:48:22  *** mountaingoat has joined #bitcoin-dev
 70 2017-02-10T05:52:01  *** janko33 has joined #bitcoin-dev
 71 2017-02-10T06:00:06  *** TheSeven has quit IRC
 72 2017-02-10T06:00:26  *** TheSeven has joined #bitcoin-dev
 73 2017-02-10T06:04:19  *** instagibbs has quit IRC
 74 2017-02-10T06:06:12  *** instagibbs has joined #bitcoin-dev
 75 2017-02-10T06:13:40  *** btiefert has quit IRC
 76 2017-02-10T06:13:55  *** btiefert has joined #bitcoin-dev
 77 2017-02-10T06:15:14  *** btiefert has quit IRC
 78 2017-02-10T06:18:20  *** impulse has joined #bitcoin-dev
 79 2017-02-10T06:21:11  *** Newyorkadam has quit IRC
 80 2017-02-10T06:33:05  *** oleganza has quit IRC
 81 2017-02-10T06:40:21  *** janko33 has quit IRC
 82 2017-02-10T06:41:58  *** reBrain has joined #bitcoin-dev
 83 2017-02-10T06:56:54  *** Newyorkadam has joined #bitcoin-dev
 84 2017-02-10T07:03:18  *** jimpo has joined #bitcoin-dev
 85 2017-02-10T07:03:40  <jimpo> Can someone explain what the fClient flag means?
 86 2017-02-10T07:10:49  *** ThomasV has joined #bitcoin-dev
 87 2017-02-10T07:47:22  *** ongolaBoy has quit IRC
 88 2017-02-10T07:53:49  *** Newyorkadam has quit IRC
 89 2017-02-10T08:02:34  *** arubi has quit IRC
 90 2017-02-10T08:03:38  *** BashCo has quit IRC
 91 2017-02-10T08:03:57  *** arubi has joined #bitcoin-dev
 92 2017-02-10T08:16:49  <waxwing> bsm117532: what's wrong with just mining N blocks (where N is a number i can't remember)
 93 2017-02-10T08:17:08  <waxwing> oh i guess maybe it's the mining part you're interested in?
 94 2017-02-10T08:22:44  *** ongolaBoy has joined #bitcoin-dev
 95 2017-02-10T08:24:22  *** BashCo has joined #bitcoin-dev
 96 2017-02-10T08:32:19  *** jimpo has quit IRC
 97 2017-02-10T08:57:00  *** Burrito has joined #bitcoin-dev
 98 2017-02-10T09:03:39  *** nazarewk has joined #bitcoin-dev
 99 2017-02-10T09:17:40  *** mountaingoat has quit IRC
100 2017-02-10T09:21:39  *** reBrain has quit IRC
101 2017-02-10T09:28:51  *** echonaut has quit IRC
102 2017-02-10T09:29:05  *** echonaut has joined #bitcoin-dev
103 2017-02-10T09:30:05  *** echonaut has quit IRC
104 2017-02-10T09:30:19  *** echonaut has joined #bitcoin-dev
105 2017-02-10T09:30:51  *** echonaut has joined #bitcoin-dev
106 2017-02-10T09:40:22  *** echonaut has quit IRC
107 2017-02-10T09:40:53  *** echonaut has joined #bitcoin-dev
108 2017-02-10T09:41:21  *** echonaut has quit IRC
109 2017-02-10T09:44:26  *** kristofferR has quit IRC
110 2017-02-10T09:45:36  *** mountaingoat has joined #bitcoin-dev
111 2017-02-10T09:47:37  *** echonaut has joined #bitcoin-dev
112 2017-02-10T09:52:15  *** echonaut has quit IRC
113 2017-02-10T09:53:20  *** echonaut has joined #bitcoin-dev
114 2017-02-10T10:36:13  *** BashCo_ has joined #bitcoin-dev
115 2017-02-10T10:39:58  *** BashCo has quit IRC
116 2017-02-10T10:48:38  *** ThomasV has quit IRC
117 2017-02-10T10:48:41  *** kristofferR has joined #bitcoin-dev
118 2017-02-10T10:51:10  *** blueness has quit IRC
119 2017-02-10T10:54:43  *** blueness has joined #bitcoin-dev
120 2017-02-10T10:59:45  *** Starduster has joined #bitcoin-dev
121 2017-02-10T11:00:26  *** cannon-c has left #bitcoin-dev
122 2017-02-10T11:12:39  *** cannon-c has joined #bitcoin-dev
123 2017-02-10T11:14:01  *** blueness has quit IRC
124 2017-02-10T11:18:35  *** Guyver2 has joined #bitcoin-dev
125 2017-02-10T11:28:37  *** Belkaar has quit IRC
126 2017-02-10T11:29:37  *** Belkaar has joined #bitcoin-dev
127 2017-02-10T11:47:59  *** NewLiberty has joined #bitcoin-dev
128 2017-02-10T11:54:36  *** ThomasV has joined #bitcoin-dev
129 2017-02-10T11:59:06  *** RxMcDonald has joined #bitcoin-dev
130 2017-02-10T12:04:42  *** MichaelMeyer_ has joined #bitcoin-dev
131 2017-02-10T12:04:53  *** ThomasV has quit IRC
132 2017-02-10T12:05:52  *** CheckDavid has joined #bitcoin-dev
133 2017-02-10T12:07:06  *** RxMcDonald has quit IRC
134 2017-02-10T12:08:11  *** MichaelMeyer has quit IRC
135 2017-02-10T12:15:57  *** reBrain has joined #bitcoin-dev
136 2017-02-10T12:52:43  *** twistedline has quit IRC
137 2017-02-10T12:57:19  *** ThomasV has joined #bitcoin-dev
138 2017-02-10T13:04:19  *** MichaelMeyer_ has quit IRC
139 2017-02-10T13:05:19  *** NewLiberty has quit IRC
140 2017-02-10T13:07:36  *** reBrain has quit IRC
141 2017-02-10T13:22:49  *** janko33 has joined #bitcoin-dev
142 2017-02-10T13:27:32  *** MichaelMeyer has joined #bitcoin-dev
143 2017-02-10T13:27:40  *** MichaelMeyer has left #bitcoin-dev
144 2017-02-10T13:28:07  *** Giszmo has joined #bitcoin-dev
145 2017-02-10T13:28:17  *** MichaelMeyer has joined #bitcoin-dev
146 2017-02-10T13:28:39  *** agricocb has quit IRC
147 2017-02-10T13:37:03  *** Diablo-D3 has quit IRC
148 2017-02-10T13:38:50  *** RxMcDonald has joined #bitcoin-dev
149 2017-02-10T13:39:20  <RxMcDonald> Anyone knows how to convert uint256S to int and back?
150 2017-02-10T13:39:46  <RxMcDonald> I got this value 0x000000000000000000000000000000000000000000000005c13f99f6d0b1a908 and I want to make it a zero or 1 or just w/e I want ?
151 2017-02-10T13:46:01  <RxMcDonald> well, nvm i guess it's not a big deal for now
152 2017-02-10T13:51:38  *** Diablo-D3 has joined #bitcoin-dev
153 2017-02-10T13:57:12  *** agricocb has joined #bitcoin-dev
154 2017-02-10T14:15:48  *** Giszmo has quit IRC
155 2017-02-10T14:32:52  *** Giszmo has joined #bitcoin-dev
156 2017-02-10T14:40:23  *** jtimon has joined #bitcoin-dev
157 2017-02-10T14:46:05  *** Giszmo has quit IRC
158 2017-02-10T14:51:34  <RxMcDonald> Anyone here?
159 2017-02-10T14:51:50  <RxMcDonald> TZander: You there? 👋
160 2017-02-10T14:54:58  <RxMcDonald> I don't understand why It can't find then LogPrintf in chainparams.cpp after adding #include "util.h" ... ?
161 2017-02-10T15:00:35  *** nazarewk has quit IRC
162 2017-02-10T15:00:53  *** bugs_ has joined #bitcoin-dev
163 2017-02-10T15:01:12  *** Giszmo has joined #bitcoin-dev
164 2017-02-10T15:12:14  *** twistedline has joined #bitcoin-dev
165 2017-02-10T15:13:50  *** Newyorkadam has joined #bitcoin-dev
166 2017-02-10T15:22:48  *** Guyver2 has quit IRC
167 2017-02-10T15:33:49  <RxMcDonald> anyone here?
168 2017-02-10T15:34:14  *** CheckDavid has quit IRC
169 2017-02-10T15:35:12  <Chris_Stewart_5> RxMcDonald: will the uint256 fit inside of an 'int'?
170 2017-02-10T15:38:32  <RxMcDonald> Chris_Stewart_5: I'm not sure, but i kind of have a different problem now
171 2017-02-10T15:40:30  <RxMcDonald> it's still kind of the same problem though
172 2017-02-10T15:41:24  <RxMcDonald> want to print some debug info and it's throwing expression ('std::ostream' (aka 'basic_ostream<char>') and 'const uint256') Chris_Stewart_5
173 2017-02-10T15:42:14  <RxMcDonald> invalid operands to binary expression, so I guess i need to convert that to something for ostream or pass the right string placeholder, i.e. %s ?
174 2017-02-10T15:42:27  <Chris_Stewart_5> call .ToString() on uint256?
175 2017-02-10T15:43:04  <Chris_Stewart_5> https://github.com/bitcoin/bitcoin/blob/master/src/uint256.h#L54
176 2017-02-10T15:43:26  <RxMcDonald> member reference base type uint32_t aka unsigned int is not a structure or union
177 2017-02-10T15:44:32  <RxMcDonald> I guess I fixed it with %u instead of %s
178 2017-02-10T15:45:31  <RxMcDonald> now I broke something, it says symbols not found for architecture x86_64, linker command failed
179 2017-02-10T15:45:46  <RxMcDonald> so, i don't think I fixed anyhting, nice
180 2017-02-10T15:46:21  <RxMcDonald> gonna build again from sracth and see if that fixes it
181 2017-02-10T15:53:45  <RxMcDonald> Chris_Stewart_5: so, now I'm getting undefined symbols for x86_64 every time I try to compile it, fml
182 2017-02-10T15:54:21  <RxMcDonald> do you know how to find the exact place and reason for this? xD
183 2017-02-10T15:57:14  *** btiefert has joined #bitcoin-dev
184 2017-02-10T16:00:06  <Chris_Stewart_5> I'm sure honestly, can you paste the line of code in here? Or in pastebin or something?
185 2017-02-10T16:00:15  <Chris_Stewart_5> I'm *not* sure*
186 2017-02-10T16:01:42  *** btiefert has quit IRC
187 2017-02-10T16:01:55  *** btiefert has joined #bitcoin-dev
188 2017-02-10T16:02:32  <RxMcDonald> Chris_Stewart_5: I created a new issue on SO http://stackoverflow.com/questions/42163624/undefined-symbols-for-architecture-x86-64-when-compiling-bitcoin-from-source-in
189 2017-02-10T16:02:50  <RxMcDonald> The problem could be related to trying to print a uint256 value I guess ?
190 2017-02-10T16:04:06  *** btiefert has quit IRC
191 2017-02-10T16:04:12  <Chris_Stewart_5> I would put that piece of code in your question as it is relevant
192 2017-02-10T16:04:47  *** ongolaBoy has quit IRC
193 2017-02-10T16:05:50  <RxMcDonald> I made too many changes already I'm, not sure where the error could be anymore fml
194 2017-02-10T16:08:01  <RxMcDonald> I think i'm going to checkout the whole file, chainparams.cpp and see if that fixes it
195 2017-02-10T16:08:49  *** Newyorkadam has quit IRC
196 2017-02-10T16:09:29  *** Xanather has joined #bitcoin-dev
197 2017-02-10T16:09:44  <RxMcDonald> lmao still getting the same error
198 2017-02-10T16:13:49  <RxMcDonald> 3k compile errors and growing, nice
199 2017-02-10T16:14:11  <RxMcDonald> yep, same problem
200 2017-02-10T16:16:32  <RxMcDonald> I think it could be related to qt ?
201 2017-02-10T16:16:39  <RxMcDonald> gonna try building from the cli
202 2017-02-10T16:17:41  *** baldur has quit IRC
203 2017-02-10T16:19:11  <RxMcDonald> trying with the latest git commit before adding all these changes
204 2017-02-10T16:23:48  *** BashCo_ has quit IRC
205 2017-02-10T16:24:17  *** chjj has quit IRC
206 2017-02-10T16:25:35  *** Abstrct has joined #bitcoin-dev
207 2017-02-10T16:27:29  <Abstrct> Hi all, I'm looking for some help understanding the decoded read-out of a segwit transaction. Specifically (xtn) afa25ec695f2a3ee662da65e3d8379f87ff6aacb4517c212a7d7b21c063a274b
208 2017-02-10T16:28:10  <Abstrct> I'm hoping to trace it back to the previous input but I'm getting a tad lost in the data presentated and the docs
209 2017-02-10T16:29:16  <Chris_Stewart_5> RxMcDonald: I'm not familiar with qt at all unfortunately :-(
210 2017-02-10T16:29:21  <Abstrct> previous output*
211 2017-02-10T16:29:43  <RxMcDonald> Chris_Stewart_5: no it's not qt problem I think
212 2017-02-10T16:29:53  <Chris_Stewart_5> Abstrct: You should be able to paste it a block explorer and retrieve that tx
213 2017-02-10T16:30:03  *** chjj has joined #bitcoin-dev
214 2017-02-10T16:30:07  <arubi> Abstrct, there is no previous output.  it's the generation tx
215 2017-02-10T16:30:08  <RxMcDonald> I'm re compiling the version from the last git commit I made so if that works I fucked up somewhere along the way
216 2017-02-10T16:30:12  <Abstrct>  for the vin, I see it has "coinbase": "03d3971000fe8d039358fe20230a000963676d696e6572343208000000000000000000", "txinwitness": [  "0000000000000000000000000000000000000000000000000000000000000000" ], "sequence": 4294967295
217 2017-02-10T16:30:35  <arubi> right, that's the coinbase
218 2017-02-10T16:30:36  <Abstrct> from the core decoderawtransaction rpc call
219 2017-02-10T16:32:02  <RxMcDonald> yea it looks like it's working
220 2017-02-10T16:32:44  <Abstrct> so this one links back to block reward that went to a segwit addy?
221 2017-02-10T16:33:39  *** ThomasV has quit IRC
222 2017-02-10T16:33:43  <arubi> the block reward is sent to a normal p2pkh address
223 2017-02-10T16:34:02  <arubi> Abstrct, https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Commitment_structure
224 2017-02-10T16:35:39  <Abstrct> ya, I've read that a number of times but it's just not clicking for me :/
225 2017-02-10T16:35:51  <arubi> where are you stuck?
226 2017-02-10T16:37:34  <Abstrct> I'm not quite sure where the disconnect is for me. I like to think I understand what segwit is doing at a high level but I'm looking at that VIN and the BIP and I just don't see how it works.
227 2017-02-10T16:38:12  <arubi> again I ask, what specifically doesn't work for you? :)  I mean, what do you expect to happen, and what happens instead?
228 2017-02-10T16:38:32  <Abstrct> My goal is to identify the previous output that this vin spends
229 2017-02-10T16:38:35  *** RxMcDonald has quit IRC
230 2017-02-10T16:39:04  <Abstrct> but I'm not seeing the relatinoship between the two
231 2017-02-10T16:39:10  <arubi> there is not previous output
232 2017-02-10T16:39:43  <arubi> this is the transaction that pays the block reward.  there's only coinbase where the input will usually be
233 2017-02-10T16:39:45  <waxwing> it's a secret scam in bitcoin, don't tell anyone :)
234 2017-02-10T16:40:02  <arubi> hehe yea, if you run enough miners, you can actually create bitcoins from thin air!
235 2017-02-10T16:40:30  <Abstrct> ok, so this is the block reward. great
236 2017-02-10T16:40:43  <molz_> Abstrct,  which block is this?
237 2017-02-10T16:40:59  <arubi> 1087443 on testnet
238 2017-02-10T16:41:03  <Abstrct> 000000000a39c29f2a52b92bdd3492ebe692e6b719b993f82f0792ba6329b337
239 2017-02-10T16:41:08  <molz_> oh
240 2017-02-10T16:41:16  <molz_> i kept looking on mainnet lol
241 2017-02-10T16:41:25  <molz_> thanks arubi
242 2017-02-10T16:41:26  <Abstrct> heh no, xtn
243 2017-02-10T16:41:32  <arubi> I wish we had segwit on mainnet :)
244 2017-02-10T16:41:54  <Abstrct> not until I understand it pls D:
245 2017-02-10T16:42:10  <arubi> :)
246 2017-02-10T16:42:27  *** BashCo has joined #bitcoin-dev
247 2017-02-10T16:42:45  <molz_> well arubi there's still a lot of misunderstanding on segwit out there... blew my mind
248 2017-02-10T16:43:40  <arubi> yea tell me about it, it gets repeated so much that to some folks it looks like genuine information
249 2017-02-10T16:43:42  <Abstrct> so why in this case would the txwitness =  "0000000000000000000000000000000000000000000000000000000000000000"
250 2017-02-10T16:43:49  <Abstrct> what is this representing?
251 2017-02-10T16:44:02  <arubi> the witness reserved value
252 2017-02-10T16:45:01  <molz_> hm ..  block 1087443 didn't mind segwit version though
253 2017-02-10T16:45:07  <molz_> mine*
254 2017-02-10T16:45:39  <arubi> I guess you mean the bip9 version?  it's because it's already activated on testnet
255 2017-02-10T16:46:31  <molz_> or blocktrail is wrong
256 2017-02-10T16:47:08  <arubi> https://testnet.smartbit.com.au ftw
257 2017-02-10T16:47:30  <Abstrct> does anybdoy have an example of a tx with a segwit output being spent?
258 2017-02-10T16:47:49  <Abstrct> I mean, i could generate one.. but if you happen to have one handy
259 2017-02-10T16:48:34  <molz_> i have plenty
260 2017-02-10T16:49:41  <molz_> https://testnet.smartbit.com.au/tx/f70f161d77717cf30cec3560df6d26f463f001673a5c7c35383bcd646cc5feca
261 2017-02-10T16:51:00  <Abstrct> ok, this makes a lot more sense
262 2017-02-10T16:51:01  <Abstrct> thnx
263 2017-02-10T16:51:15  * Abstrct can deal with this now
264 2017-02-10T16:52:51  <molz_> decoderawtransaction for that tx:  http://paste.ubuntu.com/23967663/
265 2017-02-10T16:53:40  <Abstrct> This is what I always expected to see, basically no changes aside from some additioinal crap
266 2017-02-10T16:53:57  <arubi> \o/ soft fork
267 2017-02-10T16:54:34  <Abstrct> I think it was actually that second vout in the transaction I posted that was my actual bug, and appears unrelated to segwit
268 2017-02-10T16:55:38  <arubi> you mean the one in op_return?  that's where the commitment for segwit data is
269 2017-02-10T16:57:05  <Abstrct> ok, that makes sense too
270 2017-02-10T16:57:33  <Abstrct> but I can also not care about it in what I'm working on (famous last words..)
271 2017-02-10T17:03:12  <Abstrct> Thanks for all your help
272 2017-02-10T17:03:13  *** abpa has joined #bitcoin-dev
273 2017-02-10T17:06:11  <arubi> cheers
274 2017-02-10T17:07:06  *** Abstrct has left #bitcoin-dev
275 2017-02-10T17:15:36  *** NewLiberty has joined #bitcoin-dev
276 2017-02-10T17:17:36  *** mnk has joined #bitcoin-dev
277 2017-02-10T17:48:20  *** oleganza has joined #bitcoin-dev
278 2017-02-10T17:50:22  *** djoot has joined #bitcoin-dev
279 2017-02-10T18:02:15  *** Xanather has quit IRC
280 2017-02-10T18:27:12  *** jimpo has joined #bitcoin-dev
281 2017-02-10T18:27:37  <jimpo> Can someone explain what the fClient flag means?
282 2017-02-10T18:30:11  <arubi> jimpo, it would help if you provide context
283 2017-02-10T18:31:59  <jimpo> I've been poking around parts of Bitcoin core and found this flag https://github.com/bitcoin/bitcoin/blob/master/src/net.h#L604
284 2017-02-10T18:32:23  <jimpo> It looks like some sort of light, reduced verification mode
285 2017-02-10T18:32:30  <jimpo> that's been around since v0.1
286 2017-02-10T18:33:15  <jimpo> I still feel like I don't have the full picture on this flag and was hoping someone could shed some light
287 2017-02-10T18:34:13  <arubi> yea I see, looks like 'fClient = false; // set by version message' in net.cpp so maybe worth to look at "version message"
288 2017-02-10T18:34:25  <arubi> really haven't messed with p2p stuff at all
289 2017-02-10T18:49:28  *** ThomasV has joined #bitcoin-dev
290 2017-02-10T18:52:59  *** jimpo_ has joined #bitcoin-dev
291 2017-02-10T19:03:26  *** Giszmo has quit IRC
292 2017-02-10T19:15:52  <molz_> arubi, how did he get this from that block:  <Abstrct> so why in this case would the txwitness =  "0000000000000000000000000000000000000000000000000000000000000000"
293 2017-02-10T19:16:44  *** kristofferR has quit IRC
294 2017-02-10T19:18:09  *** Giszmo has joined #bitcoin-dev
295 2017-02-10T19:25:29  *** ThomasV has quit IRC
296 2017-02-10T19:25:43  *** Giszmo has quit IRC
297 2017-02-10T19:28:09  <arubi> it's called the witness reserved value, it's the witness for the coinbase "input|output", it says "0x20 0x0000000000000000000000000000000000000000000000000000000000000000" which is just a push operation that pushes 0x0000...
298 2017-02-10T19:28:44  <arubi> it's in the witness part of the transaction
299 2017-02-10T19:30:42  <arubi> (the generation transaction of that block)
300 2017-02-10T19:37:36  *** NewLiberty has quit IRC
301 2017-02-10T19:45:15  *** ThomasV has joined #bitcoin-dev
302 2017-02-10T19:45:37  *** jtimon has quit IRC
303 2017-02-10T19:49:35  *** chjj has quit IRC
304 2017-02-10T20:03:10  *** chjj has joined #bitcoin-dev
305 2017-02-10T20:06:35  *** jimpo has quit IRC
306 2017-02-10T20:37:19  *** NewLiberty has joined #bitcoin-dev
307 2017-02-10T21:22:25  *** JackH has joined #bitcoin-dev
308 2017-02-10T21:29:10  *** kristofferR has joined #bitcoin-dev
309 2017-02-10T21:33:08  *** dooglus has quit IRC
310 2017-02-10T21:33:28  *** dooglus has joined #bitcoin-dev
311 2017-02-10T21:36:22  *** ThomasV has quit IRC
312 2017-02-10T21:46:50  *** echonaut has quit IRC
313 2017-02-10T21:47:21  *** echonaut has joined #bitcoin-dev
314 2017-02-10T22:04:35  *** janko33 has quit IRC
315 2017-02-10T22:05:19  *** ThomasV has joined #bitcoin-dev
316 2017-02-10T22:13:27  *** NewLiberty_ has joined #bitcoin-dev
317 2017-02-10T22:17:08  *** NewLiberty has quit IRC
318 2017-02-10T22:24:51  *** chjj has quit IRC
319 2017-02-10T22:29:34  *** ThomasV has quit IRC
320 2017-02-10T22:38:36  *** chjj has joined #bitcoin-dev
321 2017-02-10T22:41:03  *** bugs_ has quit IRC
322 2017-02-10T22:48:52  *** RxMcDonald has joined #bitcoin-dev
323 2017-02-10T22:49:28  <RxMcDonald> Is the genesis block hard-coded somewhere in the chainparams.cpp?
324 2017-02-10T22:51:40  *** agricocb has quit IRC
325 2017-02-10T22:51:44  <RxMcDonald> trying to start a new blockchain
326 2017-02-10T22:55:44  <achow101> RxMcDonald: yes
327 2017-02-10T22:56:27  <RxMcDonald> achow101: oh nice, so just changing that value will start a new blockchain? where is it exactly?
328 2017-02-10T22:56:33  <achow101> https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L19
329 2017-02-10T22:56:52  <achow101> it actually builds the block and hashes it, then checks the hash, so you will need to change the assert
330 2017-02-10T22:57:36  <achow101> https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L19 and the line after will need to be changed if you change the genesis block in CreateGenesisBlock
331 2017-02-10T22:58:44  <RxMcDonald> so, what do I do if I want to start a new blockchain?
332 2017-02-10T22:58:49  <RxMcDonald> just change the assert?
333 2017-02-10T22:59:00  <RxMcDonald> or the genesis = ?
334 2017-02-10T22:59:20  *** arubi has left #bitcoin-dev
335 2017-02-10T22:59:28  <RxMcDonald> change this ?         genesis = CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN);
336 2017-02-10T23:00:29  <achow101> you have to change the assert to match whatever block you create.
337 2017-02-10T23:00:57  <RxMcDonald> Yeah, I got that, but how do I make it create a new genesis block?
338 2017-02-10T23:01:02  <achow101> to change the block, you can change this: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L117
339 2017-02-10T23:01:13  <achow101> anything in this function: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L51
340 2017-02-10T23:01:24  <achow101> and anything in this function: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L19
341 2017-02-10T23:01:38  <RxMcDonald> so, just changing anything in there will automatically generate a new genesis block?
342 2017-02-10T23:01:40  <achow101> you'll probably want to change pszTimestamp and the output script
343 2017-02-10T23:02:20  <achow101> it will create a block according to the parameters, which you have to change in order to get a different block
344 2017-02-10T23:03:28  <achow101> then you need to get the hash of the block. easiest way is to just log the genesis hash to the debug.log file and then replace the hash in the assert with the hash of the block. you will need to do the same with the merkle root
345 2017-02-10T23:04:33  <RxMcDonald> yes that's what I was trying to do earlier but my code didn't compile, can you show me how would you log it exactly?
346 2017-02-10T23:05:34  <RxMcDonald> LogPrintf("new mainnet genesis hash: %s\n", genesis.GetHash().ToString()); // like this?
347 2017-02-10T23:05:45  <RxMcDonald> just adding that?
348 2017-02-10T23:06:22  <achow101> that should work
349 2017-02-10T23:06:42  <achow101> you will need to do the same for genesis.hashMerkleRoot
350 2017-02-10T23:08:12  <RxMcDonald> do I need to change this? consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000005c13f99f6d0b1a908");
351 2017-02-10T23:09:30  <achow101> yes. with a new blockchain you will need to remove that, consensus.assumeDefaultValid, and all of the checkpoints (just leave the list empty but the variable still there
352 2017-02-10T23:14:57  <RxMcDonald> alright, just changing that it compiled
353 2017-02-10T23:17:00  <RxMcDonald> Error: Incorrect or no genesis block found. Wrong datadir for network?
354 2017-02-10T23:18:17  <achow101> you need a blank datadir otherwise it will fail
355 2017-02-10T23:20:13  <RxMcDonald> MBP:faratest mb$ ./src/faragecoind                                                                                   │2017-02-10 23:19:18 *** Failed to read block
356 2017-02-10T23:20:24  <RxMcDonald> Error: Error: A fatal internal error occurred, see debug.log for details
357 2017-02-10T23:20:54  <RxMcDonald>  ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)
358 2017-02-10T23:22:02  <RxMcDonald> achow101: http://pastebin.com/AB11Jtim care to take a look?
359 2017-02-10T23:22:21  <achow101> this is altcoin stuff now, it is off topic for this channel. If you are trying to be an altcoin dev, then you should be able to figure it out and debug it yourself. That includes knowing how to just grep for things in code and follow logic. I will not help you anymore
360 2017-02-10T23:22:53  <RxMcDonald> I called it like that it's my test dir for bitcoin
361 2017-02-10T23:23:16  <RxMcDonald> i have several folders with different copies, just trying to start a new blockchain
362 2017-02-10T23:25:04  <achow101> I'm not going to hand-hold you through making an altcoin. just use grep or Github's search function and find out what line the error is being thrown at and just look to see what is causing that. the names are all fairly self explanatory and there are comments
363 2017-02-10T23:26:22  <RxMcDonald> I'm not trying to make an altcoin, I'm trying to test and understand the whole bitcoin codebase and get into bitcoin development
364 2017-02-10T23:27:07  <achow101> in what way do you think that making a new genesis block is going to help you?
365 2017-02-10T23:27:09  <RxMcDonald> The process for learning it includes creating a local coin? yes It's not going to be uploaded or used or anything, it's for testing
366 2017-02-10T23:27:20  <achow101> if you want a local coin just for testing, use regtest
367 2017-02-10T23:27:34  <RxMcDonald> I want to have several different coins with different params and test stuff
368 2017-02-10T23:28:06  <RxMcDonald> I need the whole coin for testing
369 2017-02-10T23:28:25  <RxMcDonald> that is the only way to learn it imho, it's how I learn anything, just reproducing and playing with it
370 2017-02-10T23:28:27  <achow101> even so, if you are trying to get into any sort of software development, you should be able to read code, follow code paths, and search for errors that are being printed to logs or the console
371 2017-02-10T23:28:45  <achow101> (learn these things before actually doing)
372 2017-02-10T23:28:48  <RxMcDonald> Yeah, alright, didn't meant to bother you
373 2017-02-10T23:29:09  <RxMcDonald> just, pretty hard to get into this codebase
374 2017-02-10T23:29:49  <achow101> the issue here is that when you read this codebase, most things are named explicitly and are self explanatory. it should not take someone to explain to you that the function named CreateGenesisBlock is what makes the genesis block
375 2017-02-10T23:30:08  <RxMcDonald> No, I already know that
376 2017-02-10T23:32:49  <achow101> anyways, your problem is the PoW of your genesis block is bad. if you just search part of the error in github, you will find that the first code result is https://github.com/bitcoin/bitcoin/blob/668de70be039a4f1ffcf20aeae2a22ee71fc55a8/src/validation.cpp#L1151 and that you can infer the issue is because CheckProofOfWork returned false thus causing the error to be thrown
377 2017-02-10T23:36:50  <RxMcDonald> yeah
378 2017-02-10T23:38:10  *** chjj has quit IRC
379 2017-02-10T23:40:47  <RxMcDonald> changed consensus.fPowAllowMinDifficultyBlocks = true; hope it fixes it
380 2017-02-10T23:51:44  *** chjj has joined #bitcoin-dev
381 2017-02-10T23:57:30  <RxMcDonald> achow101: well, it didn't fix it