< wumpus> MarcoFalke: nice, since #13051 it's possible to run individual functional tests in an out-of-tree build without having to manually provide BITCOIND=...
< gribble> https://github.com/bitcoin/bitcoin/issues/13051 | qa: Normalize executable location by MarcoFalke · Pull Request #13051 · bitcoin/bitcoin · GitHub
< wumpus> though I'm confused how that manages to work, does it store the ini in the source directory?
< promag> wumpus: should I close #12507 or it's something that can be merged?
< gribble> https://github.com/bitcoin/bitcoin/issues/12507 | Interrupt rescan on shutdown request by promag · Pull Request #12507 · bitcoin/bitcoin · GitHub
< wumpus> promag: looks mergeable to me
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/ef006d92845a...2afdc294039f
< bitcoin-git> bitcoin/master c4fda76 João Barbosa: wallet: Interrupt rescan on shutdown request
< bitcoin-git> bitcoin/master 2afdc29 Wladimir J. van der Laan: Merge #12507: Interrupt rescan on shutdown request...
< wumpus> promag: I don't really like how everything is gaining a dependency on init.h for ShutdownRequested, but that's an architectural issue that can be solved separately
< bitcoin-git> [bitcoin] laanwj closed pull request #12507: Interrupt rescan on shutdown request (master...2018-02-shutdown-on-rescan) https://github.com/bitcoin/bitcoin/pull/12507
< promag> wumpus: yeah that's the way it is atm
< promag> wumpus: I also think #12729 is mergeable
< gribble> https://github.com/bitcoin/bitcoin/issues/12729 | Get rid of ambiguous OutputType::NONE value by ryanofsky · Pull Request #12729 · bitcoin/bitcoin · GitHub
< wumpus> thanks will take a look
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/2afdc294039f...979150bc2388
< bitcoin-git> bitcoin/master 1e46d8a Russell Yanofsky: Get rid of ambiguous OutputType::NONE value...
< bitcoin-git> bitcoin/master 979150b Wladimir J. van der Laan: Merge #12729: Get rid of ambiguous OutputType::NONE value...
< bitcoin-git> [bitcoin] laanwj closed pull request #12729: Get rid of ambiguous OutputType::NONE value (master...pr/nonone) https://github.com/bitcoin/bitcoin/pull/12729
< antipovka_> Someone asked me about this Satoshi Mine Bot and here it is! this bot simply automate your actions! It has a lot of settings and actually can help you being fast. But first you have to have your winning strategy! I am not going to explain about it, you are smart people, you are going to handle it! https://www.youtube.com/watch?v=ak-JKQvbDdc&t=7s
< promag> wumpus: updated #12639
< gribble> https://github.com/bitcoin/bitcoin/issues/12639 | Reduce cs_main lock in listunspent by promag · Pull Request #12639 · bitcoin/bitcoin · GitHub
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/979150bc2388...11adab39e601
< bitcoin-git> bitcoin/master 21f5680 Russell Yanofsky: Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106
< bitcoin-git> bitcoin/master 11adab3 Wladimir J. van der Laan: Merge #13154: Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106...
< bitcoin-git> [bitcoin] laanwj closed pull request #13154: Trivial: s/SetBestChain/ChainStateFlushed in comments after #13106 (master...pr/flushed) https://github.com/bitcoin/bitcoin/pull/13154
< bitcoin-git> [bitcoin] laanwj pushed 3 new commits to master: https://github.com/bitcoin/bitcoin/compare/11adab39e601...b62b437acd44
< bitcoin-git> bitcoin/master 76f344d practicalswift: logging: Fix potential use-after-free in LogPrintStr(...)
< bitcoin-git> bitcoin/master 0bd4cd3 practicalswift: logging: remove unused return value from LogPrintStr...
< bitcoin-git> bitcoin/master b62b437 Wladimir J. van der Laan: Merge #13148: logging: Fix potential use-after-free in LogPrintStr(...)...
< bitcoin-git> [bitcoin] laanwj closed pull request #13148: logging: Fix potential use-after-free in LogPrintStr(...) (master...logprintstr-uaf) https://github.com/bitcoin/bitcoin/pull/13148
< bitcoin-git> [bitcoin] laanwj opened pull request #13157: test: Handle timestamps without microseconds in combine_logs (master...2018_05_logcombine_timestamps) https://github.com/bitcoin/bitcoin/pull/13157
< bitcoin-git> [bitcoin] laanwj pushed 3 new commits to master: https://github.com/bitcoin/bitcoin/compare/b62b437acd44...7eb7076f7007
< bitcoin-git> bitcoin/master d76962e João Barbosa: rpc: Reduce cs_main lock in listunspent
< bitcoin-git> bitcoin/master a59dac3 João Barbosa: refactor: Avoid extra lookups of mapAddressBook in listunspent RPC
< bitcoin-git> bitcoin/master 7eb7076 Wladimir J. van der Laan: Merge #12639: Reduce cs_main lock in listunspent...
< bitcoin-git> [bitcoin] laanwj closed pull request #12639: Reduce cs_main lock in listunspent (master...2018-03-reduce-cs_main_lock-listunspent) https://github.com/bitcoin/bitcoin/pull/12639
< promag> wumpus: another one in the same line #12151
< gribble> https://github.com/bitcoin/bitcoin/issues/12151 | Remove cs_main lock from blockToJSON and blockheaderToJSON by promag · Pull Request #12151 · bitcoin/bitcoin · GitHub
<@wumpus> I'm done with locking refactors for a bit :)
< promag> ah! out of luck :D
< promag> maybe next month :D
<@wumpus> time to review #12979
< gribble> https://github.com/bitcoin/bitcoin/issues/12979 | Split validationinterface into paralell validation/mempool interfaces by TheBlueMatt · Pull Request #12979 · bitcoin/bitcoin · GitHub
< promag> allright :/ heh
< BlueMatt> promag: that still makes a ton more sense after 11913
< promag> BlueMatt: you mean 12979 after 11913 or 12151 after 11913?
< promag> if you mean #12151 then yeah for sure
< gribble> https://github.com/bitcoin/bitcoin/issues/12151 | Remove cs_main lock from blockToJSON and blockheaderToJSON by promag · Pull Request #12151 · bitcoin/bitcoin · GitHub
< BlueMatt> 12151, yea
< promag> BlueMatt: 11913 needs rebase
< BlueMatt> yea, I've been lazy about rebasing a few of my prs that arent getting review cause some of the other are
< BlueMatt> oh, no, that one i should rebase
< BlueMatt> ugh, k
< bitcoin-git> [bitcoin] marcoagner opened pull request #13158: [qt]: Improve sendcoinsdialog readability (master...improve_sendcoinsdialog_readability) https://github.com/bitcoin/bitcoin/pull/13158
< bitcoin-git> [bitcoin] laanwj closed pull request #13157: test: Handle timestamps without microseconds in combine_logs (master...2018_05_logcombine_timestamps) https://github.com/bitcoin/bitcoin/pull/13157
< bitcoin-git> [bitcoin] practicalswift opened pull request #13159: Don't close old debug log file handler prematurely when trying to re-open (on SIGHUP) (master...handle-reopen-failed) https://github.com/bitcoin/bitcoin/pull/13159
< bitcoin-git> [bitcoin] promag opened pull request #13160: Unlock spent outputs (master...2018-05-unlock-spent-output) https://github.com/bitcoin/bitcoin/pull/13160
< promag> rpc and wallet labels ^
< bitcoin-git> [bitcoin] real-or-random opened pull request #13161: wallet: Reset BerkeleyDB handle after connection fails (master...bdb-reset) https://github.com/bitcoin/bitcoin/pull/13161
< MarcoFalke> wumpus: (re out of tree tests) It works because test_runner.py is aware of the srcdir
< bitcoin-git> [bitcoin] jnewbery opened pull request #13162: [logging] Don't incorrectly log that REJECT messages are unknown. (master...fix_reject_logging) https://github.com/bitcoin/bitcoin/pull/13162
<@wumpus> but I eas not running test runner, that already worked before, but individual tests
< MarcoFalke> test_runner is linked from the srcdir, so we can follow that link
< MarcoFalke> hmm
< MarcoFalke> individual tests are not available in the build dir?
<@wumpus> MarcoFalke: indeed, so used the full path to the source dir, and it works, no matter whether the current directory is in the build directory or the source one
<@wumpus> MarcoFalke: apparently I have a test/config.ini in the source dir, pointing to the BUILDDIR
<@wumpus> MarcoFalke: not sure this is the intention, will wipe it and reconfiguer
< MarcoFalke> Yeah, otherwise it would fail
< MarcoFalke> the config.ini is required now
<@wumpus> shouldn't it be in the build dir, though?
<@wumpus> to be clear I think this is convenient, but it probably breaks the case where one source directory is used with multiple build dirs
<@wumpus> or when configuring from a read-only source dir
<@wumpus> ok, after reconfiguring the config.ini appears in the build dir, not the source dir, seems to have been an anomaly
< jamesob> cfields: would it make sense to at some point move logging into a separate thread? (about to look at your changes, but was just wondering)
<@wumpus> MarcoFalke: it looks like 'make clean' does not delete config.ini
< MarcoFalke> oh
< cfields> jamesob: yea, I think just about everyone has proposed that at some point, but nobody's done it :)
< MarcoFalke> and make distclean?
<@wumpus> MarcoFalke: what happened is probably: I configured the source dir, cleaned that, then configured in a separate build directory
< cfields> jamesob: might be a good topic for the meeting today, I'm sure there are lots of thoughts on that
< jamesob> cfields: welp, I'll add it to the list :)
< MarcoFalke> Yeah, that is what I assumed
< jamesob> cfields: cool, will bring it up
<@wumpus> distclean does remove it
< MarcoFalke> Usually you are asked to disclean before doing an out of tree build, at least I am
<@wumpus> yes
<@wumpus> I think that makes sense...
< sipa> i'm going to be 10-15 min late for keeting
< sipa> meeting
<@wumpus> ok
< MarcoFalke> Proposed short topic: Delete 0.8, 0.9 and 0.10 git branches
<@wumpus> ack
<@wumpus> oh
<@wumpus> #startmeeting
< lightningbot> Meeting started Thu May 3 19:00:10 2018 UTC. The chair is wumpus. Information about MeetBot at http://wiki.debian.org/MeetBot.
< lightningbot> Useful Commands: #action #agreed #help #info #idea #link #topic.
< promag> hi
< jamesob> hi
<@wumpus> #bitcoin-core-dev Meeting: wumpus sipa gmaxwell jonasschnelli morcos luke-jr btcdrak sdaftuar jtimon cfields petertodd kanzure bluematt instagibbs phantomcircuit codeshark michagogo marcofalke paveljanik NicolasDorier jl2012 achow101 meshcollider jnewbery maaku fanquake promag provoostenator
< jnewbery> hello
< kanzure> hi.
< achow101> hi
< cfields> hi
< jonasschnelli> hi
< jimpo> hi
< jcorgan> lurking as usual
<@wumpus> any other proposed topics?
< jamesob> logging at some point?
<@wumpus> what about logging?
< jamesob> I'd like to talk about moving it into a separate thread
<@wumpus> ok
< BlueMatt> #12934
< jnewbery> +1 to moving logging to a separate thread
< gribble> https://github.com/bitcoin/bitcoin/issues/12934 | [WIP] [net] [validation] Call ProcessNewBlock() asynchronously by skeees · Pull Request #12934 · bitcoin/bitcoin · GitHub
<@wumpus> let's start with the usual topic
<@wumpus> even though it will piss off BlueMatt :)
<@wumpus> #topic High prioriity for review
<@wumpus> only #12979 #12560 #10757 left now
< gribble> https://github.com/bitcoin/bitcoin/issues/12979 | Split validationinterface into paralell validation/mempool interfaces by TheBlueMatt · Pull Request #12979 · bitcoin/bitcoin · GitHub
< gribble> https://github.com/bitcoin/bitcoin/issues/12560 | [wallet] Upgrade path for non-HD wallets to HD by achow101 · Pull Request #12560 · bitcoin/bitcoin · GitHub
< gribble> https://github.com/bitcoin/bitcoin/issues/10757 | RPC: Introduce getblockstats to plot things by jtimon · Pull Request #10757 · bitcoin/bitcoin · GitHub
<@wumpus> anything to discuss about those?
<@wumpus> anything new to add? or remove?
< jimpo> I'd like #12254 to get some review :-)
< gribble> https://github.com/bitcoin/bitcoin/issues/12254 | BIP 158: Compact Block Filters for Light Clients by jimpo · Pull Request #12254 · bitcoin/bitcoin · GitHub
< jnewbery> There's a whole series of sequential PRs on wallet load/create/unload. It'd be good to start moving through those, but I don't know how high priority they are for others
<@wumpus> jnewbery: if it's blocking anyone, the first one on the list should be on there at least
< jtimon> perhaps put the load one in high priority?
< jnewbery> #10740
< gribble> https://github.com/bitcoin/bitcoin/issues/10740 | [wallet] `loadwallet` RPC - load wallet at runtime by jnewbery · Pull Request #10740 · bitcoin/bitcoin · GitHub
< jnewbery> It's only blocking because there are other ones queued behind it
< BlueMatt> jnewbery: that is the most common form of blocking
<@wumpus> so it's blocking the continuation ones
< jimpo> That's basically the definition of blocking...
<@wumpus> right, it's pretty much the definition of blocking
<@wumpus> lol
< jonasschnelli> I agree that we should add 10740 to the list
<@wumpus> #10740 given me an unicorn though
< gribble> https://github.com/bitcoin/bitcoin/issues/10740 | [wallet] `loadwallet` RPC - load wallet at runtime by jnewbery · Pull Request #10740 · bitcoin/bitcoin · GitHub
< jonasschnelli> has also a unicorn, reload solved
<@wumpus> yes
< LukeJr> unicorns probably have a high street value
<@wumpus> added
< jnewbery> not any more. The market's been flooded
< BlueMatt> topic: 0.15.1
< LukeJr> shows what I know of unicorn markets
< BlueMatt> err 16
<@wumpus> LukeJr: yes, I"m trying to farm them and sell them, but I have more now than atoms in the knows universe so you could say the supply is more than the demand...
< promag> wumpus: could also add #13097 too?
< gribble> https://github.com/bitcoin/bitcoin/issues/13097 | ui: Support wallets loaded dynamically by promag · Pull Request #13097 · bitcoin/bitcoin · GitHub
<@wumpus> promag: ok
< promag> ty
<@wumpus> #topic Delete 0.8, 0.9 and 0.10 git branches
< MarcoFalke> Background: Those last tagged versions on those branches are EOL for more than a year now. The tags can be kept for archival reasons, but the branches are no longer required. See https://bitcoincore.org/en/lifecycle/#schedule
<@wumpus> yes
< BlueMatt> ack
<@wumpus> bye
< achow101> ack
< jonasschnelli> ack
< jtimon> I didn't know we still had those
< LukeJr> is the latest commit of each tagged?
< LukeJr> If not, maybe a 0.n_final tag is appropriate
< jonasschnelli> LukeJr: i hope so
<@wumpus> LukeJr: agree, will check that first
< cfields> er, are they not tagged from their respective branches?
< LukeJr> jonasschnelli: it wouldn't be the first time we have backported fixes and never released with them
< MarcoFalke> LukeJr: For the 0.8 one not
< MarcoFalke> The others are last tag == tip of branch, last time I checked
<@wumpus> will create a v0.8_final for that
<@wumpus> +tag
< LukeJr> maybe it can be a non-object tag, to avoid confusing users with a recent date
<@wumpus> yes fine with me, just to avoid losing history
< MarcoFalke> Oh, and the 0.9 one is missing one commit (upnp)
< sipa> back
<@wumpus> MarcoFalke: so same for 0.9 then
<@wumpus> #topic Moving logging to a separate thread (jamesob)
< jamesob> after working on #13099, I think it may be worthwhile to move logging into a separate thread
< gribble> https://github.com/bitcoin/bitcoin/issues/13099 | Use thread names in logs and deadlock diagnostics by jamesob · Pull Request #13099 · bitcoin/bitcoin · GitHub
< jamesob> esp. given instances like #12970
< BlueMatt> ACKACKACKACKACKACKACKACKACKACK (this is a surprisingly high lag-creator for miners, at least for those with spinning-disk-backed-or-cloud-hosted machines
< gribble> https://github.com/bitcoin/bitcoin/issues/12970 | logging: bypass timestamp formatting when not logging by theuni · Pull Request #12970 · bitcoin/bitcoin · GitHub
<@wumpus> queue log messages to a ring buffer ?
< jamesob> wumpus: sure, something along those lines
<@wumpus> gmaxwell has been proposing that for ages...
< jnewbery> I started working on a branch for this last year, but didn't get very far
< jnewbery> definite concept ACK
<@wumpus> yes, concept ACK
< BlueMatt> I did not propose it upstream as it means if we LogPrintf(); assert(false) we'll likely miss it
< jnewbery> means the message processing thread can't be blocked on i/o hangs
< BlueMatt> and I figured folks wouldnt want that
< skeees> ACK - should point out that it could make crash debugging substantially more complicated
< BlueMatt> jnewbery: it still will be a ton cause it ReadBlockFromDisk()s
<@wumpus> BlueMatt: we could have special priority log calls that always make it to disk?
< jamesob> skeees: right, I think that's the only caveat I can think of
< LukeJr> BlueMatt: surely there's a way to run log flushing at assert
<@wumpus> BlueMatt: CriticalLogPrintf?
< promag> +1 BlueMatt point
< cfields> are there any possible interactions where someone might be tailing the log and assume that it's synchronous?
< jonasschnelli> use gdb
< BlueMatt> wumpus: I mean the number of times its been helpful just to see which lines actually made it to debug.log when someone submitted a crash is super helpful
< LukeJr> cfields: it couldn't be?
< BlueMatt> and gdb isnt really an option when debugging remotely over github issues :/
< jimpo> Does anyone know the relative performance of logging to console vs debug log file?
< BlueMatt> jimpo: on non-serial-consoles, console logging should be fast, serial consoles can block
< LukeJr> in theory, we could fork() a logging-only process, but that feels ugly
< BlueMatt> (or vtt on a slow-refresh-monitor)
< sipa> We should fork a separate process for logging, and then open a FIFO with it and pipe the log data there. If bitcoind crashes, that process hopefully survives :)
< sipa> !hi5 LukeJr
< gribble> Error: "hi5" is not a valid command.
<@wumpus> it's mostly a win for low priority debugging messages, I guess
< BlueMatt> or we could just make it optional
<@wumpus> if logging is low volume it's never a bottleneck
< BlueMatt> miners can enable it, everyone else probably doesnt need to
<@wumpus> only miners that have debug=net enabled?
< skeees> just throwing out some alternatives with a properly tuned buffer cache - logging shouldn't hit disk that often? if its still flushing frequently - could consider a more compact binary format for logs - though that means you'd need a special tool to read them
< jimpo> I feel like disabling logging to file and piping stdout through tee or something should work fine
<@wumpus> skeees: well the logging is unbuffered at this moment so can't do much worse than that...
< BlueMatt> wumpus: I mean -debug should always mean non-async loggin, I think
< cfields> skeees: it's not just hitting disk, it's serialization as well. Though I guess we couldn't defer serialization if references are passed in.
<@wumpus> even line-buffered would be better for performance
< jamesob> wumpus: I thought fwrite was buffered?
<@wumpus> BlueMatt: right
< skeees> another option is to have debug logging compiled out
< skeees> instead of just disabled via flag as it is currently
<@wumpus> jamesob: yes, but the buffer is disabled after opening
< BlueMatt> I mean I dont think people who want performance dont want a debug.log
< BlueMatt> they just dont want it to result in 8-ms pauses
<@wumpus> skeees: that's not the issue; debug logging is already not executed if it's disabled
< * LukeJr> wonders if we skip serialization when the debug log level is such that it will not be logged
<@wumpus> skeees: even formatting is bypassed in that case
<@wumpus> LukeJr: yes
< skeees> LukeJr: yeah that's exactly the question i was trying to ask
< skeees> ah ok
< skeees> i dunno actually
<@wumpus> tbh I don't think there's an actual issue here
< skeees> because theres a lot of uint256.ToString() stuff
< cfields> operations on incoming vars aren't skipped though, I believe. Like LogPrint("foo: %s", foo.get())
< BlueMatt> the only issue here is for folks who care a shitload about small disk pauses
<@wumpus> although the ring buffer would be nice because of gmaxwell's argument (log at higher debug message, but don't log the messages to disk unless a crash)
< BlueMatt> hence why I use it in fibre
< BlueMatt> when we get ReadBlockFromDisk to be async for peer handling, then it may make more sense to revisit this
<@wumpus> so a crash would log the last low-priority debug messages even if debugging is disabled.. then agian, it's not possible to bypass formatting anymore in that case
< BlueMatt> we'd have to swap assert() for dump_log_and_crash()
<@wumpus> not sure that even requires logging to be in a sepaerate thread
< LukeJr> wumpus: not sure if formatting is a big deal tbh
< LukeJr> BlueMatt: or handle SIGABRT?
< BlueMatt> no, but then I dont get to upstream my lockless ring buffer logger :p
<@wumpus> LukeJr: well some messages are extremely high volume
< BlueMatt> luke-jr: I dont think we want to do that much work in a signal handler
<@wumpus> LukeJr: try enabling *all* debugging for fun
< BlueMatt> matt@bitcoin-seednode:~$ ls -lha ~/.bitcoin/debug.log
< BlueMatt> -rw------- 1 matt matt 8.6T May 3 19:24 /home/matt/.bitcoin/debug.log
<@wumpus> heh
< sipa> how long?
< LukeJr> BlueMatt: if it's plain old C code, we can probably get away with it
<@wumpus> hence my proposal at some point to split up net logging into low and high volume messages
< * jamesob> buys BlueMatt a pair of socks with the logrotate manpage on them
< BlueMatt> sipa: 2014-11-19 00:06:55
<@wumpus> #12219
< gribble> https://github.com/bitcoin/bitcoin/issues/12219 | More granular net logging · Issue #12219 · bitcoin/bitcoin · GitHub
< cfields> wumpus: +1. Will have a look.
< BlueMatt> I do like the flush-debug-ring-to-disk-on-crash idea
<@wumpus> yes
< jamesob> +1
< BlueMatt> (would mean serializing all debug messages, though)
< LukeJr> maybe even on non-crash critical errors
< BlueMatt> non-crash critical errors should crash :p
<@wumpus> it's in the word 'critical'
< jamesob> okay so unless anyone has any objections, I'll start working on a thread-consumes-from-ring-buffer implementation in the near future
<@wumpus> I think I killed the topic
<@wumpus> oh
< jnewbery> jamesob: ACK
< BlueMatt> jamesob: I think only as optional except for disabled-debug-messages
< jamesob> i.e. async logging should be opt-in?
< BlueMatt> jamesob: but if upstream wants to maintain by fibre patches, fine by me :p
< BlueMatt> yes
< jamesob> I'll give it a look, thanks
<@wumpus> #topic 0.16.1 (BlueMatt)
< BlueMatt> so for those who weren't paying attention, skeees found some particularly novel races in block handling in #13092
< gribble> https://github.com/bitcoin/bitcoin/issues/13092 | ActivateBestChain concurrency issues · Issue #13092 · bitcoin/bitcoin · GitHub
< BlueMatt> cause they're threading issues they almost certainly wont effect anyone except submitblock users
< BlueMatt> ie miners, and only rare races
< BlueMatt> but, still, I think given that and some of the other various fixes we've had, it may be worth backporting
<@wumpus> 13092 is an issue, not a PR, can't label it for backport
< BlueMatt> further, at least personally, I'd kinda like to see #11423 make some movement, and making that kind of policy change in a non-minor-version strikes me as weird
< gribble> https://github.com/bitcoin/bitcoin/issues/11423 | [Policy] Make OP_CODESEPARATOR and FindAndDelete in non-segwit scripts non-std by jl2012 · Pull Request #11423 · bitcoin/bitcoin · GitHub
< BlueMatt> yes, it needs a pr, sdaftuar has a branch, I believe, but not open
< sdaftuar> skeees has a pr, one sec
< skeees> #13023
< sdaftuar> #13023
< BlueMatt> was the skeees pr updated for the new method?
< gribble> https://github.com/bitcoin/bitcoin/issues/13023 | Always refresh most work chain when reacquiring cs_main in ActivateBestChain() by skeees · Pull Request #13023 · bitcoin/bitcoin · GitHub
< gribble> https://github.com/bitcoin/bitcoin/issues/13023 | Always refresh most work chain when reacquiring cs_main in ActivateBestChain() by skeees · Pull Request #13023 · bitcoin/bitcoin · GitHub
< sdaftuar> no we need to settle on the right fix
< skeees> still needs a bit of work - i need to pull in some fixes @sdaftuar made
< sdaftuar> i think the fix i proposed works, but maybe someone has a better idea
<@wumpus> ok added tags
< BlueMatt> ok, yes, I think that is doable, however, and I think between that and making progress on the standardness changes from jl2012 probably are worth a minor bump
< skeees> there's also #12988 - which is a similar type of bug
< gribble> https://github.com/bitcoin/bitcoin/issues/12988 | Hold cs_main while calling UpdatedBlockTip() signal by skeees · Pull Request #12988 · bitcoin/bitcoin · GitHub
< BlueMatt> yes, indeed, that too
< sdaftuar> agreed
<@wumpus> ok
< BlueMatt> (so, obviously, for those following along at home, next-milestone usually gets auto-high-priority-for-review status :p)
<@wumpus> re: #11423, I rebased that one for jl2012, not sure if there's further things to be done there
< gribble> https://github.com/bitcoin/bitcoin/issues/11423 | [Policy] Make OP_CODESEPARATOR and FindAndDelete in non-segwit scripts non-std by jl2012 · Pull Request #11423 · bitcoin/bitcoin · GitHub
<@wumpus> added 0.16.1 tag there too
< BlueMatt> I believe jl2012 wanted to add one more policy rule there, which should be done, there was a branch floating around but I cant find it atm
< BlueMatt> anyway, thats for discussion on that pr
< BlueMatt> I'll ping jl2012 since he's probably asleep
< BlueMatt> anyway, seems no disagreement, so next topic?
<@wumpus> yes, but it is the open PR with the most (ut)ACKs so I thought it'd be almost ready for merge
<@wumpus> that's why I rebased it with the idea to merge it after final review
<@wumpus> but ok
< MarcoFalke> Yeah, would need some re-ACKs first, though
<@wumpus> right, but if the goalposts keep moving
<@wumpus> I think we've exhausted all proposed topics
< MarcoFalke> If there are minor fix ups, they should probably happen soon
< BlueMatt> oh, no, wait i had another topic
< BlueMatt> topic: activate segwit
< BlueMatt> topic 2: <BlueMatt> #12934
< gribble> https://github.com/bitcoin/bitcoin/issues/12934 | [WIP] [net] [validation] Call ProcessNewBlock() asynchronously by skeees · Pull Request #12934 · bitcoin/bitcoin · GitHub
< BlueMatt> its certainly not ready for review, but we should maybe have a discussion about what concurrency across peers is gonna look like
<@wumpus> #topic Call ProcessNewBlock() asynchronously (skeees)
< BlueMatt> there are two main approaches, but both end up requiring similar refactors for the majority of their work
< BlueMatt> in the past I've looked at doing ProcessMessages() in parallel
< BlueMatt> in this pr skeees moves the validation processing of txn/blocks into a queue and does that in a separate thread
< sipa> how does that interact with eg sending a ping after a block, and expecting it to be processed after the pong returns?
< BlueMatt> in both cases, we end up building logic to "pause" processing of a peer until whatever message it just generated has been processed
<@wumpus> that sounds sensible, though I'm really afraid of c++ threading
< BlueMatt> sipa: ^
< gmaxwell> Seems like it would add more locking overhead.
< BlueMatt> (which would also likely be useful for eg ReadBlockFromDisk moving to be more async)
< sipa> sound reasonable to me
< BlueMatt> and a ton of logic to move CNodeState out of cs_main (likely by creating a CNodeState2 during transision)
< BlueMatt> cfields: may have more thoughts
< sipa> that sounds even better
< skeees> the other side benefit of this approach is that ultimately it may simplify the concurrency model inside validation
< sipa> though everything depends on the details...
< BlueMatt> gmaxwell: indeed, thats a major difference between the skeees approach and the parallel ProcessMessages approach
< skeees> having a single thread processing from an ordered queue would have also solved the concurrency issues discussed before
< BlueMatt> ProcessMessages will still do the work on the processing thread, which should have a bit less locking overhead
< cfields> BlueMatt: just reading now. at a glance, this approach sounds similar to what I had in mind as well
< BlueMatt> but is definitely more complicated than the skeees approach
< BlueMatt> which draws a much cleaner boundary between validation and net_processing
< gmaxwell> The biggest gain I'm aware of from concurrency is that right now when connecting multiple blocks at a time (due to out of order fetching in IBD) we stop downloading new blocks, ... fixing that would be a big gain; so it might be worth prioritizing improvements that would let that happen.
< cfields> BlueMatt: I don't see why they'd be mutually exclusive?
< BlueMatt> gmaxwell: that and relaying compact block gettxn during block connection
< BlueMatt> which is the one big cheapish win left for block-relay-latency
< gmaxwell> (e.g. esp when fetching from slow peers, watching network traffic during IBD is comical... transfering at only a couple mbps for a while then nothing for seconds at a time while it connects)
< BlueMatt> cfields: well doing both is maybe not so useful
< BlueMatt> since they'd accomplish largely the same thing
< gmaxwell> BlueMatt: Fair enough for gettxn, though right now my own node makes almost no gettxn requests... and orphaning rates appear to be exceptionally low.
< gmaxwell> (so what I'm saying is that at the moment I don't think of latency improvements as that critical)
< BlueMatt> gmaxwell: the skeees approach is certainly better for doing things like deserialization of blocks coming in from other peers while calling ProcessNewBlock/ActivateBestChain
< BlueMatt> indeed, right now (with mempool ~empty) compact block performance is ~perfect
< BlueMatt> its not always so, however
< gmaxwell> hm. interesting point that making deserialization concurrent would potentially be a multi-core gain.
< BlueMatt> also, fibre nodes see more getblocktxn than miners
< sipa> by "mempool ~empty" you mean "mempool is a perfect match" ?
< BlueMatt> which would be equally solved by miners delaying 1 second before including new txn in blocks....
< gmaxwell> sipa: if each block mostly clears the mempool, miner-specific prioritizaition of transactions doesn't cause as much surprise txn.
< gmaxwell> BlueMatt: and also making use of the CB facility for transmitting extra txn proactively.
< BlueMatt> yea, that too
< BlueMatt> anyway, so tl;dr: I was a bigger fan of the skeees approach and wanted a little bit of concept discussion on the idea of putting a queue in front of the entire validation stuff
< BlueMatt> since thats a huge departure from current operation
< BlueMatt> but I think the potential gain is nice
< BlueMatt> plus all our blocks are already passed in as shared_ptrs anyway.....
< gmaxwell> so right my point was that speading up IBD is probably a big win, .. improving latency and what not would be nice too but I think it's less important.
< LukeJr> +1
< BlueMatt> yes, right now that is definitely true
< BlueMatt> certainly this has the potential to address both, however
< gmaxwell> making use of more cores during sync would be nice too, e.g. if deserilization and hashing can happen on seperate threads async with connection.
< BlueMatt> we can do CheckBlock on the net_processing thread
< BlueMatt> (since, and sipa is gonna die a little bit inside, here, the result is cached in the CBlock structure)
< sdaftuar> that is kinda gross :)
< BlueMatt> its incredibly gross
< gmaxwell> (e.g. multiple message handling threads, which do deserialization and maybe stateless checks)
<@wumpus> oh no...
< bitcoin-git> [bitcoin] practicalswift opened pull request #13163: Make it clear which functions that are intended to be translation unit local (master...internal-linkage) https://github.com/bitcoin/bitcoin/pull/13163
< gmaxwell> though I did a dumb hack a while back that reordered some of the block validation steps to interleave checks that operate per transaction and got a few percent sync speed improvement... we should be mindful of memory locality and not introduce even more passes over blocks.
< BlueMatt> gmaxwell: dunno about multiple message handling threads being doable in the immediate future, but doing CheckBlock on the message processing thread (which does merkle root verification, which is a good chunk of the work) may be worth a chunk
< skeees> cool - so if no strong objections or concerns with the approach i'll continue this and come back when its more ready for review
< gmaxwell> Funny, I would have thought handling seperate peers in seperate threads would almost just work now, vs stuff that handled messages from the same peer concurrently, which violates protocol assumptions about ordering without special work to add processing barriers.
< BlueMatt> gmaxwell: CNodeState requires cs_main, so....not even close :(
< gmaxwell> (almost just work, because the critical data structues have locks ... oh CNodeState)
< BlueMatt> I've got some old branches that do that, if you want to look
< gmaxwell> cs_main lite.
< BlueMatt> but they're....not small changes
< BlueMatt> and cfields hates them, though he's probably right
< BlueMatt> anyway, so </topic> </meeting> ["DIE", "XML"]?
< gmaxwell> in particular our most commons messages are transaction invs and get datas, and those should only need mempool stuff for much of their activity.
< gmaxwell> k.
< BlueMatt> gmaxwell: yes, I did all that in an old branch
< BlueMatt> that in particular is much closer than it used to be
< BlueMatt> cause now the HandleGetData stuff cant take cs_main at the top
< BlueMatt> IIRC that refactor landed for 0.16
< gmaxwell> Thanks.
< BlueMatt> (it got a bunch of time in helgrind, too, and got all the issues fixed, so I'm at least kinda confident in it, but its essentially unreviewable, even by my standards)
<@wumpus> #endmeeting
< lightningbot> Meeting ended Thu May 3 19:57:40 2018 UTC. Information about MeetBot at http://wiki.debian.org/MeetBot . (v 0.1.4)
< gmaxwell> I think it would be simpler now, a lot of changes in the last year would have made it easier (I say this without having recently looked at that branch)
< BlueMatt> yes, I agree
< BlueMatt> rather significantly
< BlueMatt> and if we took the "split CNodeState" approach instead of "pull CNodeState above cs_main in global lock order and give it its own lock all in one go" approach that that branch takes, it'd likely be wayyy simpler
< bitcoin-git> [bitcoin] laanwj deleted 0.9 at 460ccfb: https://github.com/bitcoin/bitcoin/commit/460ccfb
< bitcoin-git> [bitcoin] laanwj deleted 0.10 at 9cea169: https://github.com/bitcoin/bitcoin/commit/9cea169
<@wumpus> :x
< sdaftuar> neat
< bitcoin-git> [bitcoin] jamesob closed pull request #13099: Use thread names in logs and deadlock diagnostics (master...2018-04-26-use-threadnames) https://github.com/bitcoin/bitcoin/pull/13099
< cfields> jamesob: noo!
< cfields> jamesob: I hope you don't think I'm being NIH about that PR, that wasn't my intention at all. Coding up an alternative myself helps me to understand the challenges better, it wasn't meant to replace your work.
<@wumpus> "Note: GitHub Services are being deprecated. Please contact your integrator for more information on how to migrate or replace a service to webhooks or GitHub Apps. "
<@wumpus> I wonder if that means the IRC notification bot will disappear
< luke-jr> isn't it a webhook?
<@wumpus> no
<@wumpus> it's under "integrations and services" which displays that
< luke-jr> IRC notifications of projects seems to have mostly died with CIA :<
< jamesob> cfields: oh no not at all! sorry if the PR close came off as me being upset
< jamesob> cfields: I just like your commits better :). Maybe I can cherry-pick them and then shuffle in my GetProcessName/SetProcessName stuff + some tests
< jamesob> if that sounds good, would it make sense to repurpose that same PR or open a new one?
< cfields> jamesob: ok, good
< cfields> jamesob: if you're going to do away with the suffix handling, I'd say just do a new PR
< cfields> jamesob: either way, my code is all yours if you like it
< jamesob> cfields: yeah, should be easy to incorporate the suffix stuff inline as you suggest
< jamesob> just felt embarrassed I didn't see that earlier :)