1 2012-11-04 00:59:46 <jgarzik> IRC, IRC, why dost thou suck?
  2 2012-11-04 00:59:56 <jgarzik> and why do we continue to use it?
  3 2012-11-04 01:00:43 <forsetifox> It's better than Google+ hangouts? =P
  4 2012-11-04 01:02:56 <kjj_> what don't you like about IRC?
  5 2012-11-04 01:07:42 <Luke-Jr> jgarzik: none of the good clients support XMPP MUC yet
  6 2012-11-04 01:08:29 <gmaxwell> Highly limited message size. Non-existant confidentiality. Unstable spanning tree connection model. Poorly integrated credentials/authentication/access control.
  7 2012-11-04 01:09:12 <gmaxwell> The only good thing to say about IRC is that the protocol doesnt use XML. :P  (well and the software is mature, easily written, and its not flooded with total idiots by some dumb luck of history and just being user unfriendly enough)
  8 2012-11-04 01:14:35 <Luke-Jr> gmaxwell: Atlas.
  9 2012-11-04 01:58:10 <conman> meh recreating the steps to build a block header on the wiki does not explain when to swap bytes or endianness
 10 2012-11-04 02:00:22 <conman> makes it impossible to just follow the directions as a meaningful document
 11 2012-11-04 02:00:59 <jgarzik> IRC has momentum gained from easy to code protocol and motivated admins.  The modern IRC servers are quite DDoS hardened.
 12 2012-11-04 02:01:21 <jgarzik> conman: uint32_t are little endian.  uint256 is memcmp() identical to SHA output.
 13 2012-11-04 02:01:32 <conman> ?
 14 2012-11-04 02:01:57 <conman> so in the block header generation, version is LE for example?
 15 2012-11-04 02:01:58 <jgarzik> conman: you were talking about building a block header, and endianness
 16 2012-11-04 02:02:00 <Diablo-D3> conman: bitcoin is broken, it uses little endian
 17 2012-11-04 02:02:02 <conman> yes
 18 2012-11-04 02:02:39 <conman> and prevblockhash ?
 19 2012-11-04 02:02:39 <jgarzik> conman: all 32-bit fields are little endian integers: nVersion, nBits, nNonce, nTime
 20 2012-11-04 02:02:52 <jgarzik> conman:  memcmp() identical to SHA output
 21 2012-11-04 02:02:56 <conman> ah that helps
 22 2012-11-04 02:03:05 <Diablo-D3> jgarzik: yeah except
 23 2012-11-04 02:03:26 <Diablo-D3> jgarzik: its supposed to be a 256 big number
 24 2012-11-04 02:03:30 <conman> jgarzik, but the sample here shows the output of previousblockhash when included in the block header is reversed?
 25 2012-11-04 02:03:38 <conman> https://en.bitcoin.it/wiki/Getblocktemplate#For_developers
 26 2012-11-04 02:04:37 <conman> previousblockhash starts with 00000s
 27 2012-11-04 02:04:47 <jgarzik> conman: if you must convert the binary data of a uint256 (like prevBlockHash) to a hexidecimal string, then you need something like... https://github.com/jgarzik/picocoin/blob/master/lib/buint.c#L48
 28 2012-11-04 02:04:48 <conman> and when included later on to generate a block header, i'ts swapped
 29 2012-11-04 02:05:08 <conman> I know how to convert, I just see no mention of *what* needs to be converted
 30 2012-11-04 02:05:31 <conman> in the part how to build block header, only the version and curtime seem to be endian encoded back to LE
 31 2012-11-04 02:05:38 <etotheipi_> conman... even if you think you got it right, you'll end up getting it wrong and trying every combination anyway
 32 2012-11-04 02:05:43 <etotheipi_> might was well get started :)
 33 2012-11-04 02:05:56 <conman> etotheipi_, I already have, that's why I'm now sick of rolling things around
 34 2012-11-04 02:06:00 <jgarzik> conman: the native binary format is the native binary format.  nothing needs to be converted.  if converting binary to hex string, you swap 32-bit across 256-bit integer _and_ swap bytes within each 32-bit
 35 2012-11-04 02:06:08 <etotheipi_> lol, well I've been there, too
 36 2012-11-04 02:06:16 <jgarzik> conman: as the link demonstrates
 37 2012-11-04 02:06:21 <conman> jgarzik, but
 38 2012-11-04 02:06:34 <conman> the block heaader example below shows a now byteswapped prevblockhash
 39 2012-11-04 02:06:55 <conman> "previousblockhash": "000000004d424dec1c660a68456b8271d09628a80cc62583e5904f5894a2483c"
 40 2012-11-04 02:07:18 <conman> but there's no mention of that in
 41 2012-11-04 02:07:23 <conman> binascii.a2b_hex(template['previousblockhash']) +
 42 2012-11-04 02:07:44 <conman> or does a2b_hex do that??
 43 2012-11-04 02:08:02 <jgarzik> conman: " if converting binary to hex string, you swap 32-bit across 256-bit integer _and_ swap bytes within each 32-bit"
 44 2012-11-04 02:08:07 <jgarzik> conman: you are looking at a hex string
 45 2012-11-04 02:08:09 <jgarzik> thus...
 46 2012-11-04 02:08:13 <conman> thus?
 47 2012-11-04 02:08:27 <conman> I see
 48 2012-11-04 02:08:34 <jgarzik> conman: thus perform the swaps described :)
 49 2012-11-04 02:08:39 <conman> ok what about the transactions?
 50 2012-11-04 02:08:43 <jgarzik> conman: hex string != native format
 51 2012-11-04 02:08:48 <jgarzik> conman: hex string == swapped
 52 2012-11-04 02:08:51 <conman> ok
 53 2012-11-04 02:08:58 <conman> and t he transactions are transmitted as hex
 54 2012-11-04 02:09:27 <jgarzik> conman: yes, a different hex too ;p
 55 2012-11-04 02:09:37 <jgarzik> conman: just straight byte-for-byte hex decode, no swapping
 56 2012-11-04 02:09:38 <conman> so what do I do with those? swap them or can I just feed them as binary versions of the hex?
 57 2012-11-04 02:09:46 <conman> gah see this is what I mean lol
 58 2012-11-04 02:09:53 <conman> different rules...
 59 2012-11-04 02:10:16 <jgarzik> conman: raw data is decoded without swapping, a la https://github.com/jgarzik/picocoin/blob/master/lib/hexcode.c#L36
 60 2012-11-04 02:10:28 <jgarzik> conman: the transaction raw data falls into that category
 61 2012-11-04 02:10:33 <conman> ok
 62 2012-11-04 02:10:41 <conman> time to start flipping shit again
 63 2012-11-04 02:10:47 <conman> oh and while you're here
 64 2012-11-04 02:10:51 <jgarzik> conman: "uint256" is a unique bitcoin concept, with unique binary and hexidecimal string encodings
 65 2012-11-04 02:10:58 <jgarzik> conman: prevblockhash is uint256
 66 2012-11-04 02:11:00 <Diablo-D3> unique? broken
 67 2012-11-04 02:11:05 <Diablo-D3> text hex is _backwards_
 68 2012-11-04 02:11:14 <Diablo-D3> its broken and wrong and a bug
 69 2012-11-04 02:11:19 <jgarzik> Diablo-D3: blah blah blah
 70 2012-11-04 02:11:31 <Diablo-D3> and you cant argue otherwise, because it is text readable for humans and we sure as hell dont write that way
 71 2012-11-04 02:11:40 <Diablo-D3> its a 12 thousand year old spec, comply.
 72 2012-11-04 02:11:54 <jgarzik> I can.  And have.  No interest in repeating old text.
 73 2012-11-04 02:12:15 <conman> jgarzik,  when creating a block submission it says I can omit the transactions if I don't *modify* them, but do I need to still add the number of transactions into the block data?
 74 2012-11-04 02:12:29 <conman> blkdata = blkheader + varintEncode(len(txnlist)) + coinbase
 75 2012-11-04 02:12:48 <conman> should len(txnlist) read 0 ?
 76 2012-11-04 02:19:03 <jgarzik> conman: Are we talking about GBT's submitblock? https://en.bitcoin.it/wiki/BIP_0023 seems to indicate that actions like that are "implied if 'transactions' omitted from result"  Which also seems to imply that the transaction list should be sent separately from the block header.
 77 2012-11-04 02:19:33 <conman> that is what I'm talking about
 78 2012-11-04 02:19:54 <conman> it implies that if you take the transactions as is from the server without modifying the list, you need not resubmit them
 79 2012-11-04 02:20:12 <conman> however it doesn't say what you should do to the transaction count in the blockdata
 80 2012-11-04 02:21:09 <jgarzik> conman: do you mind if I curse, a bit?
 81 2012-11-04 02:22:11 <conman> please do
 82 2012-11-04 02:22:24 <conman> but get in line, cause I've been doing so for a while...
 83 2012-11-04 02:23:18 <conman> so I'm going to assume that coinbasetxn is raw data as well and needs no bytefucking
 84 2012-11-04 02:23:21 <jgarzik> conman: Fucking BIP 23 is a fucking dizzying array of fucking shite about mutations and proposals and it sure as shit is not clear to me from https://en.bitcoin.it/wiki/BIP_0023 what the fuck the simple game plan is for miners
 85 2012-11-04 02:23:33 <conman> thank you!
 86 2012-11-04 02:23:36 <forsetifox> Heh.
 87 2012-11-04 02:23:48 <conman> that's what I've been saying for a month on the forums
 88 2012-11-04 02:24:46 <jgarzik> conman: It's a bunch of shit from the brain of luke-jr that makes sense to luke-jr, works great in luke-jr's code, with little outside review because it's so dizzying and confusing
 89 2012-11-04 02:25:07 <conman> well you no doubt know how I feel about that
 90 2012-11-04 02:25:25 <gmaxwell> It's 1/4th the size it was originally!
 91 2012-11-04 02:25:30 <jgarzik> conman: shite was stripped from BIP 22 (GBT basics) for the bitcoind implementation by myself, because the original version made me puke with the complexity
 92 2012-11-04 02:26:13 <conman> haha I tried to come here to not get angry about the protocol and complain like I feel like doing, and ask for help, but instead someone else complains for me lol
 93 2012-11-04 02:26:17 <gmaxwell> oh 23. 23 the dumping bin.
 94 2012-11-04 02:26:23 <jgarzik> precisely
 95 2012-11-04 02:26:28 <jgarzik> 23 became the dumping bin
 96 2012-11-04 02:26:34 <gmaxwell> But you shouldnt be angry, the missing component from 23 is review. Which you're providing.
 97 2012-11-04 02:26:44 <conman> "it's shit, throw it out"
 98 2012-11-04 02:26:46 <conman> enough
 99 2012-11-04 02:27:36 <gmaxwell> _some_ rare people can write a really excellent spec whole cloth without even review... sometimes.  But most humans need some other eyes. The stuff that was pulled from 22 was largely pulled becuase at the time no one wanted to even review it.
100 2012-11-04 02:27:53 <jgarzik> BIP 22 hammers out what solo miners and p2pool needs
101 2012-11-04 02:28:21 <jgarzik> BIP 23 should hammer out what conman and friends need
102 2012-11-04 02:28:54 <jgarzik> paraphrasing a military saying, "no spec survives first contact with the userbase"
103 2012-11-04 02:29:19 <conman> sigh maybe I should just make my stance by not supporting it at all now that I've got stratum support in
104 2012-11-04 02:29:47 <gmaxwell> conman: or just go cooperate with luke some to get the non-clarity hammered out.
105 2012-11-04 02:29:56 <conman> gmaxwell, you ask the impossible
106 2012-11-04 02:30:04 <jgarzik> It is a fair point that luke-jr (and gmaxwell) makes, about privacy and control.
107 2012-11-04 02:30:07 <conman> he is the sole individual on the internet I refuse to talk to
108 2012-11-04 02:30:33 <gmaxwell> It won't kill you. You've already dont the hard part of identifying about of it. I didn't say argue with him about his goals, just point out where the document is jibberish. He'll fix it.
109 2012-11-04 02:31:03 <gmaxwell> conman: If you can cope with Kano you can cope with luke. :P
110 2012-11-04 02:31:19 <gmaxwell> s/dont/done/
111 2012-11-04 02:31:29 <conman> seriously they're nothing like each other
112 2012-11-04 02:31:50 <conman> one gets worked up over tiny things, the other is a narcissistic megalomaniac
113 2012-11-04 02:32:10 <Luke-Jr> "the total number of transactions encoded in Bitcoin variable length number format" was in BIP 23 until "Format of Data for Merkle-Only Shares", but I'll add it to the other part less than a page up too???
114 2012-11-04 02:34:19 <jgarzik> BIP 23 should (a) provide a way to mine without transiting the TX's in the block, and (b) illustrate this with examples somewhere :)
115 2012-11-04 02:34:37 <jgarzik> maybe luke-jr's http://gitorious.org/bitcoin/libblkmaker has examples?
116 2012-11-04 02:35:17 <conman> trying to avoid jesus taint
117 2012-11-04 02:36:10 <conman> I'll just fuck around with some more byte swapping for now and then try random shit till it works
118 2012-11-04 02:36:55 <conman> thanks jgarzik
119 2012-11-04 02:50:00 <conman> funny thing is slush decided to encode everything in stratum as BE in hex :P
120 2012-11-04 02:55:45 <Diablo-D3> good for him
121 2012-11-04 02:56:06 <conman> fuck of  a lot easier to read
122 2012-11-04 02:57:01 <conman> though I'm wondering how gbt headers can start with 02000000 and stratum with 0000002 and still work...
123 2012-11-04 03:01:21 <jgarzik> BE is easier to read, and wonderfully non-native for 99% of the userbase ;p
124 2012-11-04 03:02:18 <Luke-Jr> ACTION wonders how conman implemented stratum without knowing stratum headers start with 01000000 O.
125 2012-11-04 03:02:20 <Luke-Jr> O.o
126 2012-11-04 03:03:50 <conman> cause be32toh() is so hard to use...
127 2012-11-04 03:04:13 <conman> d:
128 2012-11-04 03:05:24 <Diablo-D3> well, theres also another thing
129 2012-11-04 03:05:34 <Diablo-D3> 99% of the time you dont HAVE to flip endian
130 2012-11-04 03:05:45 <Diablo-D3> and generally if you do, you're doing something wrong
131 2012-11-04 03:05:49 <jgarzik> because our ints are LE, agreed
132 2012-11-04 03:06:19 <Diablo-D3> no, even if you operate in NE all the time
133 2012-11-04 03:06:29 <Diablo-D3> the problem here is merely text.
134 2012-11-04 03:07:16 <jgarzik> and nVersion and nTime and nBits etc, etc.  That is not merely text.  Bitcoin is fixed endian-LE.
135 2012-11-04 03:08:03 <Luke-Jr> jgarzik: well, nBits isn't any simple endian, it's more of a custom floating-point type
136 2012-11-04 03:10:04 <Diablo-D3> jgarzik: maybe.
137 2012-11-04 03:10:04 <jgarzik> The "nBits" field in the CBlock header is most definitely 32-bit little endian, no matter what it may expand to.
138 2012-11-04 03:10:17 <Diablo-D3> what is the nBits field?
139 2012-11-04 03:10:30 <jgarzik> Diablo-D3: fired
140 2012-11-04 03:12:40 <Diablo-D3> thats the diff field, right?
141 2012-11-04 03:13:08 <Diablo-D3> theres no reason endian should ever be a problem with that since its just a uint32_t
142 2012-11-04 03:13:15 <Diablo-D3> assuming bitcoin's code is correct
143 2012-11-04 03:13:54 <Luke-Jr> jgarzik: just because bitcoind interprets it as little endian then processes that doesn't change the fact that's just an implementation choice and not inherent in the encoding
144 2012-11-04 03:14:45 <Diablo-D3> jgarzik: how does bitcoin output ints?
145 2012-11-04 03:14:54 <Diablo-D3> does it just output them, or does it properly sequence them as a byte array?
146 2012-11-04 03:15:11 <gmaxwell> sort of inherent for anything that gets hashed!
147 2012-11-04 03:15:35 <Diablo-D3> gmaxwell: that doesnt answer the question
148 2012-11-04 03:17:52 <Diablo-D3> because if I have a NE byte stream, I can do x = (stream[3] << 0) | (stream[2] << 8) | (stream[1] << 16) | (stream[0] << 24); on EITHER endian cpu and it will be correct
149 2012-11-04 03:18:49 <gmaxwell> ...
150 2012-11-04 03:21:55 <jgarzik> Luke-Jr: Incorrect.  It is fixed in stone at this point.
151 2012-11-04 03:22:15 <Luke-Jr> jgarzik: it's a custom floating-point number.
152 2012-11-04 03:22:32 <Diablo-D3> gmaxwell: what?
153 2012-11-04 03:22:44 <Diablo-D3> seriously, Ive never looked at how the protocol code looks
154 2012-11-04 03:22:56 <Diablo-D3> I want to believe it was coded correctly, but I kind of doubt it was =/
155 2012-11-04 03:25:42 <jgarzik> Bitcoin was coded as native endian, with 100% of the userbase using little endian.  Due to hashing, it was therefore fixed at little endian.
156 2012-11-04 03:26:10 <jgarzik> Satoshi stated that was intentional, and never intended to support big endian machines at all.  (of course, he was anti-alt-client too...)
157 2012-11-04 03:26:53 <Diablo-D3> jgarzik: so basically bitcoin is crap
158 2012-11-04 03:27:04 <Diablo-D3> why the fuck are people even writing their own network protocol shit
159 2012-11-04 03:27:07 <Diablo-D3> theres libs for this
160 2012-11-04 03:28:41 <jgarzik> uh huh
161 2012-11-04 03:28:56 <conman> heh
162 2012-11-04 03:31:42 <jgarzik> man Sergio is all about the DoS roadmap, https://bitcointalk.org/index.php?topic=122013.msg1315781#msg1315781
163 2012-11-04 03:32:44 <gmaxwell> Glad someone is bothering to make such a list.
164 2012-11-04 03:33:22 <gmaxwell> Though it's not a complete one.
165 2012-11-04 03:34:05 <conman> question about variable length integer then
166 2012-11-04 03:34:14 <conman> if it's 0xff + uint32_t etc
167 2012-11-04 03:34:19 <conman> is uint32_t LE ?
168 2012-11-04 03:36:33 <conman> I guess so based on the docs
169 2012-11-04 03:36:39 <conman> nm
170 2012-11-04 03:42:06 <copumpkin> it's your native endianness
171 2012-11-04 03:42:21 <Diablo-D3> HA HA, FOOLS, I USE PPC
172 2012-11-04 03:42:22 <copumpkin> you need to call something to adjust it before serializing it
173 2012-11-04 03:42:28 <copumpkin> if you want to be safe
174 2012-11-04 03:42:30 <Diablo-D3> EPIC ENDIANNESS, AMIRITE?!
175 2012-11-04 03:42:56 <copumpkin> totally
176 2012-11-04 03:44:33 <Diablo-D3> ACTION puts router on top of powerbook, then tablet on top of router
177 2012-11-04 03:44:43 <Diablo-D3> ACHIEVEMENT UNLOCKED: HOLY TRINITY
178 2012-11-04 03:57:02 <jgarzik> conman: https://github.com/jgarzik/picocoin/blob/master/lib/serialize.c#L137
179 2012-11-04 03:57:36 <jgarzik> conman: the u16 and u32 inputs are little endian, yes
180 2012-11-04 03:59:23 <conman> thanks
181 2012-11-04 04:02:15 <jgarzik> conman: https://github.com/jgarzik/picocoin/blob/master/lib/core.c uses that lib/serialize.c module, to encode and decode the standard bitcoin data structures into natively-usable data structures.
182 2012-11-04 04:29:56 <jgarzik> 11/04/12 05:27:18 ERROR: CTxMemPool::accept() : inputs already spent
183 2012-11-04 04:30:02 <jgarzik> wow!  it actually caught one.
184 2012-11-04 04:33:39 <weex> was it a large txn?
185 2012-11-04 04:34:01 <weex> can it have been accidental?
186 2012-11-04 04:42:16 <gmaxwell> there are nodes that continually broadcast double spends... just because they did goofy crap with multiple wallet copies and created ones and now have them stuck.
187 2012-11-04 09:34:58 <Varan> Has anyone tried to run a bitcoin client on a linksys router?
188 2012-11-04 09:35:55 <Varan> I have a router left over and i thought it might be a good way too generate key/create offline transactions
189 2012-11-04 14:28:54 <abrkn> wha
190 2012-11-04 14:29:47 <abrkn> what's a reasonable way to poll the bitcoin rpc to know when money has been received? i was told yesterday that listtransactions may not return transactions sorted
191 2012-11-04 16:17:40 <Luke-Jr> abrkn: 0.7.1+ should keep listtransactions in order
192 2012-11-04 16:17:46 <Luke-Jr> not necessarily sorted
193 2012-11-04 17:33:13 <Diablo-D3> NBC was hacked, LOL: http://www.nbc.com/saturday-night-live/
194 2012-11-04 18:11:40 <kreal> ACTION 's brains was hacked.
195 2012-11-04 19:14:40 <jgarzik> ponder:
196 2012-11-04 19:14:49 <jgarzik> chroot to $DataDir at the end of init?
197 2012-11-04 19:15:45 <forrestv> jgarzik, backupwallet?
198 2012-11-04 19:16:38 <jgarzik> true
199 2012-11-04 19:16:46 <jgarzik> ACTION wonders if he could hack the network code into forking
200 2012-11-04 19:22:47 <kjj_> if you could stream the wallet backup over the RPC connection, it would work,  be better too, in my opinion
201 2012-11-04 19:24:02 <jgarzik> heh, that would be interesting
202 2012-11-04 19:24:08 <kjj_> for that matter, I'd prefer that the wallet backup just be the encrypted privkeys
203 2012-11-04 19:24:11 <jgarzik> currently we only use the "/" HTTP path
204 2012-11-04 19:24:11 <sipa> yes, i've suggested that before
205 2012-11-04 19:24:28 <jgarzik> just use "/walletbackup" HTTP path for raw binary wallet contents
206 2012-11-04 19:25:04 <jgarzik> or "/wallet.privkeys"
207 2012-11-04 19:25:52 <D34TH> or "/wallet?form={binary,json}"
208 2012-11-04 19:25:58 <kjj_> the privkeys would work fine in JSON.
209 2012-11-04 19:26:03 <jgarzik> true
210 2012-11-04 19:26:35 <jgarzik> sounds like a fun mini-project.
211 2012-11-04 19:27:22 <kjj_> I wish that WIF had been designed a little better.  we are going to run out of code bytes if we keep using a new one for each variation of each blob
212 2012-11-04 19:29:30 <sipa> haha
213 2012-11-04 19:29:32 <sipa> sorry :)
214 2012-11-04 19:29:34 <kjj_> but that's how it always goes
215 2012-11-04 19:29:48 <jgarzik> How cygwin forks, on Windows: http://cygwin.com/faq/faq.api.html#faq.api.fork
216 2012-11-04 19:30:10 <kjj_> meh.  at the time it was made, who could have guessed that we'd want formats for compressed keys?  for keys that include birthdates?  for whatever
217 2012-11-04 19:31:39 <kjj_> also, the base58 encoder has pretty well run out of unique leading symbols, so people are going to need to stop expecting that soon
218 2012-11-04 19:50:11 <jgarzik> hum
219 2012-11-04 19:50:17 <jgarzik> ReadHTTPStatus() is completely nutters
220 2012-11-04 19:50:29 <jgarzik> the return value is Not What It Thinks It Is
221 2012-11-04 19:50:44 <jgarzik> and that's not a status... that's an HTTP request line being read
222 2012-11-04 19:51:38 <sipa> it should be ReadHTTPRequest() line then
223 2012-11-04 19:51:50 <sipa> I feel a Diapolo-style pullreq coming up
224 2012-11-04 19:52:12 <jgarzik> sipa: kinda sorta
225 2012-11-04 19:52:23 <jgarzik> ReadHTTPStatus() does read HTTP status in client (cli) mode
226 2012-11-04 19:52:32 <Diablo-D3> heh
227 2012-11-04 19:52:37 <jgarzik> ReadHTTPStatus() is overloaded to request HTTP request line, in server mode
228 2012-11-04 19:52:39 <jgarzik> sigh
229 2012-11-04 19:52:43 <Luke-Jr> hmm, I have some vague memory of finding a bug in ReadHTTPStatus, and forgetting to report or look into it >_<
230 2012-11-04 19:52:44 <sipa> eh
231 2012-11-04 19:52:45 <Diablo-D3> eww
232 2012-11-04 19:52:59 <Diablo-D3> btw, arent there already libs for this?
233 2012-11-04 19:53:05 <Luke-Jr> probably.
234 2012-11-04 19:53:10 <sipa> no
235 2012-11-04 19:53:17 <Diablo-D3> srsly? not even in boost?
236 2012-11-04 19:53:18 <sipa> nobody ever wrote an HTPP library
237 2012-11-04 19:53:19 <sipa> ever
238 2012-11-04 19:53:22 <sipa> HTTP
239 2012-11-04 19:53:24 <Diablo-D3> bah
240 2012-11-04 19:53:32 <Diablo-D3> ACTION lights sipa on fire and goes back to working on seaking
241 2012-11-04 19:53:51 <sipa> that's about how to become Neptunus?
242 2012-11-04 19:54:00 <jgarzik> git checkout -f
243 2012-11-04 19:54:04 <jgarzik> ACTION starts over
244 2012-11-04 19:54:05 <Luke-Jr> boost_asio/example/http/server/
245 2012-11-04 19:54:15 <jgarzik> Luke-Jr: that's an example, not a lib API
246 2012-11-04 19:54:32 <Luke-Jr> yeah, looks a bit big for what we need too
247 2012-11-04 19:54:44 <Diablo-D3> sipa: no, its a C-like language that doesnt suck
248 2012-11-04 19:54:54 <Diablo-D3> sipa: and is based around doing highly parallel things
249 2012-11-04 19:54:59 <jgarzik> I wrote a JSON RPC server, based on boost.asio: https://github.com/jgarzik/rpcsrv
250 2012-11-04 19:55:00 <sipa> you mean Go?
251 2012-11-04 19:55:01 <jgarzik> fully m-t
252 2012-11-04 19:55:10 <jgarzik> quite large, for what tiny things it does
253 2012-11-04 19:55:14 <Diablo-D3> sipa: go doesnt have working concurrency and never will
254 2012-11-04 19:55:31 <jgarzik> based on the boost.asio multi-threaded http server example
255 2012-11-04 19:55:54 <Diablo-D3> sipa: I have no clue why google even made the language, its basically failed at every goal
256 2012-11-04 19:57:16 <sipa> it's used a lot within Google though, and makes many things done often at google a lot easier
257 2012-11-04 19:59:22 <Diablo-D3> yeah, but its a fucking shithole of a language
258 2012-11-04 19:59:26 <Diablo-D3> its arguably worse than java
259 2012-11-04 19:59:28 <sipa> i'm not a very big fan myself (i haven't used it enough for that), but i can see how it simplifies things
260 2012-11-04 19:59:45 <sipa> C++-like performance with way less boilerplate
261 2012-11-04 19:59:59 <Luke-Jr> Diablo-D3: Google loves Java too, but we don't accomplish anything by ranting about it here off-topic
262 2012-11-04 20:00:07 <Diablo-D3> c++-like performance isnt even a thing anymore
263 2012-11-04 20:00:09 <Diablo-D3> you know why?
264 2012-11-04 20:00:20 <Diablo-D3> thanks to shit like llvm, ANYTHING can have c++-like performance now
265 2012-11-04 20:00:51 <Diablo-D3> the trick is to have a language that helps you code instead of fucks your shit up
266 2012-11-04 20:02:00 <Diablo-D3> I'm trying to figure out how I want to do a concurrency model, though
267 2012-11-04 20:05:04 <Diablo-D3> sipa: also, Im wondering if using C as an IL really is viable
268 2012-11-04 20:05:44 <sipa> unsure; C is not really designed to be machine-writable
269 2012-11-04 20:05:57 <sipa> there have been attempts like C-- to improve upon that
270 2012-11-04 20:06:14 <Diablo-D3> its not designed to be human writable either =/
271 2012-11-04 20:06:32 <gmaxwell> There are _lots_ of things that use C as an IL.
272 2012-11-04 20:06:39 <Luke-Jr> IMO the biggest problem with C is the lack of exceptions
273 2012-11-04 20:06:42 <Diablo-D3> gmaxwell: yeah, but is it sane?
274 2012-11-04 20:06:55 <Diablo-D3> I'd probably be better off just using LLVM directly
275 2012-11-04 20:07:05 <Luke-Jr> makes code much uglier than it otherwise would have to be
276 2012-11-04 20:08:10 <Diablo-D3> any LLVM language can call C with no pain, so it looks like the best bet
277 2012-11-04 20:09:29 <yellowhat> does anyone know what this is? slush? http://instagram.com/p/Rm5n9ZDY7O/
278 2012-11-04 20:10:11 <sipa> i suppose a hardware wallet
279 2012-11-04 20:10:49 <Diablo-D3> an lcd on a bread board
280 2012-11-04 20:13:24 <Diablo-D3> gmaxwell, sipa: c-- isnt really needed if I just use a very minimal set of c
281 2012-11-04 20:13:44 <sipa> c-- is also old, i think LLVM is probably a better choice nowadays
282 2012-11-04 20:13:59 <Diablo-D3> I dont even need to support all c compilers
283 2012-11-04 20:14:05 <sipa> haven't looked into it enough, actually
284 2012-11-04 20:14:10 <Diablo-D3> just modern clang and modern gcc
285 2012-11-04 20:14:50 <Diablo-D3> also, to be a complete asshole
286 2012-11-04 20:14:55 <Diablo-D3> I should port llvm to seaking
287 2012-11-04 20:15:05 <sipa> surely you want to support 16-bit Borland C++
288 2012-11-04 20:17:05 <D34TH> yellowhat, https://www.adafruit.com/products/326
289 2012-11-04 20:17:19 <Diablo-D3> sipa: hell no
290 2012-11-04 20:17:27 <Diablo-D3> also, theres one other thing I want to support
291 2012-11-04 20:17:33 <Diablo-D3> automatic opencl parallelization
292 2012-11-04 20:18:47 <Diablo-D3> you'll be able to write parallel(array[]) {} or parallel(x) {}, and if it can be written in opencl, it'll do it
293 2012-11-04 20:19:47 <D34TH> hmm, cant wait to see a miner Diablo-D3
294 2012-11-04 20:19:57 <kreal> any rejections to using RIJNDAEL as encryption in my next project?
295 2012-11-04 20:20:16 <Diablo-D3> D34TH: why bother, Ive already written a miner that does it directly in opencl
296 2012-11-04 20:20:27 <D34TH> proof of concept
297 2012-11-04 20:21:17 <kreal> thinking like, fuck you kreal, are you stupid, want to get hacked?
298 2012-11-04 20:21:27 <kreal> or like yeah go away and use it, so I can hack the crap out of you.
299 2012-11-04 20:21:37 <kreal> away/ahead
300 2012-11-04 20:21:50 <kreal> or maybe its pretty good, what are you encrypting?
301 2012-11-04 20:22:02 <D34TH> kreal is the object to be able to retreive encrypted data?
302 2012-11-04 20:22:24 <kreal> no, just to encrypt and have it stay encrypted.
303 2012-11-04 20:22:42 <kreal> but still being able to receive it later on request.
304 2012-11-04 20:23:11 <D34TH> so you do want it two-way
305 2012-11-04 20:23:21 <kreal> and maybe a requirement of a 32 char key.
306 2012-11-04 20:23:32 <kreal> yes two-way.
307 2012-11-04 20:23:42 <kreal> would be great if I could just make a salted hash.
308 2012-11-04 20:24:08 <kreal> but sadly there are limits everywhere I need to overcome.
309 2012-11-04 20:24:19 <kreal> and oh yeah, it is ofcause a bitcoin project.
310 2012-11-04 20:25:44 <D34TH> ripemd320?
311 2012-11-04 20:26:52 <kreal> thats reather custom? :)
312 2012-11-04 20:26:56 <kreal> havend heard of it.
313 2012-11-04 20:27:19 <D34TH> https://en.wikipedia.org/wiki/RIPEMD
314 2012-11-04 20:27:24 <kreal> reading
315 2012-11-04 20:29:48 <kreal> it seems it compares to sha-1
316 2012-11-04 20:30:02 <kreal> but with less testing.
317 2012-11-04 20:30:08 <kreal> or however you say it.
318 2012-11-04 20:30:31 <D34TH> less implementation
319 2012-11-04 20:30:39 <D34TH> i suppose you could say
320 2012-11-04 20:31:20 <kreal> or that yes.
321 2012-11-04 20:42:37 <forsetifox> Question for you C programmers. Should I drop MS Visual C++ and use something else as an editor/ IDE? I just ran into the stdafx.h vs iostream.h thing. O.o
322 2012-11-04 20:43:10 <Diablo-D3> forsetifox: microsoft does not produce a C compiker, so yes, switch
323 2012-11-04 20:43:11 <Diablo-D3> try vim
324 2012-11-04 20:44:05 <D34TH> i use notepad++ and mingw D:
325 2012-11-04 20:45:03 <forsetifox> I'd prefer to stay in the windows platform Diablo.
326 2012-11-04 20:46:18 <D34TH> why not code::blocks
327 2012-11-04 20:46:45 <D34TH> i find it useful once in a blue moon
328 2012-11-04 20:50:38 <Diablo-D3> forsetifox: vim works on windows fine
329 2012-11-04 20:56:05 <BitDev> hi all
330 2012-11-04 20:56:22 <BitDev> i have few questions about bitcoin
331 2012-11-04 20:56:57 <BitDev> if i want to do only maining - i still must create listening socket on port 8333?
332 2012-11-04 20:57:41 <kreal> no
333 2012-11-04 20:57:53 <BitDev> 2) in wiki i have read that in Network address: 4\t time\t uint32\t the Time (version >= 31402)  - what this time is?
334 2012-11-04 20:57:57 <kreal> listening socket is mainly for incresed block speed.
335 2012-11-04 20:58:47 <BitDev> and what ip i must write in version packet?
336 2012-11-04 20:58:56 <BitDev> and time?
337 2012-11-04 20:58:58 <BitDev> and port?
338 2012-11-04 20:59:11 <BitDev> or just leave it blank?
339 2012-11-04 20:59:18 <kreal> I lost you there.
340 2012-11-04 20:59:27 <BitDev> version packet
341 2012-11-04 20:59:51 <BitDev> addr_from record
342 2012-11-04 21:00:03 <BitDev> this is net_addr type
343 2012-11-04 21:00:27 <BitDev> and net_addr type means that i write my ip address, port and time
344 2012-11-04 21:01:19 <BitDev> what should i do?
345 2012-11-04 21:02:37 <BitDev> you understand about what i am saying?
346 2012-11-04 21:02:46 <kreal> nope
347 2012-11-04 21:03:07 <kreal> there are many parts which I do not know about.
348 2012-11-04 21:03:24 <BitDev> look https://en.bitcoin.it/wiki/Protocol_specification#version
349 2012-11-04 21:03:43 <BitDev> version message
350 2012-11-04 21:04:09 <BitDev> there are fields: addr_recv and addr_from
351 2012-11-04 21:04:21 <BitDev> you see them?
352 2012-11-04 21:07:12 <BitDev> there are 2 values: addr_from and addr_recv
353 2012-11-04 21:07:23 <BitDev> there type is net_addr
354 2012-11-04 21:07:32 <BitDev> how to fill them?
355 2012-11-04 21:13:53 <BitDev> no body knows?
356 2012-11-04 21:26:16 <jgarzik> sipa: Where does one find the _encrypted_ privkeys, for a wallet-wide dump?  Iterate through BDB, dumping all "ckey"?
357 2012-11-04 21:26:35 <jgarzik> it is unclear where they are stored in memory, in wallet.h
358 2012-11-04 21:27:46 <sipa> jgarzik: CWallet inherits from CKeyStore
359 2012-11-04 21:27:51 <sipa> guess which ones stores keys...
360 2012-11-04 21:27:56 <jgarzik> mapCryptedKeys
361 2012-11-04 21:28:18 <sipa> jgarzik: by the way, i already have code to dump an entire wallet
362 2012-11-04 21:28:43 <sipa> somehow never finished it after dumpprivkey, but it's probably more or less usable
363 2012-11-04 21:29:02 <sipa> my 'showwallet' branch
364 2012-11-04 21:31:01 <sipa> it's 1.5 years old though...
365 2012-11-04 21:33:30 <Diablo-D3> you know, I just had a hilarious idea
366 2012-11-04 21:33:50 <Diablo-D3> make everything message passing
367 2012-11-04 21:33:58 <Diablo-D3> the async kind
368 2012-11-04 21:34:18 <Diablo-D3> well, everything thats an object method call
369 2012-11-04 21:34:22 <sipa> you mean erlang?
370 2012-11-04 21:38:53 <Diablo-D3> sipa: yeah, sorta like erlang
371 2012-11-04 21:39:04 <Diablo-D3> except erlang I dont think does it habitually
372 2012-11-04 21:56:26 <OneEyed> It works fine with Erlang because data structures are immutable. You have to adhere to a strict discipline to make everything asynchronous if your data is mutable.
373 2012-11-04 21:57:09 <OneEyed> That's a problem in Scala, which is based on Java: there is no way to enforce immutability, so people must be careful when using actors and asynchronous messages
374 2012-11-04 21:57:32 <Diablo-D3> OneEyed: mutability isnt the issue
375 2012-11-04 21:57:52 <Diablo-D3> its versioning thats the issue
376 2012-11-04 21:58:45 <gribble> tcatm was last seen in #bitcoin-dev 2 weeks, 3 days, 22 hours, 14 minutes, and 17 seconds ago: <tcatm> MC1984: 0.7.1 will load it automatically, for 0.7.0 -loadblock is needed
377 2012-11-04 21:58:45 <[Tycho]> !seen tcatm
378 2012-11-04 22:21:22 <conman> feh
379 2012-11-04 22:21:47 <conman> hard to debug what the server doesn't like about my GBT block submission when it returns with a 500 internal server error
380 2012-11-04 22:22:11 <sipa> is that bitcoind?
381 2012-11-04 22:22:24 <conman> nah eclipse
382 2012-11-04 22:22:39 <conman> wonder if I can find inaba
383 2012-11-04 22:24:03 <conman> ACTION looks for an irc channel
384 2012-11-04 22:24:48 <jgarzik> kjj_: https://github.com/bitcoin/bitcoin/pull/1982
385 2012-11-04 22:25:43 <jgarzik> sipa: wasn't able to use any of showwallet, sadly
386 2012-11-04 22:26:30 <sipa> oh, this seems to serve a different purpose
387 2012-11-04 22:26:40 <sipa> showwallet creates a json importable dump of an entire wallet
388 2012-11-04 22:26:51 <sipa> not a list of encrypted keys
389 2012-11-04 22:27:34 <Luke-Jr> if someone wants to ask con to push his code and/or test it against Eligius, I could provide input
390 2012-11-04 22:27:55 <conman> I wonder if I found a buffer overflow in the pool receive code :P
391 2012-11-04 22:28:06 <conman> ACTION hacks it
392 2012-11-04 22:28:11 <Luke-Jr> ACTION would be interested in a buffer overflow in Python code???
393 2012-11-04 22:29:43 <kjj_> jgarzik: sweet!
394 2012-11-04 22:29:47 <Luke-Jr> ;;echo <Luke-Jr> if someone wants to ask con to push his code and/or test it against Eligius, I could provide input
395 2012-11-04 22:29:48 <gribble> <Luke-Jr> if someone wants to ask con to push his code and/or test it against Eligius, I could provide input
396 2012-11-04 22:30:04 <conman> oh
397 2012-11-04 22:30:20 <conman> I might just unignore him for such a purpose
398 2012-11-04 22:30:39 <Diablo-D3> hah
399 2012-11-04 22:31:13 <wizkid057> ...
400 2012-11-04 22:31:37 <conman> wizkid057, yes I was that angry
401 2012-11-04 22:32:34 <conman> maybe a chance to redeem?
402 2012-11-04 22:32:51 <conman> mining against your server now
403 2012-11-04 22:33:09 <conman> 30MH might take a while to find a share tho... :P
404 2012-11-04 22:33:14 <wizkid057> lol
405 2012-11-04 22:33:29 <maaku> heard cody wilson on npr's "on the media"; anyone know how to contact him directly?
406 2012-11-04 22:33:32 <wizkid057> 30MH... what is that, a raspberry pi? :P
407 2012-11-04 22:33:42 <sipa> that'd be 30 kH
408 2012-11-04 22:33:46 <conman> haha
409 2012-11-04 22:33:58 <conman> no it's my actual desktop and I always use nvidia cards there
410 2012-11-04 22:34:01 <wizkid057> sipa: actually, I got just under 1MH out of mine IIRC
411 2012-11-04 22:34:12 <sipa> wizkid057: nice :)
412 2012-11-04 22:35:12 <conman> ACTION twiddles thumbs
413 2012-11-04 22:35:58 <sipa> wizkid057: at how many watt?
414 2012-11-04 22:36:00 <conman> Luke-Jr, so can you please tell me if I'm supposed to list the number of transactions as a varint even when not submitting them with the block, or do I just use 0 there?
415 2012-11-04 22:36:21 <conman> cause the document does not specify
416 2012-11-04 22:36:32 <sipa> how can you not submit transactions?
417 2012-11-04 22:36:42 <wizkid057> sipa: Was showing ~5W at the Kill-a-watt
418 2012-11-04 22:36:47 <wizkid057> with a crappy power adapter
419 2012-11-04 22:37:06 <Luke-Jr> conman: yes, the varint should represent the block total of transactions always (it does say that btw)
420 2012-11-04 22:37:17 <Luke-Jr> conman: do note that includes the coinbase, so it should never be 0
421 2012-11-04 22:37:42 <wizkid057> what if I dont want a coinbase and want to mine for the network out of the goodness of my heart?
422 2012-11-04 22:37:49 <Luke-Jr> sipa: if you use the pool-provided transactions as-is, or propose your changes before you find shares, you can omit them for each share
423 2012-11-04 22:38:01 <conman> ah got a rejected share
424 2012-11-04 22:38:10 <Luke-Jr> wizkid057: solo with coinbase having 0 amount value
425 2012-11-04 22:38:28 <conman> I think when the share submit is larger is when it 500s
426 2012-11-04 22:39:17 <sipa> wizkid057: there is a network rule that every block must have exactly one coinbase transaction
427 2012-11-04 22:39:39 <wizkid057> sipa: i know, was just trolling ;)
428 2012-11-04 22:39:53 <sipa> naughty!
429 2012-11-04 22:40:12 <conman> ok no 500s now; doesn't happen every time
430 2012-11-04 22:40:30 <conman> just rejects from my broken generation implementation
431 2012-11-04 22:42:31 <conman> ACTION tries harder
432 2012-11-04 22:43:42 <conman> meh just rejects again
433 2012-11-04 22:44:49 <wizkid057> H-not-zero
434 2012-11-04 22:45:09 <conman> yeah so I"m just assembling it wrong; that much I know (just not how it's wrong)
435 2012-11-04 22:45:16 <conman> but why the 500 errors before?
436 2012-11-04 22:45:35 <wizkid057> hmm... dunno
437 2012-11-04 22:45:38 <wizkid057> Luke-Jr: ^
438 2012-11-04 22:46:08 <wizkid057> 00000002d39508fc0f659dbd0a012adf632e72c58b2f24a66a33982c000002e200000000f46ca85adc54dce52ac4783585618ed56a5f780590d8bcccf9786e403b74618d5096fd4e1a0513c524c4c402 <--- this is what I show for that share
439 2012-11-04 22:46:22 <wizkid057> not sure if that helps
440 2012-11-04 22:46:33 <conman> it does help
441 2012-11-04 22:46:43 <conman> hmm byte reversed confusion
442 2012-11-04 22:47:45 <Luke-Jr> conman: first thing I see is that your scriptSig length is including the 4 byte sequence number (ffffffff) which it shouldn't
443 2012-11-04 22:48:32 <kjj_> ok, I really really hate git.  Is there a simple way to make the master branch of my local repo a correct and current copy of github/bitcoin/bitcoin ?
444 2012-11-04 22:49:16 <conman> hmm I followed the directions
445 2012-11-04 22:49:20 <Luke-Jr> kjj_: git checkout master; git reset --hard origin/master
446 2012-11-04 22:49:25 <Luke-Jr> kjj_: assuming you initially cloned from there
447 2012-11-04 22:50:34 <conman> I dont get it, what is the 4 byte sequence number?
448 2012-11-04 22:50:35 <Luke-Jr> conman: which directions are you referring to there? maybe there's an error in some docs
449 2012-11-04 22:50:43 <conman> https://en.bitcoin.it/wiki/Getblocktemplate#For_developers
450 2012-11-04 22:50:44 <Luke-Jr> conman: it's always ffffffff in Bitcoin
451 2012-11-04 22:51:32 <Luke-Jr> conman: noticing the entire submitblock data also has 4 extra bytes at the end - possible you're simply incrementing the length too much somehow?
452 2012-11-04 22:51:42 <kjj_> Luke-Jr: it says that it updated HEAD, but all of my files are still the old ones
453 2012-11-04 22:51:51 <Luke-Jr> kjj_: git pull
454 2012-11-04 22:52:06 <kjj_> already up to date
455 2012-11-04 22:52:40 <sipa> kjj_: what does git status say?
456 2012-11-04 22:52:54 <Luke-Jr> conman: actually, there's no extranonce in your share, so maybe you're incrementing, but not adding it at the right position?
457 2012-11-04 22:53:04 <kjj_> on branch master
458 2012-11-04 22:53:20 <sipa> kjj_: git fetch origin; git reset --hard origin/master
459 2012-11-04 22:53:28 <Luke-Jr> the extra 4 bytes at the end are 64000000 - maybe that was supposed to be the extranonce?
460 2012-11-04 22:54:04 <kjj_> says the same thing that it said before, HEAD is now at 6cbae37
461 2012-11-04 22:54:35 <sipa> and the files are still... not master?
462 2012-11-04 22:54:40 <conman> Luke-Jr, the python example shows the blkdata minimum return as:
463 2012-11-04 22:54:42 <kjj_> right
464 2012-11-04 22:54:44 <conman> blkdata = blkheader + varintEncode(len(txnlist)) + coinbase
465 2012-11-04 22:54:55 <sipa> kjj_: in what way are they not master?
466 2012-11-04 22:55:04 <conman> am I appending the coinbase wrong?
467 2012-11-04 22:55:17 <conman> well I could be generating the coinbase wrong too
468 2012-11-04 22:55:26 <sipa> conman: coinbase is the entire coinbase transaction i suppose; not just the script
469 2012-11-04 22:55:57 <kjj_> sipa: well, what I'm checking is the error codes in rpcwallet.cpp.  the website shows the new RPC_BLAH_BLAH, mine is showing -11 etc
470 2012-11-04 22:56:37 <sipa> kjj_: wait... is origin not your github fork?
471 2012-11-04 22:56:54 <sipa> so you're pulling from your own outdated copy of master on github
472 2012-11-04 22:57:10 <sipa> do you have an 'upstream' remote configured?
473 2012-11-04 22:57:16 <Luke-Jr> conman: no, just the coinbase seems to be malformed from what I can tell
474 2012-11-04 22:57:23 <kjj_> heh, how the hell would I know?  I set it up by following Gavin's directions on the forum without really knowing what I was doing
475 2012-11-04 22:57:27 <conman> Luke-Jr, the real question is if the docs there are still correct?
476 2012-11-04 22:57:44 <conman> how to build coinbase transaction
477 2012-11-04 22:57:59 <conman> coinbase = coinbase[0:41] + chr(newLen).encode('ascii') + coinbase[42:42 + origLen] + extradata + coinbase[42 + origLen:]
478 2012-11-04 22:58:00 <Luke-Jr> conman: I re-read the relevant part and it seems to be; I did actually test all the code on that page, too
479 2012-11-04 22:58:16 <Luke-Jr> conman: your extradata is null, if you are doing that.
480 2012-11-04 22:58:30 <conman> hmm wait
481 2012-11-04 22:58:34 <conman> + coinbase[42 + origLen:]
482 2012-11-04 22:58:34 <sipa> kjj_: git fetch upstream
483 2012-11-04 22:58:37 <conman> what's that?
484 2012-11-04 22:58:38 <sipa> kjj_: does that do anything?
485 2012-11-04 22:58:53 <kjj_> says it doesn't appear to be a repo
486 2012-11-04 22:59:07 <sipa> kjj_: do this:
487 2012-11-04 22:59:15 <Luke-Jr> conman: you need to insert the extradata 42+origLen bytes into the coinbase
488 2012-11-04 22:59:27 <conman> that's where I've inserted it
489 2012-11-04 22:59:32 <sipa> kjj_: git remote add upstream git@github.com:bitcoin/bitcoin.git
490 2012-11-04 22:59:36 <conman> the question is what is the last thing appended?
491 2012-11-04 22:59:37 <Luke-Jr> conman: the actual data you sent has nothing inserted there
492 2012-11-04 22:59:40 <conman> coinbase[42 + origLen:]
493 2012-11-04 22:59:51 <conman> nothing appended?
494 2012-11-04 23:00:11 <sipa> kjj_: now you have two 'remotes' configured, one called 'origin' that points to your own github repo, and one called 'upstream' that points to the upstream repository
495 2012-11-04 23:00:13 <conman> ACTION looks
496 2012-11-04 23:00:13 <Luke-Jr> conman: that is the same in C as: &coinbase[42 + origLen]
497 2012-11-04 23:00:27 <kjj_> ok, and then git fetch upstream did a bunch of stuff
498 2012-11-04 23:00:34 <conman> Luke-Jr, but there should be nothing there any more
499 2012-11-04 23:00:42 <Luke-Jr> conman: the appending is to the scriptSig, not to the full coinbase transaction
500 2012-11-04 23:00:49 <sipa> kjj_: good, so now you have all branches from upstream mirrored locally
501 2012-11-04 23:00:55 <conman> I dont understand what that means
502 2012-11-04 23:01:01 <conman> I dont know what a scriptsig is
503 2012-11-04 23:01:03 <sipa> kjj_: you are currently still in your own local master branch, right?
504 2012-11-04 23:01:17 <kjj_> yeah, but now I have a branch that I need to fix
505 2012-11-04 23:01:29 <sipa> ok, tell me what you want to do
506 2012-11-04 23:02:01 <kjj_> I have a branch named rpcnormal that was based on the old version.  I need to change that so that it is a diff of the master that I just fetched
507 2012-11-04 23:02:44 <sipa> you want to rebase your changes in rpcnormal to upstream master? (adapting the patch so it seems like it was written against the current head) ?
508 2012-11-04 23:02:56 <Luke-Jr> conman: coinbase[41] is the length of a part of the coinbase called "scriptSig"
509 2012-11-04 23:03:02 <kjj_> sipa: right
510 2012-11-04 23:03:15 <sipa> kjj_: ok, do this: first switch to your branch: git checkout rpcnormal
511 2012-11-04 23:03:17 <Luke-Jr> conman: coinbase[42] onward is the content of the "scriptSig" as received by the pool
512 2012-11-04 23:03:27 <conman> right, and I increment coinbase[41] by 4
513 2012-11-04 23:03:35 <Luke-Jr> conman: you need to increment coinbase[41] by the length of the data you are appending, and then append that scriptSig data
514 2012-11-04 23:03:37 <sipa> kjj_: then do this: git rebase -i upstream/master
515 2012-11-04 23:03:45 <conman> and append 4 bytes at the end of the coinbase
516 2012-11-04 23:03:50 <Luke-Jr> after the scriptSig data is more coinbase transaction data - that goes AFTER the data you append
517 2012-11-04 23:04:06 <sipa> kjj_: that will show you an editor with a list of all changes the old patch had - typically it should just contain your own
518 2012-11-04 23:04:07 <conman> ah I need to exatract the position from coinbase[41] ?
519 2012-11-04 23:04:10 <Luke-Jr> yes
520 2012-11-04 23:04:13 <conman> aha
521 2012-11-04 23:04:17 <kjj_> sipa: git checkout rpcnormal first?  and why upstream/master instead of just master?
522 2012-11-04 23:04:29 <conman> that must be what I'm doing wrong then, I thought it just appended at the end
523 2012-11-04 23:04:36 <conman> let's fiddle
524 2012-11-04 23:04:53 <sipa> kjj_: because master is your local 'master' branch - it has no special relationship (well, it has, but imho that's confusing) with the bitcoin/bitcoin.git master
525 2012-11-04 23:04:57 <Luke-Jr> ACTION ponders adding Python2/Python3 snippets to that page for more clarify, since the portable version is kinda confusing
526 2012-11-04 23:05:18 <conman> ACTION doesn't understand python
527 2012-11-04 23:05:43 <sipa> kjj_: upstream/master is the master branch most recently synchronized using git fetch (or git pull, which does magic) from the upstream repository
528 2012-11-04 23:05:57 <kjj_> ahh, ok
529 2012-11-04 23:06:03 <kjj_> naturally, it can't apply
530 2012-11-04 23:06:08 <Luke-Jr> conman: also note that you are not claiming time/increment capability, which might be desirable if you intend to roll the time header too (though in practice it doesn't matter with Eloipool)
531 2012-11-04 23:06:15 <sipa> kjj_: ok, git status will tell you the conflicts
532 2012-11-04 23:06:35 <conman> I'm not planning on it
533 2012-11-04 23:06:53 <conman> 2^32 * 2^32 is a fair range of work...
534 2012-11-04 23:07:13 <kjj_> I know what the conflicts are.  I'm just hoping there is an easy way to fix them
535 2012-11-04 23:08:22 <D34TH> conman(2^32)^2
536 2012-11-04 23:08:24 <D34TH> :D
537 2012-11-04 23:08:47 <conman> Luke-Jr, is a longpollid template guaranteed to be a different coinbase/transaction combo? Can I reset the extranonce at that point?
538 2012-11-04 23:08:49 <kjj_> the throw JSONRPCError lines had string literals in my repo when I made the change, and now they have names
539 2012-11-04 23:08:59 <conman> D34TH, (2^32) << 1
540 2012-11-04 23:09:03 <kjj_> er, negative integer literals rather
541 2012-11-04 23:09:10 <conman> ouafh
542 2012-11-04 23:09:11 <sipa> conman: (2^32) << 32
543 2012-11-04 23:09:14 <conman> typos forget it
544 2012-11-04 23:09:18 <conman> yeah that sipa :)
545 2012-11-04 23:09:22 <Luke-Jr> conman: it's not; but every template received should be unique
546 2012-11-04 23:09:26 <sipa> i don't think we'll see hardware that goes through 2^64 hashes in any reasonable update interval
547 2012-11-04 23:09:35 <conman> hmm should or is I wonder
548 2012-11-04 23:09:36 <sipa> any time soon
549 2012-11-04 23:09:40 <Luke-Jr> conman: err, maybe I misunderstood you
550 2012-11-04 23:09:49 <kjj_> oh, sweet.  the conflicts are marked in the source.  can I just edit those to the after version?
551 2012-11-04 23:09:52 <conman> I guess time alone is enough to discriminate them
552 2012-11-04 23:09:59 <D34TH> suddenly 2^512
553 2012-11-04 23:10:01 <conman> that will make them different templates
554 2012-11-04 23:10:02 <Luke-Jr> conman: longpollid is not guaranteed to change/return for every transaction change, but the response from a LP will of course be unique
555 2012-11-04 23:10:57 <conman> we use 30 second refreshes of the template equivalent with stratum, I'm going to work with the same for gbt when there is no longpollid template unless there's a good reason