💬 roconnor-blockstream commented on pull request "Relax standardness rules regarding CHECKMULTISIG":
(https://github.com/bitcoin/bitcoin/pull/33755#issuecomment-3476339242)
@TheCharlatan I touch on this in the above, but I do want to explicitly note that the order of public keys that Counterparty uses changed in response to #5247 and the [the keys used to be in the other order](https://github.com/CounterpartyXCP/counterparty-core/commit/f1a8c82914b2f913560496e3d1becc1b63f88118#diff-b9154ac64e110b5561c5bcadc77b532aaea3f44eb53e9c4a76ae2ed3c6fad8b8L231-R261).
(https://github.com/bitcoin/bitcoin/pull/33755#issuecomment-3476339242)
@TheCharlatan I touch on this in the above, but I do want to explicitly note that the order of public keys that Counterparty uses changed in response to #5247 and the [the keys used to be in the other order](https://github.com/CounterpartyXCP/counterparty-core/commit/f1a8c82914b2f913560496e3d1becc1b63f88118#diff-b9154ac64e110b5561c5bcadc77b532aaea3f44eb53e9c4a76ae2ed3c6fad8b8L231-R261).
💬 TheCharlatan commented on pull request "(RFC) kernel: Replace leveldb-based BlockTreeDB with flat-file based store":
(https://github.com/bitcoin/bitcoin/pull/32427#issuecomment-3476389342)
Rebased daf0e9a3d45f42889fc5895fc580c73d060d2711 -> 00c5a8736532a0ca3c483d300e1d09d87be948f1 ([blocktreestore_5](https://github.com/TheCharlatan/bitcoin/tree/blocktreestore_5) -> [blocktreestore_6](https://github.com/TheCharlatan/bitcoin/tree/blocktreestore_6), [compare](https://github.com/TheCharlatan/bitcoin/compare/blocktreestore_5..blocktreestore_6))
* Fixed conflict with #31645
(https://github.com/bitcoin/bitcoin/pull/32427#issuecomment-3476389342)
Rebased daf0e9a3d45f42889fc5895fc580c73d060d2711 -> 00c5a8736532a0ca3c483d300e1d09d87be948f1 ([blocktreestore_5](https://github.com/TheCharlatan/bitcoin/tree/blocktreestore_5) -> [blocktreestore_6](https://github.com/TheCharlatan/bitcoin/tree/blocktreestore_6), [compare](https://github.com/TheCharlatan/bitcoin/compare/blocktreestore_5..blocktreestore_6))
* Fixed conflict with #31645
💬 oren-z0 commented on pull request "rest: allow reading partial block data from storage":
(https://github.com/bitcoin/bitcoin/pull/33657#discussion_r2483736256)
Why make verbosity optional, and not keep as-is?
(https://github.com/bitcoin/bitcoin/pull/33657#discussion_r2483736256)
Why make verbosity optional, and not keep as-is?
💬 romanz commented on pull request "rest: allow reading partial block data from storage":
(https://github.com/bitcoin/bitcoin/pull/33657#discussion_r2483749818)
> Why make verbosity optional, and not keep as-is?
It allows reusing this function also for the new REST endpoint (`/blockpart/`) which doesn't support JSON response format.
> Where is it called with a null value?
It is called by `rest_block_part()` here:
https://github.com/romanz/bitcoin/blob/c30647c4d34c2941696729704854467b30657c43/src/rest.cpp#L502
(https://github.com/bitcoin/bitcoin/pull/33657#discussion_r2483749818)
> Why make verbosity optional, and not keep as-is?
It allows reusing this function also for the new REST endpoint (`/blockpart/`) which doesn't support JSON response format.
> Where is it called with a null value?
It is called by `rest_block_part()` here:
https://github.com/romanz/bitcoin/blob/c30647c4d34c2941696729704854467b30657c43/src/rest.cpp#L502
💬 andrewtoth commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483807860)
Can we hoist this check out before the `try_emplace`, and just `continue` if this is the case?
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483807860)
Can we hoist this check out before the `try_emplace`, and just `continue` if this is the case?
💬 andrewtoth commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483809503)
I also think it would make sense to have a default `true`. However, if we want to be more explicit about intent to reuse the cache rather than implementation details of what we do if we don't, should we rename this parameter something more descriptive like `will_reuse`? That is the first thing that came to mind, maybe there are better names.
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483809503)
I also think it would make sense to have a default `true`. However, if we want to be more explicit about intent to reuse the cache rather than implementation details of what we do if we don't, should we rename this parameter something more descriptive like `will_reuse`? That is the first thing that came to mind, maybe there are better names.
💬 sdaftuar commented on pull request "Cluster mempool":
(https://github.com/bitcoin/bitcoin/pull/33629#issuecomment-3476628311)
Implemented a fix for the locking issue in 51d213d1449b61665628ce9b4e0209cff3c4f818. Left it unsquashed for easier review; if this approach seems ok I'll squash it with the prior commit.
FYI for reviewers: the insertion of the `AssertLockHeld()` in txmempool.h in that commit is what made the bug easy to reproduce in our tests (using a debug build).
(https://github.com/bitcoin/bitcoin/pull/33629#issuecomment-3476628311)
Implemented a fix for the locking issue in 51d213d1449b61665628ce9b4e0209cff3c4f818. Left it unsquashed for easier review; if this approach seems ok I'll squash it with the prior commit.
FYI for reviewers: the insertion of the `AssertLockHeld()` in txmempool.h in that commit is what made the bug easy to reproduce in our tests (using a debug build).
⚠️ cobratbq opened an issue: "Is not demanding low-R grinding still relevant for external signers?"
(https://github.com/bitcoin/bitcoin/issues/33761)
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Current behaviour
It seems that largest transaction coming from (my) external signer is not accepted in mempool. From what I understand, low-R grinding is not expected from external signers. That's what I understand <https://github.com/bitcoin/bitcoin/issues/26030>.
Is this still true? (it is desirable) This is the result for me in 'regtest' environment on Bitcoin Core v29.2.
### Expected behaviour
Any t
...
(https://github.com/bitcoin/bitcoin/issues/33761)
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Current behaviour
It seems that largest transaction coming from (my) external signer is not accepted in mempool. From what I understand, low-R grinding is not expected from external signers. That's what I understand <https://github.com/bitcoin/bitcoin/issues/26030>.
Is this still true? (it is desirable) This is the result for me in 'regtest' environment on Bitcoin Core v29.2.
### Expected behaviour
Any t
...
💬 Sjors commented on pull request "miner: don't needlessly append dummy OP_0 to bip34":
(https://github.com/bitcoin/bitcoin/pull/32420#issuecomment-3476735672)
Indeed the `bad-cb-length` check has been around since the first commit, of course without a documented reason.
https://github.com/bitcoin/bitcoin/blob/e071a3f6c06f41068ad17134189a4ac3073ef76b/main.h#L454-L457
There was also no documented for adding `nBits` to the coinbase `scriptSig`, before the `extraNonce`.
https://github.com/bitcoin/bitcoin/blob/e071a3f6c06f41068ad17134189a4ac3073ef76b/main.cpp#L2236-L2244
But as you point out in your historical overview, [nBits was swapped for n
...
(https://github.com/bitcoin/bitcoin/pull/32420#issuecomment-3476735672)
Indeed the `bad-cb-length` check has been around since the first commit, of course without a documented reason.
https://github.com/bitcoin/bitcoin/blob/e071a3f6c06f41068ad17134189a4ac3073ef76b/main.h#L454-L457
There was also no documented for adding `nBits` to the coinbase `scriptSig`, before the `extraNonce`.
https://github.com/bitcoin/bitcoin/blob/e071a3f6c06f41068ad17134189a4ac3073ef76b/main.cpp#L2236-L2244
But as you point out in your historical overview, [nBits was swapped for n
...
💬 l0rinc commented on pull request "validation: do not wipe utxo cache for stats/scans/snapshots":
(https://github.com/bitcoin/bitcoin/pull/33680#discussion_r2483930942)
We could, but I'm not touching that line, it's complicated enough as it is.
(https://github.com/bitcoin/bitcoin/pull/33680#discussion_r2483930942)
We could, but I'm not touching that line, it's complicated enough as it is.
💬 l0rinc commented on pull request "validation: do not wipe utxo cache for stats/scans/snapshots":
(https://github.com/bitcoin/bitcoin/pull/33680#discussion_r2483930960)
Good point, changed to `false`, added you as coauthor, thanks.
(https://github.com/bitcoin/bitcoin/pull/33680#discussion_r2483930960)
Good point, changed to `false`, added you as coauthor, thanks.
💬 l0rinc commented on pull request "validation: do not wipe utxo cache for stats/scans/snapshots":
(https://github.com/bitcoin/bitcoin/pull/33680#issuecomment-3476858887)
Thanks @optout21 & @cedwies, split the change to 2 commits, one just renames the old value and adjusts the docs and scripts, the second introduces the new value.
(https://github.com/bitcoin/bitcoin/pull/33680#issuecomment-3476858887)
Thanks @optout21 & @cedwies, split the change to 2 commits, one just renames the old value and adjusts the docs and scripts, the second introduces the new value.
💬 andrewtoth commented on pull request "validation: fetch block inputs on parallel threads >20% faster IBD":
(https://github.com/bitcoin/bitcoin/pull/31132#issuecomment-3476888214)
Rebased to test behavior with #31645.
Some other touch-ups include:
- Use `const COutPoint&` in `Input` struct instead of `vin` and `vtx` indexes
- Cleanup shared vectors and pointers at the end of loop
- Refactor inner work loop to do fewer existence checks at the expense of some duplicated code
- Use `std::atomic_usize_t` instead of `std::atomic<usize_t>`
- Use `GetPossiblySpentCoinFromCache` in tests and fuzz harness for better clarity and correctness
(https://github.com/bitcoin/bitcoin/pull/31132#issuecomment-3476888214)
Rebased to test behavior with #31645.
Some other touch-ups include:
- Use `const COutPoint&` in `Input` struct instead of `vin` and `vtx` indexes
- Cleanup shared vectors and pointers at the end of loop
- Refactor inner work loop to do fewer existence checks at the expense of some duplicated code
- Use `std::atomic_usize_t` instead of `std::atomic<usize_t>`
- Use `GetPossiblySpentCoinFromCache` in tests and fuzz harness for better clarity and correctness
💬 l0rinc commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483964717)
You mean something like:
```C++
if (it->second.IsFresh() && it->second.coin.IsSpent() && !cacheCoins.contains(it->first)) {
continue; // nothing to propagate
}
```
Wouldn't that defeat the purpose, doing the check twice? Or you mean that we don't have to check `cacheCoins` for presence and should update `coins_tests/ccoins_write` to not have the false values?
That's why I've added a TODO instead, I want this PR to be simpler and do the cleanup separately. What
...
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483964717)
You mean something like:
```C++
if (it->second.IsFresh() && it->second.coin.IsSpent() && !cacheCoins.contains(it->first)) {
continue; // nothing to propagate
}
```
Wouldn't that defeat the purpose, doing the check twice? Or you mean that we don't have to check `cacheCoins` for presence and should update `coins_tests/ccoins_write` to not have the false values?
That's why I've added a TODO instead, I want this PR to be simpler and do the cleanup separately. What
...
💬 l0rinc commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483964762)
Changed it to `will_reuse_cache` - I didn't think a lot about the name, I still hope we can completely get rid of the reallocation, I don't think it makes a lot of sense this way. But let's turn it off at least of the cases where it's obviously wrong.
> I also think it would make sense to have a default true.
We have a lot from both, it's not obvious why that would be default. I'd rather prefer explicit in this case.
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483964762)
Changed it to `will_reuse_cache` - I didn't think a lot about the name, I still hope we can completely get rid of the reallocation, I don't think it makes a lot of sense this way. But let's turn it off at least of the cases where it's obviously wrong.
> I also think it would make sense to have a default true.
We have a lot from both, it's not obvious why that would be default. I'd rather prefer explicit in this case.
💬 andrewtoth commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483969075)
This check
```
if (it->second.IsFresh() && it->second.coin.IsSpent()) {
```
Does not depend on `itUs` or `cacheCoins`, right?
So we can move it up to
```
if (!it->second.IsDirty() || ((it->second.IsFresh() && it->second.coin.IsSpent())) { // TODO a cursor can only contain dirty entries
```
Right?
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483969075)
This check
```
if (it->second.IsFresh() && it->second.coin.IsSpent()) {
```
Does not depend on `itUs` or `cacheCoins`, right?
So we can move it up to
```
if (!it->second.IsDirty() || ((it->second.IsFresh() && it->second.coin.IsSpent())) { // TODO a cursor can only contain dirty entries
```
Right?
💬 andrewtoth commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483971855)
> I still hope we can completely get rid of the reallocation, I don't think it makes a lot of sense this way.
Well, we would need to get rid of the custom allocator. I think that would be a big perf hit...
> We have multiple cases for both, it's not obvious why any should be default.
Default IMO should be we can reuse, because it doesn't break if we accidentally reuse when we end up throwing it away anyways. The reverse is not true. The non-reuse case should be the only one where we hav
...
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483971855)
> I still hope we can completely get rid of the reallocation, I don't think it makes a lot of sense this way.
Well, we would need to get rid of the custom allocator. I think that would be a big perf hit...
> We have multiple cases for both, it's not obvious why any should be default.
Default IMO should be we can reuse, because it doesn't break if we accidentally reuse when we end up throwing it away anyways. The reverse is not true. The non-reuse case should be the only one where we hav
...
💬 l0rinc commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483974664)
> Does not depend on itUs or cacheCoins, right?
Not exactly, we're only executing that branch when `cacheCoins` was missing `it->first`.
Doing your suggested:
```
if (!it->second.IsDirty() || (it->second.IsFresh() && it->second.coin.IsSpent())) { // TODO a cursor can only contain dirty entries
continue;
}
```
results in the following test failures
```bash
cmake -B build -DCMAKE_BUILD_TYPE=Debug && cmake --build build && ./build/bin/test_bitcoin --run_test=coins_tests
test/coi
...
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483974664)
> Does not depend on itUs or cacheCoins, right?
Not exactly, we're only executing that branch when `cacheCoins` was missing `it->first`.
Doing your suggested:
```
if (!it->second.IsDirty() || (it->second.IsFresh() && it->second.coin.IsSpent())) { // TODO a cursor can only contain dirty entries
continue;
}
```
results in the following test failures
```bash
cmake -B build -DCMAKE_BUILD_TYPE=Debug && cmake --build build && ./build/bin/test_bitcoin --run_test=coins_tests
test/coi
...
💬 l0rinc commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483975804)
> we would need to get rid of the custom allocator
I'm not so sure, I'd have different dbcache sizes during IBD and only reallocate after it finishes, since we don't actually need to narrow the cache size during IBD. After your input fetcher change we may never need to narrow it. We'll see, let's discuss that separately.
> The non-reuse case should be the only one where we have to be explicit.
I explicitly wanted to avoid that, but let me know if you insist, I don't mind that much.
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483975804)
> we would need to get rid of the custom allocator
I'm not so sure, I'd have different dbcache sizes during IBD and only reallocate after it finishes, since we don't actually need to narrow the cache size during IBD. After your input fetcher change we may never need to narrow it. We'll see, let's discuss that separately.
> The non-reuse case should be the only one where we have to be explicit.
I explicitly wanted to avoid that, but let me know if you insist, I don't mind that much.
💬 oren-z0 commented on pull request "rest: allow reading partial block data from storage":
(https://github.com/bitcoin/bitcoin/pull/33657#discussion_r2483977816)
Oh, now I get it.
So the question is why `tx_verbosity` was required in the first place even when the data-format was binary or hex (where it is ignored).
Consider splitting this into two commits, one to make `tx_verbosity` optional, and another to add the new blockpart feature.
(https://github.com/bitcoin/bitcoin/pull/33657#discussion_r2483977816)
Oh, now I get it.
So the question is why `tx_verbosity` was required in the first place even when the data-format was binary or hex (where it is ignored).
Consider splitting this into two commits, one to make `tx_verbosity` optional, and another to add the new blockpart feature.
💬 andrewtoth commented on pull request "[IBD] coins: reduce lookups in dbcache layer propagation":
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483977917)
> I explicitly wanted to avoid that, but let me know if you insist, I don't mind that much.
Don't you think it's safer to have the case that won't break either way be default, and then the performant case that can break if you pick the wrong option be explicit?
(https://github.com/bitcoin/bitcoin/pull/33602#discussion_r2483977917)
> I explicitly wanted to avoid that, but let me know if you insist, I don't mind that much.
Don't you think it's safer to have the case that won't break either way be default, and then the performant case that can break if you pick the wrong option be explicit?