Bitcoin Core Github
43 subscribers
122K links
Download Telegram
💬 maflcko commented on pull request "test: handle wallet_reorgrestore.py failed":
(https://github.com/bitcoin/bitcoin/pull/29395#issuecomment-1931648941)
The issue is a race, so it is not deterministically reproducible. Usually, to deterministically reproduce it on all hardware, a sleep will have to be added in the right place in the source code or test code.

A pull request will either have to explain where to put the sleep, or, if not possible, come up with a plausible explanation how the race could happen. Also, the pull request should explain if the bug is in the wallet code or in the test code, in which case the fix should be applied to th
...
📝 hebasto opened a pull request: "release: Update translations for v27.0 soft translation string freeze"
(https://github.com/bitcoin/bitcoin/pull/29397)
This PR follows our [Release Process](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md).

Required to open Transifex translations for v27.0 as it's scheduled in https://github.com/bitcoin/bitcoin/issues/29028.

The previous similar PR: https://github.com/bitcoin/bitcoin/pull/28383.
💬 hebasto commented on pull request "release: Update translations for v27.0 soft translation string freeze":
(https://github.com/bitcoin/bitcoin/pull/29397#issuecomment-1931659359)
cc @jarolrod
⚠️ azazar opened an issue: "Internal bug detected: Fee needed > fee paid"
(https://github.com/bitcoin/bitcoin/issues/29398)
### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current behaviour

It's a bitcoinfaucet.uo1.net testnet node that is sending bitcoins and checking balance. It stopped working and was restarted. I've lost all bug details, but it happens. Restarting node helped.

### Expected behaviour

It should work

### Steps to reproduce

IDK

### Relevant log output

bitcoinfaucet-background-job-1 | Internal bug detected: Fee needed > fee paid
bitcoinfaucet-backgroun
...
💬 josibake commented on pull request "sqlite: Disallow writing from multiple `SQLiteBatch`s":
(https://github.com/bitcoin/bitcoin/pull/29112#issuecomment-1931693124)
ACK https://github.com/bitcoin/bitcoin/pull/29112/commits/cfcb9b1ecf9be5267487713fa1e112ca09a1ae55

Looks good, nothing to add. Happy to reACK if you end up taking ryanofsky's suggestions.
💬 hebasto commented on issue "doc: List identifiers used from header in #if(def)":
(https://github.com/bitcoin/bitcoin/issues/26972#issuecomment-1931724034)
I agree that all required headers must be included explicitly without relying on indirect inclusions via other headers.
💬 maflcko commented on pull request "test: Fix CPartialMerkleTree.nTransactions signedness":
(https://github.com/bitcoin/bitcoin/pull/29363#issuecomment-1931772226)
rfm?
📝 maflcko opened a pull request: "test: Fix utxo set hash serialisation signedness"
(https://github.com/bitcoin/bitcoin/pull/29399)
It is unsigned in Bitcoin Core, so the tests should match it:

https://github.com/bitcoin/bitcoin/blob/5b8990a1f3c49b0b02b7383c69e95320acbda13e/src/kernel/coinstats.cpp#L54


Large positive values for the block height are impossible to hit in tests, but it still seems fine to fix this.

The bug was introduced when the code was written in 6ccc8fc067bf516cda7bc5d7d721945be5ac2003.

(Lowercase `i` means signed, see https://docs.python.org/3/library/struct.html#format-characters)
💬 BrandonOdiwuor commented on pull request "test: fix RPC coverage check":
(https://github.com/bitcoin/bitcoin/pull/29387#discussion_r1481302085)
fixed
📝 maflcko opened a pull request: "test: Fix SegwitV0SignatureMsg nLockTime signedness"
(https://github.com/bitcoin/bitcoin/pull/29400)
It is unsigned in Bitcoin Core, so the tests should match it:

https://github.com/bitcoin/bitcoin/blob/5b8990a1f3c49b0b02b7383c69e95320acbda13e/src/script/interpreter.cpp#L1611

The bug was introduced when the code was written in 330b0f31ee5719d94f9e52dfc83c5d82168241f9.

(Lowercase `i` means signed, see https://docs.python.org/3/library/struct.html#format-characters)
💬 maflcko commented on pull request "test: Fix SegwitV0SignatureMsg nLockTime signedness":
(https://github.com/bitcoin/bitcoin/pull/29400#issuecomment-1931820988)
This can be tested by passing a transaction with a large locktime and then observing the error:

```
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
```
💬 paplorinc commented on pull request "test: Fix utxo set hash serialisation signedness":
(https://github.com/bitcoin/bitcoin/pull/29399#discussion_r1481313446)
I'm just looking around, I'm not a Bitcoin core expert.
My understanding is that this is unsigned little endian is `<I`, wouldn't it make sense to change as little as possible here:
```suggestion
data += struct.pack("<I", height * 2 + coinbase)
```
or if we want to mimic the C++ code:
```suggestion
data = struct.pack('<I', (height << 1) + coinbase)
```
💬 paplorinc commented on pull request "test: Fix SegwitV0SignatureMsg nLockTime signedness":
(https://github.com/bitcoin/bitcoin/pull/29400#discussion_r1481315962)
Could we keep the format?
```suggestion
struct.pack("<I", txTo.nLockTime)
```

In the instructions you've mentioned it's reproducible - can you add a test that fails before this change, but passes after?
💬 paplorinc commented on pull request "test: Fix utxo set hash serialisation signedness":
(https://github.com/bitcoin/bitcoin/pull/29399#discussion_r1481317057)
if possible, can you cover it with a test that reproduces the error before this fix - and passes after it?
💬 maflcko commented on pull request "test: Fix utxo set hash serialisation signedness":
(https://github.com/bitcoin/bitcoin/pull/29399#discussion_r1481319871)
> wouldn't it make sense to change as little as possible here:

No. `struct.pack` is brittle and confusing. Just look at all the bugs: https://github.com/bitcoin/bitcoin/pull/29400, https://github.com/bitcoin/bitcoin/pull/29399, https://github.com/bitcoin/bitcoin/pull/29363, fa3886b7c69cbbe564478f30bb2c35e9e6b1cffa, ...

Thus, `struct.pack` should be removed from all tests to avoid more bugs in the future.
💬 maflcko commented on pull request "test: Fix utxo set hash serialisation signedness":
(https://github.com/bitcoin/bitcoin/pull/29399#discussion_r1481320201)
No, Large positive values for the block height are impossible to hit in tests, but it still seems fine to fix this.
💬 maflcko commented on pull request "test: Fix SegwitV0SignatureMsg nLockTime signedness":
(https://github.com/bitcoin/bitcoin/pull/29400#discussion_r1481330149)
Yes, you can try this with the following diff:

```
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py
index d316c4b602..708e4d7e8f 100755
--- a/test/functional/p2p_segwit.py
+++ b/test/functional/p2p_segwit.py
@@ -1663,6 +1663,7 @@ class SegWitTest(BitcoinTestFramework):
pubkeyhash = hash160(pubkey)
script_pkh = key_to_p2wpkh_script(pubkey)
tx = CTransaction()
+ tx.nLockTime = 0xffffffff
tx.vin.append(CTxIn(COutPoint
...
💬 maflcko commented on pull request "test: fix RPC coverage check":
(https://github.com/bitcoin/bitcoin/pull/29387#discussion_r1481349496)
Is this needed?
💬 maflcko commented on pull request "test: fix RPC coverage check":
(https://github.com/bitcoin/bitcoin/pull/29387#discussion_r1481350393)
nit: Could use f-string instead of `%` when touching this line?