Bitcoin Core Github
44 subscribers
120K links
Download Telegram
💬 hodlinator commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2053511581)
There's no `return` before the assignment on line 271, and we already set this field to 0 during initialization, so could be removed?
💬 hodlinator commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2053535171)
2009?
💬 hodlinator commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2053538744)
```suggestion
// Cached key rotations for different offsets.
std::array<uint64_t, SIZE_BYTES> m_rotations;

```
Most important for me is `m_`-prefix, newline and comment are nits.
💬 hodlinator commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2053529374)
(Thanks for restoring sanity with the `m_`-prefix).
💬 hodlinator commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2053627072)
util/check.h, random and cstring seem unused?
bit-header seems required for `rotr` and `std::endian`.

```suggestion
#include <serialize.h>
#include <span.h>

#include <array>
#include <bit>
#include <cassert>
#include <climits>
#include <cstdint>
```
💬 hodlinator commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2053635433)
nit:
```suggestion
BOOST_CHECK_EQUAL(obfuscate, dbwrapper_private::GetObfuscation(dbw));
```
Here and above on line 30.
💬 hodlinator commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2053648375)
nit: This is inherited from stream.h, but could change to "target"/"dest" to make it more of a noun?
```suggestion
void operator()(std::span<std::byte> target, const size_t key_offset_bytes = 0) const
```
Same in `xor_roundtrip_random_chunks` and `xor_bytes_reference` test cases.
💬 janb84 commented on pull request "depends: Fix cross-compiling on macOS":
(https://github.com/bitcoin/bitcoin/pull/32215#issuecomment-2821181976)
I'm trying to test this PR, but having trouble verifying it. Am I correct to conclude that the fix is really mac only ( not nix-shell on macos? or GUIX cross-compile ? )

Can confirm that the `mv -t` option is not supported on MacOS .
💬 rkrux commented on pull request "test: Test that migration automatically repairs corrupted metadata with doubled derivation path":
(https://github.com/bitcoin/bitcoin/pull/29124#discussion_r2053991401)
Nit:
```diff
- # Retrieve all records that have the keymeta prefix
+ # Retrieve all records that have the "keymeta" prefix, rest of the key data is the pubkey that differs for each record
```
🤔 rkrux reviewed a pull request: "test: Test that migration automatically repairs corrupted metadata with doubled derivation path"
(https://github.com/bitcoin/bitcoin/pull/29124#pullrequestreview-2783901872)
Nice that the migration flow can fix it automatically and no new custom handling is required now while loading the legacy wallets!
💬 rkrux commented on pull request "test: Test that migration automatically repairs corrupted metadata with doubled derivation path":
(https://github.com/bitcoin/bitcoin/pull/29124#discussion_r2053994529)
Isn't [076b65796d6574, 076b65796d6575) a little too wide of a search range?

"keymeta" in hex is "6b65796d657461", prepending it with the compact size length "07" should make the key prefix "076b65796d657461" in the serialised form imo, making the range as [076b65796d657461, 076b65796d657462)
💬 rkrux commented on pull request "test: Test that migration automatically repairs corrupted metadata with doubled derivation path":
(https://github.com/bitcoin/bitcoin/pull/29124#discussion_r2053996701)
```diff
- # Make sure that this is being detected and automatically cleaned up
+ # Make sure that this it is being automatically cleaned up during migration
```
💬 l0rinc commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2054042572)
This is needed to be able to read without obfuscation - as the comment states. Can you suggest how to reword that to make it obvious?
💬 l0rinc commented on pull request "[IBD] multi-byte block obfuscation":
(https://github.com/bitcoin/bitcoin/pull/31144#discussion_r2054043508)
I'm moving code, I never know what that implies
💬 darosior commented on pull request "miner: timelock the coinbase to the mined block's height":
(https://github.com/bitcoin/bitcoin/pull/32155#discussion_r2054047295)
Of course. My point is that it does not change anything for a miner if its coinbase transaction has `nLockTime` 0 or height-1.
💬 hebasto commented on pull request "cmake: Improve robustness and usability":
(https://github.com/bitcoin/bitcoin/pull/31233#issuecomment-2821242063)
Rebased on top of https://github.com/bitcoin/bitcoin/pull/32324, which addresses https://github.com/bitcoin/bitcoin/pull/31233#discussion_r2026642378, and drafted.
📝 hebasto converted_to_draft a pull request: "cmake: Improve robustness and usability"
(https://github.com/bitcoin/bitcoin/pull/31233)
This PR:

1. Switches to a modern CMake approach by using the `Python3::Interpreter` imported target, which is more robust than using variables.

2. Disables tests instead of ignoring them.

For example:
- building without Python available:
```
$ cmake -B build
$ cmake --build build -j 16
$ # ctest --test-dir build -j 16 -R "^util_"
Internal ctest changing into directory: /bitcoin/build
Test project /bitcoin/build
Start 113: util_tests
Start 114: util_threadnames_tests

...
💬 hodlinator commented on pull request "qa: Verify clean shutdown on startup failure":
(https://github.com/bitcoin/bitcoin/pull/30660#discussion_r2054050094)
Adjusted in similar direction.
💬 hodlinator commented on pull request "qa: Verify clean shutdown on startup failure":
(https://github.com/bitcoin/bitcoin/pull/30660#discussion_r2054053341)
This was the result of an unfortunate battle with the linter. Seems to not even have worked on older versions:

https://stackoverflow.com/questions/51775950/why-isnt-it-possible-to-use-backslashes-inside-the-braces-of-f-strings-how-can
💬 hodlinator commented on pull request "qa: Verify clean shutdown on startup failure":
(https://github.com/bitcoin/bitcoin/pull/30660#discussion_r2054051131)
Took part of the simplification.