< gwillen> is there a document or a cohesive policy on how exceptions are used in Core? I am refactoring stuff out of RPC handlers so it can be used in the GUI, and it throws exceptions with descriptive text for the RPC server to return.
< gwillen> and I'm not sure what to do with them. I can convert them to more generic exceptions, but I assume throwing exceptions out into UI code would do something bad.
< mryandao> bitcoind uses whatever libsnappy that's provided through the host system yes?
< mryandao> libsnappy being a dependency of leveldb.
< gmaxwell> bitcoind doesn't use libsnappy at all.
< sipa> mryandao: no, our own fork of leveldb has libsnappy support disabled to simplify dependencies
< sipa> if you build against system leveldb, it will still disable libsnappy at runtime
< gmaxwell> (also because libsnappy hurt performance for us IIRC)
< mryandao> ah thank you for that.
< bitcoin-git> [bitcoin] dongcarl opened pull request #14864: test: Run scripted-diff in subshell (master...2018-12-unset-commit-script-check) https://github.com/bitcoin/bitcoin/pull/14864
< dongcarl> Looking at our shell scripts... I see a lot of fragile syntax that shellcheck would pick up on. Is it an acceptable PR to refactor those scripts to conform to shell script best pratices?
< gwillen> dongcarl: maybe step 1 is to propose a change to the coding guidelines to use shellcheck as a linter for shell scripts?
< dongcarl> Seems like lint-shell.sh already does so
< dongcarl> Just some warnings are disabled
< gleb> What currently happens if I get tx INV, send GETDATA and never hear a TX back from that peer?
< sipa> who is 'i'?
< gleb> A Bitcoin core node :)
< sipa> you mean what does bitcoin core do if it doesn't hear back from a tx getdata request?
< gleb> Yeah, I'm missing the part of code where waiting for a TX message time-outs or something
< sipa> there is a 2 minute timeout, and then permit asking another peer afaik
< gmaxwell> gleb: see the logic at the bottom of void CNode::AskFor(const CInv& inv)
< gmaxwell> lol bottom of void.
< gleb> Got it, for some reason I thought that if a node sends one GETDATA, it won't send the second one after the same INV from another peer.
< gleb> That would be highly susceptible :)
< gmaxwell> right there is a delay... the logic is a bit dumb but sufficient.
< gmaxwell> e.g. it can't handle the case that it asks and gets disconnected except by waiting for the timeout...
< gleb> gmaxwell: wait, but if a node gets 2 INVs at the same, it will send 2 GETDATAs, right? (from different peers)
< gleb> 2 INVs with the same hash at the same time*
< gmaxwell> gleb: no.
< gmaxwell> well depending on what you mean at the same time.
< gmaxwell> the will only send one getdata unless someone times out.
< gmaxwell> which of the two peer gets it depends whos inv the node processed first.
< gleb> I can censor propagation of your txs then? Once I see your tx in the network, I can start INVing everybody about it and not give TX.
< gmaxwell> gleb: for two minutes
< gleb> And if I have 2 IPs then for 4 minutes?
< gmaxwell> potentially.
< gmaxwell> (another way the handling is dumb, after timeout the available offers should be considered in random order.
< gmaxwell> )
< gleb> gmaxwell: If I start attacking early enough, that won't significantly increase the cost of an attack, because only few nodes will be INVing it along with me. You can think that relay happens "in waves" (just as bitconnect)
< gwillen> hmm, that's kind of bad for lightning unilateral channel closes, isn't it?
< gwillen> the attacker already knows the txid before you ever start broadcasting it
< gwillen> so they can start poisoning the network before they even start the attack
< gwillen> (it still seems like a nearly-infeasible amount of broadcast spam, which would be detected immediately and network-wide)
< gleb> If a botnet is 10k nodes and starts before 10% of the nodes knew about a tx, I expect us easily to get 10 minutes delay. It's a very cheap attack in terms of traffic, and requires very trivial mimicking of BTC protocol
< gleb> I'm saying even IF we implement the trick gmaxwell mentioned (random selection of next peer). If not, it's cheap to delay a transaction forever.
< gwillen> but since such an attack would be very obvious to everyone, it wouldn't be hard to get consensus to fix it permanently soon after. So it would really only work once.
< gwillen> (And there are probably more profitable things you can do with a 10k node botnet.)
< ujjwalt> Hey, I’m new here and I want to start developing Bitcoin apps. I have basic idea about the protocol - enough to understand how the system largely works (keys, basic crypto etc) but where and how do I start if I want to make an app around this. I have a full node running now.
< NicolasDorier> harding: " I suggested connecting over SPV to a single node that the user trusted."... Then if your trusted node go down, your service go down with it. And what is the advantage of doing it at all? If you have a trusted node, just run getutxosetinfo on both side and you have proof my utxoset has the same UTXOs as your trusted node
< gleb> This no TX timeout thing also may cause topology inference attacks (similar to "doublespending topology inference" from FC18).
< gleb> I acknowledge that alternative solutions might be more harmful than the issue I'm bringing up, just thought it's worth mentioning here.
< bitcoin-git> [bitcoin] jonasschnelli pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/c62b15118997...64fc7c0c1b17
< bitcoin-git> bitcoin/master 1c28feb João Barbosa: qt: Remove hidden columns in coin control dialog
< bitcoin-git> bitcoin/master 64fc7c0 Jonas Schnelli: Merge #14828: qt: Remove hidden columns in coin control dialog...
< bitcoin-git> [bitcoin] jonasschnelli closed pull request #14828: qt: Remove hidden columns in coin control dialog (master...2018-11-coincontroldialog) https://github.com/bitcoin/bitcoin/pull/14828
< gmaxwell> gleb: you can't get forever even without what I suggested.
< gmaxwell> you can get two minutes per dishonest peer, at any hop.
< stevenroose> kallewoof: around?
< stevenroose> Why do the wallet signal handlers need the main lock?
< stevenroose> ryanofsky: ^ any idea?
< kallewoof> stevenroose: I sent you DM's FYI.
< bitcoin-git> [bitcoin] AkioNak opened pull request #14866: Improve property evaluation way in bitcoin.conf (master...includeconf_eval_at_its_position) https://github.com/bitcoin/bitcoin/pull/14866
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/64fc7c0c1b17...0257062e50ca
< bitcoin-git> bitcoin/master 2012d4d Gregory Sanders: Add CScriptNum decode python implementation in functional suite
< bitcoin-git> bitcoin/master 0257062 Wladimir J. van der Laan: Merge #14816: Add CScriptNum decode python implementation in functional suite...
< bitcoin-git> [bitcoin] laanwj closed pull request #14816: Add CScriptNum decode python implementation in functional suite (master...functional_cscriptnum_decode) https://github.com/bitcoin/bitcoin/pull/14816
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/0257062e50ca...8f1753b298f1
< bitcoin-git> bitcoin/master 6c6ee8a Chakib Benziane: Less confusing documentation for `torpassword`...
< bitcoin-git> bitcoin/master 8f1753b Wladimir J. van der Laan: Merge #14804: docs: Less confusing documentation for `torpassword`...
< bitcoin-git> [bitcoin] laanwj closed pull request #14804: docs: Less confusing documentation for `torpassword` (master...rebased-squashed-14609) https://github.com/bitcoin/bitcoin/pull/14804
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/8f1753b298f1...c789add6fcc9
< bitcoin-git> bitcoin/master 4674610 João Barbosa: Log env path in BerkeleyEnvironment::Flush
< bitcoin-git> bitcoin/master c789add Wladimir J. van der Laan: Merge #14760: Log env path in BerkeleyEnvironment::Flush...
< stevenroose> sipa, meshcollider, perhaps
< bitcoin-git> [bitcoin] laanwj closed pull request #14760: Log env path in BerkeleyEnvironment::Flush (master...2018-11-logmultienvflush) https://github.com/bitcoin/bitcoin/pull/14760
< meshcollider> stevenroose: can you point me to an example of what you mean
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/c789add6fcc9...42653570373d
< bitcoin-git> bitcoin/master af1ed20 Craig Younkins: Fix broken Gmane URLs
< bitcoin-git> bitcoin/master 4265357 Wladimir J. van der Laan: Merge #14848: docs: Fix broken Gmane URL in security-check.py...
< bitcoin-git> [bitcoin] laanwj closed pull request #14848: docs: Fix broken Gmane URL in security-check.py (master...fix-gmane-urls) https://github.com/bitcoin/bitcoin/pull/14848
< stevenroose> kanzure: you here?
< stevenroose> we have a wallet question and I hear you use the wallet a lot :)
< stevenroose> Does Core's wallet (officially) support using it from a multi-threaded user?
< phwalkr> Where can I find a multi input tx building example? I have tried libbitcoin and bitcoin core and found nothing.
< stevenroose> phwalkr: with the RPC?
< bitcoin-git> [bitcoin] laanwj pushed 3 new commits to master: https://github.com/bitcoin/bitcoin/compare/42653570373d...88445889f1b3
< bitcoin-git> bitcoin/master 8042bbf Zain Iqbal Allarakhia: p2p: allow p2ptimeout to be configurable, speed up slow test
< bitcoin-git> bitcoin/master 48b37db Zain Iqbal Allarakhia: make peertimeout a debug argument, remove error message translation
< bitcoin-git> bitcoin/master 8844588 Wladimir J. van der Laan: Merge #14733: P2P: Make peer timeout configurable, speed up very slow test and ensure correct code path tested....
< bitcoin-git> [bitcoin] laanwj closed pull request #14733: P2P: Make peer timeout configurable, speed up very slow test and ensure correct code path tested. (master...p2ptimeout) https://github.com/bitcoin/bitcoin/pull/14733
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/88445889f1b3...abbf4be181e0
< bitcoin-git> bitcoin/master f3cf95f Carl Dong: tests: Modify rpc_bind to conform to #14532 behaviour....
< bitcoin-git> bitcoin/master abbf4be Wladimir J. van der Laan: Merge #14861: tests: Modify rpc_bind to conform to #14532 behaviour....
< bitcoin-git> [bitcoin] laanwj closed pull request #14861: tests: Modify rpc_bind to conform to #14532 behaviour. (master...2018-12-fix-rpc-bind-tests) https://github.com/bitcoin/bitcoin/pull/14861
< phwalkr> stevenroose: found it here: https://github.com/libbitcoin/libbitcoin/wiki/Sighash-and-TX-Signing Thanks anyway
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/abbf4be181e0...86ff0413bb8f
< bitcoin-git> bitcoin/master b14948e Amir Abrams: Remove duplicate libconsensus linking in test make...
< bitcoin-git> bitcoin/master 86ff041 Wladimir J. van der Laan: Merge #14840: Remove duplicate libconsensus linking in test make...
< bitcoin-git> [bitcoin] laanwj closed pull request #14840: Remove duplicate libconsensus linking in test make (master...patch-4) https://github.com/bitcoin/bitcoin/pull/14840
< bitcoin-git> [bitcoin] laanwj opened pull request #14869: scripts: Add trusted key for Samuel Dobson (master...2018_12_meshcollider) https://github.com/bitcoin/bitcoin/pull/14869
< kanzure> stevenroose: i'm actually not sure.
< kanzure> stevenroose: are you asking "can i make multiple rpc requests from other processes and threads?"
< stevenroose> kanzure: yes
< stevenroose> well, individual calls are obvious, if you do createrawtransaction and before you can fund, sign and send it, another thread does the same, of course that will fail
< stevenroose> but more like, f.e. if you fire two sendtoaddress calls at the same time, will they try to spend the same utxos?
< stevenroose> it appears that sendtoaddress is doing this safely
< stevenroose> so question would be if the interface claims to be safe for this in all calls
< stevenroose> or if it says you should not use it concurrently
< kanzure> stevenroose: i wouldn't expect concurrent use to work. for createrawtransaction/fundrawtransaction if you're planning multiple transactions then usually i've found i need to plan them separately outside of bitcoind.
< stevenroose> yeah for createraw/fundraw/signraw/sendraw I understand
< stevenroose> but ok we fixed our issue in elements and have an approach similar to sendaddress, so we should be at least as concurrency-safe as sendtoaddress which is enough :)
< promag> hebasto: ping
< promag> regarding #14854, can you detail your steps to see if I can reproduce?
< gribble> https://github.com/bitcoin/bitcoin/issues/14854 | qt: Cleanup SplashScreen class by hebasto · Pull Request #14854 · bitcoin/bitcoin · GitHub
< gleb> gmaxwell: Yes, 2 minutes per dishonest hop, but adding a new peer to a node is trivial and cheap. Anyway, perhaps I should allocate some time and try inferring the topology :)
< promag> another connection problem
< sipa> stevenroose: you can ask fundrawtx to lock the selected utxos
< stevenroose> sipa: oooh
< stevenroose> that's cool
< sipa> there is also lockunspent that control the set of locked utxos
< hebasto> promag: here
< hebasto> promag: my steps are the same as described in #7718
< gribble> https://github.com/bitcoin/bitcoin/issues/7718 | Verifying blocks window stays open after the main GUI appears · Issue #7718 · bitcoin/bitcoin · GitHub