Bitcoin Core Github
44 subscribers
121K links
Download Telegram
💬 vasild commented on pull request "Logging cleanup":
(https://github.com/bitcoin/bitcoin/pull/29798#discussion_r1590371992)
Yeah, good observation! I tried to reorder the commits but then if the rpc commit is the first one I would have to remove `"0"` from `LOG_CATEGORIES_BY_STR` which is used outside of `GetLogCategory()` and then it becomes difficult to asses the change. So I left it as it is.
💬 emsit commented on pull request "Testnet4 including PoW difficulty adjustment fix":
(https://github.com/bitcoin/bitcoin/pull/29775#issuecomment-2094892382)
With the tool you're using, it's possible to generate an empty block (with a gap), and after removing the condition in the code, even with null (I haven't studied further issues if psz was empty, the block was successfully generated.)
Or would it be possible to write only the testnet4 release date in Psz?


```
./generate-genesis -timestamp $(date +%s) -pubkey 000000000000000000000000000000000000000000000000000000000000000000 -psz " "
Ctrl Hash: 0x00000000320b39907d50bfd4e60d1b767ffbf403ec
...
🤔 tdb3 reviewed a pull request: "test: Add a few more corner cases to the base58 test suite"
(https://github.com/bitcoin/bitcoin/pull/30035#pullrequestreview-2039756843)
ACK for 9431bc94a19837a0b053fbbde9f5367543a7264e
Built and ran unit tests (all passed).
Left one nit, but the nit is outside the scope of this PR, so is probably better left to a separate PR.
💬 tdb3 commented on pull request "test: Add a few more corner cases to the base58 test suite":
(https://github.com/bitcoin/bitcoin/pull/30035#discussion_r1590372865)
nit: Probably outside the scope of this PR (this PR is adding tests, so business logic changes are extraneous), but at first glance, seems like these statements could be simplified, since `InsecureRandRange()` can return 0, the `std::string` constructor can handle 0 count, and string operator+ can handle empty string addition. Maybe I'm missing something?

For example:

```diff
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index 49ef9ff5b5..beb5ef3335 100644
--- a/s
...
💬 vasild commented on pull request "Logging cleanup":
(https://github.com/bitcoin/bitcoin/pull/29798#issuecomment-2094893646)
`bee22409ea...df2422c5f9`: fix CI

this compiles locally but not on the CI:
```cpp
ret.emplace_back(category, WillLogCategory(flag));
```
so instead use:
```cpp
ret.push_back(LogCategory{.category = category, .active = WillLogCategory(flag)});
```
💬 paplorinc commented on pull request "test: Add a few more corner cases to the base58 test suite":
(https://github.com/bitcoin/bitcoin/pull/30035#discussion_r1590380169)
Thanks for checking @tdb3, the results would be similar, but since I assumed the spaces are rare in reality, I gave it different odds.
In my impl the probability that we won't have any leading (or trailing) spaces was `50% + 50%*10%`, in your impl it's 10%, so spaces would be in most samples.
I'm fine with both.
💬 tdb3 commented on pull request "dbwrapper: Bump LevelDB max file size to 128 MiB to avoid system slowdown from high disk cache flush rate":
(https://github.com/bitcoin/bitcoin/pull/30039#issuecomment-2094905130)
> > Are there any drawbacks to this?
>
> I didn't notice any.
>
> It's worth mentioning that the total amount of data stored in this database is at least two orders of magnitude higher than even 128 MiB file size.

It would be great if there are few/no drawbacks. Do you mind sharing the methods used so far to test this? It would be great to have some data for comparison.

Other questions that come to mind (thinking out loud before I dig deeper or perform testing):
- Does the change
...
💬 tdb3 commented on pull request "test: Add a few more corner cases to the base58 test suite":
(https://github.com/bitcoin/bitcoin/pull/30035#discussion_r1590383244)
Thanks, that's right (higher probability of no spaces over rand range alone). I don't have a preference, just an observation.
📝 laanwj opened a pull request: "net: Replace libnatpmp with built-in PCP implementation"
(https://github.com/bitcoin/bitcoin/pull/30043)
Continues #30005. Closes #17012..

This PR replaces NAT-PMP port mapping with its successor PCP (Port Control Protocol) from [RFC6887](https://datatracker.ietf.org/doc/html/rfc6887). This adds, in addition to the existing IPv4 port mapping, support for IPv6 pinholing-that is, opening a port on the firewall to make it reachable.

PCP is a simple UDP-based protocol, and the implementation is self-contained, so this gets rid of lthe libnatpnp dependency without adding a new one. It should othe
...
laanwj closed a pull request: "[PoC, nomerge] PCP IPv4 portmap+IPv6 pinhole test"
(https://github.com/bitcoin/bitcoin/pull/30005)
💬 laanwj commented on pull request "[PoC, nomerge] PCP IPv4 portmap+IPv6 pinhole test":
(https://github.com/bitcoin/bitcoin/pull/30005#issuecomment-2094906387)
Continued in #30043.
📝 hebasto converted_to_draft a pull request: "util, refactor: Switch to value-initialization"
(https://github.com/bitcoin/bitcoin/pull/30040)
This PR allows to avoid false positive `-Wmaybe-uninitialized` warnings when cross-compiling for Windows.
hebasto closed a pull request: "util, refactor: Switch to value-initialization"
(https://github.com/bitcoin/bitcoin/pull/30040)
💬 hebasto commented on pull request "util, refactor: Switch to value-initialization":
(https://github.com/bitcoin/bitcoin/pull/30040#issuecomment-2094918672)
Closing.

> CI still failing:

FWIW, those false positive warnings are fixed in GCC 13.
💬 laanwj commented on pull request "util, refactor: Switch to value-initialization":
(https://github.com/bitcoin/bitcoin/pull/30040#discussion_r1590393699)
Concept ACK on adding value initialization here, seems like a good precaution in any case.
💬 laanwj commented on issue "Possible to Ban Clients by Name?":
(https://github.com/bitcoin/bitcoin/issues/30036#issuecomment-2094939151)
NACK on adding functionality for banning by user agent. The user agent (subversion) an arbitrary string that clients can send, so this is super easy to circumvent, and a potential footgun (generally, you'd want to connect to as many different clients as possible to reduce the chance of the node ending up on an isolated "island").
💬 andrewtoth commented on pull request "dbwrapper: Bump LevelDB max file size to 128 MiB to avoid system slowdown from high disk cache flush rate":
(https://github.com/bitcoin/bitcoin/pull/30039#issuecomment-2094958100)
> Might partially address https://github.com/bitcoin/bitcoin/issues/29662

That issue is complaining about long compaction times. From https://github.com/bitcoin/bitcoin/blob/master/src/leveldb/include/leveldb/options.h#L111-L112:

> The downside will be longer compactions and hence longer latency/performance hiccups.

it seems this change would make compaction times longer, so would exacerbate that issue?
👍 laanwj approved a pull request: "chainparams: Add achow101 DNS seeder"
(https://github.com/bitcoin/bitcoin/pull/30007#pullrequestreview-2039807786)
All good now!

ACK ee218aa9a9eaac53030c31b099b4afe354197ba7
💬 maciejsszmigiero commented on pull request "dbwrapper: Bump LevelDB max file size to 128 MiB to avoid system slowdown from high disk cache flush rate":
(https://github.com/bitcoin/bitcoin/pull/30039#issuecomment-2094981028)
> Do you mind sharing the methods used so far to test this?

I am simply watching the disk cache flush rate in `iostat(1)`.
In addition to that, the difference in the system interactivity is also pretty apparent.

> Does the change from 2MB to 128MB have any impact on consistent or transient RAM usage (i.e. for resource-constrained nodes)?

Did not observe any such effect, the RAM usage of the Bitcoin process seems to vary within roughly the same bounds when syncing with the Bitcoin net
...
💬 andrewtoth commented on pull request "dbwrapper: Bump LevelDB max file size to 128 MiB to avoid system slowdown from high disk cache flush rate":
(https://github.com/bitcoin/bitcoin/pull/30039#discussion_r1590461048)
Should we make this a constant? Would it be appropriate to reuse `MAX_BLOCKFILE_SIZE`?