1 2015-08-03 03:49:12 <Kireji> #confused. bitcoin core has been crashing randomly for months. was getting "Assertion `!"cannot load block from disk"' failed" - a while back was told to wait until after 10.x to fix it. waited. using 0.11.0, ran "bitcoind -checkblocks=0 -daemon" and it ran a while, many hours. Eventually it said ": Corrupted block database detected." and "Do you want to rebuild the block database now?" but then didn't let me input anything, and checked later
2 2015-08-03 03:50:41 <Kireji> if someone could point me where I can read what -rescan and -reindex do, and when to use them, I'd very much appreciate it
3 2015-08-03 04:04:14 <CodeShark> if your database is corrupt, I would recommend just trashing the whole datadir (except for any wallets and debug logs)
4 2015-08-03 04:05:08 <pastly> does this help? -rescan Rescan the block chain for missing wallet transactions on startup -reindex Rebuild block chain index from current blk000??.dat files on startup
5 2015-08-03 04:05:16 <pastly> https://en.bitcoin.it/wiki/Running_Bitcoin
6 2015-08-03 04:05:39 <Luke-Jr> no
7 2015-08-03 04:05:40 <CodeShark> neither will really help if the database is itself corrupted...or if you're having more serious issues like hardware malfunctions
8 2015-08-03 04:06:13 <Luke-Jr> Kireji: you can try -reindex, but basically avoid the situation :/
9 2015-08-03 04:09:00 <Kireji> Luke-Jr: doing that now. thank you
10 2015-08-03 04:09:38 <Kireji> -cli getinfo reports ""blocks" : 160," - been there about 5 minutes now.
11 2015-08-03 04:12:20 <Kireji> it's doing omething though - using a full CPU
12 2015-08-03 04:14:17 <phantomcircuit> Kireji, you're running 0.11 and it's stuck at block 160 with full cpu?
13 2015-08-03 04:17:55 <pastly> win 3
14 2015-08-03 04:33:58 <Kireji> phantomcircuit: not stuck any more 2600+ blocks
15 2015-08-03 04:34:23 <Kireji> 2688 now
16 2015-08-03 04:35:04 <Kireji> now it's only running 2.5% of 1 cpu
17 2015-08-03 04:35:46 <Kireji> looks fine now
18 2015-08-03 07:13:28 <wumpus> Kireji: if you get a "cannot load block from disk" error it is likely that your block files are corrupted
19 2015-08-03 07:13:44 <wumpus> Kireji: a reindex will scan over the block files and reindex them, it would not solve that issue
20 2015-08-03 07:14:04 <wumpus> Kireji: the most thorough solution is to nuke the blocks and chainstate directory
21 2015-08-03 07:15:11 <wumpus> Kireji: then hope that the corruption doesn't happen again. Usually these problems are related to bit flips in hardware, e.g. I had a node with an USB stick that was randomly flipping bits here and there where the problem regularly happened
22 2015-08-03 07:16:09 <wumpus> there's also an issue with reindex in some old versions of bitcoin core that doesn't set the write offset correctly and can result in two blocks being written in overlapping fashion, but if you re-start the download with 0.11 that won't happen
23 2015-08-03 07:36:07 <phantomcircuit> wumpus, reindex will simply skip any corrupt blocks; they'll still be there but you'll never try to access them again
24 2015-08-03 07:36:38 <phantomcircuit> (in 0.11 as you said)
25 2015-08-03 07:37:37 <Luke-Jr> phantomcircuit: this usually means the block file was just truncated
26 2015-08-03 07:38:54 <phantomcircuit> Luke-Jr, the rate at which he's getting blocks tells me he's either running windows with insane av or his hdd is broken
27 2015-08-03 07:38:56 <phantomcircuit> Kireji, ^
28 2015-08-03 07:41:35 <phantomcircuit> or both
29 2015-08-03 07:53:07 <wumpus> phantomcircuit: that's true, but if one of the earlier blocks is corrupted it may spend a lot of time scanning for nothing
30 2015-08-03 07:55:02 <wumpus> but sure if you're really stingy with bandwidth you may save some traffic that way
31 2015-08-03 12:53:23 <olalonde> "Error: Cannot obtain a lock on data directory /bitcoin/.bitcoin/testnet3. Bitcoin Core is probably already running."
32 2015-08-03 12:53:28 <olalonde> Anyway to get rid of this error?
33 2015-08-03 12:53:33 <olalonde> Getting it even after reboot
34 2015-08-03 12:54:47 <harding> olalonde: if you're sure bitcoind isn't running, you can remove /bitcoin/.bitcoin/testnet3/bitcoind.pid
35 2015-08-03 12:55:23 <harding> olalonde: oh, and these sort of questions should be asked in #bitcoin (sorry everyone; didn't realize what room I was in)
36 2015-08-03 12:56:09 <olalonde> I don't know, sounds like a bug to me. No such file there.
37 2015-08-03 12:56:27 <wump> the pid file is not the lock file
38 2015-08-03 12:56:52 <wump> you probably want ".lock"
39 2015-08-03 12:57:54 <harding> wump: ah. I was guessing based on a ls, should've run ls -a
40 2015-08-03 12:59:39 <wumpus> harding: I haven't heard about this problem before though, if the lock file is not... locked it shouldn't be getting in the way
41 2015-08-03 12:59:50 <wumpus> it's not the existence of the lock file itself that does the locking
42 2015-08-03 13:02:34 <harding> olalonde: so you're sure that Bitcoin wasn't already running? There are various ways to configure it to do so automatically on reboot.
43 2015-08-03 13:04:31 <olalonde> It was running, not anymore.
44 2015-08-03 13:04:45 <olalonde> I already deleted `.lock` files.
45 2015-08-03 13:05:03 <wumpus> right, if it was running, the message was doing exactly what it should
46 2015-08-03 13:05:37 <olalonde> Except it was not running when I started getting this message.
47 2015-08-03 13:06:10 <olalonde> I did shutdown bitcoind non gracefully previously but this is just a test server and I'd rather not resync if possible
48 2015-08-03 13:10:09 <olalonde> Well looks like I'll have to nuke my data directory
49 2015-08-03 13:16:39 <olalonde> wumpus: where are locks maintained? by the kernel?
50 2015-08-03 13:17:07 <olalonde> This problem persisted even after rebooting and deleting lock files
51 2015-08-03 13:19:01 <wumpus> maybe try stracing
52 2015-08-03 13:20:53 <wumpus> or fuser /home/.bitcoin/testnet3/.lock
53 2015-08-03 13:22:06 <wumpus> stracing bitcoind will show you what the last operation was before it fails, and fuser will show if any processes have opened the lock file
54 2015-08-03 13:23:33 <wumpus> the code to acquire the lock uses boost::interprocess::file_lock, not sure what that does internally
55 2015-08-03 13:24:48 <wumpus> but internally it will use flock or fcntl locking
56 2015-08-03 16:05:18 <rodarmor> Does anyone use bitrpc.py in contrib? There's an issue with it, and I'm wondering if the right fix is to just get rid of it, if nobody uses it.
57 2015-08-03 16:05:38 <rodarmor> Last mention was:
58 2015-08-03 16:05:41 <rodarmor> ~
59 2015-08-03 16:05:46 <rodarmor> 18:43 kanzure does anyone even use bitrpc.py?
60 2015-08-03 16:06:04 <rodarmor> 18:43 sipa no clue
61 2015-08-03 16:06:22 <wumpus> rodarmor: I'm ok with getting rid of i
62 2015-08-03 16:06:57 <wumpus> it came up before, at some point there was a person here that was going to improve it, but that never materialized. There's zero interest in it.
63 2015-08-03 16:07:13 <rodarmor> Okay, I'll note that on the issue and open a pr that removes it.
64 2015-08-03 16:13:20 <drazisil> rodarmor: what is the point of that file? is it part of core, or just a helper script?
65 2015-08-03 16:30:06 <rodarmor> feverdrea
66 2015-08-03 16:30:33 <rodarmor> It's just a wrapper for running rpcs against bitcoind
67 2015-08-03 16:31:01 <rodarmor> it adds prompts for each argument to commands, as well as letting you enter passwords securely (i.e. not in shell history)
68 2015-08-03 16:37:27 <wumpus> it's a very simple python-based bitcoin-cli, basically
69 2015-08-03 16:38:36 <wumpus> but it is flakey in all kind of ways, e.g. having to put credentials into the script itself to use it
70 2015-08-03 16:38:44 <drazisil> ah, so easy enough to make for anyone who needs one. :)
71 2015-08-03 16:38:55 <wumpus> I think it should go, it doesn't belong in the core repository at least
72 2015-08-03 16:39:23 <wumpus> not that it's bad to have an example, but it only gets people complaining :)
73 2015-08-03 16:40:17 <wumpus> would be better as an example of e.g. bitcoin-pythonlib
74 2015-08-03 16:40:18 <drazisil> I agree, maybe have a example of a jsonrpc call documented somewhere (if doesn'
75 2015-08-03 16:40:31 <wumpus> (or other bindings)
76 2015-08-03 16:40:35 <drazisil> t already exist) but no need for the whole thing.
77 2015-08-03 16:41:01 <wumpus> well there's contrib/linearize
78 2015-08-03 16:41:39 <drazisil> wasn't that what made the bootstrap? That I thought I was told was kinda pointless now.
79 2015-08-03 16:42:06 <wumpus> it linearizes the chain, that can be useful for other things besides bootstrapping
80 2015-08-03 16:42:39 <wumpus> (and can also package the blocks per timespan, or per X MB size, etc, useful for analysis)
81 2015-08-03 16:43:05 <drazisil> Hm, will have to keep that in mind.
82 2015-08-03 18:36:51 <sdaftuar> if i'm reading this code right, if a peer sends us a getheaders message but they're caught up with our tip, we'll still send them a headers message in response that's empty. is that intentional behavior?
83 2015-08-03 18:39:09 <sdaftuar> https://github.com/bitcoin/bitcoin/blob/219b916545f3be194eb53801bfb8d0694978fb00/src/main.cpp#L4239
84 2015-08-03 18:46:53 <wumpus> sdaftuar: I don't know
85 2015-08-03 18:50:33 <sdaftuar> wumpus: hmm, well i guess i'll leave it be (and not change this behavior in 6494, which is what i was contemplating)
86 2015-08-03 21:04:25 <Luke-Jr> wumpus: won't this semantic variable thing screw up translations btw?
87 2015-08-03 21:05:16 <wumpus> Luke-Jr: you mean the unit name constant? I'd say the unit name should never be translated anyway
88 2015-08-03 21:05:29 <Luke-Jr> hm
89 2015-08-03 21:05:46 <Luke-Jr> even for languages not using a Latin-based alphabet?
90 2015-08-03 21:05:48 <wumpus> (it wasn't possible either in the GUI)
91 2015-08-03 21:06:16 <wumpus> if it's desirable this makes it easier - only one place to translate. But it'd be a new one.
92 2015-08-03 21:06:38 <Luke-Jr> true
93 2015-08-03 21:08:23 <wumpus> this doesn't even affect so many translation strings - just the command line help, the RPC help messages are (rightly) not translated
94 2015-08-03 21:38:57 <ldelarosa> Hello guys I created a transaction and broadcast it and it's saying "Unable To Decode Script" in the input.
95 2015-08-03 21:40:11 <ldelarosa> Right now Blockchain "This transaction has a none standard input"
96 2015-08-03 21:40:19 <ldelarosa> How can I fix this?
97 2015-08-03 21:43:44 <kadoban> ldelarosa: Doesn't sound like material for #bitcoin-dev, move to #bitcoin ? Also doesn't necessarily sound like a problem, though it might be.
98 2015-08-03 21:45:33 <ldelarosa> Ok thanks
99 2015-08-03 21:45:50 <ldelarosa> I will ask on #bitcoin
100 2015-08-03 21:58:36 <kanzure> shouldn't there be a bip for trying all transactions on testnet first (like a protocol to use with merchants)
101 2015-08-03 22:15:49 <ldelarosa> How can I fix a transaction with none standard input?
102 2015-08-03 22:16:04 <ldelarosa> Input script says "Unable To Decode Script"
103 2015-08-03 22:16:31 <rgenito> hmm,
104 2015-08-03 22:16:34 <rgenito> what is the input script?
105 2015-08-03 22:16:45 <rgenito> ( do you have a blockchain link?)
106 2015-08-03 22:17:05 <ldelarosa> Here it is https://blockchain.info/tx/f1fdaf2247e0f278deb63e70e98be77dede9d8d5d9a572b70182a39bf9e1e3bc
107 2015-08-03 22:23:24 <rgenito> ldelarosa, do https://blockchain.info/tx/f1fdaf2247e0f278deb63e70e98be77dede9d8d5d9a572b70182a39bf9e1e3bc?format=json
108 2015-08-03 22:23:26 <rgenito> ?format=json
109 2015-08-03 22:23:44 <rgenito> anyone here know how to read the "script" ?
110 2015-08-03 22:23:55 <rgenito> i've always wondered that... ldelarosa has: "script":"76a91454aa71950c3eb997f31b2cb94f6442e5b001928088ac"
111 2015-08-03 22:25:49 <rgenito> aww man no gmaxwell?
112 2015-08-03 22:40:45 <wumpus> try bitcoin-cli decodescript "76a91454aa71950c3eb997f31b2cb94f6442e5b001928088ac"
113 2015-08-03 22:41:19 <arubi> wumpus, I don't think it's signed
114 2015-08-03 22:42:18 <wumpus> dunno, haven't looked at the transaction, just answered the question on how to get more information about the script
115 2015-08-03 22:42:59 <arubi> fair enough.
116 2015-08-03 23:00:20 <phantomcircuit> wumpus, rebased connlimit-fix
117 2015-08-03 23:01:21 <wumpus> phantomcircuit: great
118 2015-08-03 23:02:21 <phantomcircuit> hmm i think the rebase is missing the logic for the whitelisting stuff actually
119 2015-08-03 23:04:29 <xtor> How many places which accept btc use their own standalone cart system versus outsourcing it to a btc payment gateway company?
120 2015-08-03 23:06:54 <wumpus> xtor: #bitcoin is a better place to ask