Bitcoin Core Github
42 subscribers
126K links
Download Telegram
⚠️ sojoyork opened an issue: "Let's go to PoUW!!!"
(https://github.com/bitcoin/bitcoin/issues/31685)
### Please describe the feature you'd like to see added.

Rather than PoW (Proof of Work), why not go on PoUW (Proof of Useful Work)??? If bitcoin should do something useful, then why not?

### Is your feature related to a problem, if so please describe it.

_No response_

### Describe the solution you'd like

_No response_

### Describe any alternatives you've considered

_No response_

### Please leave any additional context

_No response_
βœ… fanquake closed an issue: "Let's go to PoUW!!!"
(https://github.com/bitcoin/bitcoin/issues/31685)
πŸ‘ andrewtoth approved a pull request: "refactor: inline `UndoWriteToDisk` and `WriteBlockToDisk` to reduce serialization calls"
(https://github.com/bitcoin/bitcoin/pull/31490#pullrequestreview-2561056791)
ACK 223081ece651dc616ff63d9ac447eedc5c2a28fa
πŸ’¬ andrewtoth commented on pull request "refactor: inline `UndoWriteToDisk` and `WriteBlockToDisk` to reduce serialization calls":
(https://github.com/bitcoin/bitcoin/pull/31490#discussion_r1921599648)
nit: Here and in `WriteBlock`
```suggestion
const uint32_t blockundo_size{static_cast<uint32_t>(GetSerializeSize(blockundo))};
```
πŸ’¬ l0rinc commented on pull request "refactor: inline `UndoWriteToDisk` and `WriteBlockToDisk` to reduce serialization calls":
(https://github.com/bitcoin/bitcoin/pull/31490#discussion_r1921604482)
That's what I was going for originally, but this was explicitly requested by @ryanofsky in https://github.com/bitcoin/bitcoin/pull/31490#discussion_r1907299844
πŸ’¬ l0rinc commented on pull request "optimization: `CheckBlock` input duplicate detection":
(https://github.com/bitcoin/bitcoin/pull/31682#issuecomment-2600969293)
> The bar should be pretty high for touching such critical code.

Absolutely, every change should have an extremely high bar here.
For context, compared to the changes described in https://bitcoincore.org/en/2018/09/20/notice, this update doesn’t involve caching or reusing previously calculated values elsewhere. Instead, it operates entirely within the method, maintaining a black-box approach that ensures the exact same behavior. To validate this, I’ve added an extensive suite of tests that t
...
βœ… l0rinc closed a pull request: "optimization: precalculate SipHash constant XOR with k0 and k1 in SaltedOutpointHasher"
(https://github.com/bitcoin/bitcoin/pull/30442)
βœ… l0rinc closed a pull request: "build: improve cxx and linker flag caching"
(https://github.com/bitcoin/bitcoin/pull/30732)
βœ… l0rinc closed a pull request: "doc: Add `nproc` support for Mac through `coreutils`"
(https://github.com/bitcoin/bitcoin/pull/30936)
πŸ’¬ l0rinc commented on pull request "RPC: Fix invalid txid in `gettransaction` example":
(https://github.com/bitcoin/bitcoin/pull/31610#issuecomment-2600988779)
@luke-jr, what's wrong with the current approach?
βœ… l0rinc closed a pull request: "coins: Add move operations to Coin and CCoinsCacheEntry"
(https://github.com/bitcoin/bitcoin/pull/30643)
πŸ€” mzumsande reviewed a pull request: "optimization: `CheckBlock` input duplicate detection"
(https://github.com/bitcoin/bitcoin/pull/31682#pullrequestreview-2561075956)
This is not just affecting `CheckBlock`, it is called whenever a tx is validated (so also during mempool acceptance).

The reason that this check is increased significantly percent-wise by these changes might just be that the non-contextual checks are extremely fast in the first place (compared with contextual checks such as script verification / input lookup).
Since the non-contextual checks aren't really ever performed in isolation, an interesting benchmark for me would be how much this imp
...
πŸ€” fjahr reviewed a pull request: "test: assumeutxo: add missing tests in wallet_assumeutxo.py"
(https://github.com/bitcoin/bitcoin/pull/30455#pullrequestreview-2561068645)
Did another pass, mostly minor comments, otherwise looks pretty good. Will do a final pass when my comments have been addressed.
πŸ’¬ fjahr commented on pull request "test: assumeutxo: add missing tests in wallet_assumeutxo.py":
(https://github.com/bitcoin/bitcoin/pull/30455#discussion_r1921611162)
I would prefer if the logging here and below were comments because these are printed multiple times since this is a helper function and that means they are less helpful for debugging/showing progress.
πŸ’¬ fjahr commented on pull request "test: assumeutxo: add missing tests in wallet_assumeutxo.py":
(https://github.com/bitcoin/bitcoin/pull/30455#discussion_r1921614979)
nit: looks like there is a double space before `error_message`
πŸ’¬ fjahr commented on pull request "test: assumeutxo: add missing tests in wallet_assumeutxo.py":
(https://github.com/bitcoin/bitcoin/pull/30455#discussion_r1921612541)
Should check the balance of w2 here once more I think
πŸ’¬ fjahr commented on pull request "test: assumeutxo: add missing tests in wallet_assumeutxo.py":
(https://github.com/bitcoin/bitcoin/pull/30455#discussion_r1921615367)
nit: `pruneblockchain` returns the new pruneheight, so I think you could shorten this to

``` suggestion
assert_equal(n3.pruneblockchain(FINAL_HEIGHT), 299)
```
πŸ’¬ fjahr commented on pull request "test: assumeutxo: add missing tests in wallet_assumeutxo.py":
(https://github.com/bitcoin/bitcoin/pull/30455#discussion_r1921619130)
nit: I would have used this, it's a little more readable and a little more strict

``` suggestion
assert 'snapshot_blockhash' not in normal
```
πŸ’¬ fjahr commented on pull request "test: assumeutxo: add missing tests in wallet_assumeutxo.py":
(https://github.com/bitcoin/bitcoin/pull/30455#discussion_r1921617304)
nit: Here also two spaces
πŸ’¬ fjahr commented on pull request "test: assumeutxo: add missing tests in wallet_assumeutxo.py":
(https://github.com/bitcoin/bitcoin/pull/30455#discussion_r1921616676)
nit: Would name that wallet here `w_alt` or so, just because w2 is sort of reserved for the w2 backup