1 2014-06-24 01:26:09 <Luke-Jr> when we remove accounts in 0.10, what will be the replacement for getaccountaddress? :/
  2 2014-06-24 01:27:52 <gwillen> Luke-Jr: you can always just leave the concept of accounts in, and just not support creating new ones (i.e. only support the default account in new installations, and existing accounts in existing installations)
  3 2014-06-24 01:28:17 <gmaxwell> getaddresslabled <x>
  4 2014-06-24 01:28:19 <gmaxwell> ?
  5 2014-06-24 01:34:22 <Luke-Jr> gmaxwell: that doesn't currently exist :/
  6 2014-06-24 01:35:05 <gmaxwell> accounts aren't removed yet
  7 2014-06-24 01:36:16 <Luke-Jr> gmaxwell: I'd prefer to make BFGMiner work with 0.9 and 0.10 <.<
  8 2014-06-24 01:38:09 <Luke-Jr> hm
  9 2014-06-24 01:38:31 <Luke-Jr> I suppose if 0.10 adds a generation txn to GBT requests, it'd just work
 10 2014-06-24 01:48:28 <jgarzik> gar
 11 2014-06-24 01:48:33 <jgarzik> CMutableTransaction my foot
 12 2014-06-24 01:48:46 <jgarzik> why do we need a new class for a new use of the same data?
 13 2014-06-24 01:49:03 <jgarzik> ACTION goes to un-break a bunch of newly broken code
 14 2014-06-24 01:49:49 <gmaxwell> jgarzik: because mutable and non-mutable data must be handled differently if you want to both avoid performance issues with copying and safty issues with mutation while not copying (e.g. iterator invalidation, data races, etc).
 15 2014-06-24 01:55:07 <jgarzik> ...and, the bloat increases.  My code now requires multiple copies of the same data structure.  Must use non-mutable to init a mutable copy and vice versa.
 16 2014-06-24 01:56:56 <gmaxwell> it shouldn't, I've not reviewed that change but its a pattern that can be done for ownership tracking with no overhead except syntatic overhead.
 17 2014-06-24 01:58:00 <jgarzik> + CMutableTransaction tx(txDecodeTmp);
 18 2014-06-24 01:58:00 <jgarzik> - CTransaction tx;
 19 2014-06-24 01:58:00 <jgarzik> + CTransaction txDecodeTmp;
 20 2014-06-24 01:58:00 <jgarzik> + DecodeHexTx(txDecodeTmp, strHexTx);
 21 2014-06-24 01:58:00 <jgarzik> - DecodeHexTx(tx, strHexTx);
 22 2014-06-24 01:58:09 <gmaxwell> oh actually I think I did review that one.
 23 2014-06-24 01:58:19 <jgarzik> gmaxwell, That's just a first order review.
 24 2014-06-24 01:58:27 <gmaxwell> (if you're talking about the one that was merged)
 25 2014-06-24 01:59:11 <jgarzik> gmaxwell, These types of changes always have second order effects.  Take the above example.  DecodeHexTx() cannot just decode to mutable.  So you first decode, then convert to mutable, to get around the artificial gateway just erected.
 26 2014-06-24 02:01:06 <jgarzik> gmaxwell, Were we actually seeing performance issues?  Safety issues with mutation?
 27 2014-06-24 02:01:19 <gmaxwell> yes, they do have effects or they wouldn't be worth doing— but the end result is you can do things like hash the transaction hash and avoid recomputing it a zillion times.
 28 2014-06-24 02:01:20 <jgarzik> gmaxwell, What were the data races found?
 29 2014-06-24 02:01:42 <gmaxwell> I believe it speed up sync to hight 200k by about 15%.
 30 2014-06-24 02:02:19 <gmaxwell> sha256 is the biggest cpu user during initial download (pre sigs, of course) by far, and a lot of it was redundant.
 31 2014-06-24 02:02:58 <jgarzik> gmaxwell, sure -- and that has absolutely nothing to do with turning one class into two.
 32 2014-06-24 02:03:15 <jgarzik> gmaxwell, libccoin, python-bitcoinlib and others manage to cache the sha256 without needing multiple classes
 33 2014-06-24 02:04:08 <gmaxwell> yes, it does— simply adding caching to the mutiable side is unsafe if done the direct way.
 34 2014-06-24 02:06:36 <jgarzik> gmaxwell, unsafe how?  all implementations I've seen use a hash and a isValid flag, and track the state.
 35 2014-06-24 02:07:41 <gmaxwell> concurrent access that way is not safe without festooning every access with locks.
 36 2014-06-24 02:12:22 <jgarzik> gmaxwell, Irrelevant in this case.  When you are mutating a transaction, it is a conscious operation, never done while others may be concurrently accessing it.
 37 2014-06-24 02:13:46 <jgarzik> gmaxwell, parallel access by definition happens on transactions that are not actively mutating
 38 2014-06-24 02:14:01 <jgarzik> otherwise they would be of no use to access in parallel with cached hash
 39 2014-06-24 02:14:53 <jgarzik> "update cached data after I'm done mutating this transaction" pattern that is commonly applied to such situations works just fine, and does not require two classes.
 40 2014-06-24 02:19:36 <Luke-Jr> [01:49:49] <gmaxwell> jgarzik: because mutable and non-mutable data must be handled differently if you want to both avoid performance issues with copying and safty issues with mutation while not copying (e.g. iterator invalidation, data races, etc). <-- why not const CTransaction vs non-const? <.<
 41 2014-06-24 02:29:31 <jgarzik> Luke-Jr, nah that's a bit different
 42 2014-06-24 02:29:49 <jgarzik> Luke-Jr, compile time const is not necessarily runtime const
 43 2014-06-24 02:30:09 <jgarzik> though there is useful overlap in many situations (speaking generally)
 44 2014-06-24 02:31:03 <jgarzik> Luke-Jr, there are some exotic languages that can do what you're thinking, ones written with parallelism built in from the start.
 45 2014-06-24 02:31:22 <jgarzik> *multi-threaded parallelism, or even CPU vector parallelism
 46 2014-06-24 02:35:00 <jgarzik> In any case, two classes is IMO pointless as other implementations handle this just fine.  "mutation" is either building a new transaction or doing a quick update.  In all of those cases, you are not touching the transaction at the same time as any other thread.
 47 2014-06-24 02:35:19 <jgarzik> The in-mutation TX in question is never in any parallel access container at the time of mutation.
 48 2014-06-24 02:36:50 <jgarzik> this change has helpfully made the tiny few instances of CMutableTransaction use easy to grep for, and analyze
 49 2014-06-24 02:37:15 <jgarzik> The entire premise as stated is bogus.
 50 2014-06-24 02:37:36 <jgarzik> Look at _use_, not just blindly create compiler protection because.
 51 2014-06-24 03:49:04 <aloha_> Hey!
 52 2014-06-24 03:49:28 <aloha_> After days of fight, i did it! I got everything compiled and working.
 53 2014-06-24 03:49:34 <aloha_> How can i start mine it now ?
 54 2014-06-24 03:53:31 <Luke-Jr> gmaxwell: re "just copy bitcoind" for .bitcoin path: it uses boost -.-
 55 2014-06-24 03:54:16 <mdev> I read the stuff about accounts not scaling to thousands and tens of thousands of tranactions, but can I do that if i avoid the api regarding most the account stuff? or do I need to avoid accounts all together and just stick them in a seperate database and just generate new addresses without associated accounts in the wallet?
 56 2014-06-24 03:55:09 <gmaxwell> Luke-Jr: thats why I didn't tell you to look at bitcoind
 57 2014-06-24 03:55:10 <gmaxwell> 18:08 <@gmaxwell> p2pool is fairly effective, should look at what it does.
 58 2014-06-24 03:55:10 <gmaxwell> 18:08 <@gmaxwell> Petertodd's dustbegone does too, though I think I suggested he pattern it after p2pool.
 59 2014-06-24 03:55:33 <gmaxwell> mdev: yes.
 60 2014-06-24 03:56:30 <Luke-Jr> ACTION wishes Linux didn't suck as a router OS
 61 2014-06-24 03:56:37 <mdev> gmaxwell yes to what
 62 2014-06-24 03:56:49 <mdev> avoid most account api or have to avoid accounts entirely in the wallet
 63 2014-06-24 03:57:07 <mdev> for thousands of transactions
 64 2014-06-24 03:57:12 <mdev> or 10's of thousands
 65 2014-06-24 03:57:57 <gmaxwell> mdev: if you're not using the accounts apis they don't do anything except cause you confusion and trouble.
 66 2014-06-24 03:58:02 <jgarzik> +1
 67 2014-06-24 03:59:14 <mdev> well my interest is to help organize, but I guess I don't #need that in addition to keeping it in a database
 68 2014-06-24 03:59:20 <mdev> if it's going to slow things down
 69 2014-06-24 03:59:52 <mdev> hopefully I don't run into any roadblocks using just addresses, since i'll need to still generate 10's of thousands of those
 70 2014-06-24 04:02:29 <mdev> as far as confirmations go, is there a minimum number I should check for(besides 1) to trust in
 71 2014-06-24 04:02:50 <mdev> before considering the transaction valid
 72 2014-06-24 04:05:16 <jgarzik> mdev, standard advice is 6
 73 2014-06-24 04:05:41 <jgarzik> mdev, depends on the $value involved and other factors.  If it's a car or house, I would wait longer than 1 hour, personally.
 74 2014-06-24 04:06:03 <mdev> 6 is about an hour right? and wow very long time, ok
 75 2014-06-24 04:06:29 <mdev> does bumping up the transaction fee help speed that up much?
 76 2014-06-24 04:07:40 <poutine> mdev, I'm not sure how much of a dev question this is, or any of what you asked is, but I think as someone dealing with bitcoin, you should determine your own acceptable limits of liability/risk
 77 2014-06-24 04:12:04 <Luke-Jr> gmaxwell: yeah, this seems simpler once you find the code ;)
 78 2014-06-24 04:22:59 <aloha_> how can i mine bitcoin from deamon on ubuntu ?
 79 2014-06-24 04:24:29 <Luke-Jr> aloha_: BFGMiner
 80 2014-06-24 04:24:37 <Luke-Jr> aloha_: also, you need mining hardware
 81 2014-06-24 04:24:44 <Luke-Jr> computers don't mine, they just control it
 82 2014-06-24 04:26:22 <aloha_> I know it.
 83 2014-06-24 04:26:50 <aloha_> can you tell me ?
 84 2014-06-24 04:26:50 <aloha_> I got avalon
 85 2014-06-24 04:26:50 <aloha_> I just want to know how to mine by deamon
 86 2014-06-24 04:26:50 <aloha_> on ubuntu
 87 2014-06-24 04:27:05 <aloha_> bitcoind _ _ _ _ _ _ _ ?
 88 2014-06-24 04:27:16 <aloha_> and now ?
 89 2014-06-24 04:27:16 <aloha_> bitcoin server starting
 90 2014-06-24 04:32:09 <mdev> cgminer is very popular mining software that the majority of pool seems to provide params for, you should check that out
 91 2014-06-24 04:32:26 <mdev> there are variants like sgminer for certain altcoins and similar, but most based off cgminer
 92 2014-06-24 04:32:37 <mdev> sgminer based off cgminer too
 93 2014-06-24 05:25:35 <Luke-Jr> mdev: cgminer itself is a fork of BFGMiner, which is far superior
 94 2014-06-24 05:25:45 <Luke-Jr> aloha_: but in any case, this is off-topic here; this is -dev
 95 2014-06-24 05:25:47 <Luke-Jr> not -mining
 96 2014-06-24 05:26:23 <mdev>  weird, I see cgminer everywhere and forks off it, wonder why bfgminer lost popularity
 97 2014-06-24 05:26:49 <Luke-Jr> mdev: cgminer reused the name of the GPU miner BFGMiner was based on
 98 2014-06-24 05:27:16 <Luke-Jr> mdev: so BFGMiner didn't really *lose* popularity, as much as cgminer hijacked it ;)
 99 2014-06-24 05:27:20 <Luke-Jr> but this is off-topic too :P
100 2014-06-24 05:27:44 <aloha_> I made shiit
101 2014-06-24 05:27:56 <aloha_> i changed .conf file while bitcoind was started
102 2014-06-24 05:28:01 <aloha_> now i cant make anything :S
103 2014-06-24 05:28:06 <aloha_> What solve this issue
104 2014-06-24 05:28:07 <aloha_> ?
105 2014-06-24 05:28:14 <Luke-Jr> aloha_: this is also not bitcoind support
106 2014-06-24 05:30:54 <mdev> does bitcoind have its own channel?
107 2014-06-24 05:32:14 <Luke-Jr> mdev: #bitcoin works
108 2014-06-24 05:33:28 <mdev> ahh not for me, banned from there for a month, cause ops can.
109 2014-06-24 05:33:34 <mdev> anyway i'll google, thanks for the help
110 2014-06-24 05:37:08 <aloha_> cmon
111 2014-06-24 05:37:19 <aloha_> i couldnt connect the server waht i must do guys
112 2014-06-24 05:37:21 <aloha_> Plssssssssssssssssssssss
113 2014-06-24 05:57:44 <sipa> jgarzik: look at the previous two attempts i made; in one i was actually seeing test failures i could not understand and had to work around...
114 2014-06-24 05:58:04 <sipa> jgarzik: i agree it is overkill, but it is just obviously and always correct
115 2014-06-24 06:05:42 <sipa> jgarzik: also, but probably so far out that it doesn't really matter: CTransaction could use more efficient represebtations in memory (like allocating all related data in a single malloc)
116 2014-06-24 06:07:39 <Luke-Jr> gmaxwell: reckon I want to load bitcoin.conf before or after chrooting? :P
117 2014-06-24 06:14:20 <aloha_> Please...
118 2014-06-24 06:14:22 <aloha_> Guys
119 2014-06-24 06:14:27 <aloha_> 1h ago it was ok.
120 2014-06-24 06:14:34 <aloha_> Can you just tell me how to reset this?
121 2014-06-24 06:14:39 <aloha_> Or i need recompile again ?
122 2014-06-24 06:15:47 <AndersAA> aloha_: #bitcoin - not #bitcoin-dev
123 2014-06-24 07:36:19 <Luke-Jr> Reviews requested for https://github.com/luke-jr/bfgminer/pull/474 (Automatically enable solo mining failover and local block submission)
124 2014-06-24 07:36:23 <Luke-Jr> gmaxwell: ^
125 2014-06-24 08:00:04 <GAit> Luke-Jr: why the go to when you could just return false? also the free(rpcpass) above to goto out is redundant since the if ensures its NULL
126 2014-06-24 08:01:36 <Luke-Jr> GAit: cleanliness
127 2014-06-24 08:01:41 <Luke-Jr> true re rpcpass tho
128 2014-06-24 08:02:14 <Luke-Jr> GAit: wait no, because the 'goto err' later needs to free it
129 2014-06-24 08:08:07 <GAit> yes, missed the label. other thing: if rpcpass is given and rpcuser is not given, the goto err will call free on the "" character string
130 2014-06-24 08:08:26 <Luke-Jr> crap
131 2014-06-24 08:09:13 <Luke-Jr> thanks
132 2014-06-24 08:09:17 <GAit> also, the code only ever returns false?
133 2014-06-24 08:09:27 <GAit> nw
134 2014-06-24 08:09:45 <GAit> and its return is never checked, so either make it return something meaningful and check it or make it a void return ?
135 2014-06-24 08:11:12 <Luke-Jr> GAit: it's a callback, its return value is used to determine if it continues on to other files
136 2014-06-24 08:18:19 <GAit> that makes sense
137 2014-06-24 12:06:26 <dekalo> hello
138 2014-06-24 12:16:17 <BitNodes> Hello!
139 2014-06-24 12:16:29 <dekalo> how comes BitNodes
140 2014-06-24 12:16:39 <BitNodes> I would like to know if somebody here can help me to set up nodes to btc network.
141 2014-06-24 12:16:57 <BitNodes> im getting 4 on digital ocean.
142 2014-06-24 12:16:57 <dekalo> nodes?
143 2014-06-24 12:17:08 <BitNodes> yes.
144 2014-06-24 12:17:21 <dekalo> have you ever use bitcoind ?
145 2014-06-24 12:17:25 <BitNodes> Yes .
146 2014-06-24 12:17:29 <dekalo> and. ?
147 2014-06-24 12:17:29 <Gabridome> there is a tutorial and a script on bitcointalk and reddit
148 2014-06-24 12:17:32 <BitNodes> a lot mate.
149 2014-06-24 12:17:35 <BitNodes> ok
150 2014-06-24 12:17:35 <hearn> All you need to do is run it, then
151 2014-06-24 12:17:55 <BitNodes> I dont need to setup nothing behind ssh ?
152 2014-06-24 12:18:02 <BitNodes> Jsut addnode ip add ?
153 2014-06-24 12:18:19 <BitNodes> I thought was needed conf the VPS.
154 2014-06-24 12:18:24 <BitNodes> for that.
155 2014-06-24 12:18:24 <hearn> not even that. you just ...... run it and let it get on with it
156 2014-06-24 12:18:37 <hearn> just keep an eye on the logs to make sure it's still running and upgrade it when new releases come out
157 2014-06-24 12:18:44 <Gabridome> you have to open the port but the script does it for you
158 2014-06-24 12:18:51 <BitNodes> Ok.
159 2014-06-24 12:19:02 <BitNodes> My point is just support bitcoin network.
160 2014-06-24 12:19:17 <BitNodes> If we keep doing this, bitcoin hard to shutdown :)
161 2014-06-24 12:19:34 <dekalo> BitNodes, nice, when you stard bitcoind it gets first well-known nodes from dns seed
162 2014-06-24 12:19:34 <Gabridome> i did the same
163 2014-06-24 12:19:47 <BitNodes> Gabridome +1
164 2014-06-24 12:20:01 <BitNodes> Ok. dekalo.
165 2014-06-24 12:20:09 <Gabridome> but lately the size of the blockchain compelled me to stop for a bit
166 2014-06-24 12:20:41 <BitNodes> hum ok.
167 2014-06-24 12:20:50 <BitNodes> digitalOcean vps seems ok right ?
168 2014-06-24 12:20:56 <hearn> should be fine
169 2014-06-24 12:21:07 <hearn> Gabridome: because of upload bandwidth?
170 2014-06-24 12:21:23 <Gabridome> I have apreciated their service and now you can also them with bitcoin
171 2014-06-24 12:21:24 <BitNodes> dekalo, my head is a big confusion then lol.. I thought I need to compile bitcoind inside the vps
172 2014-06-24 12:21:35 <BitNodes> and after run it as i run daemon on my comp
173 2014-06-24 12:22:00 <BitNodes> I get 10$ free so 6nodes.
174 2014-06-24 12:22:09 <Gabridome> no i had only 40 giga vps and did an electrum server for my personal purpose
175 2014-06-24 12:22:09 <sipa> wait, are you running bitcoind on your vps our on your own system?
176 2014-06-24 12:22:25 <Gabridome> at the end I went out of space...
177 2014-06-24 12:22:45 <BitNodes> sipa atm on my laptop..
178 2014-06-24 12:22:58 <BitNodes> but i thought i needed to run it on VPS also.
179 2014-06-24 12:23:03 <sipa> ...?
180 2014-06-24 12:23:07 <sipa> it's the same program
181 2014-06-24 12:23:11 <Gabridome> you do have to
182 2014-06-24 12:23:11 <sipa> you run it wherever you want
183 2014-06-24 12:23:30 <sipa> "needed" for what?
184 2014-06-24 12:23:48 <Gabridome> if you want to serve the network you have to keep it up though
185 2014-06-24 12:23:57 <BitNodes> ahhh
186 2014-06-24 12:24:12 <BitNodes> Ok, i will find more about it or i will ask help of Morb
187 2014-06-24 12:24:16 <Gabridome> uptime is essential I think. Am I wrong?
188 2014-06-24 12:24:19 <BitNodes> since he set up a lot of nodes.
189 2014-06-24 12:25:48 <Gabridome> If you want to sustain the network you have to have a trustfully connected machine
190 2014-06-24 12:26:45 <Gabridome> a vps with large bandwith and continuous uptime is good for the network
191 2014-06-24 12:27:16 <Luke-Jr> Gabridome: uptime isn't all that important
192 2014-06-24 12:27:26 <Luke-Jr> I mean, obviously it's better to be up 24/7
193 2014-06-24 12:27:30 <Gabridome> you can just crawl reddit or bitcointalk for "vps bitcoind"
194 2014-06-24 12:28:51 <Gabridome> 24/7and good bandwidth is an effective help for the network
195 2014-06-24 12:29:08 <tjopper> Just a tip, if you know how to use AWS (amazon) you could run 1 node on their free tier, for a year.
196 2014-06-24 12:29:31 <Gabridome> wow
197 2014-06-24 12:29:55 <Luke-Jr> tjopper: with enough RAM for bitcoind?
198 2014-06-24 12:30:40 <tjopper> Luke-JR 512 MB
199 2014-06-24 12:31:39 <tjopper> Its not just clickable, you would have to connect your 30GB free storage to your micro instance
200 2014-06-24 12:31:43 <Gabridome> Luke-Jr: so better to limit the number of connections right?
201 2014-06-24 12:31:58 <Luke-Jr> Gabridome: totally depends on the node's resources
202 2014-06-24 12:32:24 <Gabridome> Luke-Jr: something like 40 connection max
203 2014-06-24 12:32:26 <tjopper> but feel free to dig into AWS free tier and find out if im right
204 2014-06-24 12:32:49 <Luke-Jr> tjopper: dunno if that'd be enough
205 2014-06-24 12:33:05 <Luke-Jr> Amazon decided to tell me my 1 year was up before I even know it was available :/
206 2014-06-24 12:34:03 <tjopper> I currently use it for a hosted wordpress small site, so Im not totally sure, but from paper it seems doable. I just wanted people to it.
207 2014-06-24 12:34:26 <tjopper> If somebody can verify this everybody who doesnt have an AWS could run 1 for free
208 2014-06-24 12:35:26 <Luke-Jr> for a year..
209 2014-06-24 12:35:35 <Luke-Jr> then after a year, they all die and we realise we have no real nodes left
210 2014-06-24 12:35:37 <Luke-Jr> :P
211 2014-06-24 12:35:54 <tjopper> I found out a few weeks ago... Since we (blocktrail.com) were investigating hosting
212 2014-06-24 12:36:25 <tjopper> Luke-jr I agree short term
213 2014-06-24 12:36:52 <tjopper> however after people relaise how much money they did earn they would be happy ot pay in a year right ;) ?
214 2014-06-24 12:37:11 <tjopper> sorry for my English
215 2014-06-24 12:38:26 <Luke-Jr> running a node doesn't earn any money
216 2014-06-24 12:39:57 <Gabridome> Luke-Jr: you gain experience though... :P
217 2014-06-24 12:40:39 <Gabridome> I see it as a small donation to the network
218 2014-06-24 13:17:06 <robbak> Could someone yell at Mischi for me? Nice idea to get rid of sed -i, which everyone uses even if posix doesn't define it. Did he have to replace it with an ugly bash shell glob trick which isn't supported outside of bash?
219 2014-06-24 13:18:11 <dabura667_> BitNodes: rock on! I am running my full node right now!
220 2014-06-24 13:19:17 <dabura667_> 38 connections, currently uploading about 200kB/s consistently... I guess someone's downloading the blockchain...
221 2014-06-24 13:20:36 <sipa>           RX bytes:332569404363 (332.5 GB)  TX bytes:1854295388364 (1.8 TB)
222 2014-06-24 13:20:51 <jgarzik> heh
223 2014-06-24 13:21:00 <jgarzik> After tons of complaints that this is impossible,
224 2014-06-24 13:21:00 <sipa> (97 days uptime)
225 2014-06-24 13:21:07 <jgarzik> Counterparty moves to use 40-byte OP_RETURN
226 2014-06-24 13:25:53 <dabura667_> jgarzik: Lowers fees considerably for CP
227 2014-06-24 13:29:03 <hearn> sipa: i really wonder where all these nodes go. we seem to upload far more blockchains than actually survive to become full nodes
228 2014-06-24 13:29:09 <hearn> i guess they sit behind NAT doing not much
229 2014-06-24 13:30:24 <sipa> hearn: i guess many never reach full sync
230 2014-06-24 13:31:13 <Luke-Jr> hearn: re BIP 70 savings extension, I like
231 2014-06-24 13:32:58 <hearn> Luke-Jr: cool :)
232 2014-06-24 13:33:16 <hearn> coinbase are all for it
233 2014-06-24 13:35:18 <epscy> i tried to sync a new node recently and gave up
234 2014-06-24 13:35:33 <epscy> kept getting killed due to running out of memory
235 2014-06-24 13:35:49 <epscy> this was on a VPS with 512 MB memory
236 2014-06-24 13:43:07 <helo> my isp hates me... it's easy for me to exceed my data limit by two to four times if i run a listening full node.
237 2014-06-24 13:44:43 <helo> this is probably the case with the majority of the normal users that are ~supposed to function as the backbone of the p2p network.
238 2014-06-24 13:44:55 <hearn> yeah
239 2014-06-24 13:45:02 <hearn> we know it's painful in the extreme
240 2014-06-24 13:45:39 <epscy> i might try again when headers first is in, then again the VPS only has 30GB of disk space so I might not
241 2014-06-24 13:45:45 <helo> there's nothing in the contract about my data cap... they just bug me and recommend i upgrade for a "more ideal experience" :)
242 2014-06-24 13:45:50 <hearn> Tor has a great notion of hibernation mode
243 2014-06-24 13:45:57 <sipa> headersfirst will not change resource usage
244 2014-06-24 13:46:04 <hearn> you tell it how much bandwidth you can offer and then it shuts down until the end of the month, if you exceed it
245 2014-06-24 13:46:25 <sipa> making block serving optional may
246 2014-06-24 13:46:49 <wumpus> hearn: yes, that would be nice for bitcoind
247 2014-06-24 13:47:35 <sipa> or increases the chance that block serving is denied when you get close to the limit
248 2014-06-24 13:47:41 <wumpus> well not shutting down, but no longer serve blocks
249 2014-06-24 13:47:45 <hearn> right
250 2014-06-24 13:47:51 <epscy> sipa: i'm pretty sure bitcoind didn't used to need >512MB RAM, any idea what changed?
251 2014-06-24 13:48:18 <sipa> it has certainly needed that amount since a year or so
252 2014-06-24 13:48:25 <sipa> on 32 bit perhaps a bit less
253 2014-06-24 13:48:51 <gmaxwell> It used that much back in 0.3.x times, IIRC.
254 2014-06-24 13:49:22 <sipa> RSS or VM?
255 2014-06-24 13:49:25 <wumpus> yes it has always been a memory hog, though in some scenarios it uses more memory like the initial sync
256 2014-06-24 13:49:29 <hearn> i see a surprising number of nodes with a starting height of -1
257 2014-06-24 13:49:53 <hearn> epscy: it holds all headers in RAM so memory usage will naturally go up over time
258 2014-06-24 13:50:38 <hearn> e.g. 23mb of that is just headers, assuming the most optimal representation possible
259 2014-06-24 13:50:44 <tjopper> epscy if you get it synched you would be able to run it for "free"
260 2014-06-24 13:50:45 <hearn> but in reality they're stored in a std::map so it's more than that
261 2014-06-24 13:51:03 <hearn> not sure what the blowup factor is
262 2014-06-24 13:51:05 <wumpus> I doubt it's the headers that are problematic
263 2014-06-24 13:51:21 <wumpus> are there good tools for figuring out what the memory goes to in a C++ program?
264 2014-06-24 13:51:26 <gmaxwell> sipa: RSS, — we had a lot of prior issues which were improved.
265 2014-06-24 13:51:38 <hearn> there are tools. whether they're good or not is debatable :)
266 2014-06-24 13:51:53 <hearn> if we switched to tcmalloc then it has diagnostic and heap profiling tools built in
267 2014-06-24 13:51:54 <gmaxwell> wumpus: some allocators can output debugging, e.g. tcmalloc you just LD_PRELOAD it and set some enviroment variables.
268 2014-06-24 13:52:07 <gmaxwell> you don't have to switch, you can just ld_preload it for debugging.
269 2014-06-24 13:52:11 <wumpus> gmaxwell: ok, sounds useful
270 2014-06-24 13:52:32 <hearn> tcmalloc might yield speed improvements too, perhaps. OTOH it used to be not very good at giving back memory to the OS
271 2014-06-24 13:52:38 <hearn> it's not hard to experiment with at least
272 2014-06-24 13:52:39 <wumpus> yes I'd like to avoid having to do anything invasive, it's not conductive to repeated runs
273 2014-06-24 13:52:58 <wumpus> something with LD_PRELOAD is great
274 2014-06-24 13:52:59 <gmaxwell> I benchmarked tcmalloc and jcmalloc a while back and surprisingly there was no measurable improvment, which really surprised me.
275 2014-06-24 13:53:35 <gmaxwell> we're currently very hard on the heap allocator, the glibc malloc is better than it's often credited for. :)
276 2014-06-24 13:53:44 <Luke-Jr> I thought programs never gave memory back to the OS?
277 2014-06-24 13:53:56 <gmaxwell> Luke-Jr: they do.
278 2014-06-24 13:53:57 <wumpus> Luke-Jr: on modern linux they can (and do)
279 2014-06-24 13:54:16 <Luke-Jr> non-mmap'd memory?
280 2014-06-24 13:54:18 <gmaxwell> (perhaps on windows tcmalloc/jemalloc would be a speed improvement)
281 2014-06-24 13:54:23 <wumpus> on older OSes like solaris they generally didn't
282 2014-06-24 13:54:31 <gmaxwell> Luke-Jr: modern malloc's use mmap.
283 2014-06-24 13:56:00 <wumpus> http://goog-perftools.sourceforge.net/doc/heap_profiler.html  this does look useful
284 2014-06-24 13:56:45 <sipa> replacing the CCoinsViewCache with something hashmap based rather than std::map would reduce allocations too, i think :)
285 2014-06-24 13:56:52 <sipa> (and sync performance...)
286 2014-06-24 13:58:56 <hearn> gmaxwell: i think it mostly makes a difference when you have lots of threads
287 2014-06-24 13:59:16 <sipa> we're still painfully single-threaded for most things
288 2014-06-24 14:04:49 <gdm85> npm, bower, pkmanager: what's wrong with NodeJS? :s
289 2014-06-24 14:05:36 <SomeoneWeird> gdm85: ?
290 2014-06-24 14:05:43 <gdm85> SomeoneWeird: sorry, off-topic rant
291 2014-06-24 14:05:54 <SomeoneWeird> bower is frontend stuff, never ever heard of pkmanager
292 2014-06-24 14:06:24 <gdm85> SomeoneWeird: pakmanager. I was just reading ways to install in https://github.com/FuturesJS/sequence
293 2014-06-24 14:07:08 <SomeoneWeird> that looks like a horrible module
294 2014-06-24 14:07:18 <SomeoneWeird> anyway, offtopic
295 2014-06-24 14:07:24 <SomeoneWeird> pm me if you wanna continue ;p
296 2014-06-24 14:08:14 <jtimon> does "make check" run all the test in the pull tester? how can I run those locally?
297 2014-06-24 14:10:48 <wumpus> jtimon: qa/pulltester has the scripts for the pulltester
298 2014-06-24 14:11:51 <wumpus> make check is part of it, but not everything
299 2014-06-24 14:13:15 <jtimon> thanks
300 2014-06-24 14:13:32 <skinnkavaj> <Luke-Jr> running a node doesn't earn any money
301 2014-06-24 14:14:01 <skinnkavaj> Why is this not incentivized?
302 2014-06-24 14:15:06 <hearn> skinnkavaj: because it's hard and nobody did it yet. do you want to work on it?
303 2014-06-24 14:15:16 <hearn> + it may put off existing volunteers if it's made commercial (maybe)
304 2014-06-24 14:15:28 <skinnkavaj> hearn: Why would it be hard to do?
305 2014-06-24 14:15:51 <hearn> "incentivised" with what? bitcoins? so you pay for the download and then the node refuses to give it to you, for example.
306 2014-06-24 14:15:57 <hearn> so then you need micropayments
307 2014-06-24 14:16:01 <hearn> and then you need micropayment channels
308 2014-06-24 14:16:11 <hearn> and then ideally you need non-malleable transcations
309 2014-06-24 14:16:26 <skinnkavaj> hearn: Didn't you work on micropayment channels? You have been talking about it a lot if I remember correctly
310 2014-06-24 14:16:30 <hearn> micropayment channels + file download exists, i prototyped it last year with PayFile. but it's a separate app
311 2014-06-24 14:16:43 <hearn> yes. there's a desktop app that lets you pay for large file downloads on a per-chunk basis
312 2014-06-24 14:16:48 <hearn> so it could be used to download the block chain
313 2014-06-24 14:16:56 <hearn> but it's not integrated/integrateable into Core.
314 2014-06-24 14:17:39 <skinnkavaj> Does anyone have any rejection against forcing all miners to keep a full node running? As proposed by Vitalik from Ethereum
315 2014-06-24 14:17:40 <wumpus> I don't think having to pay for download of block  data would work
316 2014-06-24 14:17:45 <wumpus> people would just use the torrent ;)
317 2014-06-24 14:18:48 <wumpus> but for rarer data the system sounds interesting
318 2014-06-24 14:19:03 <Luke-Jr> wumpus: not to mention until you have the blockchain you can't have bitcoins to pay with :P
319 2014-06-24 14:19:19 <hearn> wumpus: well, they would just download from old nodes :) i mean, bittorrent doesn't magically make bandwidth cheaper
320 2014-06-24 14:19:23 <hearn> same amount of data is gonna move no matter what
321 2014-06-24 14:19:36 <wumpus> if at some point the first (or intermediate) blocks of the block chain become very rare, there may be a market
322 2014-06-24 14:19:38 <skinnkavaj> http://bitcoinmagazine.com/14282/mining-2/ I have not heard anyone say anything bad about this proposal from Vitalik
323 2014-06-24 14:20:01 <wumpus> hearn: no it doesn't, it was meant as more of a joke, as people are used to spreading large files through torrents without expecting payments
324 2014-06-24 14:20:38 <hearn> sure
325 2014-06-24 14:20:45 <wumpus> Luke-Jr: they could pay with a SPV client :p
326 2014-06-24 14:20:59 <hearn> right, that bootstrapping problem is rather a pain :)
327 2014-06-24 14:21:08 <tjopper> skinnkavaj running a node is an "investment" which result in more knowledge about nodes, the netwerk, the protocol. So you would earn value in knowledge and being part of the network instead money :P
328 2014-06-24 14:21:10 <wumpus> Luke-Jr: on the other hand, having to pay with bitcoins to get connected to the internet would be interesting
329 2014-06-24 14:21:15 <skinnkavaj> wumpus: We have like 7000-7000 full nodes I think. Yesterday when I downloaded a movie from Piratebay it had 4000-5000 seeders and I was thinking "Why don't we have more full nodes running if a random torrent on piratebay have this much seeders?"
330 2014-06-24 14:21:40 <wumpus> skinnkavaj: right, but financial incentive is probably not the answer
331 2014-06-24 14:21:45 <deup> because the value isn't there, no entertainment
332 2014-06-24 14:22:11 <skinnkavaj> wumpus: But forcing miners to keep running full nodes as suggested by Vitalik
333 2014-06-24 14:22:18 <SomeoneWeird> ACTION sighs at skinnkavaj
334 2014-06-24 14:22:18 <wumpus> skinnkavaj: hey at least torrent clients have bandwidth limits, that helps
335 2014-06-24 14:22:28 <hearn> that's true
336 2014-06-24 14:22:37 <hearn> bittorrent had more work put into it
337 2014-06-24 14:22:46 <hearn> we need to integrate bittorrent and core together in a single package :)
338 2014-06-24 14:23:01 <wumpus> some day I'm just going to add bandwidth limits to bitcoin core and get flamed by everyone :)
339 2014-06-24 14:24:05 <tjopper> :D isn't armory downloading part of the blockchain by torrents in their latest update ?
340 2014-06-24 14:24:40 <skinnkavaj> I wouldn't be worried at all about the future of bitcoin if only the dev team had the guts to fix the pool mining problem
341 2014-06-24 14:25:16 <SomeoneWeird> wow
342 2014-06-24 14:25:20 <SomeoneWeird> why don't you fix it then?
343 2014-06-24 14:25:31 <skinnkavaj> SomeoneWeird: I am suggesting to you right now
344 2014-06-24 14:25:36 <skinnkavaj> The proposal from Vitalik
345 2014-06-24 14:25:40 <SomeoneWeird> skinnkavaj: they're not your slaves
346 2014-06-24 14:25:44 <tjopper> skinnkavaj are you asking the dev team t fix humanity ?
347 2014-06-24 14:25:59 <Luke-Jr> SomeoneWeird: I've been over this with him a few times now. skinnkavaj is all about complaining and forcing others to do things as volunteers, but nothing from himself.
348 2014-06-24 14:26:08 <SomeoneWeird> Luke-Jr: yep.
349 2014-06-24 14:26:11 <skinnkavaj> Luke-Jr: Fix it and I give you 1 BTC
350 2014-06-24 14:26:22 <SomeoneWeird> bribes, great c_c
351 2014-06-24 14:26:32 <jtimon> can you summarize it? that wall of text apparently contained several solutions...
352 2014-06-24 14:26:51 <Luke-Jr> skinnkavaj: 3 hours isn't going to fix it.
353 2014-06-24 14:27:18 <jtimon> well, "solutions", for example, I don't think forcing miners to keep the full chain is a good idea
354 2014-06-24 14:27:40 <skinnkavaj> jtimon: Why? Then we would have more full nodes so it would help that problem as well
355 2014-06-24 14:27:56 <SomeoneWeird> is it /actually/ a problem?
356 2014-06-24 14:28:07 <SomeoneWeird> or is it some made up problem again?
357 2014-06-24 14:28:09 <skinnkavaj> SomeoneWeird: Pooled mining or lack of full nodes?
358 2014-06-24 14:28:10 <jtimon> full node != archive node
359 2014-06-24 14:28:19 <skinnkavaj> Are you seriously thinking that pooled mining is not a problem.
360 2014-06-24 14:28:26 <SomeoneWeird> skinnkavaj: whatever you want to pay someone to fix?
361 2014-06-24 14:28:33 <SomeoneWeird> What exactly needs fixing?
362 2014-06-24 14:28:42 <skinnkavaj> The decentralized part of bitcoin
363 2014-06-24 14:28:55 <SomeoneWeird> So, how do you plan on fixing that?
364 2014-06-24 14:29:04 <skinnkavaj> Right now we could change the text on bitcoin.org from "decentralized" to "controlled by a few pool operators"
365 2014-06-24 14:29:27 <deup> sounds like the democracy that is the us govnt
366 2014-06-24 14:29:31 <SomeoneWeird> skinnkavaj: wow
367 2014-06-24 14:30:14 <deup> though "a few" is much more, over 12: https://blockchain.info/pools
368 2014-06-24 14:30:17 <wumpus> please move this discussion somewhere else
369 2014-06-24 14:30:27 <deup> agreed
370 2014-06-24 14:30:41 <jtimon> https://github.com/bitcoin/bitcoin.org
371 2014-06-24 14:30:41 <jtimon> skinnkavaj is that the fix you're suggesting? changing bitcoin.org?
372 2014-06-24 14:31:14 <skinnkavaj> How can everyone be in denial this is a problem? Even Luke-Jr thinks it's a problem
373 2014-06-24 14:31:53 <SomeoneWeird> #bitcoion
374 2014-06-24 14:31:56 <SomeoneWeird> er, #bitcoin
375 2014-06-24 14:31:57 <jtimon> you haven't presented any solution for a problem you've loosely defined
376 2014-06-24 14:31:58 <Luke-Jr> skinnkavaj: pooled minign is not a problem
377 2014-06-24 14:32:17 <Luke-Jr> SomeoneWeird: +1
378 2014-06-24 14:35:20 <hearn> skinnkavaj: the blog post i wrote should go live soon. i kicked jinyoung about it today
379 2014-06-24 14:35:34 <hearn> skinnkavaj: IMO the next thing to do is build out getblocktemplate more
380 2014-06-24 14:52:12 <skinnkavaj> <deup> though "a few" is much more, over 12: https://blockchain.info/pools
381 2014-06-24 14:52:19 <skinnkavaj> So 12 people in control off Bitcoin
382 2014-06-24 14:52:33 <skinnkavaj> I bet VISA and Mastercard also have 12 people in control of their servers
383 2014-06-24 14:53:00 <skinnkavaj> <hearn> "incentivised" with what? bitcoins? so you pay for the download and then the node
384 2014-06-24 14:53:20 <skinnkavaj> If miners are forced to keep the full blockchain, it will be kinda incentivised to keep running a full node
385 2014-06-24 14:54:13 <skinnkavaj> Because you have to do it in order to mine.
386 2014-06-24 14:54:40 <deup> they would never download such a fork.
387 2014-06-24 14:55:04 <SomeoneWeird> i guess your twitter bio sums it up
388 2014-06-24 14:55:08 <SomeoneWeird> "troll"
389 2014-06-24 14:56:22 <Luke-Jr> skinnkavaj: do something useful and review the code I wrote this morning https://github.com/luke-jr/bfgminer/pull/474
390 2014-06-24 14:57:58 <skinnkavaj> Luke-Jr: Can you atleast provide a description of the changes in the description field on Git?
391 2014-06-24 14:58:19 <gmaxwell> skinnkavaj: the descriptions are in the indivigual commits.
392 2014-06-24 15:03:55 <wumpus> skinnkavaj: again, please move this discussion somewhere else
393 2014-06-24 15:10:41 <isotonic2> hi, i was wondering, is there an OP code in the script that would get the hash of a transaction? A bit like OP_CHECKSIG - but without doing the ecdsa verification?
394 2014-06-24 15:11:32 <hearn> there is not
395 2014-06-24 15:15:50 <isotonic2> thats a shame :(
396 2014-06-24 15:17:49 <hearn> what do you want it for?
397 2014-06-24 15:20:51 <isotonic2> well, if you could - then I think (still devising) you would be able to do a lamp port signature using the scripting facility
398 2014-06-24 15:21:31 <isotonic2> in the scriptsig - provide the typical lamport signature based on the hash of the transaction, and validate that it matches up
399 2014-06-24 15:21:47 <dekalo> hello, how can it be possibile that when I invoke RPC rawsigntransaction on bitcoind 0.9 in RegTetst I got the error Non-canonical signature: too short? Looking at script.cpp (like as hearn wisely advised) seems that the signature scriptSig vchSig.size < 9, but I'm pretty sure that it isn't.
400 2014-06-24 15:21:59 <dekalo> 0100000001cbdb3850d6fbc16d1623a6ff2e3541fa8d32c644215e29907399031e82e79511000000009100473045022100a45fe1f03de512b0cbeb95e998607732714ca0b27e9772a7c07528773468569a02200695636a7f89b81d8c423d13838e0b8c2d13d5ee0ecd33e028c0fe891612f69847522103331cd1918b2ba042450d869a556d38f5e79ccee0c8285b8597d1e3c7871bfe1d2102b5fec9d03d5ef69cbe2b64b5c952bfb49b453f18abd5d5ac90780614ee02781152aeffffffff0100943577000000001976a91450b88bb3b43
401 2014-06-24 15:21:59 <dekalo> 45a052d2cc1802fb7131414f6b10688ac00000000
402 2014-06-24 15:21:59 <dekalo> That's the rawtransaction that I'm trying to sign:
403 2014-06-24 15:22:07 <dekalo> That's it rawdecoded: http://sprunge.us/FJZI
404 2014-06-24 15:26:06 <gmaxwell> isotonic2: you would need more than that, a lot more to make it reasonably efficient.
405 2014-06-24 15:27:59 <isotonic2> gmaxwell: i was looking at it to see if it was possible, but you could do a winternitz signature (v similar to lam port) to increase its effiency (would never be as great as ecdsa obviously)
406 2014-06-24 15:28:48 <gmaxwell> isotonic2: that was my "lot more" since fully unrolling winternitz decompression requires a bunch of operations.
407 2014-06-24 15:32:32 <isotonic2> gmaxwell: true, but I think the unrolling is competitive with verifying an ecdsa signature, but it's not as attractive as its very difficult to explain how it works, but i think such an op_code to allow the script to retrieve the hash of the transaction would be useful (perhaps for applications that i cannot think off right now)
408 2014-06-24 15:37:27 <andytoshi> i think it could create security issues, you could create outputs that could only be spent by signing (a) the output, (b) another output containing a message of the sender's choice
409 2014-06-24 15:37:33 <andytoshi> "i hereby enslave myself to andytoshi"
410 2014-06-24 15:39:15 <andytoshi> (not that that's really a security issue, since nobody would accept such a coin as payment for anything...but it highlights why it's best to be conservative)
411 2014-06-24 15:41:28 <isotonic2> haha, well I was thinking it would be something like OP_TRANHASH and it would work similarly to OP_CHECKSIG, but just returns the hash instead of a boolean (skips checking the ecdsa signature part). An attacker would not be able to predict the hash of a future transaction.
412 2014-06-24 15:42:50 <isotonic2> may even give rise to some uses for the numeric op_codes, (that aren't used that much from my understanding?)
413 2014-06-24 16:01:18 <gmaxwell> isotonic2: again, you cannot do this with just obtaining the hash.
414 2014-06-24 16:22:18 <plaprade> dekalo, when I try to decode your transaction using my library, the signatures seem to be missing the hash type (the very last byte)
415 2014-06-24 16:28:36 <michagogo> Hm, did the files that autogen makes change?
416 2014-06-24 16:28:53 <michagogo> If so, gitignore wasn't updated, I think
417 2014-06-24 16:31:02 <jtimon> " can't cd to ../../src" I'm  not sure what I have to pu in the parameter of if I have to configure something else
418 2014-06-24 16:31:02 <jtimon> I've been trying  sh qa/pull-tester/pull-tester.sh "../../src" but it says
419 2014-06-24 16:31:17 <jtimon> I'm on debian jessie
420 2014-06-24 16:32:14 <dekalo> plaprade, first thank you for helping
421 2014-06-24 16:32:37 <dekalo> i've just corrected a little error
422 2014-06-24 16:36:15 <dekalo> 47ad6340bf1271c4e22edf3f4c60f0ec582f5361788ac00000000
423 2014-06-24 16:36:15 <dekalo> plaprade: 0100000001721fd74c429424b6748dcad5c12204d42bb691c1434e705f9067c3a225a2cd8d0000000092004830450221008b2daae26728692e1e435d1f715499dd220b4feb943d02db8299b55d66383ee1022032f73e43dbfde776218825ba99acf8fed6653f7b91816e181c7b8dde7a9b68990147522102b5fec9d03d5ef69cbe2b64b5c952bfb49b453f18abd5d5ac90780614ee0278112103331cd1918b2ba042450d869a556d38f5e79ccee0c8285b8597d1e3c7871bfe1d52aeffffffff0100943577000000001976a91
424 2014-06-24 16:37:05 <dekalo> ERROR: Non-canonical signature: too short
425 2014-06-24 16:38:26 <dekalo> I'm thinking about that message is not referred to the input signatures in rawtx, but to the signature that bitcoind have just product. It seems adding a key in the middle of the rawtx in response of signrawtransaction of 1 byte 0x00
426 2014-06-24 16:39:06 <dekalo> "asm" : "0 3045022100f4ac4837ee64fecbac6ed49c40711b6b31f42d041075b97cd8175bbd9bb5bf610220008ed031e214ff562fbbc1256ac60d518b6caa2a59b6d4adcf42dee7062c601401 0 522102b5fec9d03d5ef69cbe2b64b5c952bfb49b453f18abd5d5ac90780614ee0278112103331cd1918b2ba042450d869a556d38f5e79ccee0c8285b8597d1e3c7871bfe1d52ae",
427 2014-06-24 16:39:06 <dekalo>                 "hex" : "00483045022100f4ac4837ee64fecbac6ed49c40711b6b31f42d041075b97cd8175bbd9bb5bf610220008ed031e214ff562fbbc1256ac60d518b6caa2a59b6d4adcf42dee7062c6014010047522102b5fec9d03d5ef69cbe2b64b5c952bfb49b453f18abd5d5ac90780614ee0278112103331cd1918b2ba042450d869a556d38f5e79ccee0c8285b8597d1e3c7871bfe1d52ae"
428 2014-06-24 16:42:23 <maxconner> Question: is there some cap on the number of connections?
429 2014-06-24 16:42:41 <xertrov> if you don't have 8333 open, your client won't connect to more than 8
430 2014-06-24 16:42:46 <maxconner> 2014-06-24 16:41:16 Using at most 873 connections (100000 file descriptors available)
431 2014-06-24 16:42:51 <maxconner> maxconnections=2000
432 2014-06-24 16:42:52 <maxconner> but in the conf
433 2014-06-24 16:43:08 <maxconner> er, those two lines were reversed
434 2014-06-24 16:43:29 <maxconner> i have it turned up to 2000, and i also increased fd count
435 2014-06-24 16:43:34 <maxconner> but it's maxing at 873
436 2014-06-24 16:43:38 <maxconner> where is that coming from
437 2014-06-24 16:44:26 <maxconner> grepping for 873 doesn't return anything relevent
438 2014-06-24 16:44:34 <xertrov> yeah, just tried that myself
439 2014-06-24 16:44:41 <sipa> it uses max 1024 filedescriptors, because select doesn't support more
440 2014-06-24 16:44:48 <gmaxwell> maxconner: select cannot be used with more then 1000 file descriptors, it will otherwise corrupt memory.
441 2014-06-24 16:44:58 <sipa> and then subtracts the number it expects to use for non-connections
442 2014-06-24 16:45:01 <gmaxwell> You _really_ don't want to have that many connections either, everything will work poorly.
443 2014-06-24 16:45:09 <maxconner> how many does it expect to use
444 2014-06-24 16:45:25 <maxconner> and is there a way to increase beyond this number?
445 2014-06-24 16:45:27 <gribble> 151
446 2014-06-24 16:45:27 <sipa> ;;calc 1024-873
447 2014-06-24 16:45:33 <sipa> no
448 2014-06-24 16:45:42 <maxconner> hm, src/init.cpp:    LogPrintf("Using at most  connections ( file descriptors available)\n", nMaxConnections, nFD);
449 2014-06-24 16:45:43 <sipa> run multiple bitcoind's
450 2014-06-24 16:45:46 <gmaxwell> maxconner: No. Why are you trying?
451 2014-06-24 16:46:03 <maxconner> I want to allow a lot of people to connect
452 2014-06-24 16:46:10 <sipa> then run multiple nodes
453 2014-06-24 16:46:14 <sipa> way more scalable
454 2014-06-24 16:46:24 <maxconner> except for the hd space
455 2014-06-24 16:46:51 <maxconner> hm, src/init.cpp:    nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS)), 0);
456 2014-06-24 16:47:11 <gmaxwell> maxconner: typically publically accessible nodes are not ending up with that many connections.
457 2014-06-24 16:47:14 <sipa> how many connections do you actually have?
458 2014-06-24 16:47:28 <maxconner> none atm
459 2014-06-24 16:47:35 <maxconner> (it's not running)
460 2014-06-24 16:47:42 <gmaxwell> (e.g. already the default maximum is effectively infinite at the moment)
461 2014-06-24 16:47:56 <maxconner> can the code be patched to allow more than that?
462 2014-06-24 16:48:01 <sipa> no
463 2014-06-24 16:48:11 <sipa> you'd have to rewrite the networking subsystem pretty much
464 2014-06-24 16:48:23 <gmaxwell> And again, it wouldn't accomplish anything useful.
465 2014-06-24 16:48:25 <hearn> you would use a ton of memory and bandwidth that way. how about starting with the max and seeing how it goes?
466 2014-06-24 16:48:34 <sipa> also, i have a maxconnections=256 very reachable 24/7 up node for months... it has no more than 150 connections
467 2014-06-24 16:48:38 <maxconner> what is select
468 2014-06-24 16:48:55 <sipa> maxconner: an operating system call it uses to determine which connections have activity
469 2014-06-24 16:48:57 <maxconner> you said something like it doesnt support more
470 2014-06-24 16:49:14 <maxconner> so it needs it to have a connection open?
471 2014-06-24 16:49:18 <gmaxwell> sipa: yea, thats what I was trying to say. You have better data... I'm surprised to see >125. Cool.
472 2014-06-24 16:49:28 <maxconner> why does it only support 1024 files
473 2014-06-24 16:49:28 <sipa> maxconner: ?
474 2014-06-24 16:49:36 <sipa> because that is how it works
475 2014-06-24 16:49:49 <sipa> change your kernel and systems library if you need more
476 2014-06-24 16:49:55 <maxconner> aw :(
477 2014-06-24 16:49:56 <sipa> but you don't need more
478 2014-06-24 16:50:24 <sipa> gmaxwell: 139 now
479 2014-06-24 16:50:33 <maxconner> um
480 2014-06-24 16:50:38 <maxconner> src/init.cpp:#define MIN_CORE_FILEDESCRIPTORS 0
481 2014-06-24 16:51:00 <sipa> read the line above
482 2014-06-24 16:51:14 <maxconner> one sec, don't remember how to take grep context
483 2014-06-24 16:51:20 <maxconner> brb, ring tfm
484 2014-06-24 16:51:32 <sipa> but really, this is pointless
485 2014-06-24 16:51:41 <sipa> you won't even max out with maxconnections=200
486 2014-06-24 16:52:01 <maxconner> oic
487 2014-06-24 16:52:12 <maxconner> src/init.cpp-#ifdef WIN32
488 2014-06-24 16:52:14 <maxconner> src/init.cpp:#define MIN_CORE_FILEDESCRIPTORS 0
489 2014-06-24 16:52:14 <maxconner> src/init.cpp:#define MIN_CORE_FILEDESCRIPTORS 150
490 2014-06-24 16:52:14 <maxconner> src/init.cpp-#else
491 2014-06-24 16:52:14 <maxconner> src/init.cpp-#endif
492 2014-06-24 16:52:18 <sipa> please stop pasting
493 2014-06-24 16:52:34 <sipa> we can all read the code
494 2014-06-24 16:52:35 <maxconner> ok
495 2014-06-24 16:52:38 <maxconner> thanks anyway
496 2014-06-24 16:59:15 <hearn> jgarzik: who at bitpay handles BIP70 stuff?
497 2014-06-24 17:05:03 <dekalo> sipa: which could be the reason to obtain an "ERROR: Non-canonical signature: too short" in response to signrawtransaction (in debug.log) ?
498 2014-06-24 17:05:44 <sipa> dekalo: your signature is so short it cannot possibly be valid
499 2014-06-24 17:08:36 <dekalo> what if in the scriptSig in the rawtransaction that i'm signign the <sig> length is 72 byte?
500 2014-06-24 17:12:44 <dekalo> sipa: http://sprunge.us/RNLR if you watch here you can see that the length si canonical
501 2014-06-24 17:15:02 <sipa> dekalo: what is the scriptPubKey?
502 2014-06-24 17:20:44 <jtimon> so can I run pull-tester.sh without building the win32 version and having it complaining about mingw dependencies? Does anybody run the pull-tester tests locally? I have cloned TheBlueMatt/test-scripts
503 2014-06-24 17:25:25 <dekalo> sipa: is a field of tx output to tell how and who will redeem a tx
504 2014-06-24 17:25:54 <hearn> dekalo: he meant what *is* it. he knows what purpose it serves
505 2014-06-24 17:26:01 <hearn> dekalo: sipa is a bitcoin developer for years now :)
506 2014-06-24 17:26:22 <dekalo> ehe I thought it was a rhetorical question
507 2014-06-24 17:27:15 <dekalo> sipa: a914673044885ff5cc83cc318d42f4dfb77d285d6f6d87
508 2014-06-24 18:33:34 <sipa> dekalo: that looks like a txid, not a script :)
509 2014-06-24 18:35:04 <dekalo> sipa: a9 (OP_HASH160) 14 (PUSH 20 BYTE) 673044885ff5cc83cc318d42f4dfb77d285d6f6d 87 (OP_EQUAL)
510 2014-06-24 18:35:45 <dekalo> sipa: is not that a scriptPubKey containing the hash of this redeemScript? -> 522102b5fec9d03d5ef69cbe2b64b5c952bfb49b453f18abd5d5ac90780614ee0278112103331cd1918b2ba042450d869a556d38f5e79ccee0c8285b8597d1e3c7871bfe1d52ae
511 2014-06-24 18:36:00 <sipa> you're not providing the redeemscript in the scriptsig
512 2014-06-24 18:36:04 <sipa> oh wait
513 2014-06-24 18:36:09 <sipa> sorry, you are!
514 2014-06-24 18:37:18 <sipa> it's a 2-of-2 multisig, but you only provide 1 signature
515 2014-06-24 18:37:32 <sipa> so it's considering the extra 0 pushed in front as the second signature
516 2014-06-24 18:37:36 <sipa> which fails, as it's way too short
517 2014-06-24 18:38:35 <dekalo> sipa: is partial signed, i would to put the last sig and send. Generally I use to import  raw trasaction partial signed, so RPC signrawtransaction add the last one sign, and so RPC sendrawtransaction will send to network
518 2014-06-24 18:38:56 <sipa> yes?
519 2014-06-24 18:39:02 <dekalo> for sure
520 2014-06-24 18:39:06 <sipa> as long as it's not fully signed, it's invalid
521 2014-06-24 18:39:10 <sipa> and you can't broadcast it
522 2014-06-24 18:39:24 <dekalo> the problem is not broadcasting, is putting the last sign with bitcoind
523 2014-06-24 18:39:57 <dekalo> There are examples on bitcoin developers site to sign in this way on offline-wallets
524 2014-06-24 18:39:57 <sipa> it gives that error when using signrawtransaction? that's strange
525 2014-06-24 18:40:08 <dekalo> that's the strange behavior !
526 2014-06-24 18:40:23 <sipa> sorry, no idea in that case
527 2014-06-24 18:40:26 <dekalo> non-canonical signature: too short
528 2014-06-24 18:40:35 <dekalo> well
529 2014-06-24 18:41:00 <dekalo> should be that bitcoind has some problems with bitcoinJ signature?
530 2014-06-24 18:41:27 <sipa> maybe it uses a different format for partially signed? (just guessing, i don't know)
531 2014-06-24 18:42:24 <dekalo> partial signing is equal to a normal signign in bitcoinj, it only take the hash of certain fields and sign it with a privatekey
532 2014-06-24 18:42:54 <dekalo> I can manually create the scriptSig putting the right opcodes
533 2014-06-24 18:43:53 <jtimon> in some places we use std namespace and in others we use std:: explicitly
534 2014-06-24 18:43:53 <jtimon> would anyone complain if I move everything to use always std:: ?
535 2014-06-24 18:45:04 <sipa> jtimon: if you find any 'using namespace' in .h files: definitely
536 2014-06-24 18:45:47 <jtimon> not in cpp files?
537 2014-06-24 18:46:48 <sipa> in cpp it's more like a per-file decision... i don't care about changing it, but change-the-world patches tend to be disliked (review overhead, cause merge conflicts for pretty much everything, and don't really much benefit)
538 2014-06-24 18:49:51 <jtimon> I see, so in cpp files it's not going to be welcomed either, there's no using namespace std in .h files anymore
539 2014-06-24 18:50:54 <sipa> i generally always use fully qualified names in new code (except when there's surrounding code with style to match) though
540 2014-06-24 18:52:01 <jtimon> yeah, although namespaces are good and let's use more of those, explicit it's better than implicit
541 2014-06-24 18:53:03 <sipa> agree
542 2014-06-24 18:53:14 <jtimon> what's the criterion to define stuff in .h files instead of .cpp files (my teachers told me to only declare things in .h files)
543 2014-06-24 18:53:20 <jtimon> ?
544 2014-06-24 18:53:34 <sipa> if it needs to be inlined, or is templated, it needs to be in a .h file
545 2014-06-24 18:53:57 <sipa> sometimes it's just laziness, though we've moved most of that out to .cpp files by now
546 2014-06-24 18:54:05 <jtimon> yep, templates need to be in .h
547 2014-06-24 18:54:55 <jtimon> so nobody will complain when I move definitions to cpp, and someone may complain if I define a new method inline for no reason, good
548 2014-06-24 18:55:23 <sipa> modern c++ compilers inline a lot when they can automatically
549 2014-06-24 18:55:38 <sipa> it's more that if it's performance critical, you'll likely define it in a .h to give the compiler a chance
550 2014-06-24 18:55:56 <sipa> unless we can start using -flto at some point (which allows cross-module inlining), there's no way around that
551 2014-06-24 18:56:29 <sipa> i've been wanting to move some of the uint256.h stuff to a .cpp file
552 2014-06-24 18:57:00 <sipa> the division/shift/multipy code and compact format conversions are definitely sizable enough to not be in .h
553 2014-06-24 18:57:28 <sipa> but it requires some magic to do that for templated code