Bitcoin Core Github
44 subscribers
120K links
Download Telegram
👍 MarcoFalke approved a pull request: "Fee estimation: avoid serving stale fee estimate"
(https://github.com/bitcoin/bitcoin/pull/27622#pullrequestreview-1422877741)
lgtm. Left some nits
💬 MarcoFalke commented on pull request "Fee estimation: avoid serving stale fee estimate":
(https://github.com/bitcoin/bitcoin/pull/27622#discussion_r1191350003)
nit (feel free to ignore): An alternative to adding a function here would be to call the already existing `Ticks<std::chrono::hours>(a)` over `count_hours(a)`, but either seems fine.
💬 MarcoFalke commented on pull request "Fee estimation: avoid serving stale fee estimate":
(https://github.com/bitcoin/bitcoin/pull/27622#discussion_r1191352778)
nit:

```suggestion
fee_dat = self.nodes[0].chain_path / "fee_estimates.dat"
```
💬 MarcoFalke commented on pull request "Fee estimation: avoid serving stale fee estimate":
(https://github.com/bitcoin/bitcoin/pull/27622#discussion_r1191357213)
nit: I am not a fan of uninterruptible sleep in tests. `assert_debug_log` can be used to wait, if you supply a timeout argument (or rely on the default timeout)
💬 MarcoFalke commented on pull request "Improve performance of p2p inv to send queues":
(https://github.com/bitcoin/bitcoin/pull/27610#discussion_r1191369870)
Thanks, I should have just read the documentation: https://en.cppreference.com/w/cpp/named_req/Compare , which would have answered this.
⚠️ Sataur opened an issue: "guiutil.cpp: formatNiceTimeOffset"
(https://github.com/bitcoin-core/gui/issues/728)
### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current behaviour

last received block was generated _ years and 0 weeks..

### Expected behaviour

that tool tip can be improved by:
_..you first see the [raw](https://4sysops.com/archives/format-time-and-date-output-of-powershell-new-timespan/) output and then the human-friendly version created by my.._
_Only non-zero weeks, days, hours, minutes and seconds are displayed_

### Steps to reproduce

_Submit
...
🤔 ajtowns reviewed a pull request: "Parallel compact block downloads, take 3"
(https://github.com/bitcoin/bitcoin/pull/27626#pullrequestreview-1422727983)
Seems okay at first glance. It would be nice to have a "blockrequest.cpp" module that collects all this logic together. Perhaps we want to keep this change simple so it's a smaller backport, and refactor later, though.
💬 ajtowns commented on pull request "Parallel compact block downloads, take 3":
(https://github.com/bitcoin/bitcoin/pull/27626#discussion_r1191251631)
Would this be better as a `map<uint256, map<NodeId, list<>::iterator>>` ? Seems like it'd make some of the `FIXME`s easier.
💬 ajtowns commented on pull request "Parallel compact block downloads, take 3":
(https://github.com/bitcoin/bitcoin/pull/27626#discussion_r1191307770)
I think this case is (mostly) for when a non-high-bandwidth peer tells us about a block, we request it via a compact block, and then we get a different block from some other peer, UpdateTip to that, and only afterwards see the CMPCTBLOCK response from the original peer. But now that response is probably useless, so replace it with a GETDATA.

I wonder if that might be better expressed as: `if (in_flight_same_peer && pindex->pprev != ActiveChain().Tip())` ?
💬 ajtowns commented on pull request "Parallel compact block downloads, take 3":
(https://github.com/bitcoin/bitcoin/pull/27626#discussion_r1191313364)
Might be better to name this `requested_block_from_this_peer` ? (I think for new code we prefer `bool x{false};` so we get errors if we're accidently narrowing values?)
💬 ajtowns commented on pull request "Parallel compact block downloads, take 3":
(https://github.com/bitcoin/bitcoin/pull/27626#discussion_r1191357478)
Out of the last 612 compact blocks my node's reconstructed that required requesting transactions, 277 needed 10 or fewer (45%), 441 needed 50 or fewer (72%), 488 needed 100 or fewer (80%), 548 needed 500 or fewer (90%). I'd probably prefer 50 or 100 than 10, I guess?

(In simpler times, 1086/1162 (93%) need 10 or fewer, 1140/1162 (98%) needed 50 or fewer, 1144/1162 (98.5%) needed 100 or fewer. Again, I'm not including blocks that requested 0 txs in those denominators)
💬 ajtowns commented on pull request "Parallel compact block downloads, take 3":
(https://github.com/bitcoin/bitcoin/pull/27626#discussion_r1191323390)
(Test the bool first?)
💬 ajtowns commented on pull request "Parallel compact block downloads, take 3":
(https://github.com/bitcoin/bitcoin/pull/27626#discussion_r1191320979)
`already_in_flight == 0 || (already_in_flight == 1 && in_flight_same_peer)` ?
💬 ajtowns commented on pull request "Parallel compact block downloads, take 3":
(https://github.com/bitcoin/bitcoin/pull/27626#discussion_r1191369251)
This logic is different to the previous `first_in_flight`; probably should be the same?
💬 instagibbs commented on pull request "rpc: allow submitpackage to be called outside of regtest":
(https://github.com/bitcoin/bitcoin/pull/27609#discussion_r1191393064)
Lots of magic numbers in this test. Could you assert specific vsizes on each tx, and have that number match the picture here?
💬 instagibbs commented on pull request "rpc: allow submitpackage to be called outside of regtest":
(https://github.com/bitcoin/bitcoin/pull/27609#discussion_r1191360507)
test/txpackage_tests.cpp:382:9: warning: multi-line comment [-Wcomment]
382 | // / \
| ^
💬 instagibbs commented on pull request "rpc: allow submitpackage to be called outside of regtest":
(https://github.com/bitcoin/bitcoin/pull/27609#discussion_r1191354472)
`grandparent_inputs.size() * COIN`
🤔 mzumsande reviewed a pull request: "Improve performance of p2p inv to send queues"
(https://github.com/bitcoin/bitcoin/pull/27610#pullrequestreview-1422952009)
Post-Merge ACK.

I've been running this patch (plus added reporting in `getpeerinfo`, https://github.com/mzumsande/bitcoin/commit/6932997b1b41d2197094a0a9c71601df72630501) for a few days, and have neither seen extremely high backlogs > 5000 in `m_tx_inventory_to_send` nor enhanced CPU use.

In order to better monitor the efficacy of this, it might make sense to expose the size of `m_tx_inventory_to_send` via RPC permanently?
💬 ajtowns commented on pull request "net processing: avoid serving non-announced txs as a result of a MEMPOOL message":
(https://github.com/bitcoin/bitcoin/pull/27602#discussion_r1191396005)
I don't think the timing of removal from `mapRelay` reveals a secret -- that's 15minutes after it was added, but the time it was added is the time it was first announced (probably to an outbound peer), which is already randomised/batched, compared to the time we received it?
💬 vasild commented on pull request "net processing: avoid serving non-announced txs as a result of a MEMPOOL message":
(https://github.com/bitcoin/bitcoin/pull/27602#issuecomment-1544261088)
> > `txinfo.m_time <= mempool_req`

> This condition is checking that our inv (`txinfo`) is more recent than the last `mempool_req`, meaning that once a mempool request has been processed the peer can request any transaction from our mempool.

I don't get it. Is it not that the condition is checking whether `txinfo` is _older_ than the last `mempool_req`? In that case the transaction has been part of the `MEMPOOL` reply, so we have sent an `INV` about it.