Bitcoin Core Github
44 subscribers
122K links
Download Telegram
πŸ’¬ kevkevinpal commented on pull request "test: Added test coverage to listsinceblock rpc":
(https://github.com/bitcoin/bitcoin/pull/30195#discussion_r1621231556)
Yes that might make more sense, I've tried to do such in [f278ac9](https://github.com/bitcoin/bitcoin/pull/30195/commits/f278ac9f78b802e578ad35fd756ddbce229364d4)

Lets see if it passes the ci, it was passing on my machine
πŸ’¬ Sjors commented on pull request "Testnet4 including PoW difficulty adjustment fix":
(https://github.com/bitcoin/bitcoin/pull/29775#issuecomment-2140539320)
> @Sjors suggestion to change nActualTimespan was also aimed at this problem

No it wasn't, it seems I was confused myself and thought there was no problem: https://github.com/bitcoin/bitcoin/pull/29775#discussion_r1599635493
πŸ’¬ murchandamus commented on pull request "Fix waste calculation in SelectionResult":
(https://github.com/bitcoin/bitcoin/pull/28366#discussion_r1621255404)
Unfortunately, we don’t have the `change_fee` or `feerate` readily available in the BnB function. The following passes the tests, though:

```cpp
- result.RecalculateWaste(cost_of_change, cost_of_change, CAmount{0});
+ /* Calculate the fee for a P2WPKH change output */
+ if (utxo_pool.at(0).long_term_fee) {
+ const CFeeRate feerate = utxo_pool.at(0).m_long_term_feerate * (utxo_pool.at(0).fee / utxo_pool.at(0).long_term_fee);
+ const CAmount change_fee = feerate.GetF
...
πŸ’¬ murchandamus commented on pull request "Fix waste calculation in SelectionResult":
(https://github.com/bitcoin/bitcoin/pull/28366#discussion_r1621257403)
Let me know if you have a suggestion how I should amend the code.
πŸ’¬ murchandamus commented on pull request "Testnet4 including PoW difficulty adjustment fix":
(https://github.com/bitcoin/bitcoin/pull/29775#issuecomment-2140656559)
> > I missed that before, but the improved text on the BIP made me realize. It looks like an attacker could jack up the difficulty by mining a few difficulty periods with an ASIC and then stop after the last block in a difficulty period. The network would then be on a difficulty some 4n higher than before, and stuck looking to mine a first block at full difficulty.
>
> I don't think that's much of a concern -- all you'd need to do is invalidateblock the last block of the period, mine a new on
...
πŸ’¬ fjahr commented on pull request "prune, rpc: Check undo data when finding pruneheight":
(https://github.com/bitcoin/bitcoin/pull/29668#discussion_r1621295595)
Taken, thanks!
πŸ’¬ fjahr commented on pull request "prune, rpc: Check undo data when finding pruneheight":
(https://github.com/bitcoin/bitcoin/pull/29668#discussion_r1621295778)
Ok, passing CChain and BlockMan as parameters now.
πŸ’¬ fjahr commented on pull request "prune, rpc: Check undo data when finding pruneheight":
(https://github.com/bitcoin/bitcoin/pull/29668#discussion_r1621295907)
Taken, thanks!
πŸ’¬ fjahr commented on pull request "prune, rpc: Check undo data when finding pruneheight":
(https://github.com/bitcoin/bitcoin/pull/29668#discussion_r1621298451)
I have adopted these changes with minor edits and that addresses your previous comment about the genesis behavior as well.
πŸ’¬ fjahr commented on pull request "prune, rpc: Check undo data when finding pruneheight":
(https://github.com/bitcoin/bitcoin/pull/29668#discussion_r1621299243)
Addressed in the other comment on this commit
πŸ’¬ fjahr commented on pull request "prune, rpc: Check undo data when finding pruneheight":
(https://github.com/bitcoin/bitcoin/pull/29668#issuecomment-2140704680)
Addressed comments from @ryanofsky , thank you for the thoughtful review!
πŸ“ mzumsande opened a pull request: "validation: Improve, document and test logic for chains building on invalid blocks"
(https://github.com/bitcoin/bitcoin/pull/30207)
Some improvements with respect to invalid blocks and blocks building on them:

1.) The fields `m_best_header` (best header irrespective on whether we have the full block or not) and `BLOCK_FAILED_CHILD` (BlockStatus saying that a header descends from an invalid block) are populated on a best-effort basis and can sometimes be off. This is not too bad because critical consensus code doesn't rely on either of these, but it is kind of brittle, especially because this is not clearly documented. Do
...
πŸ€” furszy reviewed a pull request: "validation: Improve, document and test logic for chains building on invalid blocks"
(https://github.com/bitcoin/bitcoin/pull/30207#pullrequestreview-2089313850)
Concept ACK
πŸ’¬ TheCharlatan commented on pull request "Introduce Miner interface":
(https://github.com/bitcoin/bitcoin/pull/30200#issuecomment-2140862734)
Concept ACK
πŸ’¬ naiyoma commented on pull request "cli: restrict multiple exclusive argument usage in bitcoin-cli":
(https://github.com/bitcoin/bitcoin/pull/30148#discussion_r1621428596)
Thanks for pointing this out, the reference specifies an implicit conversion from bool to int is unsafe for `T::operator bool() const;`, but for this scenario, since we are not using a custom class it could be safe
πŸ’¬ naiyoma commented on pull request "cli: restrict multiple exclusive argument usage in bitcoin-cli":
(https://github.com/bitcoin/bitcoin/pull/30148#discussion_r1621439305)
I wasn't keen on choosing between `IsArgSet() `and `GetBoolArg() `since both achieve the same desired outcome, but you are certainly right; using either of the two, for all would be a better approach.
πŸ’¬ maflcko commented on pull request "cli: restrict multiple exclusive argument usage in bitcoin-cli":
(https://github.com/bitcoin/bitcoin/pull/30148#discussion_r1621447372)
No, they are not the same. One checks whether the arg is set at all (it could be set to 0), the other checks if the arg is set to 1.
πŸ’¬ theStack commented on pull request "test: MiniWallet: respect passed feerate for padded txs (using `target_weight`)":
(https://github.com/bitcoin/bitcoin/pull/30162#discussion_r1621482991)
What is done here is a weight-to-vsize conversion, like also done in e.g. `CTransaction.get_vsize()`, so it's essentially dividing by 4 and rounding up. Added a comment to clarify.

> Tying this to an earlier comment of mine - if target_weight had been called target_weight_wu, the code would become more self explanatory.

To my knowledge, weight is always measured in weight units, so I don't think adding the `_wu` suffix here would add any new information.
πŸ’¬ theStack commented on pull request "test: MiniWallet: respect passed feerate for padded txs (using `target_weight`)":
(https://github.com/bitcoin/bitcoin/pull/30162#discussion_r1621483053)
Good idea. Leaving that as a follow-up, as the introduction of that constant could likely be used in much more places than only the ones I touch (maybe even other functional tests).
πŸ’¬ theStack commented on pull request "test: MiniWallet: respect passed feerate for padded txs (using `target_weight`)":
(https://github.com/bitcoin/bitcoin/pull/30162#discussion_r1621483090)
Agree, leaving that as a follow-up as it likely needs more instances to adapt that are not touched here.