Bitcoin Core Github
43 subscribers
122K links
Download Telegram
💬 maflcko commented on issue "Unusual "Wallet requires newer version" Error with wallet.dat on macOS, Even with Older Client":
(https://github.com/bitcoin/bitcoin/issues/32548#issuecomment-2889074717)
> * The user (me) does not have any backups of the wallet.dat file

My recommendation would be to start doing that, before you proceed further.

> -salvagewallet command was attempted

`salvagewallet` should create backups for you beside the original wallet dat file. My recommendation would be to not use salvagewallet, unless you know you have no backups and you know that the wallet file is corrupt. Otherwise, it can create more issues than it fixes.

Generally, BDB wallets are deprecated anywa
...
💬 l3x3l commented on issue "Unusual "Wallet requires newer version" Error with wallet.dat on macOS, Even with Older Client":
(https://github.com/bitcoin/bitcoin/issues/32548#issuecomment-2889079869)
I have all of my wallets backed up.

What steps should I take on migrating the wallet that gives the error it needs a newer version of bitcoin core?
💬 andrewtoth commented on pull request "contrib: add xor-blocks tool to obfuscate blocks directory":
(https://github.com/bitcoin/bitcoin/pull/32451#discussion_r2094569036)
Right, a byte array is alignment of 1, u128 is 16. I removed the unsafe cast for the key, but we still use unsafe for casting the buffer. It seems to always be at an address aligned to 16, but not sure how we can guarantee that.
💬 l3x3l commented on issue "Unusual "Wallet requires newer version" Error with wallet.dat on macOS, Even with Older Client":
(https://github.com/bitcoin/bitcoin/issues/32548#issuecomment-2889083038)
When I attempt to migrate the wallet I receive the same error asking for a newer version of bitcoin core.
💬 andrewtoth commented on pull request "log: print reason when writing chainstate":
(https://github.com/bitcoin/bitcoin/pull/32404#issuecomment-2889084471)
Concept ACK on the last commit.

It's not clear to me how the other commits are related to the PR description though. It would probably be easier to merge and review with only the last commit.
📝 hebasto opened a pull request: "refactor: Remove workaround for resolved MSVC bug"
(https://github.com/bitcoin/bitcoin/pull/32552)
The MSVC bug was [fixed](https://developercommunity.visualstudio.com/t/consteval-conversion-function-fails/1579014) in Visual Studio version 17.11, and the Bitcoin Core project now requires Visual Studio version [17.13](https://github.com/bitcoin/bitcoin/pull/32525) or later.
💬 hebasto commented on pull request "refactor: Remove workaround for resolved MSVC bug":
(https://github.com/bitcoin/bitcoin/pull/32552#issuecomment-2889087646)
cc @hodlinator
💬 andrewtoth commented on pull request "contrib: add xor-blocks tool to obfuscate blocks directory":
(https://github.com/bitcoin/bitcoin/pull/32451#discussion_r2094577106)
Ah I figured it out. Declare a u128 first then point to it as the buffer.
📝 hebasto converted_to_draft a pull request: "refactor: Remove workaround for resolved MSVC bug"
(https://github.com/bitcoin/bitcoin/pull/32552)
The MSVC bug was [fixed](https://developercommunity.visualstudio.com/t/consteval-conversion-function-fails/1579014) in Visual Studio version 17.11, and the Bitcoin Core project now requires Visual Studio version [17.13](https://github.com/bitcoin/bitcoin/pull/32525) or later.
hebasto closed a pull request: "refactor: Remove workaround for resolved MSVC bug"
(https://github.com/bitcoin/bitcoin/pull/32552)
💬 hebasto commented on pull request "refactor: Remove workaround for resolved MSVC bug":
(https://github.com/bitcoin/bitcoin/pull/32552#issuecomment-2889125273)
> The MSVC bug was [fixed](https://developercommunity.visualstudio.com/t/consteval-conversion-function-fails/1579014) in Visual Studio version 17.11, and the Bitcoin Core project now requires Visual Studio version [17.13](https://github.com/bitcoin/bitcoin/pull/32525) or later.

It's still broken in 17.14.0. Going to submit another bug report.
💬 achow101 commented on issue "Unusual "Wallet requires newer version" Error with wallet.dat on macOS, Even with Older Client":
(https://github.com/bitcoin/bitcoin/issues/32548#issuecomment-2889145174)
From your debug.log, it looks like it was opened successfully on 2025-05-18T09:23:00Z, but failed to open at the next run at 2025-05-18T09:23:59Z. Did you do anything to the wallet between these 2 runs of Bitcoin Core? There's less than a minute between them though, which is odd. If nothing was done between these 2 runs, then this suggests to me that the wallet file was randomly corrupted, possibly due to failing hardware or a cosmic ray.

The logs indicate that the version number of the wallet
...
💬 1440000bytes commented on pull request "contrib: add xor-blocks tool to obfuscate blocks directory":
(https://github.com/bitcoin/bitcoin/pull/32451#discussion_r2094597729)
> If this is the wrong home dir though then a user can just specify it manually using the -datadir= option.

I tested on Windows and it works with `-datadir=`

1. Installed bitcoin core v27.0 to sync a few signet blocks
2. Installed bitcoin core v29.0 to sync more blocks and create xor.dat file
3. Tried this tool which works only with `-datadir=` set

```
> cargo run --release
Finished `release` profile [optimized] target(s) in 0.11s
Running `target\release\blocks-xor.exe`
E
...
🤔 tapcrafter reviewed a pull request: "RFC: script: short-circuit `GetLegacySigOpCount` for known scripts"
(https://github.com/bitcoin/bitcoin/pull/32532#pullrequestreview-2849025458)
Concept ACK 432ff7e736942c6dd6fc923300b5fa5f0f94c287.

Can't fully speak to the correctness of the refactor itself, still brushing up on my C++. So can't give a full ACK but left some questions instead.

<details>

<summay>Test protocol</summary>

New benchmark test on 2e8a9e17 (first commit of PR, before refactor):

```
| ns/sigops | sigops/s | err% | total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|
...
💬 tapcrafter commented on pull request "RFC: script: short-circuit `GetLegacySigOpCount` for known scripts":
(https://github.com/bitcoin/bitcoin/pull/32532#discussion_r2094559241)
Should the test case (`BOOST_AUTO_TEST_CASE(GetSigOpCount)`) also be renamed?
💬 tapcrafter commented on pull request "RFC: script: short-circuit `GetLegacySigOpCount` for known scripts":
(https://github.com/bitcoin/bitcoin/pull/32532#discussion_r2094594388)
Same here, the original had the additional condition `&& script[1] == 0x04`.
💬 tapcrafter commented on pull request "RFC: script: short-circuit `GetLegacySigOpCount` for known scripts":
(https://github.com/bitcoin/bitcoin/pull/32532#discussion_r2094560461)
Can we add `fAccurate=False` here?
💬 tapcrafter commented on pull request "RFC: script: short-circuit `GetLegacySigOpCount` for known scripts":
(https://github.com/bitcoin/bitcoin/pull/32532#discussion_r2094594352)
Looks like this check omits the `&& (script[1] == 0x02 || script[1] == 0x03)` part that was in the original `IsToPubKey` function. Not sure if this is on purpose?
💬 tapcrafter commented on pull request "RFC: script: short-circuit `GetLegacySigOpCount` for known scripts":
(https://github.com/bitcoin/bitcoin/pull/32532#discussion_r2094593425)
Not sure if we can include `interpreter.h` here, but if yes, we could use `WITNESS_V0_KEYHASH_SIZE`. And the other constants too, for extra clarity (`WITNESS_V0_SCRIPTHASH_SIZE = 32`, `WITNESS_V1_TAPROOT_SIZE = 32`).
💬 l0rinc commented on pull request "refactor: Remove workaround for resolved MSVC bug":
(https://github.com/bitcoin/bitcoin/pull/32552#issuecomment-2889148808)
I have also tried the same in: https://github.com/bitcoin/bitcoin/pull/31991#issuecomment-2724946307