💬 MarcoFalke commented on pull request "util: Teach AutoFile how to XOR":
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260767429)
I'd say no, so I went ahead and removed them everywhere. Refer to the commit message for rationale.
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260767429)
I'd say no, so I went ahead and removed them everywhere. Refer to the commit message for rationale.
💬 MarcoFalke commented on pull request "util: Teach AutoFile how to XOR":
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260770110)
No idea, but my blind guess would be that calling `std::fwrite` takes longer than anything else in this function. :thinking:
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1260770110)
No idea, but my blind guess would be that calling `std::fwrite` takes longer than anything else in this function. :thinking:
💬 ccdle12 commented on pull request "[WIP] add a stratum v2 template provider":
(https://github.com/bitcoin/bitcoin/pull/27854#issuecomment-1632207805)
Hi @Sjors , thanks and appreciate the review,
> The PR description could use instructions on how to test this. Specifically I'd like to try it on mainnet against my vintage S9 with BraiinsOS+ (not sure which pools already support job negotiation/ announcement). This can of course point to existing documentation. [Config D](https://stratumprotocol.org/getting-started/#config-d-sv1-firmware--translation-proxy-jn-job-negotiator--sv2-pool) is close but it assumes regtest and running your own pool
...
(https://github.com/bitcoin/bitcoin/pull/27854#issuecomment-1632207805)
Hi @Sjors , thanks and appreciate the review,
> The PR description could use instructions on how to test this. Specifically I'd like to try it on mainnet against my vintage S9 with BraiinsOS+ (not sure which pools already support job negotiation/ announcement). This can of course point to existing documentation. [Config D](https://stratumprotocol.org/getting-started/#config-d-sv1-firmware--translation-proxy-jn-job-negotiator--sv2-pool) is close but it assumes regtest and running your own pool
...
💬 hebasto commented on pull request "bugfix: Make `CCheckQueue` RAII-styled":
(https://github.com/bitcoin/bitcoin/pull/26762#issuecomment-1632251389)
Rebased b7ebc999ee373f0429939ac0bdb8e38fb37404aa -> 6e079015707188ac15405662ce396dd837da569a ([pr26762.12](https://github.com/hebasto/bitcoin/commits/pr26762.12) -> [pr26762.13](https://github.com/hebasto/bitcoin/commits/pr26762.13)) due to the conflict with #27607.
(https://github.com/bitcoin/bitcoin/pull/26762#issuecomment-1632251389)
Rebased b7ebc999ee373f0429939ac0bdb8e38fb37404aa -> 6e079015707188ac15405662ce396dd837da569a ([pr26762.12](https://github.com/hebasto/bitcoin/commits/pr26762.12) -> [pr26762.13](https://github.com/hebasto/bitcoin/commits/pr26762.13)) due to the conflict with #27607.
💬 hebasto commented on issue "The destructor of CCheckQueueControl may throw a exception ":
(https://github.com/bitcoin/bitcoin/issues/28033#issuecomment-1632257985)
> ... then will call CCheckQueue::Wait and CCheckQueue::Loop.In Loop, under some achievable conditions, condition_variable::wait will be called. Assuming 'res', posix::pthread_cond_wait(&cond,the_mutex), is not equal to 0, condition_variable::wait will throw an exception, condition error.
In https://github.com/bitcoin/bitcoin/blob/357e3f6aa476658aecae7239b4b06d2bc362ff1e/src/checkqueue.h#L101
[`std::condition_variable::wait`](https://en.cppreference.com/w/cpp/thread/condition_variable/wait):
...
(https://github.com/bitcoin/bitcoin/issues/28033#issuecomment-1632257985)
> ... then will call CCheckQueue::Wait and CCheckQueue::Loop.In Loop, under some achievable conditions, condition_variable::wait will be called. Assuming 'res', posix::pthread_cond_wait(&cond,the_mutex), is not equal to 0, condition_variable::wait will throw an exception, condition error.
In https://github.com/bitcoin/bitcoin/blob/357e3f6aa476658aecae7239b4b06d2bc362ff1e/src/checkqueue.h#L101
[`std::condition_variable::wait`](https://en.cppreference.com/w/cpp/thread/condition_variable/wait):
...
📝 fanquake opened a pull request: "guix: Remove librt usage from release binaries"
(https://github.com/bitcoin/bitcoin/pull/28069)
Our release binaries currently have a runtime dependency on `librt`. However this is redundant, and only the case due to bug in glibc. The `clock_*` suit of funcs were absorbed into libc long ago, however an issue with compatibility code meant that librt would still be linked against / used redundantly:
> But the forwarders were not marked as compatibility symbols.
> As a result, on older architectures, historic configure checks such as
> AC_CHECK_LIB(rt, clock_gettime)
> still cause linkin
...
(https://github.com/bitcoin/bitcoin/pull/28069)
Our release binaries currently have a runtime dependency on `librt`. However this is redundant, and only the case due to bug in glibc. The `clock_*` suit of funcs were absorbed into libc long ago, however an issue with compatibility code meant that librt would still be linked against / used redundantly:
> But the forwarders were not marked as compatibility symbols.
> As a result, on older architectures, historic configure checks such as
> AC_CHECK_LIB(rt, clock_gettime)
> still cause linkin
...
💬 hebasto commented on pull request "guix: Remove librt usage from release binaries":
(https://github.com/bitcoin/bitcoin/pull/28069#issuecomment-1632294971)
Concept ACK.
(https://github.com/bitcoin/bitcoin/pull/28069#issuecomment-1632294971)
Concept ACK.
🤔 stickies-v reviewed a pull request: "fuzz: Generate process_message targets individually"
(https://github.com/bitcoin/bitcoin/pull/28066#pullrequestreview-1526047738)
Concept ACK, reviewed code mechanically and looks good too.
(https://github.com/bitcoin/bitcoin/pull/28066#pullrequestreview-1526047738)
Concept ACK, reviewed code mechanically and looks good too.
💬 stickies-v commented on pull request "fuzz: Generate process_message targets individually":
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1260977018)
I was thinking about suggesting this refactoring in the previous PR, glad to see it happen here. Since there's almost no code reuse between both targets, would prefer splitting it out into 2 smaller functions. The diff below does that, plus:
- use pathlib
- avoid removing and then re-adding the unlimited search target (not sure if having it at the beginning instead of at the end of targets makes a meaningful difference?)
- add some docstrings
<details>
<summary>new code</summary>
```py
...
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1260977018)
I was thinking about suggesting this refactoring in the previous PR, glad to see it happen here. Since there's almost no code reuse between both targets, would prefer splitting it out into 2 smaller functions. The diff below does that, plus:
- use pathlib
- avoid removing and then re-adding the unlimited search target (not sure if having it at the beginning instead of at the end of targets makes a meaningful difference?)
- add some docstrings
<details>
<summary>new code</summary>
```py
...
💬 stickies-v commented on pull request "fuzz: Generate process_message targets individually":
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261042551)
Could make this a bit more robust by only considering lines within `namespace NetMsgType`?
```py
if has_p2p_msg:
cmd = ["awk" , "/namespace NetMsgType {/,/} \/\/ namespace NetMsgType/ { print $0 }", str(Path(src_dir) / 'src' / 'protocol.cpp')]
lines = subprocess.run(
cmd,
check=True,
stdout=subprocess.PIPE,
text=True,
).stdout.splitlines()
lines = [l.split('"', 1)[1].split('"')[0] for l in lines if l.
...
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261042551)
Could make this a bit more robust by only considering lines within `namespace NetMsgType`?
```py
if has_p2p_msg:
cmd = ["awk" , "/namespace NetMsgType {/,/} \/\/ namespace NetMsgType/ { print $0 }", str(Path(src_dir) / 'src' / 'protocol.cpp')]
lines = subprocess.run(
cmd,
check=True,
stdout=subprocess.PIPE,
text=True,
).stdout.splitlines()
lines = [l.split('"', 1)[1].split('"')[0] for l in lines if l.
...
💬 MarcoFalke commented on pull request "fuzz: Generate process_message targets individually":
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261092272)
`awk` will probably fail on macOS again? Also, there shouldn't be any risk in being too greedy, because the fuzz target also validates the argument. It seems more risky to be too little greedy.
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261092272)
`awk` will probably fail on macOS again? Also, there shouldn't be any risk in being too greedy, because the fuzz target also validates the argument. It seems more risky to be too little greedy.
💬 MarcoFalke commented on pull request "fuzz: Generate process_message targets individually":
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261093422)
Thanks, added your docstrings
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261093422)
Thanks, added your docstrings
💬 stickies-v commented on pull request "fuzz: Generate process_message targets individually":
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261099569)
Works fine here (macOS 13.4) but I'm not familiar with its portability, so if that's been an issue in the past then yeah might not be ideal. I agree that being too greedy is not a huge risk but if we can be specific I think that's still preferred. Alternatively, could also use `git grep` with `g_all_net_message_types` like we do for the `rpc` target - didn't see that earlier.
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261099569)
Works fine here (macOS 13.4) but I'm not familiar with its portability, so if that's been an issue in the past then yeah might not be ideal. I agree that being too greedy is not a huge risk but if we can be specific I think that's still preferred. Alternatively, could also use `git grep` with `g_all_net_message_types` like we do for the `rpc` target - didn't see that earlier.
💬 naumenkogs commented on pull request "p2p: Drop m_recently_announced_invs bloom filter":
(https://github.com/bitcoin/bitcoin/pull/27675#issuecomment-1632462419)
Concept ACK
----------------
I was curious whether bumping a sequence number (RBF, then RBF back the target tx) is anything interesting. I think it's ok:
- it doesn't provide any advantage for relay-delay over the regular RBF
- it doesn't look different either (NOTFOUND as opposed to ignoring the GETDATA or whatnot) — might be worth mentioning somewhere that they should look equal?
(https://github.com/bitcoin/bitcoin/pull/27675#issuecomment-1632462419)
Concept ACK
----------------
I was curious whether bumping a sequence number (RBF, then RBF back the target tx) is anything interesting. I think it's ok:
- it doesn't provide any advantage for relay-delay over the regular RBF
- it doesn't look different either (NOTFOUND as opposed to ignoring the GETDATA or whatnot) — might be worth mentioning somewhere that they should look equal?
💬 theuni commented on pull request "guix: Remove librt usage from release binaries":
(https://github.com/bitcoin/bitcoin/pull/28069#issuecomment-1632486009)
Concept ACK.
IIRC we left this because it was harmless as most systems kept a stub for librt. I suppose the situation has now inverted and relying on the stub is deprecated? (Also, it's possible I'm mixed up and thinking of libm or similar)
(https://github.com/bitcoin/bitcoin/pull/28069#issuecomment-1632486009)
Concept ACK.
IIRC we left this because it was harmless as most systems kept a stub for librt. I suppose the situation has now inverted and relying on the stub is deprecated? (Also, it's possible I'm mixed up and thinking of libm or similar)
📝 MarcoFalke opened a pull request: "test: Drop 22.x node from TxindexCompatibilityTest"
(https://github.com/bitcoin/bitcoin/pull/28070)
The node in this test was never really needed, because the compatibility tests shouldn't be used to test previous releases. (The test suite of the previous release should be used for that). So remove it.
Also, other test changes. (See individual commits)
(https://github.com/bitcoin/bitcoin/pull/28070)
The node in this test was never really needed, because the compatibility tests shouldn't be used to test previous releases. (The test suite of the previous release should be used for that). So remove it.
Also, other test changes. (See individual commits)
💬 MarcoFalke commented on pull request "fuzz: Generate process_message targets individually":
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261159805)
Thx, pushed.
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261159805)
Thx, pushed.
💬 MarcoFalke commented on pull request "util: Teach AutoFile how to XOR":
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1261190985)
Yeah, looks like you are right. Thanks, done.
(https://github.com/bitcoin/bitcoin/pull/28060#discussion_r1261190985)
Yeah, looks like you are right. Thanks, done.
💬 hebasto commented on pull request "guix: Remove librt usage from release binaries":
(https://github.com/bitcoin/bitcoin/pull/28069#issuecomment-1632560222)
> Our release binaries currently have a runtime dependency on `librt`. However this is redundant...
Confirming. From https://www.man7.org/linux/man-pages/man3/clock_gettime.3.html:
> Link with `-lrt` (only for glibc versions before 2.17).
(https://github.com/bitcoin/bitcoin/pull/28069#issuecomment-1632560222)
> Our release binaries currently have a runtime dependency on `librt`. However this is redundant...
Confirming. From https://www.man7.org/linux/man-pages/man3/clock_gettime.3.html:
> Link with `-lrt` (only for glibc versions before 2.17).
💬 stickies-v commented on pull request "fuzz: Generate process_message targets individually":
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261202332)
nit: `has_...` is not really useful anymore i guess
```suggestion
if (rpc_target, {}) in targets:
```
(https://github.com/bitcoin/bitcoin/pull/28066#discussion_r1261202332)
nit: `has_...` is not really useful anymore i guess
```suggestion
if (rpc_target, {}) in targets:
```