1 2012-12-24 01:12:33 <jgarzik> zooko: nothing :)
2 2012-12-24 01:12:56 <zooko> jgarzik: ???
3 2012-12-24 01:13:44 <jgarzik> zooko: JSON-RPC still outputs balance as naked JSON number, e.g. XXX.YYYYYYYY
4 2012-12-24 01:14:15 <jgarzik> zooko: python libs for JSON-RPC use Decimal, such as e.g. https://github.com/jgarzik/python-bitcoinrpc
5 2012-12-24 01:14:26 <jgarzik> but there is no "official" client lib for bitcoind's JSON-RPC
6 2012-12-24 01:21:54 <D34TH> jgarzik, doesnt your lib use float
7 2012-12-24 01:22:16 <jgarzik> D34TH: libccoin, you mean? No floating point used at all.
8 2012-12-24 01:22:21 <D34TH> python
9 2012-12-24 01:22:36 <D34TH> python-bitcoinrpc
10 2012-12-24 01:22:36 <jgarzik> D34TH: python-bitcoinrpc uses Decimal
11 2012-12-24 01:23:12 <jgarzik> resp = json.loads(resp, parse_float=decimal.Decimal)
12 2012-12-24 01:23:24 <D34TH> ahh
13 2012-12-24 01:23:35 <jgarzik> all looks-like-floating-point is shoved through Decimal
14 2012-12-24 01:30:29 <zooko> jgarzik: I think that's for the json ??? Python direction.
15 2012-12-24 01:30:58 <zooko> IIUC, gmaxwell was saying that in the Python ??? json direction, if you did json.dumps({'out': Decimal('0.1')}), you'd get an exception.
16 2012-12-24 01:31:25 <zooko> Which, IIRC, can be solved in sufficiently new versions of simplejson by passing use_decimal=True.
17 2012-12-24 01:32:10 <jgarzik> zooko: hmmm, I definitely tested that direction when it was originally written. Wonder if that was something special to my setup.
18 2012-12-24 01:32:20 <jgarzik> ~Fedora 16 era
19 2012-12-24 01:40:35 <zooko> jgarzik: hm.
20 2012-12-24 01:40:57 <zooko> jgarzik: I had to roll my own patched simplejson to make that work when I did it...
21 2012-12-24 01:41:15 <zooko> ACTION looks at https://zooko.com/uri/URI:DIR2-RO:d73ap7mtjvv7y6qsmmwqwai4ii:tq5tqejzulg7yj4h7nxuurpiuuz5jsgvczmdamcalpk2rc6gmbsq/klog.html#pyutil.jsonutil
22 2012-12-24 01:47:56 <stealth222> what are the highest priority improvements/new features for bitcoin and which, if any, are unassigned or does someone need help with?
23 2012-12-24 01:48:37 <stealth222> is there a document listing that?
24 2012-12-24 01:53:44 <zooko> Which was in 2010.
25 2012-12-24 01:54:07 <zooko> stealth222: there are the regular reports from Gavin: https://twitter.com/gavinandresen/status/282120341726326784
26 2012-12-24 01:56:56 <stealth222> zooko: thanks
27 2012-12-24 02:31:32 <gmaxwell> 18:22 <@jgarzik> D34TH: python-bitcoinrpc uses Decimal
28 2012-12-24 02:31:51 <gmaxwell> Yea, what I get _out_ is Decimal, but it doesn't take Decimal going in, e.g. in createrawtransaction.
29 2012-12-24 02:32:10 <gmaxwell> haven't actually looked to see why yet??? context switched to another project.
30 2012-12-24 02:38:03 <zooko> gmaxwell: IIUC the "json" module doesn't have a nice easy way to do that, but the "simplejson" module has (in sufficiently new versions) -- you just pass "use_decimal=True".
31 2012-12-24 02:38:45 <gmaxwell> zooko: why would you need to pass it a use_decimal=True for data you send _into_ it?
32 2012-12-24 02:55:01 <gmaxwell> crazy, my regular online wallet had over 800 unspent txouts.
33 2012-12-24 02:58:24 <jgarzik> gmaxwell: send them all to SatoshiDICE! It'll help compress the txout set surely
34 2012-12-24 02:58:26 <jgarzik> ACTION runs
35 2012-12-24 02:58:51 <gmaxwell> ACTION stabs
36 2012-12-24 02:59:35 <gmaxwell> Oddly this is _after_ I'd prevously made a cycle or two of compressing my wallet by grooming up txouts.
37 2012-12-24 04:16:07 <stealth222> Shouldn't AcceptToMemoryPool always call SyncWithWallets?
38 2012-12-24 04:33:59 <midnightmagic> how do I manually build a scripthash for createrawtransaction?
39 2012-12-24 04:47:23 <midnightmagic> :-(
40 2012-12-24 04:52:08 <MC1984> are there any network metrics left that arnt completely unreliable
41 2012-12-24 04:54:24 <eoss> ?
42 2012-12-24 05:00:41 <midnightmagic> MC1984: what?
43 2012-12-24 05:20:07 <jgarzik> BitMarket.eu missing 19980 BTC - https://bitcointalk.org/index.php?topic=5441.msg1413156#msg1413156
44 2012-12-24 05:21:53 <Cusipzzz> not sure 'missing' is the right word, but yeah another one.
45 2012-12-24 05:26:44 <gmaxwell> tl;dr had customers funds all at Bitcoinica, in leveraged short positions... "What I didn't expect was that one day it could just dissapear - taking all the money with it" and is only now bothering to tell people when he has 1786 BTC in outstanding withdraws he can't cover.
46 2012-12-24 05:28:04 <Luke-Jr> tl;dr epic fail
47 2012-12-24 05:28:06 <Luke-Jr> :P
48 2012-12-24 05:28:36 <etotheipi_> endless!
49 2012-12-24 05:29:12 <Cusipzzz> yep
50 2012-12-24 05:31:13 <Cusipzzz> or a convenient cover to just walk away with the money, people will get pennies if anything from bitcoinica
51 2012-12-24 05:31:32 <gmaxwell> yea. Or why not both?
52 2012-12-24 05:32:01 <gmaxwell> "Opps. bitcoinica ate all my customer's funds... well lets see how long I can keep taking deposits and dropping them into my pocket before the crap hits the fan."
53 2012-12-24 05:32:26 <Luke-Jr> gmaxwell: ironically, it sounds like he lost the majority of it BEFORE bitcoinica was hacked
54 2012-12-24 05:32:50 <gmaxwell> yea, that was ambigious in my reading, but it would have happened eventually in any case.
55 2012-12-24 05:33:48 <gmaxwell> (he also doesn't say how leveraged he was??? but the whole thing is inconsistent. You don't need to put such large positions if the purpose was really to hedge currency conversions)
56 2012-12-24 05:35:15 <Guest123456789> any advice for a transaction that has not been confirmed for 6 hours
57 2012-12-24 05:35:48 <Cusipzzz> patience?
58 2012-12-24 05:35:50 <Guest123456789> also paid 0.001 Fee
59 2012-12-24 05:35:57 <Luke-Jr> Cusipzzz++
60 2012-12-24 05:36:02 <Luke-Jr> Guest123456789: txid?
61 2012-12-24 05:36:19 <Guest123456789> Luke-Jr: PMed
62 2012-12-24 05:36:19 <weex> Guest123456789: check if any of the inputs have been spent by another transaction?
63 2012-12-24 05:36:30 <Luke-Jr> Guest123456789: not received. just say it
64 2012-12-24 05:37:12 <Guest123456789> weex: No
65 2012-12-24 05:37:33 <Guest123456789> Luke-Jr: Also, thanks for looking into it
66 2012-12-24 05:39:00 <Guest123456789> Luke-Jr: Any ideas?
67 2012-12-24 05:43:24 <Guest123456789> Also, i have heard that some transactions takes more then 24 hours the confirm
68 2012-12-24 05:43:40 <Guest123456789> Is this true even if you pay a Fee?
69 2012-12-24 05:43:53 <stealth222> a higher fee makes faster confirmation more likely
70 2012-12-24 05:43:58 <stealth222> but not guaranteed
71 2012-12-24 05:44:33 <Cusipzzz> what is the txn id?
72 2012-12-24 05:44:49 <Guest123456789> I PMed luke
73 2012-12-24 05:45:33 <Cusipzzz> secret transaction, got it. those always take longer. :)
74 2012-12-24 05:46:27 <Guest123456789> Luke-Jr: any advice?
75 2012-12-24 05:53:04 <Luke-Jr> Guest123456789: it's already in Eligius's block templates, so I can say it will likely be mined when Eligius finds its next block at least
76 2012-12-24 05:53:24 <Guest123456789> Luke-Jr: Thanks
77 2012-12-24 05:54:30 <Guest123456789> Luke-Jr: How much time on avarage does eligius take to find a block?
78 2012-12-24 05:55:02 <Luke-Jr> dunno, haven't paid attention lately
79 2012-12-24 05:56:02 <Guest123456789> ok
80 2012-12-24 05:56:13 <Guest123456789> Also thanks for taking your time to look into it
81 2012-12-24 06:00:25 <gmaxwell> Guest123456789: there are probably other pools attempting to mine it too.
82 2012-12-24 06:01:09 <gmaxwell> I wonder if I wrote a small program that periodically does a GBT and reports it back to someplace for the purpose of having a mining-eta view of the network if people would run it?
83 2012-12-24 06:01:40 <gmaxwell> I guess it would need to intercept actual shares or otherwise it would be too easy to spam. :(
84 2012-12-24 06:03:49 <Luke-Jr> gmaxwell: ?
85 2012-12-24 06:04:00 <Luke-Jr> I don't see the spam risk
86 2012-12-24 06:04:51 <Luke-Jr> any ideas why realloc would return NULL and free the previous pointer? :/
87 2012-12-24 06:05:54 <gmaxwell> Luke-Jr: because you've ask for size zero or run out of memory.
88 2012-12-24 06:06:01 <gmaxwell> s/ask/asked/
89 2012-12-24 06:06:29 <Luke-Jr> gmaxwell: I'm pretty sure it's not size zero, and in the latter case it isn't supposed to free the old pointer :/
90 2012-12-24 06:08:17 <gmaxwell> Luke-Jr: I doubt that it's defined that its not supposted to free it on malloc failure. That would be hard to implement. :P
91 2012-12-24 06:08:41 <Luke-Jr> "If memory for the new object cannot be allocated, the old object is not deallocated and its value is unchanged." - C1x :P
92 2012-12-24 06:12:05 <gmaxwell> Okay, fine. The size is zero then. :P
93 2012-12-24 06:12:06 <Luke-Jr> glibc's manual says the same thing: "Like malloc, realloc may return a null pointer if no memory space is available to make the block bigger. When this happens, the original block is untouched; it has not been modified or relocated."
94 2012-12-24 06:12:29 <Luke-Jr> gmaxwell: well, I added a debug print of the size just to check??? too bad this bug is so random/rare
95 2012-12-24 06:13:14 <gmaxwell> Luke-Jr: I wouldn't be _too_ shocked if there was misbehavior on malloc failure in glibc, esp since its really hard to get malloc to fail on linux systems.
96 2012-12-24 06:13:47 <gmaxwell> (so I suggest looking at the source if you think it really might be failing)
97 2012-12-24 06:14:03 <Luke-Jr> gmaxwell: oh, the argument being passed to realloc for size is an unsigned number +1
98 2012-12-24 06:14:26 <Luke-Jr> that'd be pretty hard to make 0
99 2012-12-24 06:22:01 <gmaxwell> UINT_MAX?
100 2012-12-24 06:22:03 <gmaxwell> :P
101 2012-12-24 06:44:38 <Luke-Jr> af32bb06f12f2ae5fdb7face7cd272be67c923e86b7a66a76ded02d954c2f94d is interesting
102 2012-12-24 06:45:27 <Luke-Jr> gmaxwell: ^
103 2012-12-24 06:46:29 <stealth222> so why isn't it redeemable? there must be something I'm misunderstanding about the script
104 2012-12-24 06:46:36 <lianj> Luke-Jr: cant you easily redeem it?
105 2012-12-24 06:47:03 <Luke-Jr> lianj: it's impossible, actually
106 2012-12-24 06:47:04 <lianj> block 0 header hashes to that hash asked in OP_EQUAL, no?
107 2012-12-24 06:47:14 <stealth222> yes, lianj
108 2012-12-24 06:47:25 <Luke-Jr> stealth222: it is looking for a hash matching block 0's hash, but the author of this txn overlooked a non-obvious problem
109 2012-12-24 06:47:39 <Luke-Jr> block hashes are shown inverted
110 2012-12-24 06:47:43 <Luke-Jr> the zeros are at the END of the hash
111 2012-12-24 06:47:45 <stealth222> oh, lol
112 2012-12-24 06:48:20 <stealth222> yeah, the byte order thing is annoying - why does bitcoin reverse the sha256 bytes?
113 2012-12-24 06:48:32 <lianj> Luke-Jr: ah, doh ;)
114 2012-12-24 06:48:32 <Luke-Jr> blame Satoshi :P
115 2012-12-24 06:48:45 <Luke-Jr> (it gets worse, too!)
116 2012-12-24 06:49:00 <gmaxwell> Luke-Jr: you'd think people would try to redeem these things themselves before annoucing them.
117 2012-12-24 06:49:05 <Luke-Jr> gmaxwell: XD
118 2012-12-24 06:49:26 <stealth222> it's just one bitcoin and a little hacker pride at stake, gmaxwell
119 2012-12-24 06:49:34 <stealth222> not that big a deal :)
120 2012-12-24 06:49:38 <lianj> also, why did he redeem zero amount inputs?
121 2012-12-24 06:49:58 <forgot> the reversed sha256 is reversed per uint32 or whole 256bits?
122 2012-12-24 06:50:10 <gmaxwell> stealth222: well, if someone wants to waste 1 btc, they can happily send it to me instead. :P
123 2012-12-24 06:50:11 <Luke-Jr> lianj: dunno, looks like p2pool spam
124 2012-12-24 06:50:21 <Luke-Jr> forgot: whole 256 bits
125 2012-12-24 06:50:27 <Luke-Jr> forgot: rather, per 8 bit
126 2012-12-24 06:50:35 <lianj> endianness
127 2012-12-24 06:51:07 <forgot> Luke-Jr, can you clarify it? assuming sha256 is 8 uint32 integers
128 2012-12-24 06:51:13 <gmaxwell> stealth222: it just used whatever ordering 'fell out' of the implementation, it didn't go out of its way to order much of anything.
129 2012-12-24 06:52:02 <forgot> hashlib.sha256('wtf is this order').hexdigest()
130 2012-12-24 06:52:03 <forgot> 'fb6c2f88588f24246045f2146e5182ad2c2c2143c166aa1ed336a454af7aab99'
131 2012-12-24 06:52:13 <forgot> simply reverse all bytes?
132 2012-12-24 06:52:21 <stealth222> forgot: example: a4 68 3d 25 -> 25 3d 68 a4
133 2012-12-24 06:52:40 <forgot> hashlib.sha256('wtf is this order').digest()[::-1].encode('hex')
134 2012-12-24 06:52:41 <forgot> '99ab7aaf54a436d31eaa66c143212c2cad82516e14f2456024248f58882f6cfb'
135 2012-12-24 06:52:59 <stealth222> yer
136 2012-12-24 06:53:05 <Luke-Jr> forgot: the end hash flattens those to 32x uint8 characters
137 2012-12-24 06:53:22 <Luke-Jr> forgot: yep
138 2012-12-24 06:53:29 <forgot> that's evil
139 2012-12-24 06:53:54 <Luke-Jr> forgot: like I said, it gets worse.
140 2012-12-24 06:54:08 <forgot> like how?
141 2012-12-24 06:54:20 <Luke-Jr> SHA256 interprets byte input as big endian; so the block header values are little endian of course
142 2012-12-24 06:54:33 <Luke-Jr> so you have SHA256 interpreting a little endian number as big endian
143 2012-12-24 06:54:33 <stealth222> that's what's really nasty
144 2012-12-24 06:54:57 <stealth222> if bitcoin just used big endian for hashes, it would be restricted to OpenSSL/hashing operations
145 2012-12-24 06:55:02 <stealth222> all other encoding would be little endian
146 2012-12-24 06:55:46 <Luke-Jr> and then the getwork protocol does the SHA256 preprocessing for the miner - in little endian
147 2012-12-24 06:55:56 <Luke-Jr> so each 32-bit chunk gets flipped again
148 2012-12-24 06:56:14 <stealth222> yeah - which is totally stupid considering that as far as miners are concerned, hashes are random numbers
149 2012-12-24 06:56:43 <gmaxwell> stealth222: as I've told other people??? if your biggest concern is byte order then I'm _really_ happy, because thats such minutia in the sea of complex rules which must be exactly right to do anything with bitcoin, if byte order is all thats left you've really got it made. :P
150 2012-12-24 06:57:35 <stealth222> well, it's just a few more instructions that you need to add to operations - and if you remember where to put them, all's well
151 2012-12-24 06:57:54 <stealth222> but it can lead to some confusion, for instance with af32bb06f12f2ae5fdb7face7cd272be67c923e86b7a66a76ded02d954c2f94d
152 2012-12-24 06:58:51 <stealth222> and no, it's certainly not my biggest concern. the fact that you can't tack on more tx fees once you've broadcast a transaction, for example, is a bigger concern :)
153 2012-12-24 06:59:33 <stealth222> I'd also like inputs to store amounts (even if redundant) so that you can still tell what they are if the tx is orphaned - and for blocks to store height
154 2012-12-24 07:00:14 <forgot> i get a work starts with 00000001, if block values in little endian, why it's not 01000000?
155 2012-12-24 07:00:49 <Luke-Jr> forgot: it's 01000000 in the actual block header
156 2012-12-24 07:01:17 <forgot> wtf is the protocol think to swap bytes for me..
157 2012-12-24 07:01:20 <lianj> https://pastee.org/82zch is what i get
158 2012-12-24 07:01:35 <Luke-Jr> gmaxwell: byte order is very headachy compared to bigger problems :P
159 2012-12-24 07:02:04 <forgot> https://en.bitcoin.it/wiki/Block_hashing_algorithm
160 2012-12-24 07:02:17 <forgot> is the exmaple real?
161 2012-12-24 07:02:22 <lianj> wait, my push_data data is stupid
162 2012-12-24 07:02:54 <forgot> so the only reversed sha256 is merkle ?
163 2012-12-24 07:03:05 <forgot> the prevhash and resulting hash is unchanged?
164 2012-12-24 07:03:35 <stealth222> I got it all to work in an implementation I made - but if you were to ask me to code it up again, I'd have to look it all up and test it
165 2012-12-24 07:03:41 <stealth222> lol
166 2012-12-24 07:04:13 <stealth222> and it probably wouldn't work the first time
167 2012-12-24 07:04:39 <stealth222> I'm sure I'd miss one byte reversing operation somewhere
168 2012-12-24 07:05:58 <stealth222> yes, it is minutia - yes, it isn't particularly relevant once you have an implementation that exposes a higher level API - but it's annoying that I can't just implement it from memory
169 2012-12-24 07:07:47 <forgot> im still confusing about a hash < target, are we interpeting a big-endian hash as little-endian and compare them?
170 2012-12-24 07:08:43 <stealth222> speaking of which, are there any good tools out there for parsing raw transactions?
171 2012-12-24 07:08:53 <Luke-Jr> forgot: exactly
172 2012-12-24 07:09:00 <Luke-Jr> stealth222: bitcoind is nice :P
173 2012-12-24 07:09:17 <stealth222> does bitcoind parse arbitrary scripts into human-readable form?
174 2012-12-24 07:09:25 <Luke-Jr> yes
175 2012-12-24 07:09:29 <forgot> why satoshi do this to me, to fuck my mind
176 2012-12-24 07:09:31 <Luke-Jr> decoderawtransaction
177 2012-12-24 07:09:41 <stealth222> oh, cool
178 2012-12-24 07:09:58 <stealth222> lol - there's still features I'm unaware of
179 2012-12-24 07:10:10 <Luke-Jr> that's a new one
180 2012-12-24 07:10:33 <stealth222> can it detect encoding errors?
181 2012-12-24 07:10:40 <forgot> how to turn getwork job back to a raw block ?
182 2012-12-24 07:11:42 <stealth222> error: {"code":-22,"message":"TX decode failed"}
183 2012-12-24 07:12:05 <stealth222> is there any tool out there that gives you more specific error messages?
184 2012-12-24 07:14:05 <stealth222> or could decoderawtransaction perhaps be extended to give more detailed error messages?
185 2012-12-24 07:15:00 <stealth222> not that it's a feature most endusers would care about - but it's certainly helpful to hackers looking to do their own low-level implementation of the protocol
186 2012-12-24 07:21:56 <Luke-Jr> forgot: you can't do the whole block, just the header
187 2012-12-24 07:22:03 <Luke-Jr> forgot: for every 4 bytes, invert the order
188 2012-12-24 07:22:13 <Luke-Jr> stealth222: check debug.log for specifics
189 2012-12-24 07:24:51 <forgot> Luke-Jr, thank you, I'm trying
190 2012-12-24 07:24:56 <forgot> 000000027dbaf2ab3f1a493ef2054b9acf5140c887c0aabff7971d0a00000324000000002b107a44
191 2012-12-24 07:25:02 <forgot> version is 2 now?
192 2012-12-24 07:25:04 <Luke-Jr> yes
193 2012-12-24 07:25:15 <forgot> what changed?
194 2012-12-24 07:25:31 <Luke-Jr> the coinbase transaction's first input scriptPubKey must begin with the block height serialized
195 2012-12-24 07:26:13 <imisor> xmas 4 all :)
196 2012-12-24 07:26:16 <forgot> ok
197 2012-12-24 07:26:41 <imisor> i actually usually hate xmas :D
198 2012-12-24 07:26:47 <imisor> this time monday isn't so bad
199 2012-12-24 07:27:25 <stealth222> hmm, not seeing anything in debug.log. I'll take a look at CTransaction's serialization code
200 2012-12-24 07:27:27 <midnightmagic> my transactions, 0 fee, were confirmed inside of about 15 minutes. yay me
201 2012-12-24 07:28:51 <midnightmagic> It may be hard to get malloc to fail on Linux systems, but it's sure easy to kill it with love.
202 2012-12-24 07:30:11 <imisor> fail how?
203 2012-12-24 07:30:23 <imisor> i code mostly c++ nowadays
204 2012-12-24 07:31:03 <midnightmagic> fail as in full on error.. :)
205 2012-12-24 07:31:04 <imisor> never really had probs. with malloc
206 2012-12-24 07:31:13 <imisor> oh i c :)
207 2012-12-24 07:31:29 <midnightmagic> they were talking about a realloc() issue earlier instead of telling me how to make pay-to-scripthash transactions.
208 2012-12-24 07:32:25 <imisor> midnightmagic, what exactly deos realloc do :D
209 2012-12-24 07:32:27 <imisor> never used
210 2012-12-24 07:32:43 <imisor> didn't have to .. so i dont know what it does:)
211 2012-12-24 07:32:55 <imisor> frees mem and allocates in same place again?
212 2012-12-24 07:33:05 <midnightmagic> you feed it an old pointer to mem. you tell it how much new mem you want. realloc() gives you a new region of memory to monkey around with.
213 2012-12-24 07:33:12 <midnightmagic> not necessarily the same place.
214 2012-12-24 07:33:18 <imisor> k
215 2012-12-24 07:33:42 <imisor> long time with c++ :>
216 2012-12-24 07:33:54 <imisor> before that c etc.. pascal etc. etc. lol
217 2012-12-24 07:36:12 <aipa> ACTION can complain about "new" vs malloc
218 2012-12-24 07:38:57 <imisor> aipa, whats there to complain?
219 2012-12-24 07:39:21 <aipa> once saw the assembly output of "new" and noticed it had more instructions
220 2012-12-24 07:39:32 <imisor> c++ gets real messy in big projects yes, it is also very much stupid.. but it is usefull for some things like games etc ;)
221 2012-12-24 07:39:49 <Luke-Jr> imisor: I don't think C++ has a realloc equivalent ;)
222 2012-12-24 07:39:52 <aipa> but what is it supposed to do? it's just an "malloc", just with a call to the constructor afterwards
223 2012-12-24 07:40:07 <aipa> Luke-Jr: there's vector<>
224 2012-12-24 07:40:16 <imisor> well thats why there are ~class and class
225 2012-12-24 07:40:40 <Luke-Jr> aipa: vector<> isn't really realloc
226 2012-12-24 07:40:51 <midnightmagic> njarne stroustrop himself says he doesn't know the whole language.
227 2012-12-24 07:40:57 <midnightmagic> er.. bjarne.
228 2012-12-24 07:41:03 <aipa> sure, there's no real memory copying, just "member copying"
229 2012-12-24 07:41:07 <stealth222> C++ affords very many different programming idioms/styles - which provides you with much greater flexibility if you know how to use it well - but it can be very confusing when abused.
230 2012-12-24 07:41:15 <Luke-Jr> aipa: realloc would be more like turning a ClassA object into a SubClassB object
231 2012-12-24 07:41:32 <stealth222> also, it's sometimes annoying when working on a project that contains different parts that are in very different styles
232 2012-12-24 07:41:35 <midnightmagic> stealth222: What's that, a euphemistic interpretation of the "blow your whole leg off" quote? :)
233 2012-12-24 07:42:12 <stealth222> heh. more or less
234 2012-12-24 07:42:25 <midnightmagic> lol
235 2012-12-24 07:42:49 <imisor> class foo { Foo() { <set everything to zero> ); ~foo(){ <check which are zero if not delete> .. int init( <args> ) { something = new xyz[size]; } int update( timer etc... ); };
236 2012-12-24 07:42:51 <midnightmagic> it's become far too civilized in here these days. where's xelister anyway
237 2012-12-24 07:43:09 <stealth222> C++ generics, for instance, can be very powerful when you do it right - but make one tiny mistake and good luck deciphering the error messages
238 2012-12-24 07:43:25 <imisor> its somehow easier to manage memory usage but when project has more than 2 millons askiis of code it simply gets messy again :D
239 2012-12-24 07:43:29 <Luke-Jr> imisor: delete NULL; is invalid C++? :P
240 2012-12-24 07:44:03 <imisor> delete NULL? :D what that is supposed to mean, delete nothing?
241 2012-12-24 07:44:16 <Luke-Jr> imisor: delete a null pointer
242 2012-12-24 07:44:32 <Luke-Jr> imisor: free is valid and ignored in C
243 2012-12-24 07:44:43 <Luke-Jr> so you don't need to check if there's an object assigned
244 2012-12-24 07:44:47 <stealth222> doesn't delete NULL fire an exception?
245 2012-12-24 07:45:12 <imisor> :)
246 2012-12-24 07:45:17 <Luke-Jr> maybe.
247 2012-12-24 07:45:23 <Luke-Jr> I know C better than C++ ;)
248 2012-12-24 07:45:32 <aipa> i think "delete 0" is supposed to work
249 2012-12-24 07:45:37 <aipa> and not crash
250 2012-12-24 07:45:40 <imisor> Luke-Jr, yeah C is nice .. they are just so different
251 2012-12-24 07:45:59 <imisor> for different purposes
252 2012-12-24 07:46:15 <aipa> but still, i'd write "if (x) delete x;"
253 2012-12-24 07:46:27 <aipa> i'm against the use of NULL
254 2012-12-24 07:46:42 <imisor> yeah
255 2012-12-24 07:46:46 <imisor> i use zero simply
256 2012-12-24 07:46:48 <aipa> except in very special cases, such as in variable argument lists
257 2012-12-24 07:47:00 <stealth222> actually, C++ doesn't allow delete NULL; NULL is treated as a long int
258 2012-12-24 07:47:07 <imisor> :D
259 2012-12-24 07:47:09 <imisor> oh
260 2012-12-24 07:47:10 <imisor> funny
261 2012-12-24 07:47:13 <Luke-Jr> would be nice if C++ kept up with C <.<
262 2012-12-24 07:47:43 <imisor> Luke-Jr, it would be nice .. code c or c++ doesn't matter like in compiler .. it would be nice
263 2012-12-24 07:48:26 <imisor> win+c++ something like kbhit is err
264 2012-12-24 07:48:26 <stealth222> int main() { int* i = NULL; delete i; return 0; }
265 2012-12-24 07:48:28 <stealth222> I just tested that
266 2012-12-24 07:48:32 <stealth222> it did not throw an exception
267 2012-12-24 07:48:38 <imisor> :)
268 2012-12-24 07:49:17 <stealth222> but int main() { delete NULL; return 0; } produces a compiler error
269 2012-12-24 07:49:39 <Luke-Jr> stealth222: well, it *is* stupid to "delete NULL" literally :p
270 2012-12-24 07:50:26 <aipa> "delete ((int*)0)" would probably work
271 2012-12-24 07:50:54 <aipa> or i don't know
272 2012-12-24 07:51:03 <stealth222> yes, it would
273 2012-12-24 07:51:15 <stealth222> int main() { delete (int*)NULL; return 0; }
274 2012-12-24 07:51:21 <stealth222> just exits without incident
275 2012-12-24 07:52:12 <stealth222> but delete (void*)NULL; gives a compiler error
276 2012-12-24 07:52:31 <stealth222> or a warning
277 2012-12-24 07:52:34 <stealth222> it will still run
278 2012-12-24 07:52:44 <aipa> must be the void then. doesn't have a destructor
279 2012-12-24 07:52:49 <stealth222> right
280 2012-12-24 07:53:00 <midnightmagic> oh good grief. could gettext possibly have any more dependencies.
281 2012-12-24 07:53:04 <midnightmagic> ACTION goes to bed.
282 2012-12-24 07:53:36 <aipa> i have an official complaint about c++...
283 2012-12-24 07:54:34 <aipa> was thinking i should be able to write a template with lesser typing
284 2012-12-24 07:55:02 <stealth222> can you elaborate?
285 2012-12-24 07:55:21 <stealth222> you mean you want runtime type checking?
286 2012-12-24 07:55:26 <aipa> say, something like this: f(a,b,c) { return a + b + c; }
287 2012-12-24 07:55:34 <aipa> a simple inline function
288 2012-12-24 07:55:39 <stealth222> sure
289 2012-12-24 07:55:54 <forgot> why don't just use python...
290 2012-12-24 07:56:24 <forgot> only write highly-optimized C extension for a bottle neck profiled
291 2012-12-24 07:56:26 <aipa> i'd have to write it as "template <typename A, typename B, typename C, typename D> D f(A a, B b, C c) { return a+b+c; }"
292 2012-12-24 07:57:14 <stealth222> yeah, it is a bit verbose
293 2012-12-24 07:57:27 <aipa> wishing there was a fast compiled language that allowed me to write something like that as something like "f(a,b,c) = a+b+c;"
294 2012-12-24 07:57:47 <stealth222> and these LONG template definitions also are a pain in the ass when you're trying to decipher compiler errors
295 2012-12-24 07:57:49 <aipa> ACTION thinks of Haskell, but it's just not c++
296 2012-12-24 07:58:07 <stealth222> one definition might take up the whole screen
297 2012-12-24 07:58:24 <stealth222> especially when you start nesting templates
298 2012-12-24 07:58:43 <forgot> your definition is dynamic, and dynamic languages cannot be compiled, however they can be JITed
299 2012-12-24 07:59:05 <Luke-Jr> aipa: well???
300 2012-12-24 07:59:11 <Luke-Jr> #define f(a,b,c) (a+b+c)
301 2012-12-24 08:00:18 <aipa> eh, i guess i'll have to satisfy myself with that
302 2012-12-24 08:00:42 <stealth222> what if it were such that if you omitted types it was understood to be a template?
303 2012-12-24 08:00:59 <aipa> yes, i was thinking about that possibility
304 2012-12-24 08:01:02 <Luke-Jr> stealth222: how does it know the keyword is a type?
305 2012-12-24 08:01:17 <Luke-Jr> or maybe
306 2012-12-24 08:01:27 <Luke-Jr> auto f(auto a, auto b, auto c) { return a + b + c; }
307 2012-12-24 08:01:40 <stealth222> I could live with that
308 2012-12-24 08:02:02 <aipa> guess i could live with that too
309 2012-12-24 08:02:18 <stealth222> #define f(a,b,c) (a+b+c) is fine for very short, simple functions
310 2012-12-24 08:02:25 <aipa> just "auto f(a,b,c) { return a+b+c; }" looks better
311 2012-12-24 08:02:36 <stealth222> but for a longer function, using preprocessor macros is asking for trouble
312 2012-12-24 08:02:49 <Luke-Jr> no kidding, uthash is a mess
313 2012-12-24 08:02:52 <aipa> yeah, evaluation
314 2012-12-24 08:03:11 <Luke-Jr> I like Perl: sub f{shift+shift+shift}
315 2012-12-24 08:03:13 <Luke-Jr> <.<
316 2012-12-24 08:04:48 <Luke-Jr> or to do variable argument count: sub f{my $r;$r+=$_ for @_;$r}
317 2012-12-24 08:05:23 <forgot> def f(*args): return len(args)
318 2012-12-24 08:06:35 <forrestv> len instead of sum?
319 2012-12-24 08:06:45 <forgot> i cannot read perl :(
320 2012-12-24 08:07:05 <forgot> i thought it was counting # arguments :((
321 2012-12-24 08:13:20 <forgot> finally, ported rpcminer-cuda to poclbm, can I donate 1BTC for help, Luke-Jr ?
322 2012-12-24 08:24:49 <stealth222> Say I have forked bitcoin/bitcoin master at github, I'm working on a few branches, and bitcoin/bitcoin master changes. How can I merge those changes back in with my fork so that the commits all contain those changes?
323 2012-12-24 08:25:08 <stealth222> I guess I have to do a new commit for each branch?
324 2012-12-24 08:26:21 <stealth222> or can I rebase it with the new bitcoin/bitcoin master?
325 2012-12-24 08:30:29 <Luke-Jr> forgot: 1Bbx57zzUBX7prDgynZrSxShSAWQLC5Fkp if you want
326 2012-12-24 08:30:34 <Luke-Jr> forgot: it's working, then?
327 2012-12-24 08:31:05 <Luke-Jr> stealth222: yes; git help rebase
328 2012-12-24 08:31:19 <Luke-Jr> stealth222: or if you want to do things the low-level way, check out git reset and git cherry-pick
329 2012-12-24 08:31:34 <forgot> 1BTC sent :)
330 2012-12-24 08:32:37 <forgot> working like a dream
331 2012-12-24 08:37:37 <Luke-Jr> forgot: any interest in porting to BFGMiner? :P
332 2012-12-24 08:37:45 <Luke-Jr> how's it perform compared to OpenCL btw?
333 2012-12-24 08:38:01 <forgot> opencl on cuda has bug
334 2012-12-24 08:38:07 <forgot> will eat up cpu
335 2012-12-24 08:38:14 <Luke-Jr> same hashrate tho?
336 2012-12-24 08:38:39 <forgot> a bit higher since it's native on nvidia devices
337 2012-12-24 08:39:00 <forgot> but not so higher
338 2012-12-24 08:39:53 <Luke-Jr> forgot: might ask this guy what reward he's offering: https://github.com/luke-jr/bfgminer/issues/132
339 2012-12-24 08:42:10 <forgot> i may create a pull request to poclbm
340 2012-12-24 08:42:34 <forgot> seems im not alone :)
341 2012-12-24 08:43:25 <forgot> bfgminer is very cool, I highly respect
342 2012-12-24 08:43:42 <Luke-Jr> forgot: the guy in that link has bfgminer integrated into his computer game, and players pay-to-play by it mining in the background ;p
343 2012-12-24 08:43:52 <Luke-Jr> so the 100% CPU bug bothers him quite a bit
344 2012-12-24 08:44:20 <forgot> im doing exactly the same thing
345 2012-12-24 08:44:38 <Luke-Jr> hah, nice
346 2012-12-24 08:45:26 <forgot> that's way I have to mine in python
347 2012-12-24 08:45:47 <forgot> my customers won't like an embed binary
348 2012-12-24 08:46:13 <Luke-Jr> your customers all run Linux or smth? O.o
349 2012-12-24 08:46:36 <forgot> windows
350 2012-12-24 08:46:59 <Luke-Jr> I'd have thought the opposite for Windows
351 2012-12-24 08:47:15 <Luke-Jr> Python has overhead (bundled interpreter etc) and most users don't even know what source code is
352 2012-12-24 08:47:31 <Guest68559> good morning all
353 2012-12-24 08:47:51 <forgot> some malware may embed rpcminer or bfgminer as binary dll in windows
354 2012-12-24 08:48:05 <Luke-Jr> ah, looking to avoid that
355 2012-12-24 08:48:11 <Luke-Jr> Rebroad_: hey, ltns
356 2012-12-24 08:48:34 <Rebroad_> Merry Christmas (to all who celebrate it) for tomorrow/day after tomorrow
357 2012-12-24 08:48:45 <Rebroad_> ACTION for some reason can't change his nick to "Rebroad"
358 2012-12-24 08:49:22 <Rebroad_> Luke-Jr, I tried merging your coincontrol with the latest master but it required a bit of work...
359 2012-12-24 08:49:23 <Luke-Jr> Rebroad_: it's registered by ??? looks like you
360 2012-12-24 08:49:36 <Luke-Jr> Rebroad_: that's a shame, I'll probably need to drop it then :<
361 2012-12-24 08:50:20 <Rebroad_> Luke-Jr, I was thinking of writing some python script to interface with bitcoind to provide an easy way to group addresses into groups and move funds keeping groups independant..
362 2012-12-24 08:50:40 <Luke-Jr> Rebroad_: how is that different from multiwallet?
363 2012-12-24 08:50:54 <Rebroad_> I've not heard of multiwallet..
364 2012-12-24 08:51:57 <stealth222> https://github.com/bitcoin/bitcoin/pull/2124
365 2012-12-24 08:52:34 <Rebroad_> do you mean multibit?
366 2012-12-24 08:53:06 <Rebroad_> ah.. thanks, stealth222
367 2012-12-24 08:53:31 <Rebroad_> how do I merge with that pull please? I forget how to do these things...
368 2012-12-24 08:54:10 <stealth222> we're all learning to use git, Rebroad_. Welcome to the club :)
369 2012-12-24 08:54:45 <stealth222> git branch <branch you're merging into>
370 2012-12-24 08:54:53 <stealth222> git merge <branch to merge>
371 2012-12-24 08:54:57 <stealth222> or something like that :p
372 2012-12-24 08:55:17 <stealth222> actually, git checkout <branch to merge into>
373 2012-12-24 08:55:50 <Rebroad_> the main thing I'd like to learn to do with git (if possible) is to rebase -i my master to the upstream master, but without losing the merge information where I've merged my own branches in to create my master..
374 2012-12-24 08:57:28 <Luke-Jr> Rebroad_: git fetch git://github.com/CodeShark/bitcoin.git multiwallet && git merge FETCH_HEAD
375 2012-12-24 08:59:00 <Rebroad_> Luke-Jr, thanks... I take it this is just RPC stuff, no gui changes? I wanted to write something that makes it really easy to group the addresses, using the current descriptions and allows labelling of the groups, and then can show total balance per group, and once the groups are created, any payments are limited to the total of the contents of that group.
376 2012-12-24 08:59:15 <stealth222> there are no GUI changes
377 2012-12-24 08:59:26 <stealth222> a GUI would have to be written to make use of it
378 2012-12-24 08:59:33 <stealth222> it's all CLI for now
379 2012-12-24 08:59:34 <Luke-Jr> Rebroad_: dunno, I was talking in general/theory, not a specific implementation
380 2012-12-24 09:02:59 <stealth222> Rebroad_, please feel free to write a GUI for it :)
381 2012-12-24 09:03:39 <stealth222> the way bitcoind is currently implemented, all the coins inside a single wallet are liberally mixed regardless of the account name corresponding to the outputs
382 2012-12-24 09:03:55 <stealth222> but by having multiple wallets, keeping things separate is simple
383 2012-12-24 09:04:03 <Luke-Jr> stealth222: are you CodeShark? :P
384 2012-12-24 09:04:03 <Rebroad_> how about instead of multiwallet like that we simple separate the gui from the bitcoind, so that each gui is linked to one wallet... or some solution between that and this one...
385 2012-12-24 09:05:28 <stealth222> the GUI is pretty much already separate
386 2012-12-24 09:08:11 <stealth222> and geting the GUI to use a different wallet would be fairly straightforward
387 2012-12-24 09:08:32 <stealth222> getting a GUI to display multiple wallets and switch between them would require a tiny bit of effort
388 2012-12-24 09:11:53 <aipa> this is defamation, gmaxwell
389 2012-12-24 09:12:01 <aipa> and you are guilty
390 2012-12-24 09:12:11 <aipa> this gets you 2 years in prison here
391 2012-12-24 09:12:57 <aipa> you are making my already fucked up life even worse
392 2012-12-24 09:13:43 <aipa> but you are good at it, you are in the right place
393 2012-12-24 09:14:00 <aipa> your wife is a lawyer too
394 2012-12-24 09:14:30 <aipa> you sure know how to handle the little "trolls" like me
395 2012-12-24 09:15:06 <forgot> is gmaxwell ghosting around? I didn't see
396 2012-12-24 09:15:13 <aipa> he is in channel
397 2012-12-24 09:15:22 <aipa> he will probably get this
398 2012-12-24 09:15:34 <aipa> but will ceremonially ban me again
399 2012-12-24 09:16:10 <aipa> you can understand why i feel like reacting violently
400 2012-12-24 09:16:42 <aipa> aethero disappeared
401 2012-12-24 09:16:53 <aipa> you should look at aethero's rating of gmaxwell too
402 2012-12-24 09:17:11 <aipa> you can understand why i'd want to ban gmaxwell from the world
403 2012-12-24 09:17:37 <stealth222> wtf?!?!
404 2012-12-24 09:18:39 <aipa> long story, stealth222. i want gmaxwell's rating of stamit removed
405 2012-12-24 09:19:17 <aipa> from #bitcoin-otc, just now: <Hasimir> Luke-Jr, have you seen gmaxwell's rating of stamit? I can see why he'd go on a banning spree
406 2012-12-24 09:20:00 <aipa> i now have to pretend i am a different person
407 2012-12-24 09:20:13 <Luke-Jr> stealth222: just ignore him
408 2012-12-24 09:20:22 <aipa> stealth222: just ignore Luke-Jr
409 2012-12-24 09:20:33 <stealth222> enough with the personal shit - take that somewhere else
410 2012-12-24 09:20:35 <aipa> don't know how to fight this shit
411 2012-12-24 09:20:45 <aipa> there's nowhere i can take it
412 2012-12-24 09:21:01 <aipa> "banned from everywhere", remember?
413 2012-12-24 09:21:19 <stealth222> well, bitching about it here is not likely to improve the situation
414 2012-12-24 09:21:30 <aipa> got talk about getting "convicted"
415 2012-12-24 09:21:42 <aipa> i got that talk from a friend of gmaxwell
416 2012-12-24 09:22:05 <aipa> that's the next step
417 2012-12-24 09:22:28 <aipa> it's not enough that my life is fucked, my money is stolen, my reputation is fucked
418 2012-12-24 09:22:38 <aipa> i have to be put behind bars too
419 2012-12-24 09:22:57 <Luke-Jr> you could just shut up instead
420 2012-12-24 09:23:30 <aipa> why don't you and your friends shut up?
421 2012-12-24 09:26:53 <aipa> i used to do all these little projects long ago, but now i feel like i can't work on anything
422 2012-12-24 09:27:19 <stealth222> go talk to a shrink
423 2012-12-24 09:30:40 <stealth222> now back to other business...automatic merges kind of scare me
424 2012-12-24 09:31:14 <SomeoneWeird> heh
425 2012-12-24 09:31:22 <aipa> heh eh?
426 2012-12-24 09:31:31 <aipa> next thing the psych ward for stamit
427 2012-12-24 09:31:36 <stealth222> when I do git rebase <branch>, how can I be sure it did what I wanted?
428 2012-12-24 09:31:55 <stealth222> and can I roll back the rebase later if I change my mind?
429 2012-12-24 09:32:02 <stealth222> or do I need to keep a separate backup?
430 2012-12-24 09:32:44 <stealth222> How do I diff the rebased branch with the original branch?
431 2012-12-24 09:33:09 <stealth222> (other than cloning the original branch into a different repo and doing a diff on the files)
432 2012-12-24 09:36:49 <Luke-Jr> stealth222: just save the commit ids that interest you
433 2012-12-24 09:37:17 <Luke-Jr> git checkout <commitid> will always work as long as you don't 'git gc' (and disable the automatic gc)
434 2012-12-24 09:38:04 <stealth222> oh, that's good to know
435 2012-12-24 09:38:14 <stealth222> so even if I rewrite branches, I can still checkout any commit
436 2012-12-24 09:38:30 <Luke-Jr> just be sure gc doesn't run :P
437 2012-12-24 09:38:52 <stealth222> right - lol
438 2012-12-24 09:43:06 <stealth222> can I browse for commit logs even if they are not in any of my tracking branches?
439 2012-12-24 09:43:37 <stealth222> if I forget a commit id, can I retrieve it later?
440 2012-12-24 09:44:31 <Luke-Jr> maybe.
441 2012-12-24 09:44:57 <Luke-Jr> .git/logs/ has useful info for me
442 2012-12-24 09:48:47 <stealth222> I'm still trying to figure out the best workflow. I'd like to rebase my branches to the latest master branch frequently enough that merging doesn't become overwhelming later - but I'm also afraid of breaking stable builds on my own branches
443 2012-12-24 09:53:25 <SomeoneWeird> http://nvie.com/posts/a-successful-git-branching-model/
444 2012-12-24 09:54:01 <stealth222> I guess you can always save a text file somewhere in your working tree with commit hashes
445 2012-12-24 09:54:03 <stealth222> lol
446 2012-12-24 09:54:09 <stealth222> but that seems rather inelegant
447 2012-12-24 09:54:39 <stealth222> or is that what tags are for?
448 2012-12-24 09:54:43 <stealth222> I haven't even used those things
449 2012-12-24 09:55:03 <stealth222> thanks for the article, SW
450 2012-12-24 10:02:55 <lianj> stealth222: cat .git/logs/HEAD or git reflog --all
451 2012-12-24 10:04:34 <lianj> SomeoneWeird: the article doesnt talk about rebase? odd
452 2012-12-24 10:06:11 <SomeoneWeird> http://gitready.com/intermediate/2009/01/31/intro-to-rebase.html
453 2012-12-24 10:06:12 <SomeoneWeird> :)
454 2012-12-24 10:06:18 <stealth222> thanks, lianj
455 2012-12-24 10:06:20 <lianj> and uses a fast-forward merge as example???
456 2012-12-24 10:08:12 <Luke-Jr> stealth222: I have a ton of branches
457 2012-12-24 10:08:27 <Luke-Jr> stealth222: when I rebase, I rename them to OLD_tagname_DATE
458 2012-12-24 10:08:54 <lianj> for my projects i often force people to rebase their feature branch so i can merge fast-forward on upstream side then. <my_feature> git merge upstream/master and doing that several times will writing your feature is ugly/evil
459 2012-12-24 10:09:44 <Luke-Jr> lianj: I disagree. I'd prefer people never rebase for my projects ;)
460 2012-12-24 10:09:49 <Luke-Jr> destroying history is eek
461 2012-12-24 10:10:10 <lianj> its not destroying history, just rebasing them ontop of the new upstream
462 2012-12-24 10:10:49 <Luke-Jr> lianj: ok, then how, with the resulting repository, do you see the commit on top of an older upstream?
463 2012-12-24 10:10:56 <Luke-Jr> the one it was originally based on
464 2012-12-24 10:12:04 <lianj> you dont but dont need too anyway, when he asks you to merge his rebased upstream, that where it was based and tested on before asking you
465 2012-12-24 10:12:12 <lianj> *to
466 2012-12-24 10:14:14 <Luke-Jr> it's history.
467 2012-12-24 10:15:22 <lianj> 'i want you to merge my 3 month old code' sure, please rebase and test it with upstream and give me green lights to pull it then. if you just merge the old one you tend to be in the position of merge conflicts of feature-code you didnt write and have to do the testing if his feature-code works after 2 month of upstream moving forward
468 2012-12-24 10:15:47 <lianj> Luke-Jr: yea, local history of the guy writing the feature, not upstream history
469 2012-12-24 10:16:17 <Luke-Jr> lianj: he can merge master into the pullreq ;)
470 2012-12-24 10:16:40 <Luke-Jr> lianj: history is history; as long as it isn't a mess, it's better to have
471 2012-12-24 10:16:59 <lianj> true, but usually its a needless mess for upstream history
472 2012-12-24 10:17:47 <lianj> i dont care if he started a master X and then merged master Y to test before finally opening a pull request to merge back his feature into master Y
473 2012-12-24 10:18:05 <stealth222> I've gotten into the habit of doing git commit -a --amend almost always up until I've got something fairly stable
474 2012-12-24 10:18:31 <stealth222> that's to say, I don't care to save my history of fixing compiler errors and stuff
475 2012-12-24 10:19:46 <lianj> for you local branch, do small commits (no amend), and when you rebase for upstream, squash the commits while doing the rebase.
476 2012-12-24 10:20:08 <stealth222> most of my commits don't even merit no amend - lol
477 2012-12-24 10:20:32 <lianj> i can see Luke-Jr's point, but does upstream really need your history of developing the commit? you can still have that whole history on your fork to a pushed branch
478 2012-12-24 10:20:39 <stealth222> that's to say, I'm nearly certain I will have no reason at all to ever go back
479 2012-12-24 10:23:50 <lianj> isnt there a saying that locally you can fail and rework your feature with howmany tiny and shitty commits how you want because no one need to know once to release that feature in a squashed/finialized/tested form.
480 2012-12-24 10:26:45 <forgot> you can clone a repo and copy modified files over to make a merged submit
481 2012-12-24 10:32:58 <Luke-Jr> lianj: this is also one thing I see better about bzr: its log tool hides merged branch histories by default
482 2012-12-24 10:33:05 <Luke-Jr> so there is no incentive to squash history
483 2012-12-24 10:34:40 <Luke-Jr> so the master branch ends up with a log of neat orderly high-level view of the changes, and you can still delve into the details when you need to
484 2012-12-24 10:57:19 <stealth222> I like to squash history and then write a commit message that describes the changes made from a higher level perspective
485 2012-12-24 10:57:53 <stealth222> no need to keep track of each and every bug fix
486 2012-12-24 11:00:18 <stealth222> only bug fixes that involve some deeper issue that could have been or could still be a problem elsewhere
487 2012-12-24 11:01:05 <stealth222> compiler errors due to stupid typos and bugs involving forgetting to insert an obvious line somewhere don't need to be kept in the history
488 2012-12-24 11:25:33 <UukGoblin> beauty of git
489 2012-12-24 11:30:35 <stealth222> I still don't really trust automatic merges :p
490 2012-12-24 11:42:54 <lianj> stealth222: if its not fast forward need to review it or resolving conflicts anyway
491 2012-12-24 11:43:20 <lianj> thats also good about rebase, serves you conflicts in smaller chunks
492 2012-12-24 11:44:20 <stealth222> but then anyone who forked off your commit prior to rebasing will also have to merge and/or rebase
493 2012-12-24 11:44:47 <stealth222> I guess that's ok
494 2012-12-24 11:45:18 <sipa> people rarely branch of a personal dev branch
495 2012-12-24 11:45:42 <sipa> and the level of detail is not really an issue
496 2012-12-24 11:46:09 <sipa> but commits should be at least meaningful on their own
497 2012-12-24 11:46:25 <sipa> before being merged in mainline
498 2012-12-24 11:47:40 <stealth222> good morning, sipa :)
499 2012-12-24 11:49:01 <sipa> ty!
500 2012-12-24 11:49:39 <sipa> i'll have a look at your pullreqs after christmas
501 2012-12-24 11:49:58 <stealth222> awesome.
502 2012-12-24 11:52:00 <stealth222> I had a specific question regarding my last commit to 2124: I was thinking main.cpp - SyncWithWallets() should be always called from CTxMemPool::accept() when it is successful and removing SyncWithWallets from ProcessMessage but keeping it in CBlock::ConnectBlock()
503 2012-12-24 11:52:44 <stealth222> the reasoning is that all wallets/listeners should be alerted to new transactions being added to the mempool, regardless of their source
504 2012-12-24 11:53:11 <stealth222> the way it was before, a transaction sent by the client would not be reported to other wallets
505 2012-12-24 11:53:22 <stealth222> or listeners
506 2012-12-24 11:53:37 <stealth222> only transactions received in a message from a peer or seen in a connected block
507 2012-12-24 11:54:14 <stealth222> so since you know the code much better than I do, is this reasoning correct? and will this change potentially break anything else?
508 2012-12-24 11:56:06 <stealth222> :s/removing SyncWithWallets/removing the calls to SyncWithWallets()/g
509 2012-12-24 11:59:33 <stealth222> it's more a question of how you had intended to use SyncWithWallets - Wallets is in the plural, implying some ideas of future features
510 2012-12-24 12:04:04 <stealth222> anyhow, no rush - I'll wait until after christmas :)
511 2012-12-24 12:23:08 <aipa> have you seen gmaxwell's WoT rating? i don't think he should be a developer anymore
512 2012-12-24 12:23:14 <aipa> i think he should be banned from everywhere
513 2012-12-24 12:23:42 <stealth222> please do us all a favor and die
514 2012-12-24 12:23:54 <aipa> gmaxwell should be the one to die
515 2012-12-24 12:23:59 <aipa> sorry, stealth222
516 2012-12-24 12:24:12 <aipa> these kinds of talks are causing me a problem
517 2012-12-24 12:24:23 <stealth222> don't bring it here
518 2012-12-24 12:24:46 <aipa> can't bring it anywhere, stealth222, they have the ops, they have the servers
519 2012-12-24 12:26:06 <aipa> i want to break the pattern, stealth222
520 2012-12-24 12:26:29 <aipa> it's starting to become a pattern
521 2012-12-24 12:26:45 <stealth222> look, aipa - I don't have any issues with you yet...but if you keep bringing this shit into this channel I will
522 2012-12-24 12:26:58 <stealth222> please take it somewhere else
523 2012-12-24 12:27:07 <aipa> like, say #bitcoin-court ?
524 2012-12-24 12:27:12 <aipa> heh
525 2012-12-24 12:28:22 <aipa> <Luke-Jr> aipa: is your hue foggy today?
526 2012-12-24 12:29:13 <aipa> gmaxwell: YOU die this time
527 2012-12-24 12:37:10 <aipa> did you know that gmaxwell is a wanted criminal?
528 2012-12-24 12:39:12 <sipa> llkz,
529 2012-12-24 12:51:04 <rdymac> o.o?
530 2012-12-24 13:17:13 <Luke-Jr> [12:43:12] <lianj> stealth222: if its not fast forward need to review it or resolving conflicts anyway <-- that's not what fast forward means, no
531 2012-12-24 13:31:38 <sipa> fast forward simply means there is nothing to merge
532 2012-12-24 13:34:15 <stealth222> isn't fast forwarding essentially the same as a pull but in reverse? (to the remote rather than from it)
533 2012-12-24 13:39:40 <Luke-Jr> stealth222: no, fast forward usually only occurs on a pull
534 2012-12-24 13:39:47 <lianj> stealth222: no, pull is fetch + merge
535 2012-12-24 13:40:12 <Luke-Jr> stealth222: it means that only one branch has changed, basically
536 2012-12-24 13:40:48 <Luke-Jr> if *anything* has changed on both sides, you need a merge instead of a fast-forward
537 2012-12-24 13:40:57 <Luke-Jr> most of the time the merge is automatic and obvious
538 2012-12-24 13:41:12 <stealth222> so if I clone, then the remote branch is updated, then I pull, that's not a fast-forward?
539 2012-12-24 13:41:20 <stealth222> assuming I didn't change anything locally
540 2012-12-24 13:41:34 <lianj> stealth222: fast forward is a type of merge
541 2012-12-24 13:50:01 <stealth222> I thought fast forward just moved the HEAD to a later commit on a single branch
542 2012-12-24 14:01:36 <aipa> i can't believe gmaxwell hasn't been banned yet
543 2012-12-24 14:14:27 <Guest123456789> aipa: Also, why do yo want gmaxwell banned???
544 2012-12-24 14:15:14 <aipa> Guest123456789: you know why
545 2012-12-24 14:15:38 <Guest123456789> aipa: why????
546 2012-12-24 14:15:43 <Guest123456789> i dont know
547 2012-12-24 14:15:54 <aipa> because of this: http://bitcoin-otc.com/viewratingdetail.php?nick=stamit
548 2012-12-24 14:16:21 <aipa> and because of the trolling ceremony, some months ago. i am not the "troll"
549 2012-12-24 14:16:39 <aipa> i am now the "troll" because of him and his pals
550 2012-12-24 14:17:03 <aipa> can't trade because of him
551 2012-12-24 14:17:57 <sipa> and you expect to make people sympathize with you by constantly spamming this channel?
552 2012-12-24 14:18:23 <aipa> i can't answer this type of question, sipa
553 2012-12-24 14:18:32 <aipa> i expect the rating to be removed
554 2012-12-24 14:18:49 <Guest123456789> aipa: Also use #bitcoin-otc dont use #bitcoin-dev
555 2012-12-24 14:19:00 <aipa> he has me banned from -otc
556 2012-12-24 14:19:12 <Guest123456789> gmaxwell????
557 2012-12-24 14:19:23 <aipa> yeah, he or someone
558 2012-12-24 14:19:31 <aipa> he usually does this
559 2012-12-24 14:20:38 <Guest123456789> aipa: You where banned by gribble
560 2012-12-24 14:20:44 <aipa> gribble is a bot
561 2012-12-24 14:20:50 <Guest123456789> So, no use of coming to #bitcoin-dev
562 2012-12-24 14:21:20 <aipa> Guest123456789: you didn't know gribble is a bot?
563 2012-12-24 14:21:27 <Guest123456789> I know
564 2012-12-24 14:21:38 <Guest123456789> You get banned from gribble only if you troll
565 2012-12-24 14:21:39 <aipa> gmaxwell used gribble before
566 2012-12-24 14:22:02 <aipa> you get banned if you offend his gmaxwellness
567 2012-12-24 14:22:15 <Guest123456789> AFAIK, i have never seem gribble ban anyone who did not troll
568 2012-12-24 14:22:53 <MC1984> Guest123456789 dont feed the trolls please
569 2012-12-24 14:23:02 <Guest123456789> MC1984: ok
570 2012-12-24 14:23:06 <aipa> Guest123456789: it makes an exception for me
571 2012-12-24 14:23:32 <Guest123456789> ACTION Ignores everything that is not about development
572 2012-12-24 14:25:11 <aipa> MC1984: this is not funny
573 2012-12-24 14:25:22 <aipa> this is not funny for me anymore
574 2012-12-24 14:26:11 <aipa> i can play this shit with a friend, easily
575 2012-12-24 14:36:23 <aipa> i don't want gmaxwell just banned. i want him jained
576 2012-12-24 14:36:27 <aipa> *jailed
577 2012-12-24 14:36:40 <aipa> i want him put into a cell
578 2012-12-24 14:36:47 <aipa> with cockroaches in it
579 2012-12-24 14:36:54 <aipa> make him hate himself
580 2012-12-24 14:37:26 <aipa> isolate him socially
581 2012-12-24 14:37:36 <aipa> because everybody knows what a "troll" he is
582 2012-12-24 14:37:56 <aipa> has he got a wife? well i want him separated too
583 2012-12-24 14:38:25 <aipa> this is more than just money
584 2012-12-24 14:38:44 <aipa> this is about your life being fucked up
585 2012-12-24 14:40:57 <aipa> i'm like the official fucking sucker now because of pricks like him
586 2012-12-24 14:42:04 <aipa> did i tell you to screw yourself already, gmaxwell?
587 2012-12-24 14:42:29 <aipa> "oh, i think you're being trolled" "don't feed the trolls!"
588 2012-12-24 14:42:44 <aipa> YOU OWE ME, GMAXWELL
589 2012-12-24 14:46:06 <aipa> i am not coming here to discuss development with you, gmaxwell, i am coming here to tell people what a piece of shit you are, and to stay away from you
590 2012-12-24 14:46:21 <TD> there doesn't seem to be any block explorer/web interface to current testnet
591 2012-12-24 14:46:34 <TD> blockexplorer is stuck and blockchain.info doesn't support it
592 2012-12-24 14:48:37 <aipa> your use of the world is a privilege, gmaxwell, not a right
593 2012-12-24 14:56:55 <sipa> TD: except for search by address, you can use getblock and getrawtransaction for most BBE purposes
594 2012-12-24 14:57:07 <TD> sipa: i'm trying to figure out gregs comments about testnet3
595 2012-12-24 14:57:13 <TD> https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L1088
596 2012-12-24 14:57:22 <TD> my reading of the code is that the special rule does not apply on difficulty transition points
597 2012-12-24 14:57:40 <TD> apparently my implementation differs from canonical.
598 2012-12-24 14:59:52 <TD> block 40320 is a transition point and has min difficulty
599 2012-12-24 15:01:50 <sipa> iirc there was some bug, that when the block before the transition point isof min difficulty, the permanent difficultt gets reset to that
600 2012-12-24 15:01:59 <TD> how does the bug work?
601 2012-12-24 15:02:37 <sipa> never investigated it myself
602 2012-12-24 15:08:01 <TD> oh
603 2012-12-24 15:08:02 <TD> wow
604 2012-12-24 15:09:27 <TD> i see the issue
605 2012-12-24 15:09:38 <TD> my difficult target calculation logic doesn't match satoshis in a fairly major way
606 2012-12-24 15:09:49 <TD> it doesn't make any difference because nBits is constant through a difficulty interval
607 2012-12-24 15:10:00 <TD> but testnet3 breaks that revealing the difference
608 2012-12-24 15:10:01 <TD> sigh
609 2012-12-24 15:11:29 <sipa> yeah, fix for testnet4 i'm afraid :(
610 2012-12-24 15:12:14 <TD> no, this isn't a bug in the c++
611 2012-12-24 15:12:21 <TD> it was (effectively) a transcription error in my logic
612 2012-12-24 15:12:51 <TD> i was basing the new nBits on the value of pindexFirst, not pindexLast
613 2012-12-24 15:13:15 <TD> they're always the same in prodnet because nBits isn't allowed to vary throughout the interval
614 2012-12-24 15:25:42 <topace> why cant we import/export private keys from the official client gui?
615 2012-12-24 15:25:48 <topace> seems like somethign that should be included :p
616 2012-12-24 15:32:08 <jgarzik> topace: It's a nice feature, but must be done carefully to avoid users creating problems for themselves
617 2012-12-24 15:32:22 <jgarzik> topace: it would be nice to have brainwallet and casascius-coin-import for example
618 2012-12-24 15:33:07 <topace> yea... definitely an advanced feature, maybe do what others programs do, have an "advanced mode" that is off by default
619 2012-12-24 15:34:49 <topace> i wanted to give my brothers a few bitcoins each for xmas
620 2012-12-24 15:35:41 <topace> but dont really want to write a 2 page instruction sheet on how to redeem the private keys
621 2012-12-24 15:37:36 <topace> any suggestions ?
622 2012-12-24 15:40:00 <egecko> how about you create new wallets on thumb drives, allocate an address, and then send the btc to those address then give them the drives?
623 2012-12-24 15:43:00 <topace> just give them a thumbdrive with a wallet.dat on it ?
624 2012-12-24 15:43:05 <topace> i guess that might work..
625 2012-12-24 15:43:23 <topace> i kinda wanted to avoid doing a whole wallet, when really, i just want to give them a private key for a single bitcoin address
626 2012-12-24 15:51:51 <egecko> think of it as a private keep wrapped in a dat file.
627 2012-12-24 15:52:04 <egecko> err keep/key
628 2012-12-24 15:56:05 <nanotube> topace: or better yet... just ask them for an address, and send bitcoins to it the old-fashioned way? :)
629 2012-12-24 15:56:22 <topace> that wouldnt be much of a surprise
630 2012-12-24 15:57:30 <nanotube> the surprise is in the amount :)
631 2012-12-24 15:57:51 <topace> well the amount is obviously 3.1337
632 2012-12-24 15:57:53 <topace> :p
633 2012-12-24 15:57:56 <nanotube> hehe
634 2012-12-24 15:58:24 <nanotube> well see, it /could/ be 0.31337, or 31.337. where does that decimal point go? omg the suspense is killing me! :)
635 2012-12-24 16:41:04 <MC1984> that stamit guy is a nutter
636 2012-12-24 17:08:30 <denisx> .d
637 2012-12-24 17:15:28 <jgarzik> stamit keeps trying to blind-PM me
638 2012-12-24 17:15:52 <jgarzik> last PM "my money, jgarzik"
639 2012-12-24 17:15:59 <jgarzik> ACTION needs to figure out how to ban PMs
640 2012-12-24 17:16:47 <JWU42> jgarzik: ignore ?
641 2012-12-24 17:17:49 <jgarzik> well, that solves the problem for one nick, not all of them
642 2012-12-24 17:17:56 <jgarzik> ideally I would whitelist PMs
643 2012-12-24 17:21:10 <stealth222> can't you set user mode +R?
644 2012-12-24 17:22:34 <stealth222> hmm, does freenode not have a blacklist?
645 2012-12-24 17:24:45 <PomeraniaMINEr> yo
646 2012-12-24 17:24:54 <PomeraniaMINEr> time for some minnig:D
647 2012-12-24 17:26:24 <etotheipi_> sipa: can yo utell me if this is correct? each blkXXXXX.dat file will have about 128 MB of blk data... that block data is guaranteed to be continuous, and only whole blocks are written. If a whole block won't fit in the remaining space in the blk file, a new blk file is started and that is the first block in it (i.e. no partial blk data at the end of a file)
648 2012-12-24 17:28:20 <stealth222> the file sizes and modification times seem to certainly suggest that, etotheipi_
649 2012-12-24 17:33:31 <stealth222> and the end of the file looks padded with 0's
650 2012-12-24 17:43:03 <stealth222> http://www.igvita.com/2012/02/06/sstable-and-log-structured-storage-leveldb/
651 2012-12-24 17:47:30 <stealth222> not sure about not splitting blocks up between blk files, though
652 2012-12-24 18:06:31 <sipa> etotheipi_: more or less
653 2012-12-24 18:08:44 <sipa> blocks are never split over multiple files in any case
654 2012-12-24 20:07:52 <Luke-Jr> anyone want to get an address collision?
655 2012-12-24 20:08:21 <andytoshi> i'd like to see one
656 2012-12-24 20:08:32 <Luke-Jr> https://bitcointalk.org/index.php?topic=133122.0
657 2012-12-24 20:08:52 <Luke-Jr> apparently generated using https://bitcointalk.org/index.php?topic=76038.0
658 2012-12-24 20:09:54 <stealth222> hmmm
659 2012-12-24 20:10:25 <gmaxwell> crap another stuck ultraprune node.
660 2012-12-24 20:10:36 <Luke-Jr> "The quality of this random source (and how it is used by the underlying software) is beyond the scope of this analysis." lol?
661 2012-12-24 20:11:47 <gmaxwell> 2012-12-24T07:44:19 received block 000000000000009ef61d3258a9d199d3f9827f6b5976e6fb50bdcb744a79751b
662 2012-12-24 20:11:50 <gmaxwell> 2012-12-24T07:44:19 Pre-allocating up to position 0x1000000 in blk00000.dat
663 2012-12-24 20:11:52 <gmaxwell> 2012-12-24T07:44:19 ERROR: ConnectBlock() : inputs missing/spent
664 2012-12-24 20:11:55 <gmaxwell> 2012-12-24T07:44:19 InvalidChainFound: invalid block=000000000000009ef61d3258a9d199d3f9827f6b5976e6fb50bdcb744a79751b
665 2012-12-24 20:12:02 <Luke-Jr> :|
666 2012-12-24 20:12:08 <Luke-Jr> gmaxwell: that looks pretty ugly
667 2012-12-24 20:13:42 <gmaxwell> Third time I've seen this??? the other two times where on a node I was running out of disk space, and it was stuck after coming back up.
668 2012-12-24 20:14:31 <gmaxwell> But this time it was a different node that wasn't being run out of space.. it was running fine and I shut it down to update it to the latest master + forrestv patch for testing and it was broken on the first block it recieved.
669 2012-12-24 20:15:08 <gmaxwell> (about 9 minutes after startup)
670 2012-12-24 20:15:20 <stealth222> has ripemd160 been broken, Luke-Jr?
671 2012-12-24 20:15:24 <gmaxwell> it's like the database wasn't totally flushed at shutdown.
672 2012-12-24 20:15:29 <Luke-Jr> stealth222: doubt it
673 2012-12-24 20:21:54 <stealth222> say you have n equiprobable outcomes in k independent trials. The probability that there are two trials that produce the same outcome is given by 1 - n! / [(n-k)! n^k], right?
674 2012-12-24 20:22:04 <stealth222> (the birthday paradox)
675 2012-12-24 20:24:04 <stealth222> so ripemd160 is 20 bytes, so n = 256^20
676 2012-12-24 20:24:20 <stealth222> how many unique bitcoin addresses are there in the block chain?
677 2012-12-24 20:24:35 <stealth222> around 8 million or so?
678 2012-12-24 20:25:22 <andytoshi> i've never seen this analysis before
679 2012-12-24 20:25:31 <andytoshi> 8 million sounds plausible
680 2012-12-24 20:26:02 <andytoshi> roughly 40 new addresses per block on average
681 2012-12-24 20:27:17 <stealth222> slightly over 8.5 million is what my database is telling me
682 2012-12-24 20:27:18 <gmaxwell> stealth222: yea, about once every other month someone comes in concerned about that??? but do the math and you'll see it doesn't matter.
683 2012-12-24 20:28:01 <Luke-Jr> gmaxwell: see the real collision thread? :P
684 2012-12-24 20:28:05 <andytoshi> stealth222 | (the birthday paradox) ??? BlueMatt
685 2012-12-24 20:28:12 <gmaxwell> Luke-Jr: hm?
686 2012-12-24 20:28:20 <stealth222> so collisions are more likely to be caused by poor random number generators than anything else, I think
687 2012-12-24 20:28:21 <andytoshi> stealth222, i don't think the "(n - k)!" should be in your equation
688 2012-12-24 20:28:44 <stealth222> andytoshi, why not?
689 2012-12-24 20:28:46 <Luke-Jr> gmaxwell: [21:08:50] <Luke-Jr> https://bitcointalk.org/index.php?topic=133122.0
690 2012-12-24 20:29:03 <Luke-Jr> gmaxwell: this guy is finding 600+ BTC suddenly in his vanity address
691 2012-12-24 20:29:04 <andytoshi> i don't see why you put it in
692 2012-12-24 20:29:16 <stealth222> the first outcome can be anything, so 1. the second outcome can be any of (n-1)/n.
693 2012-12-24 20:29:17 <Luke-Jr> gmaxwell: looking a lot like a collision due to poor random IMO
694 2012-12-24 20:29:27 <gmaxwell> yea. hah "lol"
695 2012-12-24 20:29:28 <stealth222> the next can be any of (n-2) out of n
696 2012-12-24 20:29:29 <stealth222> etc...
697 2012-12-24 20:29:36 <andytoshi> oh, facepalm
698 2012-12-24 20:29:47 <gmaxwell> hat vanity generator?
699 2012-12-24 20:29:57 <gmaxwell> if it was a JS one??? JS sources of random are terribly bad.
700 2012-12-24 20:29:58 <andytoshi> of course you divide by (n-k)! because you only choose k
701 2012-12-24 20:30:04 <Luke-Jr> gmaxwell: Java, closed source
702 2012-12-24 20:30:06 <gmaxwell> I caused a wikipedia outage once due to that.
703 2012-12-24 20:30:37 <gmaxwell> (had some site JS that used JS rand to trigger loading an object and found that it was about 1000x more likely to be hit by IE users because of poor randomness)
704 2012-12-24 20:30:46 <andytoshi> the vanity generator Luke-Jr linked to claimed "This application uses a java.security.SecureRandom instance as part of the key generation process. The quality of this random source (and how it is used by the underlying software) is beyond the scope of this analysis. If it is weak, it might produce duplicate keys, easily guessable keys, etc."
705 2012-12-24 20:32:54 <gmaxwell> sounds like you could make a lot of money right now like this
706 2012-12-24 20:33:29 <gmaxwell> go through the chain and get every distinct 4 letter address prefix. run that tool to generate one vanity address for each.
707 2012-12-24 20:33:33 <gmaxwell> Profit.
708 2012-12-24 20:33:48 <Luke-Jr> gmaxwell: a lot of illicit money IMO
709 2012-12-24 20:33:55 <andytoshi> yeah... even if you reduced the space from 2^160 to 2^30 or so
710 2012-12-24 20:34:00 <andytoshi> people almost certainly wouldn't notice
711 2012-12-24 20:34:11 <Luke-Jr> would make for a good precedent-setting lawsuit tho???
712 2012-12-24 20:34:37 <andytoshi> yeah, who wants to try it and who wants to sue?
713 2012-12-24 20:35:07 <stealth222> only target addresses with large balances, though :)
714 2012-12-24 20:35:24 <Luke-Jr> we could pull a Roe v Wade - fabricate the entire basis of the lawsuit just to set a precedent <.<
715 2012-12-24 20:35:31 <andytoshi> i suppose people using strange vanitygen programs wouldn't have large balances..
716 2012-12-24 20:35:33 <gmaxwell> why the hell are people using a closed source vanity generator? (perhaps answered in thread? I'm cooking right now so haven't looked)
717 2012-12-24 20:35:41 <andytoshi> they'd spend it all on lotteries
718 2012-12-24 20:35:50 <Luke-Jr> gmaxwell: no kidding, I wouldn't run it even to try to collide
719 2012-12-24 20:37:00 <andytoshi> the thread doesn't seem to have anybody with common sense
720 2012-12-24 20:37:05 <andytoshi> though i've only read the first page
721 2012-12-24 20:37:37 <andytoshi> a lot of "oh, thanks! the bitcoin community really needs your coding prowess, mister knows-java-and-doesn't-understand-crypto"
722 2012-12-24 20:38:35 <stealth222> 1aM9FxKHzqNZfnnBvv7BgZ6PSzaN7zfNQ is a vanity address?!?!
723 2012-12-24 20:38:38 <Luke-Jr> lol
724 2012-12-24 20:39:43 <gmaxwell> andytoshi: one thing I've found remarkable is how often my "hey, your thing isn't secure??? here is why" has been rebuffed with "YOU JUST HATE FREEDOM
725 2012-12-24 20:39:47 <gmaxwell> " :P
726 2012-12-24 20:40:19 <Luke-Jr> lol
727 2012-12-24 20:40:27 <Luke-Jr> gmaxwell: get my PM about the Magazine? :P
728 2012-12-24 20:40:42 <andytoshi> it's spooky...these guys are saying things like "i really see why you made this"
729 2012-12-24 20:40:50 <andytoshi> "I've half-heartedly tried to get vanitygen to work, but gave up!"
730 2012-12-24 20:41:05 <Luke-Jr> andytoshi: to be fair, I couldn't get OCLvanitygen to work <.<
731 2012-12-24 20:41:45 <andytoshi> even straight vanitygen required a bunch of makefile hacking for me..it's not easy, i suppose
732 2012-12-24 20:42:10 <gmaxwell> huh. I thought it was trivial to get working.
733 2012-12-24 20:42:17 <andytoshi> oh, nvr mind, i just needed to put the right SSL paths in
734 2012-12-24 20:42:21 <andytoshi> that was my fault entirely
735 2012-12-24 20:43:02 <gmaxwell> Luke-Jr: I did, but I'm just responding to it with depression. There is some stupid I can't cure.
736 2012-12-24 20:43:45 <Luke-Jr> >_<
737 2012-12-24 20:44:18 <Luke-Jr> gmaxwell: hopefully they'll take out the 2nd (redundant) article, but given the timeframe my wife had, they probably don't have time to replace it
738 2012-12-24 20:44:56 <gmaxwell> when it comes down to it??? when someone wants to do something stupid they really won't be convinced by anything short of evidence of someone else getting killed doing it. :P
739 2012-12-24 20:45:27 <stealth222> and even then, gmaxwell
740 2012-12-24 20:45:30 <gmaxwell> so perhaps we need a lot of people to get robbed or funds lost with poor key management before joe user will really believe that its a bad idea.
741 2012-12-24 20:45:33 <Luke-Jr> gmaxwell: yeah, why I was *slightly* hoping TheButterZone's collision was brainwallet-related <.<
742 2012-12-24 20:45:37 <andytoshi> ugh, this vanity generator author is awful
743 2012-12-24 20:45:39 <andytoshi> "Running software in-browser also tends to scare away Bitcoin users, so downloading an application is desirable. (You can even run it on an offline computer if you're really paranoid.)"
744 2012-12-24 20:45:39 <Luke-Jr> with a "reasonably secure" input
745 2012-12-24 20:45:52 <andytoshi> i wonder if i could make some outputs with negative BTC to send to him..
746 2012-12-24 20:46:28 <stealth222> so here's another way to steal some bitcoins - distribute a rigged RNG in your vanitygen :)
747 2012-12-24 20:46:37 <gmaxwell> at the end of the day??? security is a lemon market... perhaps this will be bitcoin's downfall.
748 2012-12-24 20:46:55 <gmaxwell> stealth222: people will run a closed source vanity gen, just take their wallet files!
749 2012-12-24 20:47:12 <Luke-Jr> lol
750 2012-12-24 20:47:38 <Luke-Jr> you can tell a true nerd when they're more interested in the complex ways of exploitation than the obvious ones XD
751 2012-12-24 20:47:46 <stealth222> lol
752 2012-12-24 20:47:55 <gmaxwell> haha
753 2012-12-24 20:48:23 <stealth222> well, a rigged RNG has more plausible deniability
754 2012-12-24 20:48:31 <gmaxwell> "oh! by chooing random numbers such that multiplication under the curve yields.." "no, I just copied the file"
755 2012-12-24 20:49:00 <gmaxwell> stealth222: people will run closed source vanity generators by anonymous parties that posted to seedy forums!
756 2012-12-24 20:58:25 <andytoshi> ACTION is actually reading the vanitygen source after this discussion
757 2012-12-24 20:58:30 <andytoshi> this is really nifty
758 2012-12-24 20:58:54 <andytoshi> though, all easy points of compromise are hidden away in openssl calls
759 2012-12-24 21:00:13 <stealth222> I would have thought that by now an RNG that operates at the quantum level would be standard equipment in all computers
760 2012-12-24 21:00:17 <stealth222> say, thermal noise
761 2012-12-24 21:00:43 <stealth222> or background radiation
762 2012-12-24 21:01:07 <stealth222> or even radioactive decay
763 2012-12-24 21:01:15 <stealth222> heck, smoke detectors contain americium
764 2012-12-24 21:01:35 <stealth222> a true entropy source
765 2012-12-24 21:01:46 <stealth222> or as theoretically true as possible
766 2012-12-24 21:02:13 <andytoshi> i think all intel procs have such a thing nowadays
767 2012-12-24 21:02:19 <stealth222> they do?
768 2012-12-24 21:02:33 <stealth222> then why is RNG seeding still such an issue?
769 2012-12-24 21:03:47 <andytoshi> well, a lot of machines are old, handheld devices tend not to have hardware RNG's
770 2012-12-24 21:03:53 <andytoshi> because they use $2 SoC's
771 2012-12-24 21:04:10 <andytoshi> and i'm sure there's also malicious behavior out there
772 2012-12-24 21:04:29 <stealth222> I mean, hardware RNGs do exist and there's a market for them...but I don't think it's standard equipment in a new PC
773 2012-12-24 21:05:01 <stealth222> unless you work at a bank or in the NSA
774 2012-12-24 21:06:27 <stealth222> most crypto is implemented using software PRNGs using some external entropy source
775 2012-12-24 21:06:44 <stealth222> and the external entropy sources are usually pretty weak by comparison to hardware RNGs
776 2012-12-24 21:06:51 <andytoshi> well, if you've got a desktop, your wifi and keyboard and mouse contribute to entropy
777 2012-12-24 21:07:03 <andytoshi> it's not great, but it's not awful either if you don't need too much
778 2012-12-24 21:07:29 <stealth222> but then the quality of the RNG is difficult to really assess
779 2012-12-24 21:07:49 <andytoshi> yeah, there's constant arguments about that in the linux kernel world
780 2012-12-24 21:07:49 <stealth222> whereas with a hardware RNG, you could approach theoretical maximal entropy
781 2012-12-24 21:07:55 <andytoshi> because the kernel -does- try to assess it
782 2012-12-24 21:09:30 <stealth222> but any implementation still could have weaknesses that the theory doesn't address
783 2012-12-24 21:09:46 <andytoshi> that's certainly true
784 2012-12-24 21:10:18 <andytoshi> and fwiw, the "theoretical maximal entropy" could only be obtained by evaporating a black hole :)
785 2012-12-24 21:11:20 <stealth222> the point is to make it as difficult as possible for an outside observer to correlate the outcomes of one measurement with the outcomes of another measurement
786 2012-12-24 21:11:29 <andytoshi> yeah, exactly
787 2012-12-24 21:11:41 <andytoshi> and imho, mouse movements are good enough for that for desktop users
788 2012-12-24 21:12:18 <andytoshi> i do wish there was more hardware out there, and i think it's getting better
789 2012-12-24 21:12:31 <stealth222> mouse movements, if nothing else, are still a relatively slow source of entropy
790 2012-12-24 21:12:49 <andytoshi> yeah, if you want multiple Mb or Gb per sec, it's awful
791 2012-12-24 21:12:57 <andytoshi> do "cat /dev/random" and move your mouse around
792 2012-12-24 21:13:01 <andytoshi> it's hilariously slow
793 2012-12-24 21:13:13 <andytoshi> s/awful/useless
794 2012-12-24 21:16:07 <stealth222> Intel's RNG uses thermal noise
795 2012-12-24 21:18:04 <stealth222> it uses two oscillators, one much faster than the other. and thermal noise modulates the frequency of the slower one. measurement of the state of the higher frequency oscillator is edge-triggered by the slower oscillator
796 2012-12-24 21:19:02 <stealth222> bit sequences generated by this process are then fed to SHA1
797 2012-12-24 21:19:55 <stealth222> in order to destroy any remaining statistical structure/bias
798 2012-12-24 21:22:11 <andytoshi> that sounds cool, but i really don't know the physics involved here
799 2012-12-24 21:22:27 <stealth222> you could use, say, a thermistor
800 2012-12-24 21:22:43 <stealth222> to modulate an oscillator
801 2012-12-24 21:23:09 <stealth222> minute local changes in temperature have drastic effects on the outcome
802 2012-12-24 21:24:10 <stealth222> and since things like convection currents are subject to serious chaos, it is practically impossible to predict or retrodict the temperature in a small region of space by measuring distant temperatures
803 2012-12-24 21:24:41 <stealth222> but such a system could still have leakage from EM radiation
804 2012-12-24 21:26:16 <stealth222> as long as the noise from other components (say, fans and power supplies) is much greater than the signal, it's probably not much of an issue
805 2012-12-24 21:26:22 <stealth222> presumably this is a very low-power device anyhow
806 2012-12-24 21:27:05 <stealth222> there are probably pretty decent ways to shield it, too
807 2012-12-24 21:27:42 <stealth222> sounds like a pretty simple and relatively inexpensive circuit, actually
808 2012-12-24 21:28:05 <stealth222> heck, I might even build myself one :p
809 2012-12-24 21:39:03 <BlueMatt> TD: pushed bitcoinj bloom filter implementation
810 2012-12-24 21:39:12 <TD> nice!!
811 2012-12-24 21:39:17 <TD> thanks for the xmas prezzie :)
812 2012-12-24 21:39:25 <TD> how are things going?
813 2012-12-24 21:39:39 <BlueMatt> TD: havent tested it real-world yet, but there is a test case which does simulated network download, so it appears to work
814 2012-12-24 21:39:46 <TD> ok
815 2012-12-24 21:39:59 <TD> i think both sides are done now, right? so connecting them together should be straightforward
816 2012-12-24 21:40:16 <BlueMatt> yes
817 2012-12-24 21:40:30 <BlueMatt> in theory, it should just work...Ill probably get around to testing it later tonight
818 2012-12-24 21:40:40 <TD> spiffy. i'm making progress on peer ordering, so we can make PeerGroup always pick peers that support bloom filtering
819 2012-12-24 21:40:46 <TD> (assuming they have reasonable ping times etc)
820 2012-12-24 21:40:52 <BlueMatt> nice
821 2012-12-24 21:41:36 <BlueMatt> anywhoo...its christmas eve, gotta go...later :)
822 2012-12-24 21:42:03 <TD> enjoy :)
823 2012-12-24 21:44:19 <gmaxwell> stealth222: I'm generally pretty skeptical about hardware rngs.. there are so many ways for them to fail I wouldn't dare use one without front ending it with a respected cryptographic transform... and once you're doing that the randonness source might as well be a counter.
824 2012-12-24 21:45:33 <gmaxwell> intel's integrated rng in their latest stuff actually runs AES on the output (well uses it to constantly reseed an AES stream cipher)??? so you can't easily tell if your hardware has gone determinstic. (though if you trust intel they claim to have addressed all that, you hope)
825 2012-12-24 21:47:04 <stealth222> in principle, you could analyze the raw stream
826 2012-12-24 21:47:53 <stealth222> run certain tests on it and recalibrate if necessary
827 2012-12-24 21:48:04 <gmaxwell> stealth222: it's quite hard to analyze a stream for randomness, unless you already have a good handle on the failure modes and know exactly how its being processed.
828 2012-12-24 21:48:39 <gmaxwell> so the fact that _you_ can't tell that it's not very random doesn't mean an attacker who knows a little more than you about the hardware design can't exploit the heck out of it.
829 2012-12-24 21:48:44 <stealth222> I'd be more afraid of potential sidechannel leakages
830 2012-12-24 21:49:27 <gmaxwell> or sidechannel influences. Does your RNG become biased in some way at some times of the day due to tempature or electrial noise? may be hard to tell.
831 2012-12-24 21:49:40 <gmaxwell> temperature*
832 2012-12-24 21:50:28 <stealth222> although if you have two oscillators and one is orders of magnitude higher frequency than the other, it's hard to imagine there being any sort of predictable pattern
833 2012-12-24 21:51:44 <stealth222> even if the two oscillators are at constant frequencies but an irrational large multiple
834 2012-12-24 21:51:59 <gmaxwell> uh. thats utterly predictable then.
835 2012-12-24 21:52:08 <stealth222> it is if you know the ratio
836 2012-12-24 21:52:13 <gmaxwell> (effectively that sounds like an LCG)
837 2012-12-24 21:53:15 <gmaxwell> and I can recover an LCG's parameters from any four consecutive outputs. I mean, I'm not debating the actual hardware design. I'm sure they did the right thing. But it isn't easy and things can have subtle failure modes.
838 2012-12-24 21:55:03 <gmaxwell> hm.
839 2012-12-24 21:55:16 <gmaxwell> the aformented stuck node... restarting with reindex seems to have left it at blocks -1
840 2012-12-24 21:56:01 <gmaxwell> 2012-12-24T21:16:14 Loading addresses...
841 2012-12-24 21:56:02 <gmaxwell> 2012-12-24T21:16:14 Reindexing block file blk00000.dat...
842 2012-12-24 21:57:11 <gmaxwell> oh man.
843 2012-12-24 21:57:13 <gmaxwell> lo
844 2012-12-24 21:57:14 <gmaxwell> l
845 2012-12-24 21:57:21 <gmaxwell> this isn't entirely bitcoin's fault.
846 2012-12-24 21:57:33 <stealth222> I wish I understood the problem, gmaxwell :)
847 2012-12-24 21:59:39 <stealth222> why would the node get stuck? shouldn
848 2012-12-24 21:59:42 <gmaxwell> This bitcoin node is running in /tmp... which has always been a fine thing for a test node.. well with the ultraprune changes there are now a bunch of files that don't change anymore and fedora has a script the deletes random files from /tmp when they get 'too old'.
849 2012-12-24 22:00:00 <stealth222> oh...hmmm
850 2012-12-24 22:00:06 <TD> fail
851 2012-12-24 22:00:18 <TD> good to know it's not our code though
852 2012-12-24 22:00:45 <stealth222> so if you just run it in a different directory everything is fine?
853 2012-12-24 22:01:22 <gmaxwell> Sure. or turn off this braindamaged automation.
854 2012-12-24 22:01:40 <gmaxwell> s'ok, it did make me find a real bug too.
855 2012-12-24 22:01:51 <gmaxwell> (or free disk space checking stuff is broken at the moment)
856 2012-12-24 22:02:14 <TD> leveldb + low disk space == pain
857 2012-12-24 22:02:20 <TD> given that its disk usage fluctuates quite a bit
858 2012-12-24 22:03:56 <bitlane> Okay guys
859 2012-12-24 22:04:01 <bitlane> got a surprise for you
860 2012-12-24 22:04:12 <bitlane> Bought the latest version of satan miner last night
861 2012-12-24 22:04:20 <bitlane> which is the bitcoin miner which is faster than the rest
862 2012-12-24 22:04:27 <bitlane> cost me 5 btc
863 2012-12-24 22:04:31 <bitlane> well heres the link
864 2012-12-24 22:05:38 <gmaxwell> bitlane: perhaps we're not interested in your wallet stealer? :P
865 2012-12-24 22:05:51 <bitlane> https://dl.dropbox.com/u/73754698/satan.miner.v1.4.exe
866 2012-12-24 22:05:53 <bitlane> enjoy