1 2017-04-24T00:19:11 *** belcher has quit IRC
2 2017-04-24T00:41:39 *** matrix1233 has quit IRC
3 2017-04-24T00:42:36 *** matrix1233 has joined #bitcoin-dev
4 2017-04-24T01:00:40 *** iv3c has joined #bitcoin-dev
5 2017-04-24T01:07:24 *** iv3c has quit IRC
6 2017-04-24T01:13:42 *** justanotheruser has joined #bitcoin-dev
7 2017-04-24T01:16:05 *** justan0theruser has quit IRC
8 2017-04-24T01:21:25 *** matrix1233 has quit IRC
9 2017-04-24T01:27:14 *** iv3c has joined #bitcoin-dev
10 2017-04-24T01:34:40 *** iv3c has quit IRC
11 2017-04-24T01:59:01 *** iv3c has joined #bitcoin-dev
12 2017-04-24T02:16:49 *** brianhoffman_ has joined #bitcoin-dev
13 2017-04-24T02:26:04 *** molz_ has quit IRC
14 2017-04-24T02:29:37 *** brianhoffman_ has quit IRC
15 2017-04-24T02:29:58 *** brianhoffman has joined #bitcoin-dev
16 2017-04-24T02:35:11 *** brianhoffman_ has joined #bitcoin-dev
17 2017-04-24T02:35:23 *** brianhoffman has quit IRC
18 2017-04-24T02:35:24 *** brianhoffman_ is now known as brianhoffman
19 2017-04-24T02:36:38 *** subo_ has joined #bitcoin-dev
20 2017-04-24T02:40:05 *** subo has quit IRC
21 2017-04-24T02:45:27 *** iv3c has quit IRC
22 2017-04-24T02:46:19 *** PaulCape_ has quit IRC
23 2017-04-24T03:27:57 *** anon616 has quit IRC
24 2017-04-24T03:30:25 *** anon616 has joined #bitcoin-dev
25 2017-04-24T03:50:36 *** iv3c has joined #bitcoin-dev
26 2017-04-24T03:51:04 *** janko33 has joined #bitcoin-dev
27 2017-04-24T03:53:01 *** oleganza has joined #bitcoin-dev
28 2017-04-24T03:54:48 *** suryab has joined #bitcoin-dev
29 2017-04-24T03:55:14 <suryab> what's the difference between a scriptPubKey/scriptSig and scriptCode?
30 2017-04-24T03:56:13 <suryab> the segwit dev guide says: "Please note that for a P2SH-P2WPKH, the scriptCode is always 26 bytes including the leading size byte, as 0x1976a914{20-byte keyhash}88ac, NOT the redeemScript nor scriptPubKey"
31 2017-04-24T03:57:14 *** moli_ has joined #bitcoin-dev
32 2017-04-24T03:57:27 *** janko33_ has joined #bitcoin-dev
33 2017-04-24T04:00:35 *** janko33 has quit IRC
34 2017-04-24T04:05:32 *** lnovy has joined #bitcoin-dev
35 2017-04-24T04:06:36 *** blueness has quit IRC
36 2017-04-24T04:12:11 *** |Clown| has quit IRC
37 2017-04-24T04:13:30 *** justan0theruser has joined #bitcoin-dev
38 2017-04-24T04:13:45 *** |Clown| has joined #bitcoin-dev
39 2017-04-24T04:15:01 *** justanotheruser has quit IRC
40 2017-04-24T04:18:04 *** TheSeven has quit IRC
41 2017-04-24T04:18:11 *** [7] has joined #bitcoin-dev
42 2017-04-24T04:33:06 *** oleganza has quit IRC
43 2017-04-24T04:35:39 <arubi> suryab, scriptcode is kinda like a redeemscript for witness v0 (p2wpkh,p2wsh) scriptpubkeys. when redeeming from a p2wpkh (or p2sh(p2wpkh)), the script you're actually signing will be a p2pkh script like the one in the example. when redeeming a p2wsh (or p2sh(p2wsh)), the scripcode is the redeemscript for the p2wsh. what the guide says not to do is to use the segwit scriptpubkeys themselves for the signing
44 2017-04-24T04:39:40 *** cannon-c_AFK is now known as cannon-c
45 2017-04-24T04:51:38 *** ThomasV has joined #bitcoin-dev
46 2017-04-24T04:52:17 *** RazielZ has quit IRC
47 2017-04-24T04:53:06 *** iv3c has quit IRC
48 2017-04-24T05:14:20 *** janko33_ has quit IRC
49 2017-04-24T05:15:10 *** dustfinger has quit IRC
50 2017-04-24T05:20:23 *** kristofferR has quit IRC
51 2017-04-24T05:30:02 *** d9b4bef9 has quit IRC
52 2017-04-24T05:31:08 *** d9b4bef9 has joined #bitcoin-dev
53 2017-04-24T05:33:07 *** d9b4bef9 has joined #bitcoin-dev
54 2017-04-24T05:41:05 *** suryab has quit IRC
55 2017-04-24T06:03:04 *** ThomasV has quit IRC
56 2017-04-24T06:13:18 *** MoALTz has joined #bitcoin-dev
57 2017-04-24T06:14:24 *** bodkan has joined #bitcoin-dev
58 2017-04-24T06:14:29 *** |Clown| has quit IRC
59 2017-04-24T06:15:06 *** |Clown| has joined #bitcoin-dev
60 2017-04-24T06:21:36 *** starkness has joined #bitcoin-dev
61 2017-04-24T06:21:47 *** starkness has quit IRC
62 2017-04-24T06:45:06 *** BashCo has quit IRC
63 2017-04-24T06:46:13 *** bodkan has quit IRC
64 2017-04-24T06:57:31 *** paveljanik has quit IRC
65 2017-04-24T06:58:57 *** |Clown| has quit IRC
66 2017-04-24T06:59:31 *** |Clown| has joined #bitcoin-dev
67 2017-04-24T07:00:33 *** arubi has quit IRC
68 2017-04-24T07:00:56 *** arubi has joined #bitcoin-dev
69 2017-04-24T07:11:33 *** BashCo has joined #bitcoin-dev
70 2017-04-24T07:16:15 *** ThomasV has joined #bitcoin-dev
71 2017-04-24T07:31:19 *** ongolaBoy has joined #bitcoin-dev
72 2017-04-24T07:59:17 *** blueness has joined #bitcoin-dev
73 2017-04-24T07:59:35 *** waxwing has quit IRC
74 2017-04-24T08:03:34 *** ThomasV has quit IRC
75 2017-04-24T08:08:41 *** Clown has joined #bitcoin-dev
76 2017-04-24T08:08:41 *** |Clown| is now known as Guest36204
77 2017-04-24T08:08:41 *** Clown is now known as |Clown|
78 2017-04-24T08:12:09 *** nazarewk has joined #bitcoin-dev
79 2017-04-24T08:42:30 *** mountaingoat has quit IRC
80 2017-04-24T08:55:03 *** n1ce has joined #bitcoin-dev
81 2017-04-24T08:55:23 *** ThomasV has joined #bitcoin-dev
82 2017-04-24T09:00:00 *** cannon-c has quit IRC
83 2017-04-24T09:05:01 *** d9b4bef9 has quit IRC
84 2017-04-24T09:06:08 *** d9b4bef9 has joined #bitcoin-dev
85 2017-04-24T09:24:21 *** BashCo has quit IRC
86 2017-04-24T09:25:49 *** ThomasV has quit IRC
87 2017-04-24T09:27:11 *** BashCo has joined #bitcoin-dev
88 2017-04-24T09:34:32 *** rugu has joined #bitcoin-dev
89 2017-04-24T09:35:19 *** ThomasV has joined #bitcoin-dev
90 2017-04-24T09:35:40 <rugu> Anyone know how Insight API are able to index UTXO by address?
91 2017-04-24T09:50:09 <rugu> I am trying to use the RPC commands to a full node as well as the bitcoin-lib repo from github, so far I can get the transactions per block as per the hash or block height, but not sure wht to do next, in order to get a UTXO mapping that can be queried by public address
92 2017-04-24T09:52:35 *** blueness has quit IRC
93 2017-04-24T09:56:09 *** waxwing has joined #bitcoin-dev
94 2017-04-24T10:00:26 <arubi> rugu, did you see https://github.com/btcdrak/bitcoin/tree/addrindex-0.14 ?
95 2017-04-24T10:43:07 *** blueness has joined #bitcoin-dev
96 2017-04-24T10:52:59 *** ThomasV has quit IRC
97 2017-04-24T11:10:30 *** blueness has quit IRC
98 2017-04-24T11:20:16 *** blueness has joined #bitcoin-dev
99 2017-04-24T11:22:19 *** ThomasV has joined #bitcoin-dev
100 2017-04-24T11:33:21 *** mountaingoat has joined #bitcoin-dev
101 2017-04-24T11:43:35 *** rugu has quit IRC
102 2017-04-24T11:51:54 *** waxwing has quit IRC
103 2017-04-24T11:52:00 *** ThomasV has quit IRC
104 2017-04-24T12:09:05 *** waxwing has joined #bitcoin-dev
105 2017-04-24T12:09:16 *** lnovy is now known as loupeznik
106 2017-04-24T12:12:11 *** BashCo has quit IRC
107 2017-04-24T12:14:18 *** BashCo has joined #bitcoin-dev
108 2017-04-24T12:33:35 *** jtimon has joined #bitcoin-dev
109 2017-04-24T12:49:40 *** iv3c has joined #bitcoin-dev
110 2017-04-24T12:50:53 *** iv3c has quit IRC
111 2017-04-24T12:51:19 *** iv3c has joined #bitcoin-dev
112 2017-04-24T12:57:10 *** nazarewk has quit IRC
113 2017-04-24T12:57:19 *** ThomasV has joined #bitcoin-dev
114 2017-04-24T13:14:36 *** contrapumpkin has quit IRC
115 2017-04-24T13:14:41 *** bugs_ has joined #bitcoin-dev
116 2017-04-24T13:20:54 *** suryab has joined #bitcoin-dev
117 2017-04-24T13:22:19 *** contrapumpkin has joined #bitcoin-dev
118 2017-04-24T13:24:42 <suryab> arubi when you said that the guide is saying not to use the segwit scriptPubKey itself, you mean the don't use the p2sh(p2spkh) scriptPubKey as it's defined here: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#p2wpkh-nested-in-bip16-p2sh correct? But instead use the byte that they say
119 2017-04-24T13:55:07 <arubi> suryab, p2spkh? do you mean p2wpkh or p2wsh?
120 2017-04-24T13:56:16 <arubi> what the guide means is that for redeeming p2wpkh, either nested in p2sh or not, the scriptcode is the same as a p2pkh script with the hash160 taken from the p2wpkh script
121 2017-04-24T13:57:24 <arubi> a p2wpkh looks like '0 <hash160 pubkey>', so your scriptcode will be '0x19 DUP HASH160 <hash160 pubkey> EQUALVERIFY CHECKSIG' serialized
122 2017-04-24T13:57:44 <suryab> that was a typo, i mean p2wpkh not p2spkh
123 2017-04-24T13:58:24 <arubi> a p2wsh looks like '0 <sha256 hash>' , and the scriptcode will be the redeemscript that when serialized and sha256'ed, will have give that same <sha256 hash> value from the scriptpbukey
124 2017-04-24T13:59:10 <arubi> ( plus a first byte for its size )
125 2017-04-24T14:01:52 <suryab> okay, so my scriptPubKey looks like: HASH_160 <hash-160(pubkey)> EQUAL. the scriptSig looks like: 0 <hash160(pubkey)> and the script that I use when I compute te sig hash I use the script you specified above
126 2017-04-24T14:02:21 <suryab> sorry scriptPubKey hash160 is of the redeem script: hash160( 0 hash160(pubkey) )
127 2017-04-24T14:02:48 <suryab> sorry scriptPubKey hash160 is of the redeem script: hash160( 0 <hash160(pubkey)> )
128 2017-04-24T14:03:02 <arubi> right, in scriptsig there should only be the segwit scriptpubkey as a single push
129 2017-04-24T14:03:23 <arubi> just like redeeming any other p2sh. it doesn't come into contact with the signing itself
130 2017-04-24T14:05:02 <suryab> yeah i've been trying variations of this but it looks like i can never produce valid transactions... strange
131 2017-04-24T14:05:33 <arubi> can you show what it is you're trying to sign?
132 2017-04-24T14:05:41 <suryab> i'm pretty sure I've made a valid p2sh(p2wpkh) address as the output of a different transaction
133 2017-04-24T14:05:49 <suryab> okay, give me a sec
134 2017-04-24T14:06:44 <suryab> aside from the script that's being signed in the sighash, does anything else about computing the has change betwee p2wpkh and p2sh(p2wpkh)?
135 2017-04-24T14:06:58 <arubi> nothing
136 2017-04-24T14:07:11 <arubi> the mid state is completely the same
137 2017-04-24T14:07:43 <arubi> er, what do you mean aside from?
138 2017-04-24T14:08:01 <arubi> to redeem a p2wpkh, or a p2sh(p2wpkh) you will have the same exact signature
139 2017-04-24T14:08:44 <arubi> the only difference is in relay when the preimage to the p2sh hash160 is set in scriptsig as a single push
140 2017-04-24T14:09:08 <suryab> okay looks like the output I was making was wrong
141 2017-04-24T14:09:17 <suryab> tranasctions are valid now, hallelujah
142 2017-04-24T14:09:21 <arubi> \o/
143 2017-04-24T14:09:37 <suryab> i've been grinding at this for some time, thanks a ton arubi!
144 2017-04-24T14:09:43 <arubi> cheers suryab
145 2017-04-24T14:14:36 *** dermoth has joined #bitcoin-dev
146 2017-04-24T14:27:28 *** Giszmo has joined #bitcoin-dev
147 2017-04-24T14:38:56 *** agricocb has quit IRC
148 2017-04-24T14:45:39 *** ThomasV has quit IRC
149 2017-04-24T14:51:05 *** marcoagner has joined #bitcoin-dev
150 2017-04-24T14:52:40 *** agricocb has joined #bitcoin-dev
151 2017-04-24T15:00:22 *** stalled has joined #bitcoin-dev
152 2017-04-24T15:02:28 *** ThomasV has joined #bitcoin-dev
153 2017-04-24T15:05:12 *** Guyver2 has joined #bitcoin-dev
154 2017-04-24T15:08:56 *** treehug88 has quit IRC
155 2017-04-24T15:27:38 *** blueness has quit IRC
156 2017-04-24T15:27:41 *** ThomasV has quit IRC
157 2017-04-24T15:38:33 *** airbreather has quit IRC
158 2017-04-24T15:38:56 *** airbreather has joined #bitcoin-dev
159 2017-04-24T15:42:04 *** dustfinger has joined #bitcoin-dev
160 2017-04-24T15:54:59 *** ongolaBoy has quit IRC
161 2017-04-24T15:58:36 *** n1ce has quit IRC
162 2017-04-24T15:59:52 *** n1ce has joined #bitcoin-dev
163 2017-04-24T16:00:57 *** janko33 has joined #bitcoin-dev
164 2017-04-24T16:03:53 *** starkness has joined #bitcoin-dev
165 2017-04-24T16:05:19 *** janko33_ has joined #bitcoin-dev
166 2017-04-24T16:08:34 *** janko33 has quit IRC
167 2017-04-24T16:12:35 *** BashCo has quit IRC
168 2017-04-24T16:13:23 *** BashCo has joined #bitcoin-dev
169 2017-04-24T16:19:02 *** oleganza has joined #bitcoin-dev
170 2017-04-24T16:21:49 *** czaanja has joined #bitcoin-dev
171 2017-04-24T16:23:08 *** PaulCapestany has joined #bitcoin-dev
172 2017-04-24T16:25:30 *** abpa has joined #bitcoin-dev
173 2017-04-24T16:26:32 *** brianhoffman has quit IRC
174 2017-04-24T16:28:16 *** n1ce has quit IRC
175 2017-04-24T16:32:28 *** czaanja has quit IRC
176 2017-04-24T16:36:02 *** janko33__ has joined #bitcoin-dev
177 2017-04-24T16:38:42 *** janko33_ has quit IRC
178 2017-04-24T16:40:25 *** tripleslash has quit IRC
179 2017-04-24T16:48:31 *** tripleslash has joined #bitcoin-dev
180 2017-04-24T16:48:32 *** ThomasV has joined #bitcoin-dev
181 2017-04-24T16:59:32 *** BashCo has quit IRC
182 2017-04-24T17:35:37 *** BashCo has joined #bitcoin-dev
183 2017-04-24T17:38:34 <suryab> p2sh(p2wpkh) is supposed be relay-able by all nodes, even nodes that aren't NODE_WITNESS
184 2017-04-24T17:38:37 <suryab> right?
185 2017-04-24T17:41:12 <arubi> not the spend
186 2017-04-24T17:42:58 <arubi> the backward compatibility is in the ability for old software to send to p2sh addresses, relay and mining of transactions with a witness is only possible with a segwit aware node
187 2017-04-24T17:45:35 *** suryab has quit IRC
188 2017-04-24T18:01:45 *** tripleslash has quit IRC
189 2017-04-24T18:04:43 *** tripleslash has joined #bitcoin-dev
190 2017-04-24T18:10:52 *** ThomasV has quit IRC
191 2017-04-24T18:14:59 *** Dyaheon has quit IRC
192 2017-04-24T18:16:16 *** Dyaheon has joined #bitcoin-dev
193 2017-04-24T18:37:19 *** mkwia has quit IRC
194 2017-04-24T18:37:30 *** blueness has joined #bitcoin-dev
195 2017-04-24T18:38:25 *** mkwia has joined #bitcoin-dev
196 2017-04-24T18:40:20 *** agricocb has quit IRC
197 2017-04-24T18:55:12 *** coin_trader has quit IRC
198 2017-04-24T19:10:54 *** cybrNaut has quit IRC
199 2017-04-24T19:23:09 *** agricocb has joined #bitcoin-dev
200 2017-04-24T19:44:48 *** airbreather has quit IRC
201 2017-04-24T19:51:01 *** ThomasV has joined #bitcoin-dev
202 2017-04-24T19:53:58 *** treehug88 has joined #bitcoin-dev
203 2017-04-24T19:59:28 *** luke-jr has quit IRC
204 2017-04-24T20:01:01 *** mol has joined #bitcoin-dev
205 2017-04-24T20:04:05 *** moli_ has quit IRC
206 2017-04-24T20:04:54 *** paveljanik has joined #bitcoin-dev
207 2017-04-24T20:11:11 *** luke-jr has joined #bitcoin-dev
208 2017-04-24T20:17:50 *** ProfMac has quit IRC
209 2017-04-24T20:25:05 *** ProfMac has joined #bitcoin-dev
210 2017-04-24T20:29:35 *** chjj has quit IRC
211 2017-04-24T20:38:22 *** starkness has quit IRC
212 2017-04-24T20:43:40 *** chjj has joined #bitcoin-dev
213 2017-04-24T20:51:24 *** Giszmo has quit IRC
214 2017-04-24T20:53:13 *** ThomasV has quit IRC
215 2017-04-24T21:08:30 *** Giszmo has joined #bitcoin-dev
216 2017-04-24T21:31:40 *** MoALTz has quit IRC
217 2017-04-24T21:36:49 *** Fr4n has joined #bitcoin-dev
218 2017-04-24T21:49:33 *** kristofferR has joined #bitcoin-dev
219 2017-04-24T21:52:03 *** kristofferR has quit IRC
220 2017-04-24T21:53:38 *** kristofferR has joined #bitcoin-dev
221 2017-04-24T22:00:16 *** bugs_ has quit IRC
222 2017-04-24T22:03:51 *** Guyver2 has quit IRC
223 2017-04-24T22:12:13 *** [7] has quit IRC
224 2017-04-24T22:12:20 *** TheSeven has joined #bitcoin-dev
225 2017-04-24T22:17:13 *** janko33__ has quit IRC
226 2017-04-24T22:24:27 *** belcher has joined #bitcoin-dev
227 2017-04-24T22:37:15 *** |Clown| has quit IRC
228 2017-04-24T22:37:18 *** |Clown| has joined #bitcoin-dev
229 2017-04-24T22:59:16 *** contrapumpkin has quit IRC
230 2017-04-24T23:06:07 *** contrapumpkin has joined #bitcoin-dev
231 2017-04-24T23:07:05 *** airbreather has joined #bitcoin-dev
232 2017-04-24T23:14:41 *** Fr4n has quit IRC
233 2017-04-24T23:21:00 *** teward has quit IRC
234 2017-04-24T23:22:20 *** JZA has quit IRC
235 2017-04-24T23:22:53 *** doppo has quit IRC
236 2017-04-24T23:24:56 *** jrayhawk has quit IRC
237 2017-04-24T23:24:57 *** kanzure has quit IRC
238 2017-04-24T23:27:45 *** Fr4n has joined #bitcoin-dev
239 2017-04-24T23:28:41 *** doppo has joined #bitcoin-dev
240 2017-04-24T23:28:44 *** Ahmed90 has joined #bitcoin-dev
241 2017-04-24T23:29:54 *** teward has joined #bitcoin-dev
242 2017-04-24T23:38:48 *** kanzure has joined #bitcoin-dev
243 2017-04-24T23:39:48 *** jrayhawk has joined #bitcoin-dev
244 2017-04-24T23:45:28 *** jrayhawk has quit IRC
245 2017-04-24T23:45:39 *** kanzure has quit IRC
246 2017-04-24T23:56:35 *** jrayhawk has joined #bitcoin-dev
247 2017-04-24T23:56:44 *** kanzure has joined #bitcoin-dev