1 2012-11-03 00:02:50 <phantomcircuit> bitcoind uses ~ 8 IOPS
2 2012-11-03 00:02:57 <phantomcircuit> interesting statistic
3 2012-11-03 00:47:40 <kjj_> crap. why doesn't signmessage include the address in the message?
4 2012-11-03 00:47:46 <kjj_> er, in the signature
5 2012-11-03 00:53:14 <gmaxwell> kjj_: In effect it does. You must provide it in order to do the comparison.
6 2012-11-03 00:54:03 <gmaxwell> e.g. verifymessage <message> <signature> -> true would be completely useless.
7 2012-11-03 00:54:33 <gmaxwell> verifymessage <message> <signature> -> address would be highly prone to human error (I sign with a lookalike address) so we decided not to do that.
8 2012-11-03 00:57:07 <kjj_> ok, but say you have a database of addresses, and you get a signed message. having to iterate the database to see which user sent the message is terrible
9 2012-11-03 00:57:44 <gmaxwell> ??? Then do not do that.
10 2012-11-03 00:58:06 <gmaxwell> Under most contexts that wouldn't be a secure way of using it.
11 2012-11-03 00:58:13 <kjj_> not doing that means that I have to invent a format to carry the message, the signature, and the address in one package
12 2012-11-03 00:58:29 <gmaxwell> You already have to do that if you dont know the message in advance.
13 2012-11-03 00:59:54 <kjj_> hmm. I feel a pull request coming on for a pair of functions that produce/verify blocks like GPG signatures
14 2012-11-03 01:00:51 <gmaxwell> I will NAK something that embeds the address in the signature so fast your head will spin.
15 2012-11-03 01:01:05 <kjj_> seriously?
16 2012-11-03 01:01:20 <gmaxwell> Yes. It was an intentional decision to do it this way.
17 2012-11-03 01:01:47 <kjj_> you want to make it impossible to figure out who signed a message unless you carry the address along with it, but you won't allow me to carry the address along with it?
18 2012-11-03 01:01:49 <gmaxwell> GPG has a key validation model, so you can tell if a signature is from a trusted key. Our usage is different.
19 2012-11-03 01:02:06 <kjj_> there are other usages than the one that you are thinking of
20 2012-11-03 01:02:11 <gmaxwell> kjj_: You can figure it out, just not with the RPC.
21 2012-11-03 01:02:11 <kjj_> like automatic systems, for example
22 2012-11-03 01:02:24 <gmaxwell> uh. This was written with automatic systems in mind.
23 2012-11-03 01:03:26 <gmaxwell> Just whatever anonymous system you have in mind at the moment.
24 2012-11-03 01:04:17 <kjj_> I'm thinking it would be nice to have a website that acted upon messages signed by keys it knows
25 2012-11-03 01:04:54 <kjj_> and since signing the message authenticates the user, it seems really, really, really silly to make them provide their identity TOO
26 2012-11-03 01:05:56 <kjj_> and yeah, I can make my own system to do it, but then a random user can't type up a quick message on the command line, sign it, and paste the two in
27 2012-11-03 01:06:06 <gmaxwell> Then don't do that. But that isn't want the bitcoin interface is for??? because it has no key management for validated keys (and adding one would be major feature creap) what you're asking for couldn't be done securely in the context of it.
28 2012-11-03 01:06:16 <gmaxwell> kjj_: Wow. No thats not true.
29 2012-11-03 01:06:50 <kjj_> right, the user could paste all three things in. but that's, well, odd
30 2012-11-03 01:07:02 <gmaxwell> No, they don't have to do that either.
31 2012-11-03 01:07:04 <kjj_> I get it that you want to keep users from making silly mistakes
32 2012-11-03 01:07:38 <gmaxwell> What you don't get is that you don't need bitcoind to do everthing for you. Bitcoind is not your mother. :P
33 2012-11-03 01:07:46 <kjj_> dude...
34 2012-11-03 01:08:24 <kjj_> the signature couild embed the address, but doesn't because it is someone else's mother
35 2012-11-03 01:08:25 <gmaxwell> You can't do what you're suggesting securely without having key management. Thats in your website. It knows what keys are good or not. So have it do the validation.. and it can extract the address.
36 2012-11-03 01:08:40 <Luke-Jr> ???
37 2012-11-03 01:08:46 <Luke-Jr> I suggest a compromise:
38 2012-11-03 01:08:55 <gmaxwell> kjj_: Please repeat the message I sent to you in response first.
39 2012-11-03 01:09:03 <Luke-Jr> use a PGP-compatible format, including the info to determine the address that signed it
40 2012-11-03 01:09:04 <gmaxwell> The first four words, please.
41 2012-11-03 01:09:11 <Luke-Jr> but require the JSON-RPC user to provide the address still in bitcoind
42 2012-11-03 01:09:15 <gmaxwell> Luke-Jr: Stop dont you be stupid too.
43 2012-11-03 01:09:18 <kjj_> gmaxwell: Please repeat the message. :)
44 2012-11-03 01:09:36 <gmaxwell> Okay, since you're too stupid I'll do it for you:
45 2012-11-03 01:09:37 <gmaxwell> 18:53 < gmaxwell> kjj_: In effect it does.
46 2012-11-03 01:09:43 <Luke-Jr> gmaxwell: who's to say some external process or other implementation doesn't have key management? ;)
47 2012-11-03 01:09:51 <gmaxwell> I'll even give you javascript.
48 2012-11-03 01:09:53 <kjj_> gmaxwell: you said "in effect it does", but then you say that it does not, and that it doesn't do it intentionally
49 2012-11-03 01:10:02 <gmaxwell> No. I did not.
50 2012-11-03 01:10:28 <gmaxwell> kjj_: You need to stop trying to argue with me and let me help you.
51 2012-11-03 01:10:37 <kjj_> look, I'm not going to get into cut/paste with you. you can see what you said just as plainly as I can
52 2012-11-03 01:10:51 <gmaxwell> Yes.
53 2012-11-03 01:10:57 <gmaxwell> And you misunderstood it apparently.
54 2012-11-03 01:11:37 <gmaxwell> It has the address in it, indirectly. But bitcoind is setup so you still must provide it in order to do the comparison in a safe way; because unlike gpg it doesn't know what keys are trusted.
55 2012-11-03 01:11:41 <kjj_> so, are you saying that the key really is embedded in the signature, but the client requires you to specify it on the command line too?
56 2012-11-03 01:12:01 <gmaxwell> Your software, which knows what keys are trusted, doesn't have to work the same.
57 2012-11-03 01:12:51 <gmaxwell> kjj_: Almost. The validation process does nothing other than _recover_ the address. Any syntatically correct signature for any message maps to some address or another.
58 2012-11-03 01:13:12 <gmaxwell> Validation is just comparing the expected address and the computed address.
59 2012-11-03 01:13:21 <gmaxwell> kjj_: I'll even give you JS code for it: https://people.xiph.org/~greg/eb620fe4cdc24afbd2ded229577c64fbb099a39e80bcc15750b84c04b7878d90.html#norev_G7J1ShjvCeWfqtedznDqvHIeQDkAcTUj05MhF+qT2Fp9D3MnbxZTX7MFNF9dRWMvw2CqzWG1jHKAmueQbRQGJhM=
60 2012-11-03 01:13:25 <gmaxwell> Tada.
61 2012-11-03 01:13:56 <gmaxwell> That page has JS that pulls out the txid from the HTML, and checks it with the signature in the URL and displays the signing address.
62 2012-11-03 01:14:10 <gmaxwell> twiddle some digits in the URL and you'll see the computed address change.
63 2012-11-03 01:15:08 <gmaxwell> Unfortunately it's quite easy to run a bunch of times until you get a signature that looks a lot like the one you're expecting. ... and with no keystore in bitcoind for this, visual comparison would be really unsafe, so were setup to not enable visual comparison.
64 2012-11-03 01:16:54 <kjj_> ugh. in other words, the address is NOT at all in the signature, but you can find it from the digest and the signature?
65 2012-11-03 01:17:31 <gmaxwell> Not sure why you're saying ugh.
66 2012-11-03 01:18:11 <kjj_> well, because it means that I have to do the EC math the hard way, for one thing
67 2012-11-03 01:18:12 <gmaxwell> It's not like you could have validated the signature without the siganture and the digest. And there you go, two things. Instead of 1.. and you can efficiently look it up in your keystore.
68 2012-11-03 01:18:38 <gmaxwell> kjj_: Lots of people have written code for the EC math already. I mean hell.. it's in javascript there. :P
69 2012-11-03 01:19:06 <gmaxwell> But that has nothing to do with how it works, and everything to do with bitcoind is not your mother. :P
70 2012-11-03 01:19:22 <kjj_> heh. this is for a website. passing the EC math to bitcoind to do in assembly is much faster
71 2012-11-03 01:20:11 <gmaxwell> Bitcoind doesn't do it in assembly. And you could always call your own little process for it, I suppose.
72 2012-11-03 01:21:08 <kjj_> meh. C becomes assembly becomes instructions.
73 2012-11-03 01:21:19 <gmaxwell> So does php.
74 2012-11-03 01:21:19 <kjj_> sometimes the middle step is skipped
75 2012-11-03 01:22:01 <kjj_> bitcoind is done before my enter key rises. PHP takes a while.
76 2012-11-03 01:22:29 <gmaxwell> "So don't use php" ? :P Its not like it's only slow for that.
77 2012-11-03 01:23:35 <kjj_> I seriously can't believe that I'm the first person that would have liked a function that gives the key that signed a message.
78 2012-11-03 01:24:16 <Luke-Jr> kjj_: gmaxwell's point is that there is no way to validly use that function.
79 2012-11-03 01:24:21 <Luke-Jr> besides what you can already do
80 2012-11-03 01:24:36 <kjj_> Luke-Jr: it is possible to use it unsafely. that isn't the same thing at all
81 2012-11-03 01:24:45 <gmaxwell> kjj_: so we're now down to the point where you want bitcoind to behave in a way which will endanger users, which isn't useful for many use cases, and for the use cases that do need some other behavior there _must_ be some other software to perform key management. ... and your objection is that PHP is too slow so you want to cram half an implementation into bitcoin, consequences be damned. Do I have that right?
82 2012-11-03 01:25:59 <kjj_> gmaxwell: pretty much, yup. first point is overblow, second is overblown, third is irrelavant, fourth is overstated, fifth is hyperbole.
83 2012-11-03 01:27:00 <kjj_> but yeah, other than that, you've pretty well summed it up
84 2012-11-03 01:27:18 <gmaxwell> kjj_: I've _watched_ people misuse it. It's not overblown. It's how people use it when it works the other way.
85 2012-11-03 01:27:36 <gmaxwell> Because it's actually quite surprising that someone can search for near miss signatures.
86 2012-11-03 01:28:22 <kjj_> the people that need to verify that a signature matches an address can still do that. I'm not suggesting that anyone take that call away
87 2012-11-03 01:28:27 <gmaxwell> And it's not overblown to say that there must be key managment. There must be. Otherwise the signatures are useless. Without something to know if the key is the right one all signatures are valid.
88 2012-11-03 01:28:42 <kjj_> key management is irrelevant, not overblown
89 2012-11-03 01:29:27 <gmaxwell> K. Well I'm going to ignore you now. Which is too bad, because if it turned out that your php was too slow I would have nicely written you a tool to do what you want, but instead I want to stab you because you are thickheaded and selfish.
90 2012-11-03 01:29:31 <kjj_> getting the key out of the verification process can be used as a lookup into the KMS, which is how automatic things will do it, but almost never how a human typing on the console will do it
91 2012-11-03 01:30:06 <kjj_> meh. enjoy.
92 2012-11-03 01:31:03 <gmaxwell> ::Sigh:: Again. Bitcoind is not your mother. It is bitcoind. Not "random ECC math library". The _only_ reason we should have validate in there at all was to make it available to conventional users.
93 2012-11-03 01:31:43 <kjj_> LOL. really? how much of the shit in the RPC API is totally useless to "conventional users" ? 50%
94 2012-11-03 01:32:06 <gmaxwell> 100% pretty much. A different 10% for different users.
95 2012-11-03 01:32:28 <gmaxwell> It also lacks API to do ECDH or to convert a random pubkey in a hash160, or to convert a hash 160 into a base58 address or a billion other bits of manipulation it might do.
96 2012-11-03 01:32:34 <kjj_> the point of the RPC API is to support different uses. and this seems like a totally legitimate usage to me, even if you disagree
97 2012-11-03 01:33:03 <Luke-Jr> gmaxwell: namecoin's merged mining patches added a "build a merkle tree for me" RPC :P
98 2012-11-03 01:33:22 <gmaxwell> kjj_: Having validate in it at all is on the thin edge of a legitimate use.. it's certantly a legimiate application, but it's not reasonable to put every possible function in it.. Whats next a strlen api call? :P
99 2012-11-03 01:33:56 <kjj_> if strlen wasn't built in to like everything, but was very useful for bitcoin and not much else, sure, why not?
100 2012-11-03 01:34:36 <Luke-Jr> kjj_: libbitcoin might be useful to you
101 2012-11-03 01:34:42 <gmaxwell> kjj_: validatemessage is useful at the commandline and gui. People use it in OTC contracts. It's useful by itself. As it is. And by making sure its there we can be sure most users have access to it.. it's part of the ecosystem.
102 2012-11-03 01:34:42 <Luke-Jr> there's no reason to use RPC for math
103 2012-11-03 01:34:43 <kjj_> I get it that it can't and shouldn't do everything. but it verifies signatures already. why do you feel that it would be totally wrong to have another function that verifies signatures in a different way?
104 2012-11-03 01:35:02 <Luke-Jr> kjj_: verifying the signature *is* comparing the address
105 2012-11-03 01:35:22 <gmaxwell> You want to _half_ verify it, with the other half burried in your app.
106 2012-11-03 01:36:03 <gmaxwell> And I don't agree with including that because it's feature creep??? put the other half in your app. And because it would be a hazard to everyone else who wouldn't know the safe usage without research.
107 2012-11-03 01:37:11 <Luke-Jr> IMO, the real problem kjj_ is having is that he wants to use a network protocol/server as if it were a library because his programming language of choice has trouble using standard libraries
108 2012-11-03 01:37:37 <kjj_> Luke-Jr: follow that logic another step. why have the RPC API at all?
109 2012-11-03 01:37:45 <Luke-Jr> kjj_: to interact with the wallet.
110 2012-11-03 01:37:51 <Luke-Jr> and the node.
111 2012-11-03 01:38:00 <gmaxwell> And the network.
112 2012-11-03 01:39:00 <kjj_> hmm. should we then rip out the calls that work with no wallet, no node and no network?
113 2012-11-03 01:39:22 <Luke-Jr> maybe.
114 2012-11-03 01:40:39 <gmaxwell> kjj_: you'd have ... validateaddress.
115 2012-11-03 01:40:52 <gmaxwell> and... createrawtransaction perhaps.
116 2012-11-03 01:41:08 <Luke-Jr> yeah, those shouldn't be there IMO
117 2012-11-03 01:41:13 <gmaxwell> everything else gets information from the wallet/node/network or does something to those things.
118 2012-11-03 01:41:15 <kjj_> verifymessage, signrawtransaction both come to mind
119 2012-11-03 01:41:25 <gmaxwell> No, signrawtransaction needs the wallet.
120 2012-11-03 01:41:27 <Luke-Jr> signrawtransaction at least interacts with the wallet
121 2012-11-03 01:41:38 <gmaxwell> It can be used without one but normally pulls data from the wallet.
122 2012-11-03 01:41:42 <kjj_> it can, but doesn't have to. it would be a LOT simpler if it did
123 2012-11-03 01:41:53 <gmaxwell> If it did what?
124 2012-11-03 01:42:00 <kjj_> did rely on the wallet
125 2012-11-03 01:42:17 <gmaxwell> It ... does. I mean the privkey parameter is totally optional.
126 2012-11-03 01:42:46 <kjj_> the wallet is totally optional there too
127 2012-11-03 01:43:30 <gmaxwell> It really isn't. Beyond irritating me you're losing my respect. It's poor form to make silly arguments just to make a point.
128 2012-11-03 01:43:45 <kjj_> hahahaha. I came to that conclusion a while back
129 2012-11-03 01:44:09 <kjj_> and I'm pretty sure this is like the 20th time you've lost respect for me, and I can live with that. :)
130 2012-11-03 01:44:14 <gmaxwell> Extracting keys to sign is terribly from a security and key management perspective. It absolutely should be there. And I'm not sure why you'd even suggest it shouldn't.
131 2012-11-03 01:45:00 <kjj_> ugh. for the 8th time, I'm NOT suggesting that you remove that. I'm suggesting a different function that returns the address that signed a message when it is unknown
132 2012-11-03 01:46:02 <kjj_> totally different use case. if someone used the wrong method, and an attacker had provided a lookalike address, it could be a problem. but it doesn't automatically blow everything up
133 2012-11-03 01:47:27 <gmaxwell> And I'm telling you that bitcoin's RPC api is not a general all bitcoin stuff library. Its not even close to one. It shouldn't include things that need no interaction with anything except its math library.
134 2012-11-03 01:47:54 <gmaxwell> And certantly not when it would create a trap for bad usage because there is no way to use a proposed function safely without writing addtional code.
135 2012-11-03 01:49:51 <gmaxwell> (not to mention the API is quite slow... all that json packing and unpacking. I'm almost, but not quite, surprised that it would actually be faster to call it than have a PHP implementation.)
136 2012-11-03 01:52:08 <kjj_> I haven't gone in search of a faster EC math library because I trust the one I'm using to work every time.
137 2012-11-03 01:52:30 <kjj_> I know he left, he can read it in the logs if he wants to
138 2012-11-03 02:04:24 <graingert> is the Bloom Filter randomly seeded?
139 2012-11-03 02:10:43 <graingert> otherwise it might be possible to stuff the filter
140 2012-11-03 02:35:42 <graingert> Luke-Jr: ^
141 2012-11-03 02:35:49 <Luke-Jr> ?
142 2012-11-03 02:36:03 <graingert> the Bloom Filter discussed in https://bitcoinfoundation.org/blog/?p=16
143 2012-11-03 02:39:09 <graingert> BlueMatt: ^
144 2012-11-03 02:39:25 <kjj_> Luke-Jr: the patch to allow verifymessage to accept "?" as the address and return the signing address is super simple. works great too
145 2012-11-03 02:52:24 <etotheipi_> sipa: was there ever any progress on the new wallet format? has anything changed?
146 2012-11-03 02:53:11 <etotheipi_> sipa: a long time ago, I implemented it, and then stashed it because I had other priorities... but I think I will be picking it back up again and would like to maintain compatibility
147 2012-11-03 09:52:38 <Jack> hi all
148 2012-11-03 09:53:08 <Guest24661> i have question
149 2012-11-03 09:54:35 <Guest24661> i want to develop new bitcoin client, i connect to IRC server and join random #bitcoinXX channel, i try to encode ip and ports, almost all ports are 8333 - thats is ok, but i cant connect to those nodes
150 2012-11-03 09:55:04 <Guest24661> can anyone help me?
151 2012-11-03 09:55:11 <Guest24661> what iam doing wrong
152 2012-11-03 09:57:03 <Guest24661> so can some one help me?
153 2012-11-03 10:11:42 <Guest24661> is there is some one who is online?
154 2012-11-03 10:12:07 <an3k> yes but i think you misunderstood the whole bitcoin & irc #stuff
155 2012-11-03 10:12:54 <an3k> bitcoin has nothing to do with IRC. these channels are for chatting and there are no bitcoin nodes connected
156 2012-11-03 10:16:16 <an3k> Guest18133: you want to check the source of the existing client to see what to do / how to connect -> https://github.com/bitcoin/bitcoin/tarball/v0.7.1
157 2012-11-03 10:22:19 <sipa> an3k: older bitcoin versions used irc channels for bootstrap
158 2012-11-03 10:22:56 <sipa> Guest24661: orc bootstrpping has been disabled by default for some time now
159 2012-11-03 10:23:19 <sipa> you'll likely only find very old clients there
160 2012-11-03 10:24:47 <sipa> etotheipi_: you mean append-only log file format, or bip32?
161 2012-11-03 10:25:10 <Guest24661> i know that no nodes are connected, but i know that nickname in channel #bitcoinXX is encrypted by base58 ip:port
162 2012-11-03 10:25:32 <Guest24661> i have decrypt that ip:port and try to connect to those nodes
163 2012-11-03 10:26:22 <Guest24661> only one i have connected to such node successful
164 2012-11-03 10:26:33 <Guest24661> from many times unsuccessful
165 2012-11-03 10:26:59 <Guest24661> i just what to write irc method for knowing nodes ip:port to connect
166 2012-11-03 10:27:12 <Guest24661> i going to write and dns method
167 2012-11-03 10:28:03 <Guest24661> like i was reading, i need to resolve suck dns like: bitseed.xf2.org, dnsseed.bluematt.me, seed.bitcoin.sipa.be, dnsseed.bitcoin.dashjr.org
168 2012-11-03 10:28:11 <Guest24661> *such
169 2012-11-03 10:29:19 <Guest24661> i am wrong?
170 2012-11-03 10:29:34 <sipa> why dooes that state
171 2012-11-03 10:29:54 <sipa> ment need 'suck' in it?
172 2012-11-03 10:31:29 <sipa> yes, dns seeding has replaced irc seeding
173 2012-11-03 10:32:09 <sipa> a problem maybe: are you decoding the irc ip:port in the right byteorder?
174 2012-11-03 10:32:28 <Guest24661> suck -> such
175 2012-11-03 10:32:40 <sipa> maybe you are, and none of them are actually still reachable
176 2012-11-03 10:32:49 <sipa> ha ok, sorry :)
177 2012-11-03 10:33:44 <Guest24661> i think its right byteorder, cuz port always = 8333
178 2012-11-03 10:34:01 <sipa> ok
179 2012-11-03 10:34:31 <Guest24661> can be such thing that all nodes in irc channels are unreachable?
180 2012-11-03 10:35:09 <Guest24661> can you enter in to some channel and give me list of ip:port?
181 2012-11-03 10:36:47 <sipa> you shouldn't rely on irc bootstrapping at all really
182 2012-11-03 10:36:57 <D34TH> Guest24661: have you checked that you are actually connected to the irc in debug.log?
183 2012-11-03 10:37:26 <Guest24661> what debug.log?
184 2012-11-03 10:37:26 <sipa> if he wasn't he wouldn't see ip:8333 pairs
185 2012-11-03 10:37:39 <Guest24661> i think so too
186 2012-11-03 10:38:19 <D34TH> sipa: ive had random connections when i wasnt connected to irc
187 2012-11-03 10:38:38 <D34TH> i ended up chalking it to addr.dat
188 2012-11-03 10:38:44 <sipa> ha
189 2012-11-03 10:40:32 <Guest24661> so what shell i do?
190 2012-11-03 10:40:45 <sipa> use dns seeding
191 2012-11-03 10:41:17 <Guest24661> i will, but why i cant use irc seeding for second method?
192 2012-11-03 10:42:19 <sipa> it s
193 2012-11-03 10:42:46 <sipa> it will only get you very old and badly maintained nodes
194 2012-11-03 10:44:39 <Guest24661> to do dns seeding i need just do dns resolve?
195 2012-11-03 10:46:27 <sipa> yes
196 2012-11-03 10:46:41 <Joric> omg torvaldss using kde again https://plus.google.com/u/0/+LinusTorvalds/posts/DbmEE8kXLDA users confused
197 2012-11-03 10:48:32 <D34TH> sipa: can you addnode a dnsseed?
198 2012-11-03 10:49:45 <sipa> D34TH: yes
199 2012-11-03 10:50:07 <D34TH> Guest24661, try -addnode=seed.bitcoin.sipa.be
200 2012-11-03 10:50:34 <sipa> D34TH: he is writing his own xlient
201 2012-11-03 10:50:38 <D34TH> oh
202 2012-11-03 10:50:39 <sipa> client
203 2012-11-03 10:50:44 <Guest24661> yes )
204 2012-11-03 10:50:50 <D34TH> did not know
205 2012-11-03 10:50:51 <D34TH> sorry
206 2012-11-03 10:51:47 <Guest24661> sipa - thnks )
207 2012-11-03 10:51:54 <D34TH> bluematt: when you come alive, does your bitcoin-qt build support ipv6?
208 2012-11-03 10:52:07 <D34TH> havent seen any ipv6 connections
209 2012-11-03 10:52:18 <sipa> damn 3.2" touchscreen keyboard is small once you switched to a 4.7" one...
210 2012-11-03 10:56:08 <Guest24661> writing dns seeding - i must resolve dns and i will have some nodes - this nodes are static? (some super-node?) or i need to re-resolve some period this dns?
211 2012-11-03 10:57:28 <D34TH> Guest24661, once those nodes are connected it should connect to other nodes
212 2012-11-03 10:57:34 <D34TH> all it needs is the initial seed
213 2012-11-03 10:57:51 <D34TH> so if they fall off afterward it shouldn't matter
214 2012-11-03 10:58:18 <Guest24661> but those nodes - are super nodes?
215 2012-11-03 10:58:31 <D34TH> no, they were discovered by dnsseed
216 2012-11-03 10:58:31 <Guest24661> some server?
217 2012-11-03 10:58:33 <D34TH> thats all
218 2012-11-03 10:59:26 <sipa> Guest24661: nodes exchange ip addresses with eachother
219 2012-11-03 10:59:31 <Guest24661> dns seed can fail?
220 2012-11-03 10:59:38 <sipa> all you need is an entry point
221 2012-11-03 10:59:48 <sipa> the dns seeds help you find one
222 2012-11-03 10:59:52 <Guest24661> i understand that
223 2012-11-03 11:00:31 <sipa> you should also remember a list of addresses you know, in case dns seeding fails
224 2012-11-03 11:01:02 <Guest24661> i must write it ti some local database?
225 2012-11-03 11:01:15 <sipa> but bootstrapping is inherently centralized, so there are risks
226 2012-11-03 11:01:17 <sipa> yes
227 2012-11-03 11:01:57 <sipa> see addrman.h in the bitcoin reference client source code for an (overkill) examplw
228 2012-11-03 11:14:55 <abrkn> man, bitcoind is crashing for me constantly
229 2012-11-03 11:15:00 <abrkn> stops responding to rpc
230 2012-11-03 11:16:15 <abrkn> i thought move, etc would be instant?
231 2012-11-03 11:16:35 <sipa> it is, once it gets processed
232 2012-11-03 11:16:36 <kjj_> what version? there was a bug in move recently
233 2012-11-03 11:17:16 <abrkn> Bitcoin version v0.7.1-beta
234 2012-11-03 11:17:55 <kjj_> can you run the getinfo RPC command? I think it is fixed in that one
235 2012-11-03 11:18:45 <D34TH> and im just sitting here with my haribo and coffee, running git head of bitcoin-qt
236 2012-11-03 11:19:06 <abrkn> kjj_: https://gist.github.com/4007225
237 2012-11-03 11:19:36 <kjj_> yeah, should be fixed in that one, so you aren't seeing the bug I was seeing before
238 2012-11-03 11:20:02 <abrkn> oops, pasteed my balance. *remove*
239 2012-11-03 11:20:05 <kjj_> can you tail the debug.log?
240 2012-11-03 11:20:25 <abrkn> ok so im unlocking..
241 2012-11-03 11:20:35 <abrkn> then i move 0.01 from one accnt to another
242 2012-11-03 11:20:56 <abrkn> *tap foot*
243 2012-11-03 11:21:39 <sipa> abrkn: does it stop working altogether, or is it just slow?
244 2012-11-03 11:21:41 <abrkn> ok, now it appears to be stuck entirely. is it safe to paste it?
245 2012-11-03 11:21:41 <kjj_> do you have to restart after issuing a move command? or does it just take a while?
246 2012-11-03 11:21:56 <abrkn> or does my log contain anything that could get me robbed
247 2012-11-03 11:22:13 <sipa> debug.log doesn't contain passwords or private keys
248 2012-11-03 11:22:16 <kjj_> no, shouldn't be anything unsafe in the logs
249 2012-11-03 11:22:17 <abrkn> ok
250 2012-11-03 11:22:21 <sipa> it may compromise your privacy though
251 2012-11-03 11:22:30 <abrkn> thats fine, i use facebook
252 2012-11-03 11:22:32 <abrkn> :D
253 2012-11-03 11:22:34 <sipa> haha
254 2012-11-03 11:23:28 <abrkn> db run recovery?
255 2012-11-03 11:23:33 <abrkn> happened when i ctrl-c
256 2012-11-03 11:23:56 <abrkn> EnvShutdown exception: DB_RUNRECOVERY: Fatal error, run database recovery (-30974)
257 2012-11-03 11:26:32 <Guest24661> when dns seeding - what port i must use? 8333?
258 2012-11-03 11:27:00 <sipa> yes
259 2012-11-03 11:28:58 <abrkn> heres my log
260 2012-11-03 11:29:43 <abrkn> i unlocked, initiated a move and it's been stuck for 5 min on the rpc call
261 2012-11-03 11:30:13 <sipa> ok, that's a deadlock
262 2012-11-03 11:30:28 <kjj_> is unlock necessary before a move?
263 2012-11-03 11:30:31 <sipa> no
264 2012-11-03 11:30:38 <abrkn> i wouldnt think, but did just in case :)
265 2012-11-03 11:30:43 <Guest24661> great i have connected to some noods )
266 2012-11-03 11:31:02 <Guest24661> thnk you sipa
267 2012-11-03 11:31:12 <abrkn> i run windows 8 rtm x64 btw
268 2012-11-03 11:31:24 <abrkn> i could try another version of bitcoind?
269 2012-11-03 11:31:36 <kjj_> after line 145, did you kill it off?
270 2012-11-03 11:32:05 <abrkn> nope, it's still running both daemon and my rpc call now
271 2012-11-03 11:32:09 <Guest24661> hove many noods i need for work?
272 2012-11-03 11:32:21 <kjj_> Guest24661: at least 1
273 2012-11-03 11:32:33 <Guest24661> and max count?
274 2012-11-03 11:32:35 <Guest24661> some limit
275 2012-11-03 11:32:41 <kjj_> default max is 8
276 2012-11-03 11:32:56 <Guest24661> thnks
277 2012-11-03 11:33:36 <kjj_> that does look exactly like the move bug that I was getting in a previous version, but mine has been totally fine since I upgraded
278 2012-11-03 11:33:41 <abrkn> damn
279 2012-11-03 11:33:54 <sipa> there was never a move bug
280 2012-11-03 11:34:00 <sipa> but we've seen deadlocks before
281 2012-11-03 11:34:15 <abrkn> i wish i could help but i dont have any c experience
282 2012-11-03 11:34:21 <sipa> does the problem persist after restarting the node?
283 2012-11-03 11:34:24 <kjj_> well, there was a bug that got me every time I tried to do a move
284 2012-11-03 11:34:31 <abrkn> yes, have tried 3 times restarting, sipa
285 2012-11-03 11:34:55 <abrkn> ok, downgraded daemon to 7.0 now
286 2012-11-03 11:35:05 <abrkn> it appears to be happy
287 2012-11-03 11:38:23 <abrkn> oh, the coolest shit ever happened to me yesterday. im making a video poker game with btc
288 2012-11-03 11:38:42 <abrkn> after testing play for less than 5 min i drew a royal straight flush =) 1/72000 or something
289 2012-11-03 11:39:30 <kjj_> heh. I would check the random source and the deck code
290 2012-11-03 11:39:50 <abrkn> kjj: thats the thing, it looks fine =)
291 2012-11-03 11:40:03 <abrkn> kjj: each client submits a salt, server has a secret salt. the combo is used to shuffle
292 2012-11-03 11:46:30 <kjj_> sipa: there was a specific change in one of the pulls for 0.7.1 that fixed the deadlock in move that I was getting, but for the life of me, I can't find it now
293 2012-11-03 11:55:22 <Guest24661> how to calculate checksum in message headers? what is algo?
294 2012-11-03 11:55:53 <kjj_> what do you mean by message headers?
295 2012-11-03 11:56:16 <kjj_> like network protocol messages?
296 2012-11-03 11:57:13 <sipa> Guest24661: double sha-256, trunctated to 32 bits
297 2012-11-03 11:57:37 <Guest24661> sipa - thnks again :)
298 2012-11-03 11:58:14 <Guest24661> double sha-256 of whole packet, for example - for version packet
299 2012-11-03 11:58:39 <kjj_> just the payload, according to the wiki. https://en.bitcoin.it/wiki/Protocol_specification#Message_structure
300 2012-11-03 12:35:11 <etotheipi_> sipa: talking about the deterministic wallet algorithm
301 2012-11-03 12:35:21 <etotheipi_> sipa: I won't be copying the file format, but I will be using the same algorithm
302 2012-11-03 12:36:54 <sipa> etotheipi_: that's what i expected; they are completely unrelated
303 2012-11-03 12:37:26 <sipa> since i've heard MultiBit and perhaps Electrum are interested in being compatible, i've started looking at it again
304 2012-11-03 12:37:47 <etotheipi_> sipa: so I had previously implemented it and even posted some unit-tests
305 2012-11-03 12:37:56 <sipa> ah, really?
306 2012-11-03 12:38:04 <etotheipi_> it was forever ago
307 2012-11-03 12:38:10 <etotheipi_> I was just wondering if those were still valid
308 2012-11-03 12:38:10 <sipa> apparently i implemented some unit tests as well
309 2012-11-03 12:38:30 <sipa> i don't mind adding yours to the test set, if they match
310 2012-11-03 12:38:40 <etotheipi_> well if they don't match, we need to make them match!
311 2012-11-03 12:38:44 <sipa> agree
312 2012-11-03 12:39:09 <sipa> i was right now actually busy rebasing my old patch onto git head, so i can experiment again
313 2012-11-03 12:39:22 <etotheipi_> so did you ever get feedback on the algorithm?
314 2012-11-03 12:39:32 <sipa> not really
315 2012-11-03 12:39:53 <sipa> someone noticed that if you have a child private key, and a parent extended public key, you can derive the parent private key
316 2012-11-03 12:40:09 <sipa> i don't see how that can be prevented though, but it is certainly worth noting in the text
317 2012-11-03 12:41:10 <etotheipi_> what was "extended public key" mean, again?
318 2012-11-03 12:41:27 <sipa> pubkey + chain code
319 2012-11-03 12:41:59 <etotheipi_> what is "extended" for?
320 2012-11-03 12:42:06 <etotheipi_> does it just mean the root of the key tree?
321 2012-11-03 12:42:38 <sipa> extended means including the chain code
322 2012-11-03 12:42:43 <etotheipi_> oh, right
323 2012-11-03 12:43:09 <sipa> you even drew a nice diagram for that stuff :)
324 2012-11-03 12:44:03 <etotheipi_> heh, yeah... tell me if you think it needs updating in any way
325 2012-11-03 12:44:18 <etotheipi_> so apparently my last commit to my "newwallet" branch was May 1
326 2012-11-03 12:44:29 <etotheipi_> I didn't realize it was that long ago
327 2012-11-03 12:44:32 <Tykling> when using listtransactions periodically, what should I use to check for "new" transactions since last time I checked ? can I rely on the timestamp always being larger ?
328 2012-11-03 12:45:53 <abrkn> var previouslyKnown = 0; var newToMe = listtransactions previouslyKnown 1000
329 2012-11-03 12:46:08 <abrkn> previouslyKnown += newToMe.length
330 2012-11-03 12:46:11 <abrkn> is how i do it
331 2012-11-03 12:46:21 <Tykling> ok so you just count the number of transactions
332 2012-11-03 12:46:23 <Tykling> ofcourse
333 2012-11-03 12:46:24 <abrkn> yep
334 2012-11-03 12:46:31 <abrkn> and i listen on blockchain.info stream
335 2012-11-03 12:46:35 <Tykling> neato, thanks :)
336 2012-11-03 12:46:47 <Tykling> ok
337 2012-11-03 12:46:48 <abrkn> so when they say something happened to my addresses i just poll my transactions until something shows up
338 2012-11-03 12:46:52 <sipa> etotheipi_: i don't think anything cjanged
339 2012-11-03 12:47:00 <Tykling> ahhh, clever
340 2012-11-03 12:47:36 <Tykling> I was going to listen to the local logfile and see when it logged "flushed wallet.dat" and then check listtransactions when that happens
341 2012-11-03 12:48:20 <Tykling> not pretty, but hey
342 2012-11-03 12:48:50 <kjj_> in my experience, listtransactions with no qualifiers has always shown the 10 most recent transactions
343 2012-11-03 12:49:22 <kjj_> most recent in the sense of my node learning about them, not necessarily chronological
344 2012-11-03 12:49:32 <Tykling> sure but ideally this should be eventbased so you don't need to poll needlessly
345 2012-11-03 12:49:33 <etotheipi_> sipa: looks like I'm on my way to Armory beta... and I think the wallet format will be the first major upgrade after that
346 2012-11-03 12:49:45 <sipa> etotheipi_: where can i find your unit tests?
347 2012-11-03 12:49:46 <etotheipi_> I've got a couple more days/weeks of testing and polishing
348 2012-11-03 12:49:55 <etotheipi_> sipa: hold on
349 2012-11-03 12:50:12 <kjj_> you could use the blocknotify hook to find out when new blocks come in, and then poll only then.
350 2012-11-03 12:50:15 <bera> who needs
351 2012-11-03 12:50:16 <bera> bitcoins
352 2012-11-03 12:50:56 <Tykling> kjj_: but the blocks only come in when they are found, so that would introduce a significant delay before I "discover" a payment
353 2012-11-03 12:51:11 <Tykling> kjj_: that was my first approach but I abandoned it for the above reason
354 2012-11-03 12:51:28 <kjj_> true. are you planning to do zero-conf acceptance?
355 2012-11-03 12:52:14 <etotheipi_> sipa: it's under the "TestHMAC()" function, which actually tests the BIP 32 implementation, too
356 2012-11-03 12:52:15 <etotheipi_> https://github.com/etotheipi/BitcoinArmory/blob/newwallet/cppForSwig/BlockUtilsTest.cpp#L1119
357 2012-11-03 12:52:25 <Tykling> kjj_: no, I'll wait for a couple of confirmations before actually doing anything, but I'd still like to be able to show the user that thee payment was received
358 2012-11-03 12:52:57 <etotheipi_> sipa: to be clear -- I didn't have "correct" answers for those CKD operations
359 2012-11-03 12:53:03 <etotheipi_> so they really just print out the results
360 2012-11-03 12:53:15 <kjj_> etotheipi_: just out of curiosity, how do you know how far down your key chain to go when looking for things? seems to be that in split/offline mode the node handing out pubkeys could run way past the node generating private keys
361 2012-11-03 12:53:43 <etotheipi_> sipa: it does some consistency checks, but otherwise I never had a reference point to compare to
362 2012-11-03 12:54:21 <etotheipi_> kjj_: that is true, and why I'm adding a manual "Extend Keychain" button. But I did program it to extend the keychain every time it signs a transaction
363 2012-11-03 12:54:31 <kjj_> Tykling: with the current setup, I can't think of anything you can do other than polling or an external feed
364 2012-11-03 12:54:48 <etotheipi_> so the keypool starts with 100 keys, and it should try to maintain 100 keys past the last one you signed with
365 2012-11-03 12:54:51 <sipa> etotheipi_: compiling my unit tests now
366 2012-11-03 12:55:19 <Tykling> kjj_: right, logfile tailing it is then :) should be fine
367 2012-11-03 12:55:25 <kjj_> maybe maintain 100 past the last one it sees
368 2012-11-03 12:55:29 <etotheipi_> kjj_: but now that you mention it, I should verify that behavior and fix it (I remember thinking I needed that, but I just realized I'm not sure I ever implemented it)
369 2012-11-03 12:56:04 <etotheipi_> kjj_: I'm going by "signed with" and "seen" as the same thing
370 2012-11-03 12:56:18 <kjj_> as in, if your pubkey node hands out 50 keys, and only the last one is actually used, have the privkey node skip to 50+100
371 2012-11-03 12:56:29 <kjj_> ok. cool
372 2012-11-03 12:56:39 <etotheipi_> kjj_: that was my intention, but I'll make sure it actually does that
373 2012-11-03 12:57:18 <sipa> https://github.com/sipa/bitcoin/commit/edbdc5313c02dc82104cfb6017ce3427bf323071
374 2012-11-03 12:57:20 <kjj_> Tykling: I'd just poll every X seconds into a cache, and then have everything else use that cache
375 2012-11-03 12:59:28 <kjj_> I'm sure that someone could hack up a -transactionnotify= hook just like -blocknotify= but I bet it would crush your server having to call out to external scripts every time a new TX came in
376 2012-11-03 13:00:52 <etotheipi_> kjj_: thanks for bringing this up -- it turns out I only advance the key pool by 1 every time it signs something... it will delay running out of keys, but it will not be long-term sustainable!
377 2012-11-03 13:03:13 <Tykling> kjj_: it should only notify when there is wallet activity, ie. when sending or receiving coins, the rest is uninteresting
378 2012-11-03 13:03:14 <etotheipi_> kjj_: nevermind... the code actually does what I thought it did... it actually does what it's supposed to... +1
379 2012-11-03 13:04:50 <kjj_> etotheipi_: if it always does +1, how does it keep in sync with the pubkey chain which can hand out keys which will never be used?
380 2012-11-03 13:07:13 <etotheipi_> kjj_: I lied... it does always extend the keypool to lastseen+100
381 2012-11-03 13:07:58 <kjj_> ok, good. that should be safest. I doubt many people will hand out more than 99 unique keys without any of them getting used
382 2012-11-03 13:08:05 <etotheipi_> right
383 2012-11-03 13:08:29 <etotheipi_> although one of my polishing activities before beta will be to add a "key pool" button to the "Expert" interface
384 2012-11-03 13:10:23 <etotheipi_> I've been battling the best way to "recover" a wallet... and I realized that no matter what I do, I only cover like 98% of use cases
385 2012-11-03 13:11:02 <etotheipi_> right now, I have to iteratively search the blockchain using a large keypool, and then extend the keypool each time until it no longer grows any more
386 2012-11-03 13:11:13 <etotheipi_> slow as dirt...
387 2012-11-03 13:11:35 <kjj_> ouch
388 2012-11-03 13:11:50 <sipa> why? later keys can only be used after older keys, right?
389 2012-11-03 13:12:21 <etotheipi_> sipa: mostly correct
390 2012-11-03 13:12:23 <kjj_> just because a key was created later doesn't mean that it was first used later
391 2012-11-03 13:12:49 <etotheipi_> those earlier keys may not have been used at all, and the blockchain is the only evidence I have that it was used
392 2012-11-03 13:14:16 <etotheipi_> so I have to extend the keychain to 300... search the blockchain, and if any keys higher than 200 were used, I extend to 500 and research...
393 2012-11-03 13:15:06 <etotheipi_> rinse and repeat...
394 2012-11-03 13:15:22 <sipa> right, but you can limit that second search to the part of the chain after the extension was found
395 2012-11-03 13:15:24 <etotheipi_> I need to make it exponential though... probably extend keypool by 50% every time or something
396 2012-11-03 13:15:44 <etotheipi_> sipa: that's a good point
397 2012-11-03 13:15:57 <sipa> perhaps with a small overlap
398 2012-11-03 13:16:00 <etotheipi_> not 100% reliable as kjj_ said, but I think reliable enough
399 2012-11-03 13:16:42 <sipa> anything that requires rescanning the entire chain multiple times has a scalability problem, imho
400 2012-11-03 13:16:45 <kjj_> no, I think that what Sipa is saying is that after you've searched on 0...100, you can then search on 101...300 rather than 0...300
401 2012-11-03 13:16:46 <etotheipi_> but it still doesn't solve the problem of someone, say, using a webserver that hands out addresses like candy, and may have 200 empty addresses
402 2012-11-03 13:17:25 <sipa> as long as he respects the rule of not issuing number 200+X before number X was used, there is no problem
403 2012-11-03 13:17:29 <etotheipi_> sipa: I agree, but I also don't really know any other wya to make sure
404 2012-11-03 13:17:55 <etotheipi_> you're recommending partial rescans... which is good, but either way there will still be a lot of scanning
405 2012-11-03 13:18:14 <etotheipi_> so what is he supposed to do when he hits X+200? reuse addresses?
406 2012-11-03 13:18:18 <sipa> ?
407 2012-11-03 13:18:24 <sipa> i don't see the problem
408 2012-11-03 13:18:26 <kjj_> well... how about a RPC call that gives the last keyindex?
409 2012-11-03 13:18:42 <sipa> how can he 'hit' X+200 without having used X?
410 2012-11-03 13:19:04 <sipa> if he needs more than 200 unused addresses in circulation, he needs to increase his key gap
411 2012-11-03 13:19:14 <etotheipi_> he may have handed out X, X+1, X+2, etc.... but they were never used in the blockchain
412 2012-11-03 13:19:14 <sipa> and as long as he knows his key gap, there is no problem
413 2012-11-03 13:19:49 <kjj_> you may run into problems if you use keys for order tracking or something, but I bet you could figure it out from context
414 2012-11-03 13:20:36 <etotheipi_> I hoping to be able to avoid querying the user for this... since it's a rather abstract concept for some folks... but I guess that's why I have an expert interface
415 2012-11-03 13:21:35 <kjj_> I think that the sort of people most likely to have this problem will understand and accept passing the value back to the secure wallet manually
416 2012-11-03 13:21:45 <etotheipi_> yeah...
417 2012-11-03 13:21:48 <kjj_> but I agree, far from ideal
418 2012-11-03 13:22:43 <kjj_> ooh. too bad you can't reserve a control address in the sequence, and give the online wallet a small balance that it can use to send coded amounts to the offline wallet
419 2012-11-03 13:24:40 <sipa> ewww
420 2012-11-03 13:24:56 <kjj_> hey Sipa, do you know the wallet code pretty well?
421 2012-11-03 13:25:07 <sipa> i wrote CWallet :)
422 2012-11-03 13:25:26 <D34TH> thats a definate maybe
423 2012-11-03 13:25:37 <kjj_> if I wanted to add a hook like blocknotify to trigger a script when wallet transactions came in, would AddToWallet be the right place to put it?
424 2012-11-03 13:26:18 <sipa> there actually already is a hook for what you need, i think
425 2012-11-03 13:26:30 <sipa> NotifyTransactionChanged
426 2012-11-03 13:27:17 <kjj_> ok, cool. that does mean that I'm in the right place.
427 2012-11-03 13:28:06 <kjj_> that looks like a hook for the UI.
428 2012-11-03 13:28:42 <sipa> that's the only thing it is used for right now
429 2012-11-03 13:28:52 <sipa> but that doesn't mean it's the only thing it's useful for
430 2012-11-03 13:31:45 <sipa> etotheipi_: that's how I imagine SPV/Bloom nodes with deterministic wallets will work: request filtered blocks since wallet birth time, with a preinitialized gap, and when transactions are found, increase the keys in the filter
431 2012-11-03 13:32:56 <etotheipi_> what do you mean by "filtered blocks"?
432 2012-11-03 13:33:30 <sipa> it's a proposed extension to let SPV nodes send a bloom filter to their peer
433 2012-11-03 13:33:44 <etotheipi_> that's what I thought... I just haven't been following it
434 2012-11-03 13:33:44 <sipa> which will be used to select interesting transactions for them
435 2012-11-03 13:33:48 <kjj_> sipa: that method appears to be in the QT code. I'd rather not touch it
436 2012-11-03 13:33:52 <sipa> kjj_: huh?
437 2012-11-03 13:34:00 <sipa> kjj_: it's in CWallet
438 2012-11-03 13:34:21 <kjj_> NotifyTransactionChanged appears to be in qt/walletmodel.cpp
439 2012-11-03 13:35:05 <sipa> no that's the method that is hooked into CWallet::NotifyTransactionChanged
440 2012-11-03 13:35:12 <sipa> unfortunate that it has the same name
441 2012-11-03 13:35:18 <sipa> you can hook anything into it
442 2012-11-03 13:36:17 <kjj_> I'm totally not seeing a function body in wallet.cpp or wallet.h
443 2012-11-03 13:36:37 <sipa> you have to write one yourself!
444 2012-11-03 13:36:40 <kjj_> I see the prototype in wallet.h, and 4 calls in wallet.cpp
445 2012-11-03 13:36:46 <kjj_> oooohhhhh. ok.
446 2012-11-03 13:37:06 <sipa> CWallet::NotifyWalletTransaction is not a method, it's a hook
447 2012-11-03 13:37:21 <sipa> you tell it "hey, in the future, when what you refer to happens, call method X!"
448 2012-11-03 13:43:05 <kjj_> for an external notification, the patch is like 5 lines (counting the include, but not counting blanks and { } )
449 2012-11-03 13:51:01 <kjj_> silly git question... when I want to resync my local repo to the master, I "git checkout master" and then "git clone git@github.com:blah/blah" right?
450 2012-11-03 13:51:09 <sipa> no
451 2012-11-03 13:51:12 <sipa> you only clone once
452 2012-11-03 13:51:48 <sipa> "git fetch origin" should bring updated remote branches into scope
453 2012-11-03 13:51:57 <sipa> git pull can be used to merge them into your local branch
454 2012-11-03 13:53:27 <kjj_> ok, so after those two, my local repo is now a copy of the master repo, and I can make a branch and pull request?
455 2012-11-03 13:54:15 <sipa> to do github pull request you already need a fork on github of the project
456 2012-11-03 13:54:31 <sipa> https://bitcointalk.org/index.php?topic=4571.0
457 2012-11-03 13:55:25 <kjj_> yup, I've done a couple of those before. I've just never had to update my local copy to reflect upstream changes yet
458 2012-11-03 13:55:56 <sipa> git fetch upstream && git reset --hard upstream/master, is what i do before starting a pullreq
459 2012-11-03 13:56:15 <sipa> but beware that that literally throws away the changes you made in your branch before
460 2012-11-03 13:56:47 <kjj_> as long as I switch back to the master branch, and always do my work in other branches, that should be fine, right?
461 2012-11-03 13:56:51 <sipa> yes
462 2012-11-03 13:57:19 <kjj_> honestly, I usually do stuff in the 0.7.1 or whatever directory from the tarball, and then go back and figure out how to git it up
463 2012-11-03 13:57:27 <sipa> haha
464 2012-11-03 13:57:36 <kjj_> but I only do tiny little things, so it works for me
465 2012-11-03 14:00:13 <kjj_> plus, on the ancient box I use, having to do full recompiles is painful
466 2012-11-03 14:02:17 <kjj_> you want to take a look?
467 2012-11-03 14:02:23 <kjj_> https://github.com/kjj2/bitcoin/commit/93ce4b54b5e35cd3a89685fdeb04f62d0adf3c6d
468 2012-11-03 14:02:37 <kjj_> this is to solve Tykling's problem from earlier
469 2012-11-03 14:03:22 <sipa> add it to init.cpp's help message too
470 2012-11-03 14:03:29 <kjj_> oh, duh. right
471 2012-11-03 14:03:38 <sipa> looks good otherwise
472 2012-11-03 14:04:19 <sipa> TD[gone], BlueMatt: have a look: https://github.com/sipa/bitcoin/commit/e84a8530cafc499008630e726ad8b30416ba623c
473 2012-11-03 14:04:46 <kjj_> now am I right in thinking that it will trigger also on a spend (the CT_UPDATED thing) ?
474 2012-11-03 14:04:48 <sipa> more sanity checks, more tests, guarantees+checks on serialized size, and check that random bit flips break the authentication
475 2012-11-03 14:04:57 <sipa> kjj_: i suppose, yes
476 2012-11-03 14:58:35 <abrkn> uhh
477 2012-11-03 14:58:43 <abrkn> why doesnt listtransactions list moves in order?
478 2012-11-03 14:59:13 <abrkn> my app is depending on transactions appearing in descending order of time :-(
479 2012-11-03 15:14:33 <kjj_> change your app
480 2012-11-03 15:18:49 <kreal> add it to array, and sort by timestamp
481 2012-11-03 15:18:56 <kreal> profit??
482 2012-11-03 15:24:57 <helo> in order to get the most full nodes, would it make sense on startup to let users set limits on the resources bitcoin will use?
483 2012-11-03 15:26:24 <helo> CPU %, disk idle write %, bandwidth, etc
484 2012-11-03 15:27:18 <sipa> if you can't keep up with cpu to run a full node, you shouldn't run one imho
485 2012-11-03 15:27:23 <helo> or some other heuristic
486 2012-11-03 15:27:39 <sipa> if you can't afford the bandwidth to provide the blockchain to other nodes, you shouldn't
487 2012-11-03 15:27:40 <helo> this would mostly be relevant only during IBD
488 2012-11-03 15:27:55 <helo> of course, once you're caught up, stay caught up
489 2012-11-03 15:28:48 <helo> but as bottlenecks get removed in some places, we get close to maxing out different hardware
490 2012-11-03 15:29:51 <helo> e.g. if we used 100% of all available cores for fastest IBD, the system would be completely unusable for anything else
491 2012-11-03 15:30:51 <helo> so someone who wanted to use their computer might not want to run a full node if they need their system to be ~usable
492 2012-11-03 15:31:15 <kjj_> the operating system should handle the multitasking fairly well already
493 2012-11-03 15:32:09 <sipa> maybe reducing priirity of the signature verification threads is usefull
494 2012-11-03 15:32:13 <sipa> priority
495 2012-11-03 15:34:55 <helo> not really a problem right now... almost all of the complaints are about the time required, no system responsiveness during IBD
496 2012-11-03 15:37:40 <sipa> bad responsivelness is almost always due to excessive I/O or ram/swap usage
497 2012-11-03 15:37:45 <sipa> not due to cpu usage
498 2012-11-03 15:41:33 <ThomasV_> sipa: so, I wrote a small patch for bitcoind at electrum servers, that adds an optional height parameter to getrawtransaction. should I create a pull request for it, or is to too specific?
499 2012-11-03 15:41:47 <abrkn> kjj: lost my net. anyway, how cshould i change my app? i just need to know about new transactions to update internal balances
500 2012-11-03 15:42:31 <helo> but it could hinder someone's ability to use their computer for some cpu-heavy task... i guess settin proper niceness would handle any cpu problems just fine
501 2012-11-03 15:43:51 <kjj_> abrkn: keep track of TxIDs and skip over them on subsequent polls
502 2012-11-03 15:48:13 <kjj_> or, if you want are compiling your own bitcoind: https://github.com/bitcoin/bitcoin/pull/1974/files
503 2012-11-03 15:55:21 <abrkn> kjj: but wont that make me do listtransactions and potentially get hundreds or thousands or rows every time to check against my db?
504 2012-11-03 16:02:36 <sipa> ThomasV_: hmm, unsure... i feel that the right solution is providing an index for those who need such functionality, as passing the height along 1) is slower as it reads the whole block 2) is vulnerable to race conditions during reorgs
505 2012-11-03 16:02:44 <kjj_> I don't think so, no. and would it really matter if it did?
506 2012-11-03 16:06:08 <D34TH> i have a python based BTC addr gen
507 2012-11-03 16:06:09 <D34TH> :D
508 2012-11-03 16:06:22 <D34TH> im so happy it works
509 2012-11-03 16:06:35 <D34TH> now i wonder how quick it generates
510 2012-11-03 16:07:50 <kjj_> where are you getting your random bits from?
511 2012-11-03 16:08:06 <D34TH> ill post my function give me a minute
512 2012-11-03 16:08:14 <D34TH> i want to clean the code
513 2012-11-03 16:08:18 <runeks> D34TH: cool. i had a lot of fun writing such a thing as well
514 2012-11-03 16:08:35 <D34TH> i got alot of the idea from flatfly
515 2012-11-03 16:08:40 <D34TH> im trying to make it multithreaded
516 2012-11-03 16:08:50 <runeks> did you program the EC math yourself?
517 2012-11-03 16:08:56 <D34TH> no
518 2012-11-03 16:09:01 <runeks> me neither
519 2012-11-03 16:09:04 <D34TH> i got that from him
520 2012-11-03 16:09:17 <runeks> i used bitcointalk.org user Lis' ECDSA code
521 2012-11-03 16:09:25 <kjj_> multithreaded? like a vanitygen type finder?
522 2012-11-03 16:09:52 <D34TH> kjj_, yea, and then im looking up the balance
523 2012-11-03 16:09:55 <D34TH> and saving it to a DB
524 2012-11-03 16:10:16 <sipa> how do you lookup the balance?
525 2012-11-03 16:10:21 <D34TH> abe api
526 2012-11-03 16:10:23 <runeks> if you want it to be really fast, leveraging OpenSSL is probably a good idea.
527 2012-11-03 16:10:27 <D34TH> i had a local abe running
528 2012-11-03 16:10:38 <D34TH> but the server is derping right now
529 2012-11-03 16:10:40 <kjj_> are you just starting with one random number, and the chaining EC multiply?
530 2012-11-03 16:12:09 <D34TH> here ill post the addr gen function
531 2012-11-03 16:13:32 <D34TH> http://pastebin.com/cX8xVp4E
532 2012-11-03 16:14:53 <D34TH> i should probably have syntax highlighted that
533 2012-11-03 16:15:12 <D34TH> http://pastebin.com/gLNRuzRn
534 2012-11-03 16:15:27 <runeks> what is the ecdsa library you're using?
535 2012-11-03 16:15:28 <sipa> just adding one to the provate key, and adding g to the public key ineacb iterationwill be a lot faster
536 2012-11-03 16:15:53 <sipa> but if you wanted speed, you wouldn't use php anyway
537 2012-11-03 16:16:08 <runeks> isn't it Python?
538 2012-11-03 16:16:09 <D34TH> python
539 2012-11-03 16:16:20 <runeks> but the same applies I guess :)
540 2012-11-03 16:16:21 <sipa> oh, apologies
541 2012-11-03 16:16:25 <sipa> but indeed
542 2012-11-03 16:17:04 <D34TH> im doing this for fun
543 2012-11-03 16:17:09 <sipa> sure
544 2012-11-03 16:17:18 <sipa> best reason there is
545 2012-11-03 16:17:28 <runeks> I think you can get it up to native speed in Python actually. there are python libs that basically just load the OpenSSL shared libraries and run their functions. I imagine that should be quite fast, if not just as fast as native.
546 2012-11-03 16:18:22 <D34TH> http://github.com/warner/python-ecdsa
547 2012-11-03 16:24:20 <D34TH> ~25s to generate 128 keys and convert them to addrs
548 2012-11-03 16:24:30 <D34TH> i could cut down on time ALOT
549 2012-11-03 16:25:24 <runeks> D34TH: doesn't the code you posted just print a random number to the console? you don't use addy() anywhere, do you?
550 2012-11-03 16:25:35 <kjj_> I would check my random numbers. I don't think that my box can come up with 128*256 bits of entropy in 25 seconds
551 2012-11-03 16:26:41 <D34TH> runeks, correct thats actually the pkey
552 2012-11-03 16:26:42 <D34TH> whoops
553 2012-11-03 16:27:07 <D34TH> s/int(/addy(int(
554 2012-11-03 16:27:15 <runeks> ah
555 2012-11-03 16:27:44 <D34TH> and an ) on the end
556 2012-11-03 16:28:45 <runeks> I think you should be using the order of the curve as the maximum number for your private key though. it "only" goes up to 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
557 2012-11-03 16:29:07 <runeks> although the probability that a random number between 2 and 2^256 is below this number is fairly great
558 2012-11-03 16:30:33 <D34TH> kjj_, http://pastebin.com/NZauQLcD
559 2012-11-03 16:32:03 <kjj_> I have no idea what ecdsa.util.randrange is using for an entropy source. I wouldn't trust a key that came out of this.
560 2012-11-03 16:32:13 <runeks> so I would say you should use ecdsa.util.randrange( secp256k1point.order() ) instead of ecdsa.util.randrange( pow(2,256) )
561 2012-11-03 16:32:16 <kjj_> which is no big deal if this is just a learning toy
562 2012-11-03 16:32:37 <D34TH> its mostly a learning toy
563 2012-11-03 16:34:08 <runeks> kjj_: it seems it uses os.entropy
564 2012-11-03 16:34:40 <kjj_> here is how I do it in PHP: http://pastebin.com/TvTWjAwg
565 2012-11-03 16:34:48 <runeks> which doesn't exist...
566 2012-11-03 16:34:49 <kjj_> (on linux)
567 2012-11-03 16:34:49 <ThomasV_> sipa: race condition, as in the actual height has changed and the height passed as parameter is false?
568 2012-11-03 16:35:34 <runeks> kjj_: but that's really only necessary if he plans on actually sending money to the addresses
569 2012-11-03 16:35:52 <kjj_> runeks: right
570 2012-11-03 16:35:53 <D34TH> runeks, or from
571 2012-11-03 16:36:13 <D34TH> but that would be unethical
572 2012-11-03 16:36:36 <kjj_> meh. if he finds an address with money in it, he is beyond ethics
573 2012-11-03 16:36:41 <runeks> ah. it uses os.urandom for entropy unless you specify your own entropy function to ecdsa.util.randrange
574 2012-11-03 16:37:10 <runeks> kjj_: I'd say redeeming that transction would be beyond ethics. just finding it isn't...
575 2012-11-03 16:37:11 <D34TH> kjj_, because 2^256?
576 2012-11-03 16:37:33 <kjj_> if you are that lucky, you are godlike, and ethics doesn't apply any more
577 2012-11-03 16:37:42 <runeks> oh, right :)
578 2012-11-03 16:37:57 <D34TH> kjj_, https://bitcointalk.org/index.php?topic=107172.0
579 2012-11-03 16:38:32 <kjj_> yeah, I've seen that. has anyone reporting any earnings from it yet?
580 2012-11-03 16:39:02 <D34TH> no, but i did contribute the abe function which he seems to have implemented incorrectly
581 2012-11-03 16:39:04 <runeks> I got curious at one point about brain wallets, and created 80 million addresses from a dictionary to see if any brainwallets from weak password existed. I didn't finish checking them all because I lost interest, but that's certainly an avenue. which is why I wouldn't recommend brain wallets
582 2012-11-03 16:39:39 <D34TH> runeks generating is easy, checking is the hard part
583 2012-11-03 16:40:07 <runeks> actually, the Armory code can check a lot of addresses fairly quickly.
584 2012-11-03 16:40:12 <kjj_> D34TH: all you need is an alternate index to the transaction set, and then checking becomes easy
585 2012-11-03 16:40:19 <runeks> (after it loads the block chain into memory)
586 2012-11-03 16:40:33 <D34TH> unfortunatly my python is 32 bit
587 2012-11-03 16:40:37 <ThomasV_> armory uses 128 bits of entropy I think
588 2012-11-03 16:40:47 <D34TH> so loading the chain into memory is not an option
589 2012-11-03 16:41:07 <D34TH> abe wont load properly
590 2012-11-03 16:41:07 <sipa> ThomasV_: as in a reorganisation happened, and the transaction is now at a different height
591 2012-11-03 16:41:08 <runeks> I created the address-from-password function in C. got up to about 5000 addresses per second.
592 2012-11-03 16:41:25 <ThomasV_> sipa: yes, that's what I meant :)
593 2012-11-03 16:41:56 <sipa> ThomasV_: it's probably only rarely a problem, but it shows it's not a proper solution :)
594 2012-11-03 16:41:59 <ThomasV_> sipa: I agree that it would be better to have an index :) I did this as a temporary solution
595 2012-11-03 16:42:32 <runeks> D34TH: if you use PAE you can still use more than 4 GB (if you have it available). I was using 4 GB of RAM to begin with and it still worked (until it started swapping)
596 2012-11-03 16:42:51 <D34TH> oh im running a 64bit os
597 2012-11-03 16:42:54 <D34TH> just 32bit python
598 2012-11-03 16:43:20 <D34TH> because more of the extensions i use are a paint to compile 64bit versions of
599 2012-11-03 16:43:20 <sipa> D34TH: only addresses with a nonzero balance interest you - that certainly fits in RAM
600 2012-11-03 16:43:31 <D34TH> sipa: true
601 2012-11-03 16:43:34 <kjj_> ooh. the ECB report on bitcoin just hit /.
602 2012-11-03 16:43:43 <sipa> late as usual :)
603 2012-11-03 16:44:17 <kjj_> They're both in the business of creating money out of thin air, so of course they'd see a problem with it.
604 2012-11-03 16:44:27 <kjj_> first +5 comment in the discussion
605 2012-11-03 16:44:46 <sipa> well, it's correct :)
606 2012-11-03 16:45:25 <runeks> I like the highlights I've seen from the report. haven't read it all. but it certainly isn't scare mongering. doesn't fit well with the conspiracy theorists.
607 2012-11-03 16:45:35 <runeks> but maybe that's what they WANT you to think...
608 2012-11-03 16:45:38 <runeks> then BAM!
609 2012-11-03 16:46:13 <runeks> and there's a legally established exchange rate between EUR and BTC
610 2012-11-03 16:47:22 <kjj_> heh. how would that work?
611 2012-11-03 16:48:52 <kjj_> the central bank could offer to sell unlimited EUR for BTC at their defined rate, but they can't print BTC, so there would bt no way for them to maintain the other side of that peg
612 2012-11-03 16:50:04 <abrkn> are there any open source java miners out there?
613 2012-11-03 16:50:07 <abrkn> for the browser
614 2012-11-03 16:50:29 <runeks> back in the early days, governments would establish what kind of money were "legal tender" and simlutaneously establish what the "legal" exchange rate between this legal tender and other monies were. so if the legal tender was declared to be gold, then they would say that everyone accepting silver as a payment, must accept gold in the echange rate of, for example, 1:50. this meant that if the market exchange rate was lower than this, for ex
615 2012-11-03 16:50:35 <sipa> abrkn: why would you want that?
616 2012-11-03 16:50:48 <daybyter> java or javascript?
617 2012-11-03 16:50:50 <abrkn> sipa: give users who play my casino game "free money"
618 2012-11-03 16:51:13 <abrkn> daybyter: java (from what i understand, webcl support is not available in many browsers)
619 2012-11-03 16:51:14 <sipa> abrkn: while making their browsers unresponsive, and their electricity bill soar?
620 2012-11-03 16:51:22 <abrkn> sipa: yes
621 2012-11-03 16:51:28 <runeks> kjj_: so it' doesn't relate to printing/producing the money in question, only to - by law - demanding that someone selling items denominated in BTC *must* EUR for that item as well, at some fixed exchange rate
622 2012-11-03 16:51:29 <sipa> for almost no gain
623 2012-11-03 16:51:32 <sipa> sounds like a plan
624 2012-11-03 16:51:58 <abrkn> sipa: it would be very little, but it's nice to atleast be able to start without having any bitcoins, even if just to try
625 2012-11-03 16:52:02 <daybyter> but you need an installed java plugin then...
626 2012-11-03 16:52:09 <kjj_> all that would do would make it impossible to buy BTC with euros
627 2012-11-03 16:52:13 <abrkn> daybyter: many, sadly, do
628 2012-11-03 16:52:16 <kjj_> at least legally
629 2012-11-03 16:52:18 <runeks> 's/*must*/*must* accept'
630 2012-11-03 16:52:27 <abrkn> sipa: better than having people fill surveys and whatnot to get some free money
631 2012-11-03 16:52:27 <daybyter> Javascript would be slower but better in my eyes...
632 2012-11-03 16:52:28 <kjj_> wouldn't do a damn thing about the real cost
633 2012-11-03 16:52:42 <runeks> and make it unprofitable to sell goods for BTC (legally)
634 2012-11-03 16:52:44 <abrkn> sipa: although if you have any better ideas, i'm all ears
635 2012-11-03 16:52:48 <daybyter> javscript + litecoin?
636 2012-11-03 16:52:54 <daybyter> javascript*
637 2012-11-03 16:53:09 <runeks> I can mine a 250 hashes per second with a Javascript miner I made for fun (Bitcoin)
638 2012-11-03 16:53:11 <abrkn> daybyter: aye, ive considered that one, but i'd have to keep track of rates
639 2012-11-03 16:53:15 <sipa> abrkn: it may make sense inside a game that runs on a GPU
640 2012-11-03 16:53:23 <runeks> not quite ASIC speeds
641 2012-11-03 16:53:25 <abrkn> daybyter: i'd rather not make the currency of my game LTC
642 2012-11-03 16:53:36 <sipa> abrkn: but in a browser it's something between shady and abusive, imho
643 2012-11-03 16:53:48 <abrkn> sipa: it would be optinal, ofcourse
644 2012-11-03 16:54:21 <sipa> ok, that makes it acceptable, but no rational person would choose to do so (except that no human is rational, of course)
645 2012-11-03 16:54:30 <abrkn> sipa: i'd rather have a faucet that gets some of the rake, but im scared of bots
646 2012-11-03 16:54:46 <abrkn> sipa: bots that would just mass reg accounts to get fauceted coins
647 2012-11-03 16:55:27 <runeks> abrkn: with Javascript (doing 250 hashes per sec), it'd take about 13 years to find one share at difficulty 1.
648 2012-11-03 16:55:37 <abrkn> runeks =)
649 2012-11-03 16:55:53 <runeks> but you might be able to cut that down to a single year with Java :)
650 2012-11-03 16:55:55 <sipa> ;;bc,gen 0.25
651 2012-11-03 16:55:56 <gribble> The expected generation output, at 0.25 Khps, given current difficulty of 3304356.3929903 , is 7.6098660447e-08 BTC per day and 3.17077751863e-09 BTC per hour.
652 2012-11-03 16:56:20 <abrkn> what's a sensible way to prove that a user registering on a site is not a bot or human bot (chinese sweatshop)?
653 2012-11-03 16:56:34 <abrkn> been discussing it for like 30 min with some friends and cant seem to come up with anything
654 2012-11-03 16:56:35 <sipa> captcha?
655 2012-11-03 16:56:41 <runeks> make your own custom CAPTCHA and change it frequently
656 2012-11-03 16:56:48 <abrkn> sipa: decaptcher solves them for nearly nothing
657 2012-11-03 16:57:13 <runeks> that's why you have to make your own. something that CAPTCHA solvers won't have seen before.
658 2012-11-03 16:57:44 <abrkn> aye, but i cant think of anything that cant be botted
659 2012-11-03 16:57:51 <abrkn> (aside from photo with shoe on head, obviously)
660 2012-11-03 16:58:45 <runeks> anything can be botted. the question of whether it will be botted, is whether it will be profitable to create a bot that does it or not.
661 2012-11-03 16:59:00 <abrkn> right
662 2012-11-03 16:59:10 <D34TH> wow im getting debug.log spammed, i addnode'ed all the dnsseeds
663 2012-11-03 16:59:12 <D34TH> bad idea
664 2012-11-03 16:59:23 <abrkn> even registering with FB, which i think many people wouldnt want, would just bring huge FB botnets
665 2012-11-03 17:00:37 <vazakl> ask them to read a short story, then ask a question about the plot or characters
666 2012-11-03 17:00:38 <runeks> abrkn: there is no protection against people profiting from things that are profitable.
667 2012-11-03 17:01:03 <kjj_> runeks: +1
668 2012-11-03 17:01:09 <abrkn> definitely agree
669 2012-11-03 17:02:14 <runeks> there are even CAPTCHA solver sites that employ human being sitting in front of computers. you then submit the CAPTCHA to their site via an API, and you get a response from some chinese worker sitting in front of his computer solving CAPTCHAs that come in from this service. like an outsourced CAPTCHA solver.
670 2012-11-03 17:02:49 <runeks> CAPTCHA are only supposed to tell humans and computers apart. and they're pretty good at that - the best ones at least. but this all falls to the floor when you actually hire humans to solve them.
671 2012-11-03 17:03:10 <vazakl> a short one-paragraph story, then ask a question about the character's motivations...
672 2012-11-03 17:03:28 <abrkn> runeks: aye, decaptcher =) i've used it a ton to automate some things
673 2012-11-03 17:03:38 <kjj_> lol. I used to write captcha solvers. if I couldn't break a visual captcha, most humans would have problems with it too
674 2012-11-03 17:04:06 <runeks> vazakl: yeah. and then hire Chinese workers to verify these stories
675 2012-11-03 17:04:08 <abrkn> vazakl: i love that solution, because chinese bots would be terrible at it, but id need a shitton of stories
676 2012-11-03 17:04:12 <abrkn> haha
677 2012-11-03 17:04:56 <runeks> if you pay slightly more for someone to verify these stories than someone else pays to write them, then you win.
678 2012-11-03 17:05:17 <vazakl> show a picture of a scene, then ask the user to click a certain place ("point at the dog bowl')
679 2012-11-03 17:06:06 <vazakl> or "drag the dog on to the table"
680 2012-11-03 17:06:30 <runeks> I tried cracking PHPCaptcha, and I didn't succeed. and I couldn't find anyone else who had succeeded in cracking it (publicly). so it might be a good place to start.
681 2012-11-03 17:08:45 <vazakl> you can ask basic questions, from google.. "how many legs does a centipede have"
682 2012-11-03 17:08:48 <kjj_> runeks: have a link? that isn't a google-able term
683 2012-11-03 17:09:27 <runeks> it's also called securimage
684 2012-11-03 17:09:36 <runeks> http://www.phpcaptcha.org/
685 2012-11-03 17:10:31 <kjj_> did you try a neural net?
686 2012-11-03 17:11:32 <kjj_> first, despeckle, then block finding, chop into letters, rescale, hit it with the neural net
687 2012-11-03 17:12:15 <kjj_> you could probably take out the stringers too, right after the despeckle
688 2012-11-03 17:12:16 <runeks> not at all. I basically tried to use the fact that the lines are often thinner than the letters. do if you apply a certain algorithm to the pixels in the picture the lines can disappear while a really thin version of the letters remain. then I tried using OCR on that (tesseract) but never got to more than like 5% acceptance rate. then I lost interest in it.
689 2012-11-03 17:13:25 <runeks> how would you separate out th letters when there are lines across the entire image?
690 2012-11-03 17:13:35 <kjj_> statistics. :)
691 2012-11-03 17:13:44 <runeks> umm. right :)
692 2012-11-03 17:13:46 <runeks> how? :)
693 2012-11-03 17:14:17 <kjj_> look at each column. count the blackness. the letters are peaks, the spaces are valleys
694 2012-11-03 17:16:01 <runeks> so that whenever total blackness in a column is less than some number, then we say one letter has ended and a new is beginning?
695 2012-11-03 17:16:05 <kjj_> that will get it most of the time. if you want to catch the others, you also look at the widths of the peaks and valleys
696 2012-11-03 17:16:35 <kjj_> yup, but you can do it adaptive. if the blackness goes up for a while, and then comes down, you've found a letter
697 2012-11-03 17:16:44 <kjj_> rather than just a threshold
698 2012-11-03 17:16:53 <sipa> i'm sure that a captcha designer van compensate exactly for whatever criteria you come up with to separate characters
699 2012-11-03 17:16:56 <runeks> oh, right
700 2012-11-03 17:16:58 <runeks> clever
701 2012-11-03 17:17:13 <sipa> *can
702 2012-11-03 17:17:25 <kjj_> sipa: yeah, they can. and they do. but the hard captchas are just as hard for people as they are for programs, which makes them sorta pointless
703 2012-11-03 17:17:54 <kjj_> I know I've faced captchas that I couldn't figure out, or just barely could
704 2012-11-03 17:18:03 <runeks> I saw some demo of a program solving reCAPTCHAs. I can't even solve half of those!
705 2012-11-03 17:19:02 <runeks> but now they've started to include number signs (from buildings from Google street view I think), just to keep the game going.
706 2012-11-03 17:21:19 <kjj_> my favotire captcha ever: http://pauljadam.com/presentations/accessu2011/img/Craziest_Captchas_18.jpg
707 2012-11-03 17:23:00 <sipa> by heart: 0.69 something
708 2012-11-03 17:23:44 <kjj_> I should make one with the stumper question from that episode of Big Bang Theory
709 2012-11-03 17:45:43 <runeks> in GetBlockValue(), is nHeight for the genesis block equal to 0 or 1?
710 2012-11-03 17:46:29 <sipa> 0
711 2012-11-03 17:46:38 <runeks> ok!
712 2012-11-03 18:17:05 <diki> Can someone tell me how an exchange works? I was thinking of writing a simple one in PHP for some testing, but I have no idea how it works(price, fulfilling orders etc). Any tips?
713 2012-11-03 18:17:49 <andreas> The intersango scripts?
714 2012-11-03 18:18:35 <diki> Are you telling me to look at them or are you asking if I am talking about them?
715 2012-11-03 18:20:32 <diki> I'd like to write it from scratch by myself rather than looking at ready scripts.
716 2012-11-03 18:23:50 <sipa> writing code is easier than reading code
717 2012-11-03 18:23:59 <sipa> you learn more from the latter, though
718 2012-11-03 18:24:21 <diki> Ok?
719 2012-11-03 18:25:05 <diki> However, reading code takes time. I am particularly interesting in what makes the exchange set the buy/sell price.
720 2012-11-03 18:25:15 <diki> *interested
721 2012-11-03 18:25:32 <sipa> finding out how an exchange also takes time
722 2012-11-03 18:25:36 <sipa> *works
723 2012-11-03 18:26:23 <sipa> depends on your goal though; if your goal is learning, and not building a functional exchange, it's probably easier to build from scratch
724 2012-11-03 18:27:23 <andreas> I started a data model for an exchange at some point, since I'm also interested in this stuff.
725 2012-11-03 18:27:29 <diki> I have been thinking of making a test exchange for some alt-currencies as they likely produce less traffic, but that is of course when I figure out how to write it.
726 2012-11-03 18:28:27 <andreas> Start with a data model...shouldn't be too hard.
727 2012-11-03 18:28:44 <andreas> What do you need? Users, Orders, Trades...
728 2012-11-03 18:28:55 <sipa> history
729 2012-11-03 18:28:59 <diki> History?
730 2012-11-03 18:29:40 <diki> andreas:And what is exactly a "data model"?
731 2012-11-03 18:30:32 <andreas> a diagram how to store your data...
732 2012-11-03 18:30:57 <diki> I use MySQL. As for what the data is, that comes as I go.
733 2012-11-03 18:31:28 <sipa> maybe you should at least spend some time in advance thinking about what you need
734 2012-11-03 18:31:32 <andreas> http://www.agiledata.org/images/dm101OrderNormalized.gif
735 2012-11-03 18:31:45 <andreas> Some diagram like this one...
736 2012-11-03 18:32:01 <diki> sipa:why? I am a guy that thinks of stuff as he goes, so long as I know what to do.
737 2012-11-03 18:32:04 <andreas> you could also start with use cases, but I think, they are pretty obvious...
738 2012-11-03 18:33:43 <diki> andreas:So, why not just start to write the code?
739 2012-11-03 18:34:48 <sipa> because you may end up needing something you didn't think of in advance, and be tempted to hack it in, instead of starting with a clear design that allows for that feature from the start
740 2012-11-03 18:35:17 <diki> sipa:But that happens either way.
741 2012-11-03 18:35:28 <sipa> sure, it's often inevitable
742 2012-11-03 18:35:47 <sipa> but with a clean design, its impact is less bad
743 2012-11-03 18:36:20 <diki> For instance, I wrote an application that utilizes the cgminer API, however now I have started to make it more generalized and not that much target specific.
744 2012-11-03 18:36:34 <diki> which means, moving code, changing stuff. Hacking as you have already mentioned.
745 2012-11-03 18:36:42 <andreas> I would start with a diagram. Maybe in ArgoUML.
746 2012-11-03 18:37:04 <andreas> Then use one of the db models to generate the sql for mysql.
747 2012-11-03 18:37:41 <andreas> The use one of the RAD tools to generate the php for the default methods. I would use CakePHP.
748 2012-11-03 18:38:12 <andreas> You could have a running website within a few hours. Not perfect, but working...
749 2012-11-03 18:38:13 <diki> andreas:Is the use of frameworks a must these days?
750 2012-11-03 18:38:38 <andreas> It's convenient....I like them...
751 2012-11-03 18:39:03 <diki> I suppose they are proven to be stable and secure.
752 2012-11-03 18:39:25 <diki> and probably filter any suspicious get/post requests with weird data.
753 2012-11-03 18:39:49 <andreas> It's just annoying to check 20 classes, if you forgot some check for sql injection, or so...
754 2012-11-03 18:40:22 <andreas> I wrote those websites with 10000 lines of php...been there...done that...don't need that anymore..
755 2012-11-03 18:40:26 <diki> not if you run it through your own function
756 2012-11-03 18:40:56 <sipa> sql prepared statements!
757 2012-11-03 18:41:20 <andreas> Yeah...I wrote a couple of database connection managers and stuff...
758 2012-11-03 18:41:43 <andreas> but now most of the automagic stuff is good enough for me...
759 2012-11-03 18:47:05 <andreas> http://pastebin.com/KcdUEvTG
760 2012-11-03 18:47:27 <andreas> I was told, I should use a salt instead of the password...
761 2012-11-03 18:47:35 <andreas> ...so maybe change that...
762 2012-11-03 18:47:40 <diki> definately
763 2012-11-03 18:47:53 <diki> and encrypted_password VARCHAR(40) is low for a sha256 or sha512 password.
764 2012-11-03 18:48:12 <sipa> it's enough for sha256 in hex
765 2012-11-03 18:48:20 <diki> oh yeah..32 bytes.
766 2012-11-03 18:48:26 <sipa> eh
767 2012-11-03 18:48:38 <diki> sorry, these days it's easy enough for me to confuse the bits vs bytes(sizes and all).
768 2012-11-03 18:48:39 <andreas> http://pastebin.com/Q52uYupP
769 2012-11-03 18:48:42 <sipa> sorry, i retract that statement :)
770 2012-11-03 18:49:20 <sipa> what is a tinyint/bigint?
771 2012-11-03 18:49:22 <diki> andreas:What scheme will you use for storing the login data?
772 2012-11-03 18:49:33 <diki> sipa:big integers?
773 2012-11-03 18:49:38 <diki> and small integers
774 2012-11-03 18:49:50 <andreas> http://pastebin.com/zDuFv5vv
775 2012-11-03 18:50:29 <diki> andreas:deposit_addr is 32 characters, however some addresses can be larger.
776 2012-11-03 18:50:34 <andreas> I thought just a session. Cake can do most of this stuff automagically...
777 2012-11-03 18:50:47 <andreas> yeah..the model is not complete and finished.
778 2012-11-03 18:50:53 <andreas> it would need some work.
779 2012-11-03 18:50:56 <sipa> diki: lol, of course... i mean how large are those?
780 2012-11-03 18:51:11 <andreas> but I think, we need distributed exchanges anyway.
781 2012-11-03 18:52:20 <diki> andreas:In the old days, I'd store the salted password hash in the cookie, and simply match it later with the one in the database.
782 2012-11-03 18:52:27 <diki> however, that is out of date today apparently
783 2012-11-03 18:53:32 <andreas> Now, I'm thinking about something different.
784 2012-11-03 18:53:43 <diki> I am very rusty when it comes to PHP. I've been doing mainly C for the past year, not looking back at php.
785 2012-11-03 18:53:57 <andreas> I'm working on a trade app, that has an OrderBook anyway.
786 2012-11-03 18:54:25 <andreas> If 2 users would connect and compare their order books, they might trade directly.
787 2012-11-03 18:56:20 <diki> I already have a name for that feature of yours
788 2012-11-03 18:56:24 <diki> Trade2Direct.
789 2012-11-03 19:02:58 <andreas> sounds cool...
790 2012-11-03 19:14:27 <JDuke128> hello , is it possible to run DiabloMiner offline ?
791 2012-11-03 19:16:20 <diki> no?
792 2012-11-03 19:16:49 <diki> It is possible, but what good would that do?
793 2012-11-03 19:23:39 <JDuke128> how ?
794 2012-11-03 19:23:55 <diki> why
795 2012-11-03 19:24:04 <diki> what are you going to do offline?
796 2012-11-03 19:25:44 <sipa> how will you know which blocks and transactions to build upon, if you're not connected to the network?
797 2012-11-03 19:25:59 <sipa> mining is building a chain together with anyone who participates
798 2012-11-03 19:44:58 <JDuke128> diki , i want to make offline mining
799 2012-11-03 19:45:08 <diki> JDuke128:Not possible.
800 2012-11-03 19:45:13 <JDuke128> the problem i've is i m on lab
801 2012-11-03 19:45:23 <JDuke128> our laboratory is closed to internet
802 2012-11-03 19:45:24 <diki> It's still impossible.
803 2012-11-03 19:45:28 <diki> you need to be online to do it.
804 2012-11-03 19:45:34 <JDuke128> can we make pre offline processing?
805 2012-11-03 19:45:45 <JDuke128> and just connect some pc to net after we get db
806 2012-11-03 19:46:21 <JDuke128> i will take possible answers to usb disk , then i will connect to internet from a pc
807 2012-11-03 19:46:28 <JDuke128> that i got results from lab
808 2012-11-03 19:46:31 <JDuke128> then check all
809 2012-11-03 19:46:34 <JDuke128> impossible?
810 2012-11-03 19:46:37 <sipa> JDuke128: if you can connect to the network every ten minutes, you will reduce effectiveness of mining by 50%
811 2012-11-03 19:46:40 <gmaxwell> JDuke128: What you're asking for isn't really possible. Also, do you have authorization to use that equipment for mining? If so??? get it extended to allow you to connect to the internet, if not then you should not mine on it.
812 2012-11-03 19:46:45 <sipa> any more, and it increases significantly
813 2012-11-03 19:47:11 <sipa> most miners make sure they don't have a latency of over a few seconds
814 2012-11-03 19:47:57 <sipa> also, don't abuse your lab
815 2012-11-03 19:49:25 <sipa> and unless your lab has high-end AMD graphic cards, or a cluster of FPGA's, it isn't going to gain you much
816 2012-11-03 19:50:04 <JDuke128> its super computer can run OpenCL
817 2012-11-03 19:50:19 <JDuke128> but it has no internet connection at ALL ;(
818 2012-11-03 19:50:21 <MC1984> someones gonna get fired
819 2012-11-03 19:50:34 <sipa> JDuke128: and rightfully so
820 2012-11-03 19:50:58 <sipa> JDuke128: even with OpenCL it isn't going to be fast for integer operations, unless it's using high-end AMD GPU's
821 2012-11-03 19:51:00 <MC1984> i remember reading about the first people to get fired for running seti@home in work back in the day
822 2012-11-03 19:51:01 <MC1984> lold
823 2012-11-03 19:51:29 <JDuke128> whats seti@home
824 2012-11-03 19:51:35 <sipa> giyf
825 2012-11-03 19:51:56 <MC1984> similar excpet instead of printing money you look for aliens
826 2012-11-03 19:56:21 <MC1984> i think its very telling that being able to print money quickly sucked up more processing power combined than say helping to cure devastating diseases or finding out if were are along in this cold and dark universe
827 2012-11-03 19:57:23 <MC1984> fermi paradox indeed, if they are out there maybe there is a reason they dont talk to us
828 2012-11-03 19:57:32 <gritball> cls
829 2012-11-03 19:57:42 <gritball> ?
830 2012-11-03 20:11:23 <sipa> cls?
831 2012-11-03 20:18:04 <BlueMatt> ;;later tell graingert I changed that yesterday
832 2012-11-03 20:18:05 <gribble> The operation succeeded.
833 2012-11-03 20:18:23 <BlueMatt> ;;later tell D34TH I dont see why it wouldnt, it should afaik
834 2012-11-03 20:18:24 <gribble> The operation succeeded.
835 2012-11-03 20:20:03 <sipa> BlueMatt: see my partialmerkle branch; i think i'm more or less done
836 2012-11-03 20:20:19 <BlueMatt> sipa: are you gonna rebase CPartialMerkleTree on my bloom branch, or should I cherry-pick it and merge it in?
837 2012-11-03 20:20:50 <sipa> haven't looked at the bloom branch code yet; feel free to cherry-pick
838 2012-11-03 20:21:19 <sipa> i'll help writing some description for it in the BIP
839 2012-11-03 20:21:22 <BlueMatt> ok, Ill look into that later today or tomorrow
840 2012-11-03 20:22:18 <BlueMatt> alright, afaik the only copy of the bip is just on the wiki, so you can edit it there
841 2012-11-03 20:22:33 <JDuke128> pls someone help , i ail donate with bitcoin
842 2012-11-03 20:23:13 <sipa> JDuke128: do you have permission to run bitcoin in your lab?
843 2012-11-03 20:23:23 <JDuke128> yes i ve
844 2012-11-03 20:23:26 <JDuke128> of course
845 2012-11-03 20:23:46 <sipa> then getting internet access on it shouldn't be a problem
846 2012-11-03 20:24:01 <JDuke128> okay but i ve another problem
847 2012-11-03 20:24:20 <JDuke128> i ve installed bitcoind with p2pool
848 2012-11-03 20:24:40 <JDuke128> i ve connected some clients to p2pool on my local server
849 2012-11-03 20:24:52 <JDuke128> but the problem is although i got accepts on local clients
850 2012-11-03 20:24:56 <JDuke128> i got 0 bit coin when i look on server
851 2012-11-03 20:25:20 <forsetifox> Heh.
852 2012-11-03 20:25:43 <JDuke128> bitcoind getbalance
853 2012-11-03 20:25:44 <JDuke128> 0.00000000
854 2012-11-03 20:25:48 <JDuke128> i got 0 bitcoin
855 2012-11-03 20:25:49 <sipa> how long has it been running?
856 2012-11-03 20:25:57 <JDuke128> 24 hours
857 2012-11-03 20:26:02 <kjj_> and are you actually hitting p2pool?
858 2012-11-03 20:26:08 <forsetifox> It's been running 24 hours without a internet connection?
859 2012-11-03 20:26:19 <JDuke128> no i ve internet connection