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
<bitcoin-git> [bitcoin] hebasto closed pull request #32601: test: Fix `system_tests/run_command` test (master...250523-run-comand-test) https://github.com/bitcoin/bitcoin/pull/32601
sliv3r__ has quit [Read error: Connection reset by peer]
sliv3r__ has joined #bitcoin-core-dev
csknk has quit [Quit: leaving]
memset has quit [Remote host closed the connection]
memset has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 252 seconds]
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
f321x has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 252 seconds]
csknk_ has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
<sipa> phantomcircuit: you can't just skip ABC, because ABC is what updates the tip, and the tip is used to guide what to download from peers
<sipa> phantomcircuit: and i think you need to process all of block before processing other messages (from the same peer), including updating the tip
csknk_ has quit [Quit: leaving]
csknk_ has joined #bitcoin-core-dev
hernanmarino has quit [Quit: ZNC 1.8.2+deb2+deb11u1 - https://znc.in]
jespada has joined #bitcoin-core-dev
hernanmarino has joined #bitcoin-core-dev
<bitcoin-git> [bitcoin] Sjors opened pull request #32876: refactor: use PSBTOptions for filling and signing (master...2025/07/fill-psbt-struct) https://github.com/bitcoin/bitcoin/pull/32876
csknk has joined #bitcoin-core-dev
bugs_ has joined #bitcoin-core-dev
csknk_ has quit [Quit: leaving]
csknk has quit [Client Quit]
csknk has joined #bitcoin-core-dev
Saturday7 has quit [Quit: ZNC 1.10.1 - https://znc.in]
Saturday7 has joined #bitcoin-core-dev
l0rinc has quit [Quit: l0rinc]
hacker4web3bitco has joined #bitcoin-core-dev
<hacker4web3bitco> bool BaseIndex::Rewind(const CBlockIndex* current_tip, const CBlockIndex* new_tip)
<hacker4web3bitco> {
<hacker4web3bitco>     assert(current_tip == m_best_block_index);
<hacker4web3bitco>     assert(current_tip->GetAncestor(new_tip->nHeight) == new_tip);
<hacker4web3bitco>      .......
<hacker4web3bitco> }
<hacker4web3bitco> Hi folks, ask a question. Is the first assert really correct here? I saw the caller BaseIndex::Sync() update m_best_block_index every 30s, rather than on each time it indexes a block, so current_tip may not be equal to m_best_block_index?
<hacker4web3bitco>             if (pindex_next->pprev != pindex && !Rewind(pindex, pindex_next->pprev)) {
hacker4web3bitco has quit [Quit: Client closed]
hacker4web3bitco has joined #bitcoin-core-dev
l0rinc has joined #bitcoin-core-dev
joetor5 has joined #bitcoin-core-dev
kevkevin has quit [Remote host closed the connection]
kevkevin has joined #bitcoin-core-dev
Guyver2 has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 244 seconds]
jespada has quit [Ping timeout: 260 seconds]
kevkevin has joined #bitcoin-core-dev
jespada has joined #bitcoin-core-dev
SpellChecker_ has joined #bitcoin-core-dev
SpellChecker has quit [Ping timeout: 244 seconds]
kevkevin has quit [Ping timeout: 245 seconds]
kevkevin has joined #bitcoin-core-dev
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
Guest10 has joined #bitcoin-core-dev
Guest10 has quit [Client Quit]
csknk has quit [Quit: leaving]
jespada has quit [Ping timeout: 245 seconds]
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
jespada has joined #bitcoin-core-dev
l0rinc has quit [Quit: l0rinc]
l0rinc has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 252 seconds]
f321x has quit [Quit: f321x]
sbddesign has joined #bitcoin-core-dev
joetor5 has quit [Ping timeout: 276 seconds]
jespada has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bitcoin-git> [bitcoin] HowHsu opened pull request #32878: index: fix wrong assert of current_tip == m_best_block_index (master...rewind) https://github.com/bitcoin/bitcoin/pull/32878
jespada has joined #bitcoin-core-dev
joetor5 has joined #bitcoin-core-dev
l0rinc has quit [Quit: l0rinc]
l0rinc has joined #bitcoin-core-dev
busy has quit [Read error: Connection reset by peer]
l0rinc has quit [Quit: l0rinc]
jadi has quit [Ping timeout: 248 seconds]
memset has quit [Remote host closed the connection]
memset has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 276 seconds]
jadi has joined #bitcoin-core-dev
jadi has quit [Ping timeout: 245 seconds]
hacker4web3bitco has quit [Ping timeout: 244 seconds]
sbddesign has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 245 seconds]
joetor5 has quit [Remote host closed the connection]
joetor5 has joined #bitcoin-core-dev
jadi has joined #bitcoin-core-dev
kevkevin has quit [Remote host closed the connection]
jadi has quit [Ping timeout: 265 seconds]
sbddesign has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 276 seconds]
kevkevin has joined #bitcoin-core-dev
joetor5 has quit [Ping timeout: 265 seconds]
jadi has joined #bitcoin-core-dev
f321x has joined #bitcoin-core-dev
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
kevkevin has quit [Remote host closed the connection]
kevkevin has joined #bitcoin-core-dev
l0rinc has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 252 seconds]
joetor5 has joined #bitcoin-core-dev
joetor5 has quit [Ping timeout: 252 seconds]
jadi has quit [Ping timeout: 268 seconds]
memset has quit [Remote host closed the connection]
sbddesign has joined #bitcoin-core-dev
memset has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 252 seconds]
f321x has quit [Quit: f321x]
jadi has joined #bitcoin-core-dev
joetor5 has joined #bitcoin-core-dev
flooded has quit [Remote host closed the connection]
flooded has joined #bitcoin-core-dev
piku has joined #bitcoin-core-dev
sbddesign has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 276 seconds]
joetor5 has quit [Ping timeout: 248 seconds]
joetor5 has joined #bitcoin-core-dev
joetor5 has quit [Client Quit]
Guyver2 has left #bitcoin-core-dev [Closing Window]
sbddesign has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 276 seconds]
jadi has quit [Ping timeout: 260 seconds]
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
jadi has joined #bitcoin-core-dev
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
Talkless has joined #bitcoin-core-dev
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
sbddesign has joined #bitcoin-core-dev
l0rinc has quit [Quit: l0rinc]
memset has quit [Ping timeout: 244 seconds]
sbddesign has quit [Ping timeout: 265 seconds]
l0rinc has joined #bitcoin-core-dev
sbddesign has joined #bitcoin-core-dev
busy has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 245 seconds]
jadi has quit [Ping timeout: 252 seconds]
sbddesign has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 252 seconds]
jadi has joined #bitcoin-core-dev
joetor5 has joined #bitcoin-core-dev
<phantomcircuit> sipa: is that true during ibd when we have a "best" headers chain?
l0rinc has quit [Quit: l0rinc]
jadi has quit [Ping timeout: 248 seconds]
<phantomcircuit> sipa: conceptually i dont see why we would need to update the tip before processing other messages, but i can see how that might screw things up
<phantomcircuit> but can those things be screwed up during ibd?
sbddesign has joined #bitcoin-core-dev
greypw1495085720 has quit [Remote host closed the connection]
greypw1495085720 has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 260 seconds]
bugs_ has quit [Quit: Leaving]
wafflefrie has joined #bitcoin-core-dev
jonatack has joined #bitcoin-core-dev
sbddesign has joined #bitcoin-core-dev
Earnest has quit [Ping timeout: 252 seconds]
jadi has joined #bitcoin-core-dev
SpellChecker_ is now known as SpellChecker
Cory81 has quit [Quit: Client closed]
Cory81 has joined #bitcoin-core-dev
jadi has quit [Ping timeout: 252 seconds]
sbddesign has quit [Ping timeout: 252 seconds]
Talkless has quit [Quit: Konversation terminated!]
jonatack has quit [Ping timeout: 272 seconds]
jonatack has joined #bitcoin-core-dev
sbddesign has joined #bitcoin-core-dev
Earnestly has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 252 seconds]
jadi has joined #bitcoin-core-dev
aleggg has joined #bitcoin-core-dev
jadi has quit [Ping timeout: 260 seconds]
sbddesign has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
sbddesign has quit [Ping timeout: 245 seconds]
kevkevin has quit [Ping timeout: 260 seconds]
sbddesign has joined #bitcoin-core-dev