Bitcoin Core Github
44 subscribers
120K links
Download Telegram
💬 l0rinc commented on pull request "validation: fetch block inputs on parallel threads ~17% faster IBD":
(https://github.com/bitcoin/bitcoin/pull/31132#discussion_r1812849403)
Thank you, please resolve the comment.
📝 kevkevinpal opened a pull request: "test: added test to assert TX decode rpc error on submitpackage rpc"
(https://github.com/bitcoin/bitcoin/pull/31139)
This PR adds coverage for this line https://github.com/bitcoin/bitcoin/blob/master/src/rpc/mempool.cpp#L996

If you run the following you will get no results for `submitpackage`
`grep -nri "TX decode failed" ./test/functional`
💬 l0rinc commented on pull request "validation: fetch block inputs on parallel threads ~17% faster IBD":
(https://github.com/bitcoin/bitcoin/pull/31132#discussion_r1812852143)
As mentioned before, why do we need shared outpoints here?
👍 instagibbs approved a pull request: "test: Assert that when we add the max orphan amount that we cannot add anymore and that a random orphan gets dropped"
(https://github.com/bitcoin/bitcoin/pull/31040#pullrequestreview-2388836763)
ACK 6741cde5fe3575cc0b58a52c4a30058fa08c4beb

non blocking nits only
💬 instagibbs commented on pull request "test: Assert that when we add the max orphan amount that we cannot add anymore and that a random orphan gets dropped":
(https://github.com/bitcoin/bitcoin/pull/31040#discussion_r1812834897)
We accept new orphans, we just never exceed limits

```suggestion
self.log.info("Check that we never exceed our storage limits for orphans")
```
💬 instagibbs commented on pull request "test: Assert that when we add the max orphan amount that we cannot add anymore and that a random orphan gets dropped":
(https://github.com/bitcoin/bitcoin/pull/31040#discussion_r1812836992)
unsure nit: Might be faster to mine blocks until mempool is empty?
💬 instagibbs commented on pull request "test: Assert that when we add the max orphan amount that we cannot add anymore and that a random orphan gets dropped":
(https://github.com/bitcoin/bitcoin/pull/31040#discussion_r1812840562)
before filling up the orphanage, do we want to mock time to make it static for the duration of this test? We don't want things to be evicted even if somehow the test is slow.
💬 instagibbs commented on pull request "test: Assert that when we add the max orphan amount that we cannot add anymore and that a random orphan gets dropped":
(https://github.com/bitcoin/bitcoin/pull/31040#discussion_r1812848520)
if `MAX_ORPHANS` is defined it can be used here directly
💬 maflcko commented on pull request "benchmark: Improve SipHash_32b accuracy to avoid potential optimization issues":
(https://github.com/bitcoin/bitcoin/pull/30349#discussion_r1812855024)
Yeah, this is a bit confusing. `UndefinedBehaviorSanitizer` is just the name of the tool, not an implication that the issue it found is UB.

If you want to reproduce, you'll have to compile with the `integer` sanitizer (yes, to add to the confusion, the tool is called different here). Also, it only works with `clang++`/`clang`, so you'll have to select that as well during `cmake -B`. Maybe this can be documented in `doc/developer-notes.md`?
💬 sipa commented on pull request "validation: fetch block inputs on parallel threads ~17% faster IBD":
(https://github.com/bitcoin/bitcoin/pull/31132#discussion_r1812858116)
I haven't yet experimented with them, but as far as I understand it, coroutines are just programming paradigm, not magic; they don't do anything of their own, besides making things that were already possible easier to write. In particular, you still need a thread pool or some mechanism for scheduling how to run them,
💬 laanwj commented on pull request "Drop miniupnp dependency":
(https://github.com/bitcoin/bitcoin/pull/31130#discussion_r1812862264)
Might want to keep this arg around for one major version, but make it display an error that the functionality has been removed. This gives a clearer error to anyone who has it in their configuration file than "argument doesn't exist".
💬 andrewtoth commented on pull request "validation: fetch block inputs on parallel threads ~17% faster IBD":
(https://github.com/bitcoin/bitcoin/pull/31132#discussion_r1812862679)
> We could collect the values to different vectors, each one accessed only by a single thread and merge them into the cache at the end on a single thread

If the vectors are thread local, then how can the main thread access them at the end to write them? We also want to be writing throughout while the workers are fetching, not just at the end.

> How would mpsc solve this better?

Instead of each worker thread having a local queue of results, which they then append to the global results qu
...
💬 laanwj commented on pull request "Drop miniupnp dependency":
(https://github.com/bitcoin/bitcoin/pull/31130#issuecomment-2432339381)
> Concept ACK but shouldn't this go through a deprecation cycle?

imo a real deprecation cycle is not needed here. This has teetered on the brink of being removed for so long already. Also, deprecation cycles are generally for APIs, and this doesn't add or remove any RPC or REST functionality.
🤔 instagibbs requested changes to a pull request: "rpc: getorphantxs follow-up"
(https://github.com/bitcoin/bitcoin/pull/31043#pullrequestreview-2388886132)
I really think `ORPHAN_MAX_RETENTION_TIME` should be called`ORPHAN_TX_EXPIRE_TIME`

after that LGTM
💬 andrewtoth commented on pull request "validation: fetch block inputs on parallel threads ~17% faster IBD":
(https://github.com/bitcoin/bitcoin/pull/31132#discussion_r1812869347)
If you a benchmark shows that it is better, than great!
💬 andrewtoth commented on pull request "validation: fetch block inputs on parallel threads ~17% faster IBD":
(https://github.com/bitcoin/bitcoin/pull/31132#discussion_r1812874933)
The main thread adds all outpoints to a global vector, which all workers will fetch there work from.
💬 instagibbs commented on pull request "test: added test to assert TX decode rpc error on submitpackage rpc":
(https://github.com/bitcoin/bitcoin/pull/31139#discussion_r1812876565)
two empty string might be simpler?
🤔 furszy reviewed a pull request: "validation: fetch block inputs on parallel threads ~17% faster IBD"
(https://github.com/bitcoin/bitcoin/pull/31132#pullrequestreview-2388943653)
Cool idea.

Slightly orthogonal topic:
Since the inputs fetcher call is blocking, instead of creating a new set of worker threads, what do you think about re-using the existing script validation ones (or any other unused worker threads) by implementing a general-purpose thread pool shared among the validation checks?
The script validation checks and the inputs fetching mechanism are never done concurrently because you need the inputs in order to verify the scripts. So, they could share work
...
💬 sipa commented on pull request "rpc, cli: return "verificationprogress" of 1 when up to date":
(https://github.com/bitcoin/bitcoin/pull/31135#issuecomment-2432418782)
So overall, this is effectively changing from estimating progress based on time, to estimating progress based on comparing with the best headers chain. I think that's a reasonable thing to do, but I would suggest doing it more completely and cleanly, and add some safeguards.

* Guess an "end of chain timestamp" as the maximum of:
* The timestamp of the active chain tip
* The best headers tip's timestamp if it has more work than minchainwork; the current timestamp otherwise.
* Use that t
...
💬 andrewtoth commented on pull request "validation: fetch block inputs on parallel threads ~17% faster IBD":
(https://github.com/bitcoin/bitcoin/pull/31132#issuecomment-2432481201)
> implementing a general-purpose thread pool shared among the validation checks?

Nice, yes that would be great! That would simplify this PR a lot if it could just schedule tasks on worker threads and receive the responses, instead of implementing all the sync code itself.

> https://github.com/bitcoin/bitcoin/pull/26966 introduces such structure inside https://github.com/bitcoin/bitcoin/commit/401f21bfd72f32a28147677af542887518a4dbff, which we could pull off and use for validation.

Conce
...