📝 Sjors opened a pull request: "rpc: fix getblock(header) returns target for tip"
(https://github.com/bitcoin/bitcoin/pull/33446)
A target field was added to the getblock and getblockheader RPC calls in #31583, but it mistakingly always used the tip value.
This commit fixes it to return the target for the given block.
Because regtest does not have difficulty adjustment, a test is added for mainnet instead. This required mining an additional block.
Also fix a few minor mistakes in the test (suite):
- rename the create_coinbase retarger_period argument to halving_period. Before #31583 this was hardcoded for regtest
...
(https://github.com/bitcoin/bitcoin/pull/33446)
A target field was added to the getblock and getblockheader RPC calls in #31583, but it mistakingly always used the tip value.
This commit fixes it to return the target for the given block.
Because regtest does not have difficulty adjustment, a test is added for mainnet instead. This required mining an additional block.
Also fix a few minor mistakes in the test (suite):
- rename the create_coinbase retarger_period argument to halving_period. Before #31583 this was hardcoded for regtest
...
💬 Sjors commented on pull request "rpc: add target to getmininginfo field and show next block info":
(https://github.com/bitcoin/bitcoin/pull/31583#discussion_r2365712567)
I ended up wasting my own time in #33446 forgetting this, so added more instructions :-)
(https://github.com/bitcoin/bitcoin/pull/31583#discussion_r2365712567)
I ended up wasting my own time in #33446 forgetting this, so added more instructions :-)
💬 Sjors commented on issue "RPC: getblock(header) returns the same target for every block":
(https://github.com/bitcoin/bitcoin/issues/33440#issuecomment-3315102729)
#33446 fixes this
(https://github.com/bitcoin/bitcoin/issues/33440#issuecomment-3315102729)
#33446 fixes this
💬 Sjors commented on pull request "rpc: fix getblock(header) returns target for tip":
(https://github.com/bitcoin/bitcoin/pull/33446#issuecomment-3315104012)
This should probably be backported to v29 and v30.
(https://github.com/bitcoin/bitcoin/pull/33446#issuecomment-3315104012)
This should probably be backported to v29 and v30.
👍 hebasto approved a pull request: "system: improve handling around GetTotalRAM()"
(https://github.com/bitcoin/bitcoin/pull/33435#pullrequestreview-3249158788)
ACK 8fcf71ca005449e639f189dec7ec0163a07e6d37.
(https://github.com/bitcoin/bitcoin/pull/33435#pullrequestreview-3249158788)
ACK 8fcf71ca005449e639f189dec7ec0163a07e6d37.
💬 hebasto commented on pull request "system: improve handling around GetTotalRAM()":
(https://github.com/bitcoin/bitcoin/pull/33435#discussion_r2365733195)
4ebf456dc589a993faa73b8b377c0d1919fbd577
Could you please update the commit message so it reflects the changes?
(https://github.com/bitcoin/bitcoin/pull/33435#discussion_r2365733195)
4ebf456dc589a993faa73b8b377c0d1919fbd577
Could you please update the commit message so it reflects the changes?
💬 hebasto commented on pull request "system: improve handling around GetTotalRAM()":
(https://github.com/bitcoin/bitcoin/pull/33435#discussion_r2365731315)
```suggestion
// file COPYING or https://opensource.org/license/mit/.
```
(https://github.com/bitcoin/bitcoin/pull/33435#discussion_r2365731315)
```suggestion
// file COPYING or https://opensource.org/license/mit/.
```
💬 zaidmstrr commented on pull request "rpc: Handle -named argument parsing where '=' character is used":
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2365757547)
Although using class has no performance issues, but I think the stateless point is valid, and using namespace here is a better choice to group related functions and for readability. This will also remove indirection function calls.
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2365757547)
Although using class has no performance issues, but I think the stateless point is valid, and using namespace here is a better choice to group related functions and for readability. This will also remove indirection function calls.
💬 zaidmstrr commented on pull request "rpc: Handle -named argument parsing where '=' character is used":
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2365757618)
Thanks, fixed.
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2365757618)
Thanks, fixed.
💬 zaidmstrr commented on pull request "rpc: Handle -named argument parsing where '=' character is used":
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2365757992)
Thanks for suggesting. Fixed in the latest commit.
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2365757992)
Thanks for suggesting. Fixed in the latest commit.
💬 zaidmstrr commented on pull request "rpc: Handle -named argument parsing where '=' character is used":
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2365758773)
Agreed. Now in the latest commit, I removed this and shifted it above the function with more descriptive info and an example command.
(https://github.com/bitcoin/bitcoin/pull/32821#discussion_r2365758773)
Agreed. Now in the latest commit, I removed this and shifted it above the function with more descriptive info and an example command.
💬 Sjors commented on pull request "rpc: fix getblock(header) returns target for tip":
(https://github.com/bitcoin/bitcoin/pull/33446#issuecomment-3315194787)
I split 88fb025c83c7aa84766a5385e6a797102dd94513 in two commits: one that adds the mock mainnet block and updates the docs, and one that's focussed on fixing the actual bug and adding test coverage for it (using this new block).
(https://github.com/bitcoin/bitcoin/pull/33446#issuecomment-3315194787)
I split 88fb025c83c7aa84766a5385e6a797102dd94513 in two commits: one that adds the mock mainnet block and updates the docs, and one that's focussed on fixing the actual bug and adding test coverage for it (using this new block).
💬 BitByBitByBitByBit commented on pull request "Release: 30.0 translations update":
(https://github.com/bitcoin/bitcoin/pull/33275#issuecomment-3315273628)
> > Sure, see https://github.com/maflcko/b-c-gui-translations-review/tree/99bf41c4e5ab74eee8c248b240e8e940e47e09ec/reviews
>
> Friendly ping to coordinators for addressing issues:
>
> * @sr-gi -- Catalan (ca)
> * @ostruvek -- Czech (cs)
> * @pryds -- Danish (da)
> * @laanwj @sipa -- Dutch (nl)
> * @Emzy -- German (de)
> * @cryptomeow -- Greek (el)
> * @jesterhodl -- Polish (pl)
>
> UPD. French (fr) and Spanish (es) coordinators have been notified via Transifex messages.
>
> UPD
...
(https://github.com/bitcoin/bitcoin/pull/33275#issuecomment-3315273628)
> > Sure, see https://github.com/maflcko/b-c-gui-translations-review/tree/99bf41c4e5ab74eee8c248b240e8e940e47e09ec/reviews
>
> Friendly ping to coordinators for addressing issues:
>
> * @sr-gi -- Catalan (ca)
> * @ostruvek -- Czech (cs)
> * @pryds -- Danish (da)
> * @laanwj @sipa -- Dutch (nl)
> * @Emzy -- German (de)
> * @cryptomeow -- Greek (el)
> * @jesterhodl -- Polish (pl)
>
> UPD. French (fr) and Spanish (es) coordinators have been notified via Transifex messages.
>
> UPD
...
🤔 hodlinator reviewed a pull request: "qa: Improvements to debug_assert_log + busy_wait_for_debug_log"
(https://github.com/bitcoin/bitcoin/pull/33423#pullrequestreview-3244741286)
Thanks for the feedback!
> Thanks for reducing useless work - did you measure any speedup?
Rebased new push on top of #33336 which has a lot of `assert_debug_log()` (010cf81407c0df8de766fd2a116463d180f25f33), the below represents somewhat average runs:
```
₿ git co 2025/09/assert_debug_log_rebased~3
₿ hyperfine -r 30 -N ./build/test/functional/feature_assumevalid.py
Benchmark 1: ./build/test/functional/feature_assumevalid.py
Time (mean ± σ): 6.058 s ± 0.049 s [User: 4.263 s
...
(https://github.com/bitcoin/bitcoin/pull/33423#pullrequestreview-3244741286)
Thanks for the feedback!
> Thanks for reducing useless work - did you measure any speedup?
Rebased new push on top of #33336 which has a lot of `assert_debug_log()` (010cf81407c0df8de766fd2a116463d180f25f33), the below represents somewhat average runs:
```
₿ git co 2025/09/assert_debug_log_rebased~3
₿ hyperfine -r 30 -N ./build/test/functional/feature_assumevalid.py
Benchmark 1: ./build/test/functional/feature_assumevalid.py
Time (mean ± σ): 6.058 s ± 0.049 s [User: 4.263 s
...
💬 hodlinator commented on pull request "qa: Improvements to debug_assert_log + busy_wait_for_debug_log":
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2362983549)
1) Agree `join_log` is more accurate, changed.
2) It felt like the setup code was all before the `yield`.
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2362983549)
1) Agree `join_log` is more accurate, changed.
2) It felt like the setup code was all before the `yield`.
💬 hodlinator commented on pull request "qa: Improvements to debug_assert_log + busy_wait_for_debug_log":
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2364601882)
Done.
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2364601882)
Done.
💬 hodlinator commented on pull request "qa: Improvements to debug_assert_log + busy_wait_for_debug_log":
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2362813877)
I prefer `!s` since it is closer to the original `str()`. `!r` seems more appropriate when one wants to copy the result into code, mirroring `repr()`, feverishly escaping backslashes etc:
```python
>>> repr(r'\w')
"'\\\\w'"
>>> str(r'\w')
'\\w'
```
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2362813877)
I prefer `!s` since it is closer to the original `str()`. `!r` seems more appropriate when one wants to copy the result into code, mirroring `repr()`, feverishly escaping backslashes etc:
```python
>>> repr(r'\w')
"'\\\\w'"
>>> str(r'\w')
'\\w'
```
💬 hodlinator commented on pull request "qa: Improvements to debug_assert_log + busy_wait_for_debug_log":
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2364558825)
We only report one `found`-entry per found expected message if it exists in the log, doesn't matter if it exists twice in the log (the indexes are not into the log), so I think it should be alright.
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2364558825)
We only report one `found`-entry per found expected message if it exists in the log, doesn't matter if it exists twice in the log (the indexes are not into the log), so I think it should be alright.
💬 hodlinator commented on pull request "qa: Improvements to debug_assert_log + busy_wait_for_debug_log":
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2364544756)
Agreed that it's nicer not modify inputs, done!
I had the list comprehension of
```python
remaining = [e for e in remaining if e not in log]
```
Then I realized it was wasteful to keep searching if we already failed to find one of the expected messages, so I reverted the list comprehension and added a `break`.
Found another way to probably get rid of `found` (not well tested). But it comes at the expense of copying the remaining enumerated `list` for each outer loop iteration, so holdi
...
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2364544756)
Agreed that it's nicer not modify inputs, done!
I had the list comprehension of
```python
remaining = [e for e in remaining if e not in log]
```
Then I realized it was wasteful to keep searching if we already failed to find one of the expected messages, so I reverted the list comprehension and added a `break`.
Found another way to probably get rid of `found` (not well tested). But it comes at the expense of copying the remaining enumerated `list` for each outer loop iteration, so holdi
...
💬 hodlinator commented on pull request "qa: Improvements to debug_assert_log + busy_wait_for_debug_log":
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2364603250)
Moved.
(https://github.com/bitcoin/bitcoin/pull/33423#discussion_r2364603250)
Moved.