1 2013-05-07 00:09:14 <slothbag> Hi all, i'm using nodejs and bitcoinjs-lib to perform a message verify operation and its taking about 15 seconds on an old CPU.. any idea's how much faster it would be if written in C? maybe 5-10 seconds to run?
2 2013-05-07 00:13:06 <jgarzik> slothbag: a single message? verified in pure C? under a second.
3 2013-05-07 00:14:04 <slothbag> on an old CPU? hmmm, ok I might need to upgrade that part then.. lol
4 2013-05-07 00:17:24 <slothbag> how much work is involved in writing a small C program that takes a signature as an argument and the message as STDIN and outputs the corresponding bitcoino address? use of openssl lib is ok.. might have to outsource it :)
5 2013-05-07 00:34:30 <jgarzik> slothbag: easy with picocoin.git's libccoin
6 2013-05-07 01:22:58 <slothbag> jgarzik: thanks i'll check it out
7 2013-05-07 01:32:04 <poop_> ????
8 2013-05-07 01:32:09 <poop_> oops
9 2013-05-07 01:32:55 <swulf--> if txn A has 0 fees but txn B, using an output from A, has sufficient fees, will miners try to include both A and B in order to get B's fees? Or are miners generally not that smart?
10 2013-05-07 02:09:39 <IanCormac> I want to get a solid understanding of the entire bitcoind codebase. Where should I start?
11 2013-05-07 02:10:18 <jgarzik> main.h
12 2013-05-07 02:10:35 <IanCormac> Fair enough
13 2013-05-07 02:10:51 <IanCormac> Are there any wiki articles that go over abstracted operation? I was kind of hoping to get something nice to read
14 2013-05-07 02:12:04 <swulf--> Ian, the source isn't terribly illegible .. great reading material, actually ;)
15 2013-05-07 02:12:24 <swulf--> That is, if you enjoy reading C++
16 2013-05-07 02:13:56 <IanCormac> Problem is that the codebase is so big I find myself jumping all over the place to find out what some class does
17 2013-05-07 02:14:16 <IanCormac> But I suppose you're right
18 2013-05-07 02:14:18 <swulf--> get an editor that makes it easy to jump around quickly...?
19 2013-05-07 02:14:23 <IanCormac> Any tips?
20 2013-05-07 02:14:25 <gmaxwell> I think the code is perfectly readable... and in systems like this, the details matter greatly. I'd rather have some boring code I skip over (and then can remember and go back to) then a lies for children overview.
21 2013-05-07 02:14:40 <gmaxwell> IanCormac: two terminal windows and grep always worked for me.
22 2013-05-07 02:15:13 <IanCormac> uphill through the snow both ways? :)
23 2013-05-07 02:15:50 <IanCormac> Well, better get started
24 2013-05-07 02:15:52 <swulf--> If reading the code isn't the best way to learn the code then I'm not really sure what is:)
25 2013-05-07 02:15:57 <gonffen_> you could try eclipse
26 2013-05-07 02:16:02 <gmaxwell> :P
27 2013-05-07 02:16:28 <gmaxwell> IanCormac: just prepare yourself to make multiple passes. If you hit some object that you don't understand??? you don't always have to go read it right away.
28 2013-05-07 02:18:09 <jgarzik> IanCormac: Vizzini says you have to go back to the beginning. http://bitcoin.org/bitcoin.pdf
29 2013-05-07 02:19:18 <cjd> my subset of C has spoiled me
30 2013-05-07 02:19:44 <cjd> when I see a publically visible function and it's not prefixed with the name of the file where it's defined, I'm immedietly unhappy
31 2013-05-07 02:19:52 <IanCormac> I've read through most of the whitepaper. I think I have a fairly good understanding of the protocol, but just not nearly an accurate enough understanding of the protocol to satisfy me. I've found myself making false assumptions too many times
32 2013-05-07 02:21:46 <IanCormac> e.g. that OP_CHECKSIG just did ECDSA math
33 2013-05-07 02:22:04 <IanCormac> got schooled on that one
34 2013-05-07 02:22:24 <cjd> bitcoin is complicated
35 2013-05-07 02:22:36 <cjd> every time you think you understand it you find out you don't
36 2013-05-07 02:22:59 <IanCormac> No kidding
37 2013-05-07 02:39:46 <Julius129> ok i found that crazy node screwing with my client again
38 2013-05-07 02:39:50 <Julius129> going to upload screenshots
39 2013-05-07 02:40:52 <Julius129> http://imageshack.us/photo/my-images/10/blockcount.png/
40 2013-05-07 02:41:07 <Julius129> http://imageshack.us/photo/my-images/812/outofsync.png/
41 2013-05-07 02:43:21 <cjd> ip addr?
42 2013-05-07 02:44:27 <gmaxwell> I'd repeat what I told you before and tell you that its harmless and cosmetic and doesn't do anything. But seeing how much it bugs you I might as well figure out how to avoid it being possible to trigger on the real network.
43 2013-05-07 02:44:54 <Julius129> receive version message: version 60000, blocks=140700, us=105.224.56.172:18333, them=0.0.0.0:0, peer=75.119.251.161:54650
44 2013-05-07 02:45:18 <cjd> oh yeah
45 2013-05-07 02:45:21 <cjd> I remember that
46 2013-05-07 02:45:22 <Julius129> its been stuck in that state for probably 60 minutes now
47 2013-05-07 02:45:38 <cjd> I was able to make my bitcoin node kind of unhappy that way
48 2013-05-07 02:45:52 <gmaxwell> cjd: lies.
49 2013-05-07 02:46:07 <cjd> well, it was isolated to I could 100% sybil it
50 2013-05-07 02:46:35 <gmaxwell> cjd: the blockcount is cosmetic it doesn't actually do anything to it.
51 2013-05-07 02:46:42 <cjd> yeah
52 2013-05-07 02:47:07 <gmaxwell> Julius129: can you open the console and getpeerinfo and see how many of your current peers are reporting >=140700 ?
53 2013-05-07 02:47:18 <Julius129> ok
54 2013-05-07 02:48:38 <Julius129> none, ive restarted my client, so all is normal again
55 2013-05-07 02:49:00 <gmaxwell> okay, well if it does it again??? go run that and see whats there.
56 2013-05-07 02:49:42 <cjd> could demand that block then if they don't respond DoS them and reset
57 2013-05-07 02:49:54 <cjd> only cosmetic but warm and fuzzy is king
58 2013-05-07 02:50:18 <gmaxwell> cjd: you cannot requests blocks by height
59 2013-05-07 02:50:27 <cjd> oh right :|
60 2013-05-07 02:50:43 <cjd> well if you're synced you could just ask for blocks
61 2013-05-07 02:50:44 <Julius129> if you guys say it wont affect the transactions, then i wont worry
62 2013-05-07 02:50:55 <gmaxwell> It won't affect the transactions.
63 2013-05-07 02:51:08 <gmaxwell> cjd: it uses a median for it in any case, so it shouldn't generally be possible for someone to goof you up without having a majority of your connections.
64 2013-05-07 02:51:14 <Julius129> but the out of sync status made me think my ISP or something blocked my client off
65 2013-05-07 02:51:49 <gmaxwell> I suspect that what it is is some stupid altcoin which didn't change the protocol id or something similarly stupid, and testnet nodes are actually getting half their connections to it or something like that.
66 2013-05-07 02:53:00 <Luke-Jr> gmaxwell: if you want a laugh: Feathercoin changed the magic bytes, but used Litecoin's genesis block as-is..
67 2013-05-07 02:53:23 <cjd> :|
68 2013-05-07 02:54:07 <nsh> weightlesscoin will be perfect, however
69 2013-05-07 02:54:26 <Julius129> anyway before i leave for work, what is the CPU requirements for running a bitcoind with lots of addresses in a wallet? Can i run this on a 800mhz AMD geode or isnt that a good idea?
70 2013-05-07 02:54:50 <cjd> btw nice work on the strict signatures thing
71 2013-05-07 02:55:01 <cjd> lots of grey area cleared up there
72 2013-05-07 02:55:58 <Arnavion> Luke-Jr: How does feathercoin's blockchain validate, then?
73 2013-05-07 02:58:49 <jgarzik> wtf is a feathercoin
74 2013-05-07 02:59:03 <sydna> another pump-and-dump altcoin
75 2013-05-07 02:59:22 <Arnavion> A direct copy of litecoin where they changed literally nothing except the name
76 2013-05-07 03:00:22 <sivu> but hey, how cool is that you have your own currency
77 2013-05-07 03:00:26 <sivu> you get the ladies
78 2013-05-07 03:00:43 <Julius129> hey sydna
79 2013-05-07 03:00:56 <Julius129> i got that issue again, have screenshots if you want to see
80 2013-05-07 03:00:56 <sydna> Julius129: how'd your misbehaving node go?
81 2013-05-07 03:01:10 <sydna> Julius129: sure, I'm pretty curious about that
82 2013-05-07 03:01:32 <Julius129> we think its some alt coin
83 2013-05-07 03:01:55 <gmaxwell> Arnavion: no no no.. they applied the litecoin winning model.
84 2013-05-07 03:02:22 <Arnavion> The what?
85 2013-05-07 03:02:30 <gmaxwell> They took litecoin ... and quartered the time between blocks and quadrupled the total number of coins, exactly as ltc does wrt bitcoin.
86 2013-05-07 03:02:34 <Arnavion> Also I see in one commit, they deleted main.cpp, and in the next commit they put it back
87 2013-05-07 03:02:44 <Arnavion> with one line less
88 2013-05-07 03:02:52 <sydna> Julius129: hark. they made a fork and didn't change the ports?
89 2013-05-07 03:03:19 <Julius129> maybe...
90 2013-05-07 03:03:31 <Julius129> maybe its ChickenCoin or CowCoin
91 2013-05-07 03:04:36 <sydna> BitBar was the most recent fork I think
92 2013-05-07 03:04:59 <cjd> ACTION takes bitcoind, hardcodes it into testnet mode and changes the name :D
93 2013-05-07 03:05:16 <IanCormac> I'm rich!
94 2013-05-07 03:05:24 <cjd> xD
95 2013-05-07 03:05:31 <IanCormac> In antimattercoins
96 2013-05-07 03:05:46 <IanCormac> That's even better than weightlesscoin, right?
97 2013-05-07 03:05:50 <sydna> QuarkCoin. you never know if the balance is up or down.
98 2013-05-07 03:06:15 <lianj> so much good ideas
99 2013-05-07 03:06:21 <cjd> ShrodengersCoin you may or may not have been paid, never know until you spend it
100 2013-05-07 03:06:39 <IanCormac> The proof of work system is based on poisoning cats
101 2013-05-07 03:06:48 <sydna> and cesium atoms.
102 2013-05-07 03:06:50 <cjd> xD
103 2013-05-07 03:08:31 <Julius129> today i want to get the freebsd port of bitcoin up and running :)
104 2013-05-07 03:08:51 <cjd> ambitious
105 2013-05-07 03:09:12 <IanCormac> Is there not one already?
106 2013-05-07 03:09:13 <cjd> does anyone have fork blocks handy so I can unit test reorg?
107 2013-05-07 03:09:22 <Julius129> there is one
108 2013-05-07 03:09:41 <Julius129> but i am going to attempt to put it on one of my embedded AMD geode boards
109 2013-05-07 03:10:46 <IanCormac> Alright, in my quest to understand the bitcoind code, I'm going through and re-naming every single class into some extremely explicit, lengthy description of what it does
110 2013-05-07 03:10:50 <IanCormac> Let's hope this helps
111 2013-05-07 03:20:11 <lianj> cjd: iirc testnet in a box has a reorg in it
112 2013-05-07 03:22:38 <cjd> cool, I'll take a look
113 2013-05-07 03:23:38 <cjd> btw this is my difficulty code
114 2013-05-07 03:23:39 <cjd> https://ezcrypt.it/8r6n#yMMNPOlYrvICyIE1nMWvceLQ
115 2013-05-07 03:23:57 <cjd> doesn't use openssl bignum at all and I fuzz tested it against the satoshi impl
116 2013-05-07 03:24:21 <cjd> like overnight so I'm pretty sure I covered pretty much every possibility
117 2013-05-07 03:24:42 <swulf--> Ian: CTransaction isn't descriptive enough of what it does?
118 2013-05-07 03:26:35 <gmaxwell> cjd: did you test all the obvious boundard cases ??1 too?
119 2013-05-07 03:26:58 <gmaxwell> er, boundary
120 2013-05-07 03:27:00 <petertodd> ACTION needs to make steamcoin some day, with a 3 month block time so convergence across the atlantic is possible.
121 2013-05-07 03:27:43 <cjd> My test was just to feed it random inputs
122 2013-05-07 03:27:55 <cjd> in a loop
123 2013-05-07 03:29:29 <gmaxwell> meh. random testing often has poor coverage??? good because it finds things you wouldn't think of... bad because I wouldn't be surprised if it didn't even hit all the branches in your code.
124 2013-05-07 03:30:11 <cjd> hmm
125 2013-05-07 03:30:33 <cjd> should hit all if statements but as far as the rounding errors, that's hard to tell
126 2013-05-07 03:31:15 <Happzz> any reason for the 0.8 client to take forever to launch? (minutes)
127 2013-05-07 03:31:39 <cjd> just after upgrading? probably rescaning the chain
128 2013-05-07 03:33:26 <sydna> Happzz: the client validates the blocks on disks on every launch, that takes some time
129 2013-05-07 03:33:44 <Happzz> cjd no
130 2013-05-07 03:33:55 <sydna> Happzz: you can turn down the number of blocks it checks back on using a line in bit coin.conf
131 2013-05-07 03:33:58 <Happzz> sydna that's too long
132 2013-05-07 03:34:18 <Happzz> sydna how
133 2013-05-07 03:34:33 <gmaxwell> Happzz: if it's taking minutes then something is wrong with your computer
134 2013-05-07 03:34:38 <gmaxwell> Happzz: can you post your debug log?
135 2013-05-07 03:35:07 <gmaxwell> sydna: turning down the validation isn't a great plan for someone that probably has a failing disk or something.
136 2013-05-07 03:35:39 <sydna> true.
137 2013-05-07 03:36:36 <Happzz> gmaxwell of course. is there any private data in it or can i post it publicly?
138 2013-05-07 03:36:53 <gmaxwell> Happzz: it will list your IP very likely, and potentially any txid you've made recently.
139 2013-05-07 03:37:01 <gmaxwell> otherwise no. no keys or anything like that in it.
140 2013-05-07 03:37:16 <gmaxwell> if you want you could email it to me, gmaxwell@gmail.com
141 2013-05-07 03:37:21 <Happzz> gmaxwell my hardware is as fine as it gets these days
142 2013-05-07 03:38:06 <Happzz> gmaxwell http://pastebin.com/D2mvFy5t
143 2013-05-07 03:38:23 <Happzz> gmaxwell it continues with accepting blocks and stuff, but that's the launch part as far as i understand
144 2013-05-07 03:38:46 <gmaxwell> ahh
145 2013-05-07 03:38:47 <gmaxwell> block index 237351ms
146 2013-05-07 03:38:57 <Happzz> sup?
147 2013-05-07 03:39:08 <gmaxwell> Happzz: ... are you using mercury delay line storage?
148 2013-05-07 03:39:16 <gmaxwell> 237 seconds to load the block index... crazy.
149 2013-05-07 03:39:17 <Happzz> i don't know?
150 2013-05-07 03:39:34 <gmaxwell> Happzz: what kind of filesystem is this on? what kind of drive is "D:"?
151 2013-05-07 03:39:38 <sydna> gmaxwell: ahaha!
152 2013-05-07 03:39:52 <Happzz> NTFS
153 2013-05-07 03:39:54 <sivu> d: is cd-rom of course!
154 2013-05-07 03:39:57 <Happzz> a 500gb 7200rpm hd
155 2013-05-07 03:40:16 <gmaxwell> Happzz: connected over wire telegram?
156 2013-05-07 03:40:25 <Happzz> over what
157 2013-05-07 03:40:33 <Happzz> sata cable.
158 2013-05-07 03:40:36 <gmaxwell> hm.
159 2013-05-07 03:40:41 <gmaxwell> have a benchmark too?
160 2013-05-07 03:40:43 <gmaxwell> er tool?
161 2013-05-07 03:40:59 <Happzz> i can get one in a minute
162 2013-05-07 03:41:04 <Happzz> it's a wd wd5000aaks
163 2013-05-07 03:41:32 <Happzz> i've hd tune pro up and running. what do you wanna check?
164 2013-05-07 03:41:34 <slothbag> jgarzik: i just realized your library is pure C.. would it be any faster (to run) or easier to develop in C++? I just need something to run fast.. either C or C++ is fine
165 2013-05-07 03:42:13 <gmaxwell> K. run it on D: .... can it give you IOPS and mbyte/sec read figures?
166 2013-05-07 03:42:21 <gmaxwell> for comparison on my laptop:
167 2013-05-07 03:42:22 <gmaxwell> 2013-05-07 05:40:18 block index 5628ms
168 2013-05-07 03:42:25 <gmaxwell> ^ 5.6 seconds.
169 2013-05-07 03:42:37 <Happzz> you should be more specific on what you want from me. what's IOPS
170 2013-05-07 03:42:45 <Bjander> Slothbag is that a bitcoin library in pure C?
171 2013-05-07 03:42:52 <Happzz> benchmark of Read?
172 2013-05-07 03:42:58 <slothbag> yeah, libccoin
173 2013-05-07 03:43:02 <gmaxwell> Happzz: Sorry, I don't use windows and I'm not familar with that specific tool. Sure, lets see some read benchmark numbers.
174 2013-05-07 03:43:39 <sydna> gmaxwell: would it be possible to have a copy of your compressed-key vanitygen patch? I understand that using it would be at my own risk.
175 2013-05-07 03:45:05 <jgarzik> slothbag: I doubt C++ would make libccoin any faster
176 2013-05-07 03:46:10 <gmaxwell> sydna: sure. and it's cpu only. (but it's a pretty simple patch) As long as you know enough to actually _test_ the keys before sending a billion bitcoins to them, fine with me.
177 2013-05-07 03:46:19 <slothbag> jgarzik: ok thanks.
178 2013-05-07 03:46:31 <sydna> gmaxwell: that's fine
179 2013-05-07 03:46:38 <sydna> gmaxwell: thank you
180 2013-05-07 03:47:09 <gmaxwell> It's actually a quite simple patch.
181 2013-05-07 03:47:54 <sydna> simpler than I was expecting too
182 2013-05-07 03:47:59 <Happzz> gmaxwell https://www.dropbox.com/sh/bx6boqup2avlcro/kc6YUytUq_
183 2013-05-07 03:49:58 <cjd> slothbag: generally C has a reputation for being faster than C++ because in C++ it's easier to "do more with less" by using abstractions.
184 2013-05-07 03:50:12 <cjd> If you are good then you can write fast code in anything
185 2013-05-07 03:51:17 <Luke-Jr> cjd: well, C++ compilers used to suck too
186 2013-05-07 03:51:26 <Happzz> gmaxwell just uploaded another benchmark there
187 2013-05-07 03:51:39 <Luke-Jr> and the output binaries are still rather large if you consider the stdlib
188 2013-05-07 03:52:05 <slothbag> anything.. can you get my nodejs message verification down from 15 seconds to < 1 sec :)
189 2013-05-07 03:52:19 <cjd> hehehe
190 2013-05-07 03:52:37 <cjd> I think node.js would make a good frontend for a future client
191 2013-05-07 03:52:47 <cjd> I am not NOT NOT NOT going to write a client
192 2013-05-07 03:52:50 <cjd> never ever
193 2013-05-07 03:53:07 <cjd> not even once
194 2013-05-07 03:53:33 <weex> a journey of 1,000 miles begins with a single step :P
195 2013-05-07 03:53:50 <sivu> cjd, nowadays c++ compilers tend to optimize better because more development effort is put into them
196 2013-05-07 03:54:29 <cjd> I find that my own special subset of C is everything I need
197 2013-05-07 03:55:04 <cjd> templates would be kinda cool but everything else is meh
198 2013-05-07 03:55:06 <sivu> cjd, i mean that compiling c code with c++ compiler is better than using c compiler
199 2013-05-07 03:55:22 <Happzz> ACTION pokes gmaxwell
200 2013-05-07 03:55:23 <sivu> it gives you better syntax checking too
201 2013-05-07 03:55:44 <cjd> the risk is that it gives you stuff you shouldn't have
202 2013-05-07 03:55:45 <cjd> :)
203 2013-05-07 03:55:50 <cjd> and that's a rathole
204 2013-05-07 03:55:51 <Happzz> gmaxwell i guess you're afk, so just respond when you can, i'll be on and off, gonna make some coffee
205 2013-05-07 03:56:20 <sivu> dont drink coffee! it has caffeine
206 2013-05-07 03:56:25 <sivu> it's dangerous
207 2013-05-07 03:56:37 <wumpus> cjd: node.js hmm... I'd think safer languages such as the rust, or mature languages specificually aimed at building distributed systems such as erlang would be more suited... but javascript, why in hell? :)
208 2013-05-07 03:56:51 <Luke-Jr> sivu: not really
209 2013-05-07 03:56:58 <Luke-Jr> sivu: C is way more common than C++
210 2013-05-07 03:57:13 <cjd> javascript is awesome :D
211 2013-05-07 03:57:47 <sivu> Luke-Jr: i didn't say it wasn't
212 2013-05-07 03:58:02 <gmaxwell> Happzz: https://www.dropbox.com/sh/bx6boqup2avlcro/kc6YUytUq_#f:bm2.jpg < thats realllly slow. hm.
213 2013-05-07 03:58:19 <sivu> Luke-Jr: i said more development effort is put into c++ compilers than c
214 2013-05-07 03:58:26 <cjd> really if someone just wrote a decent static analyzer which detected potential casts in js, it would be just as safe as any other language
215 2013-05-07 03:58:51 <Luke-Jr> sivu: which I doubt
216 2013-05-07 03:59:04 <cjd> g++ vs. gcc...
217 2013-05-07 03:59:10 <cjd> not sure there's much difference
218 2013-05-07 03:59:22 <sivu> it's not the only compiler you know
219 2013-05-07 03:59:24 <Luke-Jr> I've never heard of anyone compiling C with G++ for performance reasons
220 2013-05-07 03:59:29 <gmaxwell> cjd: JS is a pretty irregular language with a fair number of footguns that come purely from the irregularity.
221 2013-05-07 03:59:50 <cjd> yes but it's fast to write stuff in :)
222 2013-05-07 04:00:03 <Luke-Jr> cjd: no faster than Perl
223 2013-05-07 04:00:17 <cjd> yeah, perl is nice
224 2013-05-07 04:00:23 <cjd> I like node a bit better
225 2013-05-07 04:00:31 <gmaxwell> the only kind of performance advantages you get from C++ is that you can get more inlined gunk, for example qsort() takes a function pointer but a stl sort inlines... of course that bits you in the rear when it does too much of it and blows out your icache.
226 2013-05-07 04:00:51 <cjd> hehe
227 2013-05-07 04:00:56 <Happzz> gmaxwell ok... and what do i/we can do about that
228 2013-05-07 04:01:07 <Happzz> gmaxwell note that's the "max" one, it could be a singular op
229 2013-05-07 04:01:20 <cjd> gmaxwell: I did that using the preprocessor xD
230 2013-05-07 04:01:36 <wumpus> gmaxwell: I guess you could do the same in C if qsort is defined as inline as the compiler is smart enough to understand a fixed function pointer
231 2013-05-07 04:01:52 <Luke-Jr> gmaxwell: and even then, C11 helps with the auto type
232 2013-05-07 04:01:54 <gmaxwell> Happzz: even as slow as that is, I'm not sure if it alone explains the performance. Is it that slow if you restart it just after starting it?
233 2013-05-07 04:02:25 <Luke-Jr> too bad GCC's typeof() didn't get into C11
234 2013-05-07 04:02:55 <cjd> oh that is too bad
235 2013-05-07 04:02:55 <Julius129> its a pitty satoshi didnt write bitcoin in pure C
236 2013-05-07 04:03:14 <cjd> specifically my subset of C :)
237 2013-05-07 04:03:27 <Luke-Jr> ACTION isn't sure he likes C subsets <.<
238 2013-05-07 04:03:29 <wumpus> automotive c?
239 2013-05-07 04:03:30 <gmaxwell> wumpus: yea, with LTO. There are also some places where idomatic c++ gets optimized where doing the same thing in C won't.. e.g. if you build objects out of structs in C with function pointers, in C++ if type analysis shows only the right kind of object will be accessed it can remove the vtable indirection, so there are some optimizations like that that you won't get if you write C++ programs in C. :)
240 2013-05-07 04:04:15 <kadoban> cjd: what exactly do you mean by a subset? what don't you use?
241 2013-05-07 04:04:27 <wumpus> pre-allocate all the things!
242 2013-05-07 04:04:29 <Luke-Jr> not sure what's up with LTO. it seems popular, but at the same time, it's apparently so experimental that even Gentoo refuses to support it
243 2013-05-07 04:04:31 <cjd> It's just C with all 'public' function names prefixed with the name of the file and a _, also allocators and reader/writer
244 2013-05-07 04:05:30 <wumpus> gmaxwell: indeed, C++ compilers have been forced to be pretty smart, as the language is so complex :-)
245 2013-05-07 04:05:34 <kadoban> ah
246 2013-05-07 04:05:57 <gmaxwell> Luke-Jr: even when LTO works great, it sometimes exposes bugs in existing code that didn't show up before because the optimizer couldn't be agressive enough. It can also cause extremem memory usage while compiling.
247 2013-05-07 04:06:33 <cjd> kadoban: https://ezcrypt.it/Ar6n#Iaay01ii4DR2N7NCoEyivEPB <-- sample of cjC
248 2013-05-07 04:06:34 <Luke-Jr> gmaxwell: so like -O3 ?
249 2013-05-07 04:07:28 <wumpus> Luke-Jr: yes the same can be said of any optimization, though LTO has the potential to expose even more bugs as it mixes compile units, something the author never imagined probably
250 2013-05-07 04:07:45 <Julius129> wow cjd
251 2013-05-07 04:07:52 <Julius129> where can i find out more
252 2013-05-07 04:07:53 <cjd> ?
253 2013-05-07 04:07:58 <cjd> cjdns
254 2013-05-07 04:08:02 <Luke-Jr> ACTION wonders if LTO crosses the shared library boundary at all
255 2013-05-07 04:08:08 <wumpus> no, it doesn't
256 2013-05-07 04:08:09 <Julius129> that looks neat
257 2013-05-07 04:08:10 <cjd> I more or less invented the language to write cjdns
258 2013-05-07 04:08:22 <wumpus> a LTO that crosses the shared library boundary would have to run at runtime
259 2013-05-07 04:08:26 <Julius129> look damn awesome
260 2013-05-07 04:08:32 <Julius129> there is some C# in there
261 2013-05-07 04:08:33 <cjd> it has almost everything available in C++ but it compiles just fine as C
262 2013-05-07 04:08:33 <Julius129> :)
263 2013-05-07 04:08:47 <wumpus> which would make your software run effectively in a JIT-ed environment
264 2013-05-07 04:08:50 <cjd> it's just codestyle rules
265 2013-05-07 04:08:58 <Luke-Jr> cjd: looks like normal C to me?
266 2013-05-07 04:09:14 <gmaxwell> its omgstructs everywhere.
267 2013-05-07 04:09:16 <wumpus> the idea is interesting though
268 2013-05-07 04:09:26 <kadoban> cjd: ya, doesn't look too drastic change, sounds kinda nice though
269 2013-05-07 04:09:42 <cjd> struct Allocator* alloc = Allocator_child(myAllocator);
270 2013-05-07 04:09:49 <cjd> potentiallyLeakyFunction(alloc);
271 2013-05-07 04:09:53 <cjd> Allocator_free(alloc);
272 2013-05-07 04:10:01 <Julius129> Its sexy
273 2013-05-07 04:10:05 <cjd> makes potentially leaky functions provably non-leaky
274 2013-05-07 04:10:19 <cjd> every function takes an allocator
275 2013-05-07 04:10:27 <Julius129> cjd what platform can i use it on
276 2013-05-07 04:10:29 <gmaxwell> ACTION hands cjd a C89 compiler and lets him cry.
277 2013-05-07 04:10:37 <Luke-Jr> cjd: ???
278 2013-05-07 04:10:39 <cjd> ACTION uses -std=c99
279 2013-05-07 04:10:41 <cjd> :)
280 2013-05-07 04:10:48 <Luke-Jr> ACTION uses -std=gnu0x
281 2013-05-07 04:11:02 <gmaxwell> cjd: your use of anonymous structs makes stack usage analysis complicated, probably even moreso than vararrays.
282 2013-05-07 04:11:04 <cjd> Julius129: linux/mac/bsd/solaris
283 2013-05-07 04:11:20 <gmaxwell> cjd: yea, great, too bad there are a lot of non-c99 compilers out there.. (like MSVC :P )
284 2013-05-07 04:11:28 <cjd> yeah
285 2013-05-07 04:11:33 <Luke-Jr> gmaxwell: who needs MSVC? :p
286 2013-05-07 04:11:33 <wumpus> MSVC is really holding back the state of the art in C
287 2013-05-07 04:11:40 <cjd> I have no desire ever to work on Windows
288 2013-05-07 04:11:40 <Luke-Jr> MingW ftw
289 2013-05-07 04:11:44 <cjd> Luke-Jr: +1
290 2013-05-07 04:12:15 <gmaxwell> wumpus: more than you might guess, they actually got some of the features they refuse to implment removed from the C11 standard. (e.g. variable length arrays got made optional)
291 2013-05-07 04:12:31 <cjd> gmaxwell: stack usage analysis -> hard to optimize?
292 2013-05-07 04:12:42 <Julius129> .command = BitcoinMessage_Command_VERACK
293 2013-05-07 04:12:42 <Julius129> .network = BitcoinMessage_Network_MAIN,
294 2013-05-07 04:12:42 <Julius129> sendMessage(&(struct BitcoinMessage) {
295 2013-05-07 04:12:43 <Julius129> }, ctx);
296 2013-05-07 04:12:49 <Julius129> how is that new bitcoinmessage cleaned?
297 2013-05-07 04:12:54 <Julius129> i dont see a free()
298 2013-05-07 04:13:01 <wumpus> Luke-Jr: yes that's the bitcoin dev's mantra, 'screw MSVC'.. even though in principle bitcoin can be compiled with MSVC++ (I did it once) , no one cares a bit :)
299 2013-05-07 04:13:06 <gmaxwell> it's an anonymous struct. it's allocated on the stack and it goes away when the caller goes out of scope.
300 2013-05-07 04:13:11 <cjd> Julius129: it's only ever on the stack
301 2013-05-07 04:13:22 <Julius129> ah
302 2013-05-07 04:13:24 <Luke-Jr> wumpus: I don't see anything bitcoin-specific about it ;)
303 2013-05-07 04:13:34 <gmaxwell> presumably if the callee needs to keep it around he has to allocate and copy.
304 2013-05-07 04:13:55 <cjd> actually he writes it to a socket but same idea
305 2013-05-07 04:14:02 <Luke-Jr> wumpus: the last time I had to work with MSVB (years ago), I actually wrote a Makefile to run WINE on the CLI compiler.. :P
306 2013-05-07 04:14:16 <Julius129> cjd, tell me so have you written some bitcoin code in this?
307 2013-05-07 04:14:30 <cjd> not really, just toying around
308 2013-05-07 04:14:40 <gmaxwell> cjd: usually won't complicate analysis??? but it does mean that it can be harder to be confident that your code won't go exploidy at runtime due to running out of stack.
309 2013-05-07 04:14:50 <cjd> ahh right
310 2013-05-07 04:14:50 <wumpus> gmaxwell: that's crazy, why would they ever implement C11 anyway if they're not going to implement C99 ... and if they're not going to implement C11, why do they have influence on it
311 2013-05-07 04:14:54 <cjd> yes, that makes sense
312 2013-05-07 04:15:00 <cjd> I am highly abusive of the stack
313 2013-05-07 04:15:01 <Luke-Jr> wumpus: I don't want to squash that fix btw. It's a merge for a reason.
314 2013-05-07 04:15:18 <Julius129> im looking for some solutions, to "watch" balances of out of wallet addresses, and ive decided im not going to use some heavy python or java stuff
315 2013-05-07 04:15:26 <cjd> I have one recursive function which recurses just so it can allocate a bunch of memory very very quickly
316 2013-05-07 04:15:39 <Julius129> i want to implement something natively in feeebsd in C
317 2013-05-07 04:15:50 <gmaxwell> cjd: linux spoils you on x86_64 8mb is enough to look infinite if you aren't paying attention.. and it's very not infinite.
318 2013-05-07 04:16:06 <cjd> yeap
319 2013-05-07 04:16:21 <cjd> I take a number of risks like that
320 2013-05-07 04:16:39 <cjd> cjdns uses a grow-down stack to build and deconstruct packets in place
321 2013-05-07 04:16:47 <cjd> I've had to expand that a few times
322 2013-05-07 04:18:20 <cjd> Oh also my Allocator has an onFree() function so I can hook the freeing of the allocator
323 2013-05-07 04:18:45 <cjd> nowhere in cjdns is there a deregister type function, the contract is always "free the allocator to disconnect this thing"
324 2013-05-07 04:19:29 <cjd> I have had 2 null/dangling pointer issues in the history of cjdns
325 2013-05-07 04:21:55 <Julius129> do you have some guides how to start using this
326 2013-05-07 04:22:16 <nospinzy> can someone help me verify bitcoin addresses
327 2013-05-07 04:22:24 <nospinzy> what is the easiest way
328 2013-05-07 04:22:32 <Luke-Jr> cjd: well, at least it's not glib
329 2013-05-07 04:22:36 <cjd> :)
330 2013-05-07 04:22:42 <cjd> Julius129: sadly everything is wrapped up in cjdns at the moment
331 2013-05-07 04:22:44 <Luke-Jr> nospinzy: JSON-RPC validateaddress call?
332 2013-05-07 04:23:16 <nospinzy> i dont know how
333 2013-05-07 04:23:20 <nospinzy> please give me an example
334 2013-05-07 04:23:21 <cjd> I'm interested in possibly writing a builder which can download source packages and build them, something like npm for node
335 2013-05-07 04:23:28 <cjd> very simple and probably in node.js
336 2013-05-07 04:23:33 <nospinzy> there is little to no documentation about it
337 2013-05-07 04:23:46 <jgarzik> cjd: sounds like gentoo ;p
338 2013-05-07 04:24:06 <cjd> more like golang
339 2013-05-07 04:24:22 <cjd> that go tools thing, for people who can't stand go
340 2013-05-07 04:24:37 <Luke-Jr> I agree with jgarzik
341 2013-05-07 04:24:51 <Julius129> cjd, going to download the port and build it later today
342 2013-05-07 04:25:00 <Julius129> awesome work
343 2013-05-07 04:25:01 <cjd> port?
344 2013-05-07 04:25:07 <cjd> port of what?
345 2013-05-07 04:25:09 <Julius129> is there a freebsd port yet
346 2013-05-07 04:25:20 <cjd> of cjdns or bitcoin?
347 2013-05-07 04:25:39 <cjd> cjdns *should* run on fbsd, damn the lack of buildbots and ambition
348 2013-05-07 04:26:01 <Julius129> cjdns
349 2013-05-07 04:26:19 <cjd> yeah, go ahead and try building it, if you run into trouble there are people to help
350 2013-05-07 04:26:45 <cjd> and if there's a bug I'll try to fix it
351 2013-05-07 04:27:04 <Julius129> cool, see you around!
352 2013-05-07 04:27:06 <Julius129> gotta run
353 2013-05-07 04:27:13 <cjd> see ya on the darknet ;)
354 2013-05-07 04:29:02 <nospinzy> Hi i need help with validating bitcoin addresses thru php
355 2013-05-07 04:29:03 <nospinzy> i need help
356 2013-05-07 04:29:18 <Luke-Jr> cc1: fatal error: stdout: No such file or directory <-- wtf? :/
357 2013-05-07 04:31:21 <Arnavion> Atleast it can find stderr!
358 2013-05-07 04:31:33 <Arnavion> Maybe you just need to pipe 2>&1
359 2013-05-07 04:31:57 <Luke-Jr> this is trying to make menuconfig in Linux 3.9.0
360 2013-05-07 04:32:04 <Luke-Jr> in a VM
361 2013-05-07 04:32:23 <Luke-Jr> if I run the command by hand, it works :/
362 2013-05-07 04:32:33 <nospinzy> useless
363 2013-05-07 04:32:36 <Luke-Jr> ACTION eyes virtfs
364 2013-05-07 04:32:37 <nospinzy> THANKS GUYS
365 2013-05-07 04:32:54 <nospinzy> i thought this would be a pretty easy question for you guys
366 2013-05-07 04:32:56 <nospinzy> guess not
367 2013-05-07 04:33:02 <nospinzy> guess you are as dumb as me
368 2013-05-07 04:34:20 <Luke-Jr> hrm, same problem in tmpfs
369 2013-05-07 04:35:14 <cjd> nospinzy: you lost me at the 'in php' part =)
370 2013-05-07 04:35:51 <Happzz> gmaxwell tested, and block index 29973ms
371 2013-05-07 04:36:13 <gmaxwell> hm. okay... so with a warm cache its reasonable. :-/
372 2013-05-07 04:36:29 <Luke-Jr> cjd: careful or he'll PM-flame you :p
373 2013-05-07 04:37:49 <Happzz> gmaxwell that's still like 6 times longer than what it took you
374 2013-05-07 04:38:46 <K1773R> Luke-Jr: how about mkfifo stdout (in the directory)
375 2013-05-07 04:38:53 <K1773R> and in another terminal cat stdout
376 2013-05-07 04:39:09 <K1773R> that will create an stdout pipe :P
377 2013-05-07 04:39:21 <Happzz> gmaxwell any more suggestions? i still don't think it's hardware related.
378 2013-05-07 04:40:17 <Happzz> i've an i7, 4gb ram (barely used atm), zero issues
379 2013-05-07 04:40:21 <gmaxwell> Happzz: I'm not quite sure where to look next. It would be useful to find someone else with windows + 7200 rpm sata and find out what they're getting so at least we could isolate down the config a bit further.
380 2013-05-07 04:41:12 <Happzz> gmaxwell do you need just their block index timing?
381 2013-05-07 04:42:49 <gmaxwell> yea, that would be a good comparison point.
382 2013-05-07 04:55:03 <Happzz> gmaxwell so i found someone. with warm cache, he has 23697ms
383 2013-05-07 04:55:08 <Happzz> also 7200rpm sata, etc'.
384 2013-05-07 04:57:28 <Happzz> gmaxwell still no reason for 20% longer load time ;(
385 2013-05-07 07:14:54 <ali1234> can i ask a random node what it thinks the genesis block is?
386 2013-05-07 07:15:55 <ali1234> on the p2p protocol that is
387 2013-05-07 07:27:12 <t7> from the network protocol wikidocument, it doesnt look like it. But i only skim read
388 2013-05-07 07:30:29 <ali1234> me too
389 2013-05-07 07:33:42 <Scrat> oh noes, I can't send 0.006 usd, the sky is falling!
390 2013-05-07 07:51:02 <sipa> ali1234: you could ask for block headers starting at hash 00000...
391 2013-05-07 07:51:22 <ali1234> ok. the wiki kind of implies that doesn't work...
392 2013-05-07 07:51:25 <ali1234> but i will try it
393 2013-05-07 07:51:47 <ali1234> i have to code up the basic message code first
394 2013-05-07 07:51:53 <sipa> the wiki is often incomplete
395 2013-05-07 07:52:48 <ali1234> i'll have to try every network magic also :)
396 2013-05-07 07:53:24 <ali1234> i want to identify random nodes - which alt coin they belong to
397 2013-05-07 07:56:21 <BlueMatt-Work> has anyone else duplicated #1961
398 2013-05-07 08:13:38 <melvster> bitcoin i understand uses ECDSA secp256k1 ?
399 2013-05-07 08:14:38 <SomeoneWeird> yes
400 2013-05-07 08:15:16 <melvster> it looks like browsers are only going to support secp256r1
401 2013-05-07 08:15:18 <melvster> :(
402 2013-05-07 08:16:26 <melvster> http://www.w3.org/TR/WebCryptoAPI/#EcKeyGenParams-dictionary
403 2013-05-07 08:17:42 <sipa> it was a bit an unusual choice
404 2013-05-07 08:18:19 <sipa> i think satoshi chose it because there were potential performance improvements possible with k1
405 2013-05-07 08:29:39 <melvster> sipa: sipa yes i hear 30-50% performance improvement
406 2013-05-07 08:30:06 <melvster> hopefully i can try and persuade harry and david to include this
407 2013-05-07 08:30:47 <sipa> melvster: well, my own implementation about 6 times faster than openssl's (which doesn't have specific secp256k1 routines), but i may have some optimizations that could be applied to other curves too
408 2013-05-07 08:30:48 <melvster> i sent a mail out to the list
409 2013-05-07 08:31:04 <melvster> sipa: wow, cool!
410 2013-05-07 08:53:27 <The_Fly> have we tried compiling with emscripten an secp256k1 C implementation?
411 2013-05-07 08:53:47 <The_Fly> ive ported a few C projects over, it's fairly easy to use too
412 2013-05-07 08:54:02 <The_Fly> and now outputs ASM.js which will benefit firefox users
413 2013-05-07 08:55:30 <BlueMatt-Work> you can try sipa's https://github.com/sipa/secp256k1
414 2013-05-07 08:56:07 <wumpus> may be an interesting experiment, but I wouldn't be surprised if there are already js implementations of secp256k1 for various bitcoin projects
415 2013-05-07 08:56:09 <The_Fly> the asm in there might be problematic
416 2013-05-07 08:56:22 <The_Fly> as emscripten relies on LLVM IR
417 2013-05-07 08:56:30 <wumpus> the asm is optional
418 2013-05-07 08:56:35 <The_Fly> ah ok, nice
419 2013-05-07 08:56:42 <The_Fly> so melvster, maybe try that...
420 2013-05-07 08:56:48 <BlueMatt-Work> no, it will use either asm or gmp or openssl (for their bigints) based on what you chose
421 2013-05-07 08:56:50 <BlueMatt-Work> ACTION -> meeting
422 2013-05-07 08:57:48 <The_Fly> ah... meetings, where no work gets done, just talking about work
423 2013-05-07 08:58:22 <The_Fly> melvster: what are you looking to do in-browser?
424 2013-05-07 08:59:15 <melvster> The_Fly: web payments
425 2013-05-07 08:59:31 <The_Fly> transaction signing in the browser?
426 2013-05-07 08:59:39 <The_Fly> localstorage wallet?
427 2013-05-07 08:59:43 <melvster> The_Fly: yes and key provisioning
428 2013-05-07 08:59:48 <The_Fly> interesting
429 2013-05-07 08:59:57 <melvster> localStorage is not as secure as native
430 2013-05-07 09:00:06 <The_Fly> no but you could add a layer of crypto over it
431 2013-05-07 09:00:12 <melvster> sure
432 2013-05-07 09:00:23 <melvster> but id rather use the standard api if there's going to be one
433 2013-05-07 09:00:30 <The_Fly> standard api?
434 2013-05-07 09:00:45 <melvster> web crypto in the browser ... should be out in the next year
435 2013-05-07 09:00:52 <The_Fly> right
436 2013-05-07 09:00:59 <melvster> http://www.w3.org/TR/WebCryptoAPI/#EcKeyGenParams-dictionary
437 2013-05-07 09:01:03 <The_Fly> sure, i know
438 2013-05-07 09:01:09 <The_Fly> but in the interim you can port sipa's code
439 2013-05-07 09:01:24 <The_Fly> i was really talking about how you'd store the priv/pub keypairs
440 2013-05-07 09:01:26 <melvster> there's a few javascript solutions out there
441 2013-05-07 09:01:43 <The_Fly> i imagine an emscripten port would be the most performant
442 2013-05-07 09:01:59 <The_Fly> anyway, if it's an offline application (is it?) what are you doing for storage?
443 2013-05-07 09:02:01 <melvster> The_Fly: yes im keen to get a good key store solution in the browser that is more usable than X.509 which is pretty much all there is today
444 2013-05-07 09:02:12 <The_Fly> or were you planning to sync to server the wallet?
445 2013-05-07 09:02:40 <melvster> The_Fly: id like the wallet keys to be securely kept in the browser ideally
446 2013-05-07 09:02:53 <melvster> to the same standard that client side certificates are stored
447 2013-05-07 09:02:53 <The_Fly> they could get lost easily this way
448 2013-05-07 09:03:05 <The_Fly> i'd opt for keeping it server side but decrypting locally
449 2013-05-07 09:03:26 <The_Fly> however you'd be vulnerable to any man-in-the-middle attack which injects javascrpipt
450 2013-05-07 09:03:28 <melvster> is a good solution but you can then brute force it
451 2013-05-07 09:03:29 <The_Fly> *script
452 2013-05-07 09:03:38 <jaakkos> sipa: do you have C versions of secp256k1_fe_mul_inner and secp256k1_fe_sqr_inner?
453 2013-05-07 09:03:44 <The_Fly> melvster: brute force?
454 2013-05-07 09:03:50 <The_Fly> i doubt it
455 2013-05-07 09:04:12 <The_Fly> what you should be worried about is any attack which modifies the payload your client's are running
456 2013-05-07 09:04:34 <melvster> The_Fly: if you look at the ripple.com solution they keep wallets in a server side vault with a password ... that would be possible to brute force if you had access to the valut
457 2013-05-07 09:04:34 <The_Fly> which could easily catch the decrypted wallet and send it off somewhere
458 2013-05-07 09:05:04 <melvster> yes also a worry :)
459 2013-05-07 09:05:07 <The_Fly> melvster: not if you enforce long, high entropy passphrases
460 2013-05-07 09:05:14 <The_Fly> and you could also opt for multi-factor auth
461 2013-05-07 09:05:29 <The_Fly> e.g. user storing a key on their USB stick, plus passphrase
462 2013-05-07 09:05:43 <melvster> The_Fly: multi factor is good ... but most passphrases dont have that much entropy on the web
463 2013-05-07 09:06:11 <The_Fly> with multifactor the passphrase becomes less important
464 2013-05-07 09:06:15 <The_Fly> you get enough from the key
465 2013-05-07 09:06:23 <melvster> may be the way to go, yes
466 2013-05-07 09:06:27 <The_Fly> they'd have to bruteforce both
467 2013-05-07 09:06:30 <The_Fly> impossible
468 2013-05-07 09:06:37 <jaakkos> sipa: oh, they're there
469 2013-05-07 09:07:01 <melvster> but people find pass phrases annoying ... 'password fatigue'
470 2013-05-07 09:07:24 <The_Fly> password vault
471 2013-05-07 09:07:30 <The_Fly> use something like keepass
472 2013-05-07 09:07:38 <The_Fly> but yes, i know what you mean
473 2013-05-07 09:07:46 <melvster> sure, but then that becomes a single point of failure
474 2013-05-07 09:08:03 <The_Fly> i keep mine backed up in a few places
475 2013-05-07 09:08:20 <The_Fly> and have the most important passwords on paper
476 2013-05-07 09:08:27 <melvster> the thing about keys in the browser is that the browser manufacturers will be incentivized to have whole teams working on the security
477 2013-05-07 09:09:31 <melvster> you can then use the key store for lots of things such as distributed social nets, payments, secure messaging ... all with the same API ...
478 2013-05-07 09:09:52 <The_Fly> yeah it'd be nice
479 2013-05-07 09:10:00 <The_Fly> would also be nice if they got zlib functions in the browser
480 2013-05-07 09:10:15 <The_Fly> i had to port zlib with emscripten
481 2013-05-07 09:10:30 <The_Fly> as client requests cant notify the server of a gzip payload
482 2013-05-07 09:10:34 <melvster> the main motivation for getting this stuff in the browser is that you can reach a large audience via the browser
483 2013-05-07 09:10:34 <The_Fly> only server->client
484 2013-05-07 09:10:57 <The_Fly> yeah
485 2013-05-07 09:11:10 <melvster> email was delivered quite effectively via the webmail providers
486 2013-05-07 09:11:19 <The_Fly> browser plugins are the way to go for bitcoin i think
487 2013-05-07 09:11:22 <melvster> even tho email is a different P2P protocol
488 2013-05-07 09:11:29 <The_Fly> i like that some gateways have mobile apps for QR scanning
489 2013-05-07 09:11:48 <The_Fly> but if i can click a bitcoin: uri and pay, i'd like that
490 2013-05-07 09:11:51 <The_Fly> you probably already can
491 2013-05-07 09:11:52 <melvster> im helping to work on a plugin
492 2013-05-07 09:12:02 <melvster> but it's sometimes hard to get people to install stuff
493 2013-05-07 09:12:02 <The_Fly> ah, ive just started working on one ;)
494 2013-05-07 09:12:10 <The_Fly> well...
495 2013-05-07 09:12:26 <melvster> i want to port payments into the plugin too
496 2013-05-07 09:12:36 <The_Fly> you dont really need to
497 2013-05-07 09:12:44 <The_Fly> but it would be good...
498 2013-05-07 09:12:46 <melvster> but with web crypto every browser will have that api without needing the plugin
499 2013-05-07 09:12:59 <melvster> so its low hanging fruit
500 2013-05-07 09:13:07 <The_Fly> i think you're going to end up needing most of a bitcoind in-browser (i.e. not happening)
501 2013-05-07 09:13:18 <The_Fly> of course you can make transactions without the whole blockchain
502 2013-05-07 09:13:22 <melvster> sure
503 2013-05-07 09:13:31 <melvster> tx and signing
504 2013-05-07 09:13:36 <The_Fly> how much of the p2p can you avoid either?
505 2013-05-07 09:13:48 <The_Fly> would you just pull it all of blockinfo/explorer?
506 2013-05-07 09:13:54 <The_Fly> *blockchain/explorer
507 2013-05-07 09:14:03 <melvster> good question
508 2013-05-07 09:14:11 <The_Fly> after the transactions are signed then what?
509 2013-05-07 09:14:21 <The_Fly> http over to a bitcoin node somewhere?
510 2013-05-07 09:14:55 <melvster> if you want to send it to the block, sure
511 2013-05-07 09:15:03 <The_Fly> well you need to
512 2013-05-07 09:15:04 <The_Fly> to pay
513 2013-05-07 09:15:08 <melvster> not really
514 2013-05-07 09:15:09 <sipa> jaakkos: there are 4 (i think) implementations for the field routines (uint64 C, __int128 C, GMP, x86_64 asm), and 2 for the num routines (GMP and OpenSSL)
515 2013-05-07 09:15:12 <melvster> that can happen out of band
516 2013-05-07 09:15:19 <melvster> but the block will prevent a double spend
517 2013-05-07 09:15:24 <melvster> and is the definitive record
518 2013-05-07 09:15:29 <The_Fly> you need it on the bitcoin p2p network
519 2013-05-07 09:15:31 <The_Fly> bottom line
520 2013-05-07 09:15:38 <The_Fly> otherwise it is not spent.
521 2013-05-07 09:15:46 <melvster> depends on how much you trust the counter party
522 2013-05-07 09:15:52 <melvster> many transactions can net out
523 2013-05-07 09:15:59 <melvster> before you go to the block for settlement
524 2013-05-07 09:16:04 <sipa> whether a coin is spent or not is a local property
525 2013-05-07 09:16:19 <sipa> the blockchain exists to make sure parties reach a consensus in case of conflict
526 2013-05-07 09:16:26 <melvster> yes
527 2013-05-07 09:16:31 <The_Fly> exactly
528 2013-05-07 09:17:03 <melvster> lets say i have a poker game with a group of friends
529 2013-05-07 09:17:06 <The_Fly> and im highlighting that because i doubt many merchants will accept payments from customers which are not confirmed
530 2013-05-07 09:17:10 <melvster> we may have 10,000 transactions
531 2013-05-07 09:17:19 <melvster> but only at the end would i put the balances back to the block
532 2013-05-07 09:17:41 <melvster> or i may just save the buyin for the next game
533 2013-05-07 09:18:29 <melvster> i try to avoid spamming the block chain if possible, though I agree it's unavoidable when the counter parties are relatively unknown to each other
534 2013-05-07 09:18:46 <melvster> im also working on an out of band transaction system
535 2013-05-07 09:18:56 <melvster> which can be netted
536 2013-05-07 09:19:50 <melvster> if you look at something like ad sense for example, they'll do 1000s of micro transactions, but then only one payment per month through the traditional banking system
537 2013-05-07 09:20:13 <The_Fly> the coins have no trustable value until they are confirmed unspent
538 2013-05-07 09:20:16 <melvster> so long as you trust google not to screw you over that's ok
539 2013-05-07 09:21:11 <The_Fly> i see an unconfirmed transaction almost akin to a cheque
540 2013-05-07 09:21:39 <melvster> yes it's a bit better than that even
541 2013-05-07 09:21:48 <The_Fly> just a tiny bit
542 2013-05-07 09:22:00 <The_Fly> in that you COULD spend it, if it is valid and remains unspent
543 2013-05-07 09:22:11 <The_Fly> you could just sign junk transactions with non-existing inputs
544 2013-05-07 09:22:43 <The_Fly> until the merchant verifies that the outputs are unspent, it's nothing more than a "promise"
545 2013-05-07 09:23:07 <melvster> agree
546 2013-05-07 09:23:21 <melvster> tho it's a promise that most people keep
547 2013-05-07 09:23:30 <melvster> so you have a heuristic
548 2013-05-07 09:23:37 <The_Fly> well you'd get milage out of rating system
549 2013-05-07 09:23:42 <The_Fly> *a
550 2013-05-07 09:23:44 <melvster> definitely
551 2013-05-07 09:23:48 <melvster> also something im working on
552 2013-05-07 09:23:57 <TD> it's not a promise
553 2013-05-07 09:24:03 <TD> that's obviously nonsense under the current rule set
554 2013-05-07 09:24:14 <TD> once a tx is broadcast nodes won't replace it with double spends in their memory pool
555 2013-05-07 09:24:24 <The_Fly> i meant an out of band transaction TD
556 2013-05-07 09:24:34 <TD> ok, if it's not broadcast then sure. though even then you can raise the confidence
557 2013-05-07 09:24:37 <TD> e.g. with secure hardware
558 2013-05-07 09:24:48 <The_Fly> hmm...
559 2013-05-07 09:25:23 <melvster> i was talking to adam back, he's also interested in a distributed web of trust and reputation system
560 2013-05-07 09:26:13 <melvster> nanotube's rating system in bitcoin-otc is a great start imho
561 2013-05-07 09:35:47 <The_Fly> http://arxiv.org/abs/quant-ph/0301141
562 2013-05-07 09:35:59 <The_Fly> in 1000 qubits time, we're screwed
563 2013-05-07 09:36:15 <The_Fly> let's get to work on a quantum-cryptographic currency
564 2013-05-07 09:39:20 <The_Fly> "The bank of coherent states"
565 2013-05-07 09:39:58 <The_Fly> ShorBank
566 2013-05-07 10:12:33 <xeroc> A 160 bit elliptic curve cryptographic key c
567 2013-05-07 10:12:34 <xeroc> ould be broken
568 2013-05-07 10:12:35 <xeroc> on a quantum computer using around 1000 qubits
569 2013-05-07 10:12:43 <xeroc> bitcoin uses 256 bit ..
570 2013-05-07 10:12:51 <xeroc> thats a BIG difference
571 2013-05-07 10:14:23 <xeroc> 6
572 2013-05-07 10:14:23 <xeroc> n
573 2013-05-07 10:14:23 <xeroc> otal number of qubits (roughly
574 2013-05-07 10:14:26 <xeroc> he says also
575 2013-05-07 10:14:27 <xeroc> otal number of qubits (roughly
576 2013-05-07 10:14:28 <xeroc> 6
577 2013-05-07 10:14:28 <xeroc> n
578 2013-05-07 10:14:31 <xeroc> woops ..
579 2013-05-07 10:14:44 <xeroc> you need 6*n for shor on ecc
580 2013-05-07 10:14:47 <wumpus> just add some extra qubits, easy right? :-)
581 2013-05-07 10:15:02 <xeroc> 1536 qubits ..
582 2013-05-07 10:15:38 <xeroc> btw .. its a probabilistic 'cracking' of ECC .. not deterministic ..
583 2013-05-07 10:16:06 <TD> sipa: qq - are we using c++0x yet?
584 2013-05-07 10:16:26 <wumpus> we're not using c++0x
585 2013-05-07 10:16:35 <xeroc> https://en.wikipedia.org/wiki/Timeline_of_quantum_computing
586 2013-05-07 10:16:46 <xeroc> D-Wave claims a quantum computation using 84 qubits
587 2013-05-07 10:17:15 <wumpus> but it's not the kind of quantum computation that can execute shor's algorithm
588 2013-05-07 10:17:19 <xeroc> a long way to go for quantum computation to crack ECC/RSA
589 2013-05-07 10:17:33 <xeroc> wumpus: your are right .. afaik
590 2013-05-07 10:22:34 <t7> we should all be using lattice based crypto
591 2013-05-07 10:23:10 <t7> no one is gonna tell you once they implement shor's. just sniff your online banking sessions
592 2013-05-07 10:24:24 <t7> ACTION recalls an episode of numb3rs where someone thought he had broken RSA but he hadnt and then they had to pretend he had or something
593 2013-05-07 10:30:21 <wumpus> xeroc: this mentions d-wave and shor's algorithm briefly http://wavewatching.net/2012/12/27/big-bad-quantum-computer-revisited/
594 2013-05-07 10:31:35 <gavinandresen> somebody ping me when a quantum computer can factor a 15-bit number faster than a conventional computer. Until then??? "meh"
595 2013-05-07 10:32:53 <t7> gavinandresen, it can factor 15 :O
596 2013-05-07 10:33:00 <t7> but not a 15 bit number :)
597 2013-05-07 10:33:57 <alaricsp> So, four bits then :-)
598 2013-05-07 10:34:24 <t7> i duno if it worked for any 4 bit number
599 2013-05-07 10:34:32 <t7> i remember 15 being in the news though
600 2013-05-07 10:39:46 <sydna> even Shakuntala Devi couldn't manage that one
601 2013-05-07 10:43:41 <The_Fly> wumpus: yes, they're using adiabatic qc
602 2013-05-07 10:44:05 <The_Fly> and most quantum algorithms will give you an output distribution
603 2013-05-07 10:45:17 <The_Fly> there's decoherence to deal with
604 2013-05-07 10:45:47 <alaricsp> ACTION is used to getting incoherent answers
605 2013-05-07 10:46:06 <The_Fly> lol