1 2013-12-01 00:12:37 <HaltingState> how do i get data and target for an already mined block
  2 2013-12-01 00:15:01 <sipa> the target is encoded in the block header itself
  3 2013-12-01 00:15:12 <HaltingState> sipa, how do i get block header
  4 2013-12-01 00:15:14 <sipa> not sure what you mean by data
  5 2013-12-01 00:15:19 <sipa> you look at it?
  6 2013-12-01 00:15:24 <HaltingState> atomos@maslow:~/ProtoShares/src$ ./bitcoind getwork
  7 2013-12-01 00:15:25 <HaltingState> {
  8 2013-12-01 00:15:25 <HaltingState> }
  9 2013-12-01 00:15:25 <HaltingState>     "data" : "0200000078e0de69ece3179b587f890f3fdf7940177d997b197f59427afb2db27b000000957c69ce4c19ed8c960f6e1c1c63e197205c4196f147e6db87176f90c63fdc6ae57e9a52b8b1001e000000000000000000000000000000000000000000000000000000000000000000000000c1de12e2170000000000000000000000",
 10 2013-12-01 00:15:25 <HaltingState>     "target" : "000000000000000000000000000000000000000000000000000000b8b1000000"
 11 2013-12-01 00:15:51 <sipa> what are you trying to do?
 12 2013-12-01 00:15:52 <HaltingState> i have that and i want that same info for a previously mined block
 13 2013-12-01 00:16:25 <sipa> getblock will give all information in a block header
 14 2013-12-01 00:16:55 <HaltingState> i am trying to extract those values from blockchain so i can test miner hash thing on header; its for an altcoin with weird hash function and testnet is broken for it
 15 2013-12-01 00:17:12 <sipa> rught
 16 2013-12-01 00:17:14 <sipa> right
 17 2013-12-01 00:17:46 <HaltingState> sipa, what is best way to go from "getblock" response to the target+ "data" thing?
 18 2013-12-01 00:19:38 <kermit> how do i repair a wallet that causes bitcoin-qt to crash with "ListAccountCreditDebit() : cannot create DB cursor"?
 19 2013-12-01 00:19:47 <Ryan52> sipa: where in the block header is the difficulty/target?
 20 2013-12-01 00:20:04 <HaltingState> Ry4an, its called "bits" but its only 4 bytes so dont know what it means
 21 2013-12-01 00:21:02 <Ryan52> The simple block headers I'm building don't include it, but I only have a partial implementation so far.
 22 2013-12-01 00:24:06 <HaltingState> sipa, how does "bits" encode target?
 23 2013-12-01 00:24:25 <Ryan52> ACTION will solve that curiosity when he gets to that part, surely.
 24 2013-12-01 00:40:36 <hno> HaltingState, https://en.bitcoin.it/wiki/Block_hashing_algorithm
 25 2013-12-01 00:42:01 <HaltingState> thx
 26 2013-12-01 01:16:19 <comboy> bitcoind getbalance and listaccounts seems to be displaying number of bitcoins received, not received-spent, is this a bug or a feature?
 27 2013-12-01 01:21:12 <kjj> spends aren't tagged to an account unless you specify one
 28 2013-12-01 01:22:51 <comboy> kjj: what do you mean by tagged and how do I specify? balance sounds to me like bitcoins received - bitcoin sent, is it a problem of my understanding it this way?
 29 2013-12-01 01:23:32 <kjj> getbalance is the sum of the spendable UTXOs that it can provide the keys to
 30 2013-12-01 01:24:07 <kjj> listaccounts is the values of your local accounting names (your "accounts")
 31 2013-12-01 01:24:52 <comboy> list accounts seems to include balance, if I already spent my coins from associated with a given they are no more spendable, right?
 32 2013-12-01 01:25:20 <kjj> spends come from the default account unless you specify a different account
 33 2013-12-01 01:26:10 <comboy> kjj, I checked say on blockchain.info that coins were actually spent from the given address
 34 2013-12-01 01:26:18 <kjj> attaching an account to an address just means that when a new transaction comes in to that address, that account gets credited.
 35 2013-12-01 01:26:28 <kjj> there is no fucking "from address"
 36 2013-12-01 01:27:12 <kjj> after a transaction comes in, that transaction is not bound to an account or an address
 37 2013-12-01 01:28:39 <kjj> your accounts are a purely local bookkeeping measure.  accounts get credited when a transaction comes in to a tagged address.  they get debited when a spend is made that specifically requests that it be tagged to that account
 38 2013-12-01 01:29:50 <kjj> you can also use the "move" RPC command which reduces one account and increase another.
 39 2013-12-01 01:30:31 <comboy> yeah, but if you send a transaction, you sign it with given address private key right? so there is a way to tell what coins are left on that address, isn't there?
 40 2013-12-01 01:31:02 <kjj> you sign it with a key, yes.  and from that, you can often tell what the last address to see the coins was
 41 2013-12-01 01:31:12 <kjj> but that is NOT a "from address" and has nothing to do with accounts
 42 2013-12-01 01:31:24 <comboy> often?
 43 2013-12-01 01:31:46 <kjj> like I already said twice, accounts are credited when the transaction comes in, and debited when the user specifies
 44 2013-12-01 01:32:12 <kjj> transactions go to scripts.  the scripts are often, but not always, associated with an address
 45 2013-12-01 01:32:20 <comboy> ok I get it, coins are always send to address, and there's no from, I'm just trying to say that from dumb user perspective which I am, "balance" sound like coins available on that address, not just coins received
 46 2013-12-01 01:33:05 <kjj> the wallet does not present balances by address.  it presents balances by wallet, and by account
 47 2013-12-01 01:33:35 <comboy> I'm talking about simple scenario when each account has only one address associated
 48 2013-12-01 01:33:37 <kjj> so whatever you see on some website is fine, but it has no relationship to anything that your node does
 49 2013-12-01 01:34:29 <kjj> transctions redeem prior transactions.  the node does not keep track of them.  it just grabs what it needs and goes
 50 2013-12-01 01:35:09 <kjj> if it happens to grab a transaction that previously came in to an address attached to account "B", that does not mean that account "B" gets docked when you spend.
 51 2013-12-01 01:35:46 <kjj> accounts get debited when you specify that the account be used for the spend, and that specification has absolutely no bearing on which coins it uses for the new transaction
 52 2013-12-01 01:37:54 <comboy> can you give me an example of a script whuch would stop you from telling address balance after that transaction?
 53 2013-12-01 01:38:38 <comboy> or are you trying to tell me that yes it's always possible to tell given address balance it's just that default bitcoin client doesn't care about tracking it?
 54 2013-12-01 01:38:51 <kjj> generation transactions are the most obvious examples
 55 2013-12-01 01:39:21 <comboy> anything else?
 56 2013-12-01 01:39:26 <kjj> but there are also puzzle transactions that are redeemed by solving them
 57 2013-12-01 01:39:37 <Diablo-D3> hey gmaxwell
 58 2013-12-01 01:39:38 <kjj> and multisig gets sketchy
 59 2013-12-01 01:39:41 <Diablo-D3> small question
 60 2013-12-01 01:40:01 <Diablo-D3> when is bitcoin going to get a rate limiter for upstream
 61 2013-12-01 01:40:01 <kjj> but in addition to that, the client doesn't care about tracking them
 62 2013-12-01 01:40:47 <kjj> Diablo-D3: your box doesn't have tc?
 63 2013-12-01 01:41:10 <Diablo-D3> kjj: its unreliable when you have multiple machines
 64 2013-12-01 01:41:21 <Diablo-D3> and my router isnt smart enough to handle it per port
 65 2013-12-01 01:42:00 <kjj> get a smarter router.  :)  like a linux box running tc
 66 2013-12-01 01:42:03 <comboy> kjj, if you don't mind taking some more of your time, how does multisig stops you from telling address balance after transaction?
 67 2013-12-01 01:42:07 <gmaxwell> kjj: recently the behavior has been really bad due to multiple syncing nodes. My tor only laptop has been ending up pushing out 800kbit/sec and saturating my upstream.
 68 2013-12-01 01:42:18 <gavinandresen> comboy: if you want address to == account, then that is easy.  Just name the account the same as the address, and ALWAYS use spendfrom. Oh, and ALWAYS perform a 'move' so if you have to pay a fee it is debited from the account instead of from the '' account.
 69 2013-12-01 01:42:39 <gavinandresen> … and don't use bitcoin-qt at all, it doesn't understand accounts....
 70 2013-12-01 01:42:59 <Diablo-D3> kjj: Im not switching out my router =P
 71 2013-12-01 01:43:16 <kjj> comboy: if it is p2sh multisig, you can keep track
 72 2013-12-01 01:43:54 <gavinandresen> Oh, and don't look at a blockexplorer site, because it will have a completely different idea of address balances.  Because spendfrom doesn't actually spend from an address....
 73 2013-12-01 01:43:58 <comboy> gavinandresen: I mostly use bitcoin-qt, having it in mind I thought it could be nice addition to have balances the "Receive" tab and started wondering around from there
 74 2013-12-01 01:44:22 <gavinandresen> Oh, and never have any coinbase coin generation transactions
 75 2013-12-01 01:44:31 <gavinandresen> … and probably a few more things I'm forgetting.
 76 2013-12-01 01:44:37 <kjj> the interaction of block websites and stock client accounts is horrible.  burns up so much time here and on the forums
 77 2013-12-01 01:44:47 <gavinandresen> Ok, I changed my mind, don't name accounts after addresses, you'll just confuse yourself more.
 78 2013-12-01 01:45:21 <comboy> :)
 79 2013-12-01 01:45:28 <kjj> gavinandresen: it will work out as long as you track down the change and raw-spend it back to the account address
 80 2013-12-01 01:46:29 <gavinandresen> kjj: if you're going to that much trouble, better to use listunspent/createrawtransaction/etc
 81 2013-12-01 01:46:30 <kjj> Diablo-D3: it wasn't a very serious suggestion.  but once you flex the power of a linux box for your router, you'll never go back
 82 2013-12-01 01:46:36 <comboy> well I guess it would be cool from user perspective to have accounts working more like subwallets, especially with coin control
 83 2013-12-01 01:46:59 <kjj> comboy: that's what people tend to expect them to be, but that's not what they really do
 84 2013-12-01 01:47:12 <phantomcircuit> gavinandresen, it would be so nice if the accounts feature just went away
 85 2013-12-01 01:47:16 <kjj> and that shear causes plenty of confusion
 86 2013-12-01 01:47:37 <Diablo-D3> kjj: a) my router runs linux, b) the router before that ran linux
 87 2013-12-01 01:48:05 <kjj> gmaxwell: do you happen to have the txid of a puzzle transaction that I can file away for reference?
 88 2013-12-01 01:48:13 <phantomcircuit> Diablo-D3, tc is pretty terrible
 89 2013-12-01 01:48:28 <phantomcircuit> i've tried using it before to limit downlink and it just completely fails
 90 2013-12-01 01:48:34 <kjj> bit your tongue!  tc rocks, if you know how to use it
 91 2013-12-01 01:48:35 <gmaxwell> kjj: how about all the txn related to this thread: https://bitcointalk.org/index.php?topic=293382.0
 92 2013-12-01 01:48:44 <Diablo-D3> phantomcircuit: yes. yes it is.
 93 2013-12-01 01:48:44 <Diablo-D3> the only successful rate limiting Ive ever seen has been bittorrent in the client.
 94 2013-12-01 01:48:45 <kjj> you can't limit downlink.  that's just silly
 95 2013-12-01 01:48:48 <comboy> I think I found some: https://en.bitcoin.it/wiki/Script#Transaction_puzzle
 96 2013-12-01 01:48:53 <Diablo-D3> phantomcircuit: erm, you cant limit downstreeam
 97 2013-12-01 01:49:01 <Diablo-D3> phantomcircuit: you have to do that on the ISP side
 98 2013-12-01 01:49:12 <phantomcircuit> of course you can it just requires artifically shrinking the window and measuring latency
 99 2013-12-01 01:49:20 <kjj> gmaxwell: heh, I meant ones that were meant to be solved
100 2013-12-01 01:49:31 <Diablo-D3> phantomcircuit: rate limiting downstream means you essentially drop packets you've already downloaded
101 2013-12-01 01:49:36 <gmaxwell> kjj: the last of those has been solved several times now
102 2013-12-01 01:50:29 <phantomcircuit> Diablo-D3, not necessarily... you can also shrink the window size transparently
103 2013-12-01 01:51:03 <phantomcircuit> iirc that is how most traffic shaping of tcp connections actually works
104 2013-12-01 01:51:16 <phantomcircuit> and also why it basically doesn't work against the newer UDP bittorrent protocol
105 2013-12-01 01:51:33 <Diablo-D3> phantomcircuit: which your ISP just completely ignores because it has several megabytes of buffers dedicated just to make your life suck
106 2013-12-01 01:52:01 <phantomcircuit> Diablo-D3, the tcp window is the size of the window that the other end can send
107 2013-12-01 01:52:03 <kjj> "bufferbloat" if you want to google more info on that problem
108 2013-12-01 01:52:54 <phantomcircuit> for example if i set my side of the window to 1 KB then the other side cannot have > 1 KB of unacknowledged outstanding data
109 2013-12-01 01:53:03 <phantomcircuit> if you combine that with measurements of latency
110 2013-12-01 01:53:04 <Diablo-D3> phantomcircuit: yes, which is an advisement.
111 2013-12-01 01:53:19 <phantomcircuit> Diablo-D3, it's almost universally implemented
112 2013-12-01 01:53:37 <kjj> Hockey game, see ya all later
113 2013-12-01 01:53:49 <phantomcircuit> indeed if you send a packet with a sequence number outside the window to a modern linux server it will think you're bruteforcing the seqnum and disconnect
114 2013-12-01 01:53:53 <Diablo-D3> phantomcircuit: for example, amazon sets their shit up to completely ignore it
115 2013-12-01 01:54:07 <comboy> Ikjj, gavinandresen thx for taking time to explain
116 2013-12-01 01:58:20 <comboy> accounts acting as subwallets would be super cool
117 2013-12-01 02:01:22 <toffoo> github question: if I want to submit a New Issue, is there no way to search thru existing Issues to see if it has been submitted already?
118 2013-12-01 02:04:59 <warren> toffoo: hey
119 2013-12-01 02:05:12 <toffoo> hi warren
120 2013-12-01 02:05:23 <warren> toffoo: any trouble after syncing from bootstrap.dat ?
121 2013-12-01 02:05:34 <toffoo> just now, yes
122 2013-12-01 02:05:41 <warren> toffoo: what happpened?
123 2013-12-01 02:05:49 <toffoo> something strange and new and interesting again
124 2013-12-01 02:05:56 <warren> crash on tx sending?
125 2013-12-01 02:06:03 <toffoo> yes!
126 2013-12-01 02:06:03 <warren> did you save the traceback?
127 2013-12-01 02:06:05 <warren> toffoo: OMG6?
128 2013-12-01 02:06:08 <toffoo> yes!