1 2017-02-08 16:36:59 <Drawn> anybody at the elementsproject?
2 2017-02-08 16:41:28 <waxwing> Drawn: there's #sidechains-dev (although you might find the same people), more likely focused on whatever you're going to ask
3 2017-02-08 16:42:41 <Chris_Stewart_5> waxwing: I think 'finding the same people' is true across every project in bitcoin sadly :(. Hopefully we can get more people to contribute!
4 2017-02-08 19:11:45 <Drawn> Hey dudes - I have a problem with a mac installing the bitcoin core at the point when I want to create the autoconf. Anybody here can help me? Im on mac
5 2017-02-08 19:25:33 <doffing81> Can anyone verify that my serialized raw transactions, just before double hashing, for the complex transaction example (https://bitcoin.org/en/developer-examples#simple-raw-transaction) are correct?
6 2017-02-08 19:25:45 <doffing81> 1.) 0100000002f327e86da3e66bd20e1129b1fb36d07056f0b9a117199e759396526b8f3a20780000000023210229688a74abd0d5ad3b06ddff36fa9cd8edd181d97b9489a6adc40431fb56e1d8acfffffffff0ede03d75050f20801d50358829ae02c058e8677d2cc74df51f738285013c260000000000ffffffff02f028d6dc010000001976a914ffb035781c3c69e076d48b60c3d38592e7ce06a788ac00ca9a3b000000001976a914fa5139067622fd7e1e722a05c17c2bb7d5fd6df088ac0000000001000000
7 2017-02-08 19:25:59 <doffing81> 2.) 0100000002f327e86da3e66bd20e1129b1fb36d07056f0b9a117199e759396526b8f3a20780000000000fffffffff0ede03d75050f20801d50358829ae02c058e8677d2cc74df51f738285013c26000000001976a9149ba386253ea698158b6d34802bb9b550f5ce36dd88acffffffff02f028d6dc010000001976a914ffb035781c3c69e076d48b60c3d38592e7ce06a788ac00ca9a3b000000001976a914fa5139067622fd7e1e722a05c17c2bb7d5fd6df088ac0000000001000000
8 2017-02-08 19:28:29 <arubi> doffing81, sure, sec.
9 2017-02-08 19:29:06 <arubi> reading about the complex example, I can't remember what it's about
10 2017-02-08 19:29:44 <arubi> okay, lemme check
11 2017-02-08 19:31:16 <doffing81> doh, linked to the simplt tx, and not the complex one
12 2017-02-08 19:31:19 <arubi> well first I see that the order of utxo1 and utxo2 is different
13 2017-02-08 19:31:26 <arubi> right I figured that :)
14 2017-02-08 19:31:41 <arubi> ^^ at least for 1.
15 2017-02-08 19:32:00 <arubi> and for 2. at least that's promising :)
16 2017-02-08 19:32:37 <arubi> oh wait, sorry
17 2017-02-08 19:33:08 <arubi> looked at the first byte only and 26->26 :) my output is.. reversed :)
18 2017-02-08 19:34:15 <arubi> so doffing81, are you getting an error when signing it?
19 2017-02-08 19:34:53 <doffing81> just trying to match what core gives me
20 2017-02-08 19:35:09 <arubi> in terms of what? the signature?
21 2017-02-08 19:35:13 <doffing81> yeah
22 2017-02-08 19:35:27 <arubi> well, are you using rfc6979 for generating k?
23 2017-02-08 19:35:32 <doffing81> yup
24 2017-02-08 19:35:50 <arubi> so what's your sighash?
25 2017-02-08 19:36:24 <arubi> even better, which hash do you feed to the function that does rfc6979 for you? :)
26 2017-02-08 19:36:56 <arubi> which = "what is the.."
27 2017-02-08 19:37:19 <doffing81> hmmm
28 2017-02-08 19:38:38 <doffing81> I double sha256 hash both of those separately and generate their r,s values
29 2017-02-08 19:38:45 <doffing81> ?
30 2017-02-08 19:40:16 <doffing81> then encode for the signature
31 2017-02-08 19:40:30 <arubi> well doffing81 , to generate r you have to generate k. to generate k you use rfc6979 with the sha256 of 1. and 2. respectively
32 2017-02-08 19:40:45 <doffing81> right, that is what I am doing
33 2017-02-08 19:41:06 <arubi> do you feed the double sha256 (hash256) of those into rfc6979, or the sha256 of them?
34 2017-02-08 19:41:16 <doffing81> double
35 2017-02-08 19:41:31 <arubi> rfc6979 will hash your message
36 2017-02-08 19:41:39 <arubi> so, feed the single sha256
37 2017-02-08 19:41:42 <doffing81> interesting
38 2017-02-08 19:42:02 <doffing81> I may have to look at how I have implemented things
39 2017-02-08 19:43:10 <arubi> it's step 3.2.a specifically
40 2017-02-08 19:43:54 <doffing81> I was aware that rfc6979 used a single hash, but my double hash seems to work without hashing in my rfc6979 implementation for other tx's
41 2017-02-08 19:44:46 <arubi> ah, that's interesting. let me try to do follow the steps here
42 2017-02-08 19:46:17 <arubi> so my r for 1. is CE5DD767430D42A9DF1AC88D1BFD04A3FE4CF0CA3241C0BB143E76677528B9F7, is that what you have?
43 2017-02-08 19:46:40 <doffing81> yeah
44 2017-02-08 19:46:41 <arubi> 4A47099EB4427A30869F84B5C9E3FDE32D7D0C93C9CD4C90265B86B9674E5F4D for 2.
45 2017-02-08 19:47:04 <doffing81> b14bfacb90c6a4292fd0385ef94671ff26a8f14ab7086a6c1ac1ee6d64ae0cbd for 2 :(
46 2017-02-08 19:47:19 <arubi> oh I missed replacing the private key
47 2017-02-08 19:47:30 <arubi> hehe, it's all very manual
48 2017-02-08 19:47:54 <arubi> B14BFACB90C6A4292FD0385EF94671FF26A8F14AB7086A6C1AC1EE6D64AE0CBD
49 2017-02-08 19:48:03 <doffing81> so, correct?!
50 2017-02-08 19:48:13 <arubi> well I only used your transactions
51 2017-02-08 19:48:36 <arubi> I could try to make my own and see if we get different ones
52 2017-02-08 19:49:26 <arubi> few minutes, I'll make some tea. what are the values core give you?
53 2017-02-08 19:49:35 <doffing81> I mean, that would be the coolest ;) But yeah, I guess I just need to make sure that I have correctly serialized
54 2017-02-08 19:50:11 <doffing81> I just use the example
55 2017-02-08 19:50:42 <doffing81> assuming that is what core would give me
56 2017-02-08 19:52:14 <doffing81> and the example don't use the scriptPubKey as placeholders, or append the sigHashType, at least not in the rawTransaction output
57 2017-02-08 20:08:06 <arubi> well well
58 2017-02-08 20:09:32 <arubi> at least for input 2. it says '"vout" : 1,' in the json output but then goes on with UTXO2_VOUT=0
59 2017-02-08 20:12:34 <arubi> still I can't get it to sign :) their hex says it's input 0 but json output says 1.
60 2017-02-08 20:13:09 <arubi> still should sign if I set the vout:0, maybe I'm messing with something in the copy+paste
61 2017-02-08 20:13:40 <doffing81> you're saying mine has a vout:1?
62 2017-02-08 20:14:32 <arubi> yours has 0
63 2017-02-08 20:14:54 <arubi> on both. it's their second input that shows it's vout:1 when they listunspent, but then they set it as 0 themselves
64 2017-02-08 20:17:07 <arubi> oh, I'm wrong again, they have both
65 2017-02-08 20:17:16 <doffing81> yeah
66 2017-02-08 20:17:24 <doffing81> I thought they were correct
67 2017-02-08 20:17:31 <arubi> that format is really hard to read through
68 2017-02-08 20:17:39 <arubi> too many line breakes and it's too narrow :)
69 2017-02-08 20:17:44 <doffing81> yup
70 2017-02-08 20:18:35 <arubi> anyway, it signs correctly and we have the same r values :)
71 2017-02-08 20:18:49 <arubi> so, assuming the sky isn't falling, I don't have to check s :)
72 2017-02-08 20:18:56 <doffing81> lol
73 2017-02-08 20:20:35 <doffing81> but we have the same r values?
74 2017-02-08 20:20:45 <arubi> yep, all set up correctly
75 2017-02-08 20:21:29 <arubi> I used your 1. and 2. to generate my k values, and core signs the same transaction with the same signature
76 2017-02-08 20:21:38 <arubi> so seems like we're all in agreement
77 2017-02-08 20:21:50 <doffing81> cool, thx
78 2017-02-08 20:21:55 <arubi> cheers
79 2017-02-08 20:22:01 <doffing81> sounds like i'm on the right track
80 2017-02-08 20:22:11 <doffing81> Thanks a bunch arubi!
81 2017-02-08 20:22:13 <arubi> try different sighash types too, it gets pretty interesting
82 2017-02-08 20:22:30 <doffing81> I'm just getting started with all this
83 2017-02-08 20:22:44 <arubi> sure, trust me there's time. it all goes very slowly
84 2017-02-08 20:23:04 <doffing81> Yeah, just building my own wallet to learn
85 2017-02-08 20:23:48 <arubi> nice! I'm implementing everything I can here too. I guess we're doing the same thing basically. which language?
86 2017-02-08 20:23:58 <doffing81> swift
87 2017-02-08 20:24:37 <arubi> cool, never got to try it. I'm using bash and bc
88 2017-02-08 20:25:21 <doffing81> word. not much crypto functionality with swift, at least not for iOS, soooo I'm getting a crash course in a ll things Bitcoin
89 2017-02-08 20:26:20 <arubi> excellent. it's very interesting imo. if you get the basics right, then pretty much everything builds on the same building blocks
90 2017-02-08 20:27:07 <doffing81> Indeed to all of the above!
91 2017-02-08 20:46:28 <arubi> ;;tell doffing81 later https://gist.github.com/fivepiece/db0181148b749d13b4213e199f4ab232 cheers
92 2017-02-08 20:46:28 <gribble> Error: I haven't seen doffing81, I'll let you do the telling.
93 2017-02-08 20:46:43 <arubi> you blind motherf...