1 2016-08-08T00:01:19 *** spudowiar has quit IRC
2 2016-08-08T00:01:53 <jl2012> non-std scripts are valid in a block
3 2016-08-08T00:02:28 <p2me> okay
4 2016-08-08T00:05:05 <p2me> so let's pretend pre-p2sh i came up with a "hash puzzle" where i knew some word hash160'd to "xyz123"
5 2016-08-08T00:05:29 <p2me> and i sent coins to pubkeyscript OP_HASH160 <xyz123> OP_EQUAL
6 2016-08-08T00:05:50 <p2me> would those coins be lost forever now?
7 2016-08-08T00:06:40 <p2me> the original locking script only wanted something which hashed to "xyz123", now the new nodes would force that thing to a script and a script which returns true?
8 2016-08-08T00:14:04 <jl2012> p2me: yes
9 2016-08-08T00:21:24 *** nets1n has quit IRC
10 2016-08-08T00:27:54 *** Belkaar has quit IRC
11 2016-08-08T00:28:55 *** Belkaar has joined #bitcoin-dev
12 2016-08-08T00:30:50 *** herzmeister has quit IRC
13 2016-08-08T00:32:05 *** herzmeister has joined #bitcoin-dev
14 2016-08-08T00:35:50 *** Ylbam has quit IRC
15 2016-08-08T00:51:14 *** splix has joined #bitcoin-dev
16 2016-08-08T00:51:21 *** belcher has quit IRC
17 2016-08-08T00:55:58 *** splix has quit IRC
18 2016-08-08T01:02:02 *** realz has quit IRC
19 2016-08-08T01:18:55 <achow101> jl2012: I don't think it would, it would just be seen as non standard. such a script would still verify as the stack will return true if the thing is hashed and it matches xyz123
20 2016-08-08T01:21:37 <jl2012> achow101: only if the preimage is a valid redeemScript
21 2016-08-08T01:26:20 <p2me> you reveal your redeem script the second you spend from a p2sh address, i can steal all your coins by submitting just the raw <redeemscript> to a pool which mines non-standard tx's if that's the case
22 2016-08-08T01:27:04 *** Skirmant has quit IRC
23 2016-08-08T01:27:36 <p2me> new nodes must be operating on a "i will not relay but am otherwise fine with non-standard scripts in blocks...UNLESS they look like P2SH scripts in which case they must also have valid redeem scripts otherwise i will explicitly invalidate them"
24 2016-08-08T01:31:38 <p2me> it seems like it would've been safer to structure P2SH to default to false using the old rules and only evaluate to true using the new rules. still backwards compatible but old rules couldn't create valid blocks (in their view) which spend your coins w/ 0 sigs.
25 2016-08-08T01:32:03 <p2me> this is all very confusing/messy to me
26 2016-08-08T01:38:26 *** hsmiths has joined #bitcoin-dev
27 2016-08-08T01:38:40 *** hsmiths has left #bitcoin-dev
28 2016-08-08T01:45:15 *** Justinus has quit IRC
29 2016-08-08T01:45:42 *** mnk has joined #bitcoin-dev
30 2016-08-08T01:49:18 *** herzmeister has quit IRC
31 2016-08-08T01:49:38 *** herzmeister has joined #bitcoin-dev
32 2016-08-08T02:07:10 <jl2012> Forget standard/non-standard. For blocks we care only valid/invalid
33 2016-08-08T02:12:13 <p2me> alright. i think i understand now, just needed to process everything. i read over the bip and it seems only blocks AFTER P2SH get evaluated that way so in my example i could still redeem my coins with the simple word.
34 2016-08-08T02:14:43 <p2me> having the P2SH format evaluate to false under the old rules would also make the change a HF so everything makes sense now
35 2016-08-08T02:29:49 *** Delta_ has joined #bitcoin-dev
36 2016-08-08T02:33:32 *** Subo1977 has quit IRC
37 2016-08-08T02:39:51 *** kaidou has quit IRC
38 2016-08-08T02:45:43 <achow101> jl2012: the preimage could just be a blob of arbitrary data, not necessarily a script.If it is a script, the script would have to validate before the hashing happens
39 2016-08-08T02:51:59 *** splix has joined #bitcoin-dev
40 2016-08-08T02:56:30 *** splix has quit IRC
41 2016-08-08T02:57:49 *** Chris_Stewart_5 has quit IRC
42 2016-08-08T03:30:59 *** JZA has quit IRC
43 2016-08-08T03:51:20 *** JZA has joined #bitcoin-dev
44 2016-08-08T04:00:22 *** realz has joined #bitcoin-dev
45 2016-08-08T04:03:26 *** janko33 has joined #bitcoin-dev
46 2016-08-08T04:20:01 *** ThomasV has joined #bitcoin-dev
47 2016-08-08T04:23:00 *** AppAraat has quit IRC
48 2016-08-08T05:04:07 <jl2012> achow101: if it is not a script, the bitcoin is permanently lost
49 2016-08-08T05:25:20 *** twistedline_ has quit IRC
50 2016-08-08T05:39:07 *** twistedline_ has joined #bitcoin-dev
51 2016-08-08T05:39:21 *** realz__ has joined #bitcoin-dev
52 2016-08-08T05:42:24 *** realz has quit IRC
53 2016-08-08T05:43:04 *** CheckDavid has quit IRC
54 2016-08-08T05:43:25 *** realz__ is now known as realz
55 2016-08-08T05:43:52 *** one_zero has quit IRC
56 2016-08-08T05:47:23 *** OMDPrebel has quit IRC
57 2016-08-08T05:53:42 *** arowser has joined #bitcoin-dev
58 2016-08-08T05:54:53 *** Justinus has joined #bitcoin-dev
59 2016-08-08T05:56:58 *** ThomasV has quit IRC
60 2016-08-08T06:00:12 *** Belxjander has quit IRC
61 2016-08-08T06:01:53 *** Belxjander has joined #bitcoin-dev
62 2016-08-08T06:18:56 *** arowser has quit IRC
63 2016-08-08T06:27:12 *** Belxjander has quit IRC
64 2016-08-08T06:50:41 *** BashCo has quit IRC
65 2016-08-08T06:55:15 *** ThomasV has joined #bitcoin-dev
66 2016-08-08T07:09:46 *** BashCo has joined #bitcoin-dev
67 2016-08-08T07:21:46 *** AppAraat has joined #bitcoin-dev
68 2016-08-08T07:23:52 *** da2ce7 has quit IRC
69 2016-08-08T07:23:52 *** da2ce7_mobile has quit IRC
70 2016-08-08T07:28:02 *** indy has quit IRC
71 2016-08-08T07:31:41 *** da2ce7_mobile has joined #bitcoin-dev
72 2016-08-08T07:31:46 *** indy has joined #bitcoin-dev
73 2016-08-08T07:33:42 *** da2ce7 has joined #bitcoin-dev
74 2016-08-08T07:37:47 *** deadalnix has joined #bitcoin-dev
75 2016-08-08T07:40:22 *** deadalnix has quit IRC
76 2016-08-08T07:50:27 *** TheSeven has quit IRC
77 2016-08-08T07:50:55 *** TheSeven has joined #bitcoin-dev
78 2016-08-08T07:54:04 *** da2ce7_mobile has quit IRC
79 2016-08-08T07:57:14 *** TheSeven has quit IRC
80 2016-08-08T07:57:35 *** TheSeven has joined #bitcoin-dev
81 2016-08-08T08:04:28 *** twistedline_ has quit IRC
82 2016-08-08T08:05:19 *** da2ce7 has quit IRC
83 2016-08-08T08:06:09 *** twistedline_ has joined #bitcoin-dev
84 2016-08-08T08:14:42 *** da2ce7 has joined #bitcoin-dev
85 2016-08-08T08:16:18 *** nazarewk has joined #bitcoin-dev
86 2016-08-08T08:24:23 *** p2me has quit IRC
87 2016-08-08T08:33:05 *** arowser has joined #bitcoin-dev
88 2016-08-08T08:53:58 *** TheSeven has quit IRC
89 2016-08-08T08:57:36 *** TheSeven has joined #bitcoin-dev
90 2016-08-08T09:08:33 *** ThomasV has quit IRC
91 2016-08-08T09:11:44 *** derbumi has quit IRC
92 2016-08-08T09:18:11 *** Giszmo has joined #bitcoin-dev
93 2016-08-08T09:28:50 *** jonasschnelli has quit IRC
94 2016-08-08T09:29:34 *** jonasschnelli has joined #bitcoin-dev
95 2016-08-08T09:42:16 *** ThomasV has joined #bitcoin-dev
96 2016-08-08T09:46:12 *** jtimon has joined #bitcoin-dev
97 2016-08-08T10:14:29 *** aalex has quit IRC
98 2016-08-08T10:15:00 *** aalex has joined #bitcoin-dev
99 2016-08-08T10:36:45 *** rubensayshi has joined #bitcoin-dev
100 2016-08-08T10:51:35 *** stoopkid has joined #bitcoin-dev
101 2016-08-08T11:01:04 *** st0opkid has joined #bitcoin-dev
102 2016-08-08T11:01:16 *** st0opkid has quit IRC
103 2016-08-08T11:02:16 *** ThomasV has quit IRC
104 2016-08-08T11:03:03 *** stoopkid has quit IRC
105 2016-08-08T11:40:24 *** chjj has quit IRC
106 2016-08-08T11:41:57 *** jtimon has quit IRC
107 2016-08-08T11:45:25 *** AppAraat has quit IRC
108 2016-08-08T11:54:52 *** chjj has joined #bitcoin-dev
109 2016-08-08T11:57:54 *** ThomasV has joined #bitcoin-dev
110 2016-08-08T11:59:03 *** Chris_Stewart_5 has joined #bitcoin-dev
111 2016-08-08T12:07:57 *** Chris_Stewart_5 has quit IRC
112 2016-08-08T12:09:47 *** malte has quit IRC
113 2016-08-08T12:10:26 *** malte has joined #bitcoin-dev
114 2016-08-08T12:19:27 *** mnk has quit IRC
115 2016-08-08T12:23:20 *** mnk has joined #bitcoin-dev
116 2016-08-08T12:26:08 *** agricocb has joined #bitcoin-dev
117 2016-08-08T12:27:58 *** jtimon has joined #bitcoin-dev
118 2016-08-08T12:29:24 *** ThomasV has quit IRC
119 2016-08-08T12:56:49 *** Chris_Stewart_5 has joined #bitcoin-dev
120 2016-08-08T12:58:52 *** AppAraat has joined #bitcoin-dev
121 2016-08-08T13:01:09 *** CheckDavid has joined #bitcoin-dev
122 2016-08-08T13:31:48 *** Chris_Stewart_5 has quit IRC
123 2016-08-08T13:32:39 *** agricocb has quit IRC
124 2016-08-08T13:35:15 *** Chris_Stewart_5 has joined #bitcoin-dev
125 2016-08-08T13:55:21 *** achow101 has left #bitcoin-dev
126 2016-08-08T13:56:05 *** achow101 has joined #bitcoin-dev
127 2016-08-08T14:05:22 *** agricocb has joined #bitcoin-dev
128 2016-08-08T14:07:03 *** bugs_ has joined #bitcoin-dev
129 2016-08-08T14:14:38 *** AppAraat has quit IRC
130 2016-08-08T14:37:40 *** derbumi has joined #bitcoin-dev
131 2016-08-08T14:44:27 *** ginseng has joined #bitcoin-dev
132 2016-08-08T14:47:16 *** MoALTz has joined #bitcoin-dev
133 2016-08-08T14:54:44 *** ginseng has quit IRC
134 2016-08-08T14:54:55 *** ThomasV has joined #bitcoin-dev
135 2016-08-08T14:56:36 *** segy has quit IRC
136 2016-08-08T14:57:36 *** segy has joined #bitcoin-dev
137 2016-08-08T15:06:42 *** ThomasV has quit IRC
138 2016-08-08T15:14:56 *** one_zero has joined #bitcoin-dev
139 2016-08-08T15:16:58 *** Chris_Stewart_5 has quit IRC
140 2016-08-08T15:18:56 *** BashCo has quit IRC
141 2016-08-08T15:30:09 *** Ylbam has joined #bitcoin-dev
142 2016-08-08T15:35:44 *** Chris_Stewart_5 has joined #bitcoin-dev
143 2016-08-08T15:38:27 *** BashCo has joined #bitcoin-dev
144 2016-08-08T15:45:49 *** Chris_Stewart_5 has quit IRC
145 2016-08-08T15:47:22 *** rubensayshi has quit IRC
146 2016-08-08T15:49:45 *** mnk has quit IRC
147 2016-08-08T15:50:26 *** zooko has joined #bitcoin-dev
148 2016-08-08T15:50:35 *** mnk has joined #bitcoin-dev
149 2016-08-08T15:54:50 *** nazarewk has quit IRC
150 2016-08-08T15:57:15 *** koad has quit IRC
151 2016-08-08T15:58:19 *** ThomasV has joined #bitcoin-dev
152 2016-08-08T16:18:12 *** jtimon has quit IRC
153 2016-08-08T16:24:36 *** Skirmant has joined #bitcoin-dev
154 2016-08-08T16:43:10 *** Greybits has quit IRC
155 2016-08-08T16:51:04 *** OMDPrebel has joined #bitcoin-dev
156 2016-08-08T17:19:42 *** mnk has quit IRC
157 2016-08-08T17:20:59 *** Chris_Stewart_5 has joined #bitcoin-dev
158 2016-08-08T17:21:40 *** mnk has joined #bitcoin-dev
159 2016-08-08T17:29:38 *** koad has joined #bitcoin-dev
160 2016-08-08T17:45:50 *** Ylbam has quit IRC
161 2016-08-08T17:52:33 *** blueness has quit IRC
162 2016-08-08T18:01:29 <arubi> sorry for 13 hours delay.. jl2012, can you explain what you mean by that ^ ? isn't p2sh(segwit script) basically a single push of what seems like arbitrary data?
163 2016-08-08T18:05:52 *** zooko has quit IRC
164 2016-08-08T18:24:09 *** ThomasV has quit IRC
165 2016-08-08T18:33:04 *** herzmeister has quit IRC
166 2016-08-08T18:48:37 *** herzmeister has joined #bitcoin-dev
167 2016-08-08T18:50:05 *** so_ has joined #bitcoin-dev
168 2016-08-08T18:50:19 *** luke-jr has quit IRC
169 2016-08-08T18:50:20 *** `mist has quit IRC
170 2016-08-08T18:50:20 *** djoot has quit IRC
171 2016-08-08T18:50:20 *** Elglobo has quit IRC
172 2016-08-08T18:50:20 *** AtashiCon has quit IRC
173 2016-08-08T18:50:20 *** haakonn has quit IRC
174 2016-08-08T18:50:20 *** so has quit IRC
175 2016-08-08T18:50:21 *** mr_burdell has quit IRC
176 2016-08-08T18:50:28 *** mr_burdell has joined #bitcoin-dev
177 2016-08-08T18:50:34 *** AtashiCon has joined #bitcoin-dev
178 2016-08-08T18:50:57 *** luke-jr has joined #bitcoin-dev
179 2016-08-08T18:55:01 *** haakonn has joined #bitcoin-dev
180 2016-08-08T18:57:27 *** CheckDavid has quit IRC
181 2016-08-08T19:05:31 *** JZA has quit IRC
182 2016-08-08T19:15:54 *** deathcamel57 has joined #bitcoin-dev
183 2016-08-08T19:17:35 *** deadalnix has joined #bitcoin-dev
184 2016-08-08T19:19:31 *** deadalnix has quit IRC
185 2016-08-08T19:20:09 *** deadalnix has joined #bitcoin-dev
186 2016-08-08T19:27:19 *** agricocb has quit IRC
187 2016-08-08T19:38:11 *** blueness has joined #bitcoin-dev
188 2016-08-08T19:42:00 *** nkuttler has quit IRC
189 2016-08-08T19:42:17 *** herzmeister has quit IRC
190 2016-08-08T19:46:47 *** herzmeister has joined #bitcoin-dev
191 2016-08-08T19:55:44 *** ThomasV has joined #bitcoin-dev
192 2016-08-08T20:00:37 *** MoALTz has quit IRC
193 2016-08-08T20:09:53 *** blueness has quit IRC
194 2016-08-08T20:14:24 *** deathcamel57 has quit IRC
195 2016-08-08T20:15:11 *** fredrin has joined #bitcoin-dev
196 2016-08-08T20:16:40 *** nitrix has quit IRC
197 2016-08-08T20:20:53 *** deathcamel57 has joined #bitcoin-dev
198 2016-08-08T20:23:47 *** blueness has joined #bitcoin-dev
199 2016-08-08T20:28:00 *** zooko has joined #bitcoin-dev
200 2016-08-08T20:37:24 *** deathcamel57 has joined #bitcoin-dev
201 2016-08-08T20:39:13 *** deathcamel57 has joined #bitcoin-dev
202 2016-08-08T20:40:59 *** zooko has quit IRC
203 2016-08-08T20:46:33 *** dgenr8 has quit IRC
204 2016-08-08T20:47:58 *** contrapumpkin is now known as copumpkin
205 2016-08-08T20:55:03 *** LeMiner2 has quit IRC
206 2016-08-08T20:56:52 *** agricocb has joined #bitcoin-dev
207 2016-08-08T21:00:38 *** jtimon has joined #bitcoin-dev
208 2016-08-08T21:02:09 *** dgenr8 has joined #bitcoin-dev
209 2016-08-08T21:07:56 *** p2me has joined #bitcoin-dev
210 2016-08-08T21:08:52 *** Chris_Stewart_5 has quit IRC
211 2016-08-08T21:13:24 <p2me> i've written some raw tx stuff in PHP. when attempting to push the tx's to testnet it seems to be completely random whether they're accepted or not. i am manually pushing them to testnet via https://live.blockcypher.com/btc-testnet/pushtx/
212 2016-08-08T21:15:30 <p2me> testnet complains about "script failing to verify" but i can run the program again with identical parameters which produces an identical tx hash...
213 2016-08-08T21:16:02 <p2me> but sigScript changes slightly because of the nonce and then magically my tx is fine and testnet accepts it
214 2016-08-08T21:16:13 <p2me> can anyone explain what is possibly going on here?
215 2016-08-08T21:16:39 <arubi> can you give an example of an invalid signature?
216 2016-08-08T21:17:25 <arubi> also, the hash can't stay the same when the transaction is changed, so not sure what you mean by what you said
217 2016-08-08T21:18:00 <p2me> sorry, might be using the wrong terminology
218 2016-08-08T21:18:27 *** deadalnix has quit IRC
219 2016-08-08T21:18:28 <p2me> not the final tx hash but the intermediary "tx hash" that you sign
220 2016-08-08T21:18:41 <arubi> right, that should stay the same
221 2016-08-08T21:18:41 <p2me> when you're constructing the sigScript
222 2016-08-08T21:18:48 <p2me> ok so...
223 2016-08-08T21:19:03 <arubi> so, you're getting different signatures every time the nonce changes, that's fine
224 2016-08-08T21:19:13 <arubi> your signatures are valid... half the time?
225 2016-08-08T21:19:24 <arubi> are you checking for high-s value?
226 2016-08-08T21:20:41 <p2me> i'm using https://github.com/BitcoinPHP/BitcoinECDSA.php for the ECC stuff
227 2016-08-08T21:21:14 <p2me> 3044022079175d7bb8660827849bc3e362b89344b2dabf9805c7b4d45fd215cdf94d26b6022085f6cc66c5b99e59029a4fc63ee43899f8385f9cc5ecec6a6ee1a9732bebd4a4
228 2016-08-08T21:21:25 <p2me> ^ invalid, rejected
229 2016-08-08T21:21:26 <p2me> 3044022029dc45ac7c50f0bfda4c6464604230bbf270fab865920a0dd77a929a46ba177b02204c2709248622bc05b3d957bf6cc0a400b7a624d4f7817c0a65486e8d85166e1b
230 2016-08-08T21:21:32 <p2me> ^ accepted
231 2016-08-08T21:22:35 <arubi> right, the first one has a high s value
232 2016-08-08T21:22:50 <arubi> that means that s > n/2
233 2016-08-08T21:23:50 <p2me> is that something the bitcoin protocol enforces on top of ecc sigs?
234 2016-08-08T21:23:58 <p2me> or is this lib just generating bullshit sigs?
235 2016-08-08T21:24:01 <arubi> yes. this S will work : 7A0933993A4661A6FD65B039C11BC764C2767D49E95BB3D150F0B519A44A6C9D
236 2016-08-08T21:24:15 <arubi> so if you replace that with the one on the first sig, it will be valid
237 2016-08-08T21:24:42 *** Chris_Stewart_5 has joined #bitcoin-dev
238 2016-08-08T21:24:48 <arubi> p2me, that lib doesn't do the final check of 'if ( s > n/2 ) return s % n;
239 2016-08-08T21:28:55 <arubi> er, not s % n.. sorry, (-s) % n or (n - s)
240 2016-08-08T21:30:08 <p2me> ok, that makes more sense
241 2016-08-08T21:30:28 <p2me> would i ever have to go back and choose a new nonce?
242 2016-08-08T21:30:45 <arubi> you can just change s like I said there ^
243 2016-08-08T21:30:48 <p2me> or any nonce is fine so long as i perform that check?
244 2016-08-08T21:31:02 <arubi> p2me, you shouldn't be using just any nonce anyway
245 2016-08-08T21:31:10 <arubi> you should be using rfc6979 to generate nonces
246 2016-08-08T21:32:53 <p2me> i understand nonces must be random, rfc6979 is a specific RNG or?
247 2016-08-08T21:34:01 <arubi> yes, it's deterministic. folks lost bitcoin from nonce reuse, so generating a single nonce per message is safer
248 2016-08-08T21:34:52 *** deathcamel57 has quit IRC
249 2016-08-08T21:41:33 *** CheckDavid has joined #bitcoin-dev
250 2016-08-08T21:45:01 *** janko33 has quit IRC
251 2016-08-08T21:48:16 <p2me> hmm, still getting bad sigs. is it as simple as a 1-liner "s = (s>n/2)?n-s:s" or should i just trash this lib? ECC math is something i know very little about
252 2016-08-08T21:49:36 *** bugs_ has quit IRC
253 2016-08-08T21:56:14 *** Ylbam has joined #bitcoin-dev
254 2016-08-08T22:03:52 *** ribasushi has quit IRC
255 2016-08-08T22:04:14 *** OMDPrebel has quit IRC
256 2016-08-08T22:07:04 *** ThomasV has quit IRC
257 2016-08-08T22:11:27 <jl2012> arubi: segwit scripts look random but are valid scripts
258 2016-08-08T22:12:14 <jl2012> You may have invalid scripts, for example, one with OP_RETURN
259 2016-08-08T22:26:12 *** ribasushi has joined #bitcoin-dev
260 2016-08-08T22:30:08 *** spudowiar has joined #bitcoin-dev
261 2016-08-08T22:40:43 *** Giszmo has quit IRC
262 2016-08-08T23:05:44 *** deathcamel57 has joined #bitcoin-dev
263 2016-08-08T23:16:50 *** JZA has joined #bitcoin-dev
264 2016-08-08T23:24:55 *** JZA has quit IRC
265 2016-08-08T23:28:45 *** blueness has quit IRC
266 2016-08-08T23:36:40 *** blueness has joined #bitcoin-dev
267 2016-08-08T23:42:47 *** deathcamel57 has quit IRC
268 2016-08-08T23:42:59 *** deathcamel57 has joined #bitcoin-dev
269 2016-08-08T23:44:08 *** Matthew42 has joined #bitcoin-dev
270 2016-08-08T23:44:26 *** Matthew42 has left #bitcoin-dev
271 2016-08-08T23:47:31 *** deathcamel57 has quit IRC