achow101 changed the topic of #bitcoin-core-dev to: Bitcoin Core development discussion and commit log | Feel free to watch, but please take commentary and usage questions to #bitcoin | Channel logs: http://www.erisian.com.au/bitcoin-core-dev/, http://gnusha.org/bitcoin-core-dev/ | Weekly Meeting Thursday @ 16:00 UTC | Meeting topics http://gnusha.org/bitcoin-core-dev/proposedmeetingtopics.txt
joetor5 has quit [Remote host closed the connection]
Guest29 has joined #bitcoin-core-dev
joetor5 has joined #bitcoin-core-dev
DJWHIT89 has joined #bitcoin-core-dev
joetor5 has quit [Ping timeout: 268 seconds]
joetor5 has joined #bitcoin-core-dev
joetor5 has quit [Client Quit]
pablomartin4btc has quit [Ping timeout: 252 seconds]
DJWHIT89 has quit [Quit: Client closed]
Guest29 has quit [Quit: Client closed]
Guest29 has joined #bitcoin-core-dev
Guest29 has quit [Quit: Client closed]
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
wafflefrie has quit [Quit: Connection closed for inactivity]
<phantomcircuit> sipa: can i just skip abc for blocks during ibd but run checkblock/acceptblock ?
jonatack has joined #bitcoin-core-dev
jonatack has quit [Ping timeout: 252 seconds]
<phantomcircuit> a priority queue is definitely the right solution, but ... here me out... harder
<phantomcircuit> hear*
cmirror has quit [Remote host closed the connection]
cmirror has joined #bitcoin-core-dev
<phantomcircuit> well actually is it exactly? that's kinda a parallel issue to doing the check/accept block (which writes to disk) in parallel with activatebestchain
<_aj_> phantomcircuit: doesn't need to be a priority queue, just one queue for blocks and one queue for txs, and you always look at the block queue first?
<phantomcircuit> _aj_: well it doesn't need to be a priority queue, but it's probably more useful if it is, like certainly we want to prioritize blocks that extend the current tip over ... anything else
<phantomcircuit> sipa: so how much exactly do we *need* to process a block before handling other messages?
<_aj_> phantomcircuit: blocks that don't extend the current tip are trivial to process, so don't seem like they should need special casing?
<phantomcircuit> _aj_: that's not exactly right actually, we do the context independent sanity checks, write the block to disk, and then sometime later read the block from disk when it does extend the tip and... do all those checks again which include calcualteing the merkle root which is quite expensive
<phantomcircuit> so priority queue could potentially save us doublingg the work we do there
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
<_aj_> phantomcircuit: i guess my thought is that AcceptBlock() would be done as-is, and ActivateBestChain() would be the part that's delegated to the thread/queue?
<phantomcircuit> _aj_: that's what im doing right now, but i think sipa was suggesting going beyond that and putting the expensive to handle messages into a queue
PaperSword has quit [Quit: PaperSword]
<_aj_> phantomcircuit: i don't think anything in AcceptBlock is "expensive", except maybe in IBD with assumevalid?
<_aj_> phantomcircuit: not sure i'm following what your goal is exactly
<phantomcircuit> _aj_: during ibd the msghand thread ends up pegged at 100% cpu usage which is (obviously) a bottleneck
PaperSword has joined #bitcoin-core-dev
<_aj_> phantomcircuit: of which a signifigant fraction is CheckBlock, ContextualCheckBlock duplication in AcceptBlock/ConnectBlock?
<_aj_> significant
<_aj_> oh, just CheckBlock, ContextualCheckBlock isn't re-invoked
<_aj_> phantomcircuit: hmm, no, CheckBlock has an fChecked cache that should early exit?
<phantomcircuit> _aj_: either way, my goal is to utilitze multiple threads
<phantomcircuit> a bunch of stuff that's not actually possible
<phantomcircuit> which isn't going to be trivial here either sinnce activatebestchain holds like... every lock basically
<phantomcircuit> _aj_: i dont think we write fChecked to disk anywhere?
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
<_aj_> phantomcircuit: no, but should be feasible to retain the CBlock with fChecked set while it's in the queue? or to pass through an "assume_already_checked" flag, and set fChecked manually after reading it?
f321x has joined #bitcoin-core-dev
PaperSword has quit [Quit: PaperSword]
l0rinc has joined #bitcoin-core-dev
PaperSword has joined #bitcoin-core-dev
PaperSword has quit [Client Quit]
l0rinc has quit [Quit: l0rinc]
kevkevin has quit [Remote host closed the connection]
memset has quit [Remote host closed the connection]
memset has joined #bitcoin-core-dev
<bitcoin-git> [bitcoin] maflcko closed pull request #32871: New SVG, Icons, PNGs and X PixMaps (master...master) https://github.com/bitcoin/bitcoin/pull/32871
memset has quit [Ping timeout: 244 seconds]
memset has joined #bitcoin-core-dev
PaperSword has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
memset has quit [Ping timeout: 244 seconds]
memset has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 276 seconds]
aleggg has quit [Ping timeout: 248 seconds]
memset has quit [Ping timeout: 244 seconds]
PaperSword has quit [Quit: PaperSword]
kevkevin has joined #bitcoin-core-dev
memset has joined #bitcoin-core-dev
Zenton has quit [Ping timeout: 248 seconds]
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
Zenton has joined #bitcoin-core-dev
<phantomcircuit> _aj_: my entire concept is actually pretty difficult i now realize, i cant write a block to disk without the lock on the chainstatemanager
<phantomcircuit> which is held by abc
l0rinc has joined #bitcoin-core-dev
greypw1495085720 has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 260 seconds]
f321x has quit [Quit: f321x]
f321x has joined #bitcoin-core-dev
<_aj_> phantomcircuit: hmm, i would have thought you "should" be able to do that with just cs_LastBlockFile or so. seems like it's all being implicitly guarded by cs_main at present though
<TheCharlatan> _aj_ that is my impression too.
kevkevin has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 268 seconds]
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
<bitcoin-git> [bitcoin] maflcko opened pull request #32874: ci: Catch tests corrupting the source directory (master...2507-ci-less-corrupt) https://github.com/bitcoin/bitcoin/pull/32874
szkl has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 248 seconds]
<_aj_> i suppose you'd need a separate short-lived (reader/writer?) lock for m_block_index for efficient reading ideally.
<bitcoin-git> [bitcoin] HowHsu opened pull request #32875: index: Fix missing case in the comment in NextSyncBlock() (master...fix-comment) https://github.com/bitcoin/bitcoin/pull/32875
csknk has joined #bitcoin-core-dev
csknk has quit [Client Quit]
csknk has joined #bitcoin-core-dev
f321x has quit [Quit: f321x]
<phantomcircuit> _aj_: the chainstatemanager lock is just cs_main through a bunnch of indirection
<phantomcircuit> so im not even gettinng past the ProcessMessage ::BLOCK prev_block lookup when activatebestchain is running
<phantomcircuit> but now im confused because activatebestchain gives up cs_main specifically to avoid freezing things out for too long?
kevkevin has joined #bitcoin-core-dev