💬 furszy commented on pull request "index: make startup more efficient":
(https://github.com/bitcoin/bitcoin/pull/27607#discussion_r1254460179)
> I would probably update the code rather than the documentation, since that seems simpler, and this case should only happen when there's an assumeutxo snapshot so there shouldn't be a backwards compatibility concern.
Wouldn't be odd for the user to receive the height of a block that they do not have? (tip + 1).
Isn't really a big deal anyway, this is an edge case and we can stick to the current RPC docs. But maybe would be good to discuss further what "pruneheight" result should be in a f
...
(https://github.com/bitcoin/bitcoin/pull/27607#discussion_r1254460179)
> I would probably update the code rather than the documentation, since that seems simpler, and this case should only happen when there's an assumeutxo snapshot so there shouldn't be a backwards compatibility concern.
Wouldn't be odd for the user to receive the height of a block that they do not have? (tip + 1).
Isn't really a big deal anyway, this is an edge case and we can stick to the current RPC docs. But maybe would be good to discuss further what "pruneheight" result should be in a f
...
💬 furszy commented on pull request "index: make startup more efficient":
(https://github.com/bitcoin/bitcoin/pull/27607#discussion_r1254464720)
done 👍🏼.
(https://github.com/bitcoin/bitcoin/pull/27607#discussion_r1254464720)
done 👍🏼.
💬 furszy commented on pull request "index: make startup more efficient":
(https://github.com/bitcoin/bitcoin/pull/27607#discussion_r1254462432)
done, extended the commit description.
(https://github.com/bitcoin/bitcoin/pull/27607#discussion_r1254462432)
done, extended the commit description.
💬 furszy commented on pull request "index: make startup more efficient":
(https://github.com/bitcoin/bitcoin/pull/27607#discussion_r1254477566)
Pushed the suggested code changes.
(https://github.com/bitcoin/bitcoin/pull/27607#discussion_r1254477566)
Pushed the suggested code changes.
🤔 furszy reviewed a pull request: "test: Restore unlimited timeout in IndexWaitSynced"
(https://github.com/bitcoin/bitcoin/pull/28036#pullrequestreview-1516637883)
ACK fabed7eb
I'm a bit more inclined for #28026 but it is fine either way.
Note:
Would be good to mention in the PR description that this is a behavior change for the blockfilterindex and txindex tests. It only restores the coinstatsindex behavior.
(https://github.com/bitcoin/bitcoin/pull/28036#pullrequestreview-1516637883)
ACK fabed7eb
I'm a bit more inclined for #28026 but it is fine either way.
Note:
Would be good to mention in the PR description that this is a behavior change for the blockfilterindex and txindex tests. It only restores the coinstatsindex behavior.
💬 MarcoFalke commented on pull request "test: Restore unlimited timeout in IndexWaitSynced":
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623750494)
Thx, edited OP
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623750494)
Thx, edited OP
💬 ajtowns commented on pull request "Relay own transactions only via short-lived Tor or I2P connections":
(https://github.com/bitcoin/bitcoin/pull/27509#discussion_r1254506653)
> I don't think so.
You're right -- I missed seeing the call to `ProcessGetData` and assumed it wasn't picked up until the next `ProcessMessages`.
(https://github.com/bitcoin/bitcoin/pull/27509#discussion_r1254506653)
> I don't think so.
You're right -- I missed seeing the call to `ProcessGetData` and assumed it wasn't picked up until the next `ProcessMessages`.
💬 furszy commented on pull request "test: Restore unlimited timeout in IndexWaitSynced":
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623765081)
Little note: I think that the only downside here with respect to increasing the timeout to a much higher number or #28026 is that the tests could run forever if the thread never finishes. I'm not sure how the CI will behave in this scenario, guess that we will realize that something like this happened just by reading the last executed test name.
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623765081)
Little note: I think that the only downside here with respect to increasing the timeout to a much higher number or #28026 is that the tests could run forever if the thread never finishes. I'm not sure how the CI will behave in this scenario, guess that we will realize that something like this happened just by reading the last executed test name.
💬 mzumsande commented on pull request "p2p: Diversify automatic outbound connections with respect to networks":
(https://github.com/bitcoin/bitcoin/pull/27213#issuecomment-1623767306)
> What is (was?) the reason for [#27213 (comment)](https://github.com/bitcoin/bitcoin/pull/27213#issuecomment-1611194968)?
The unsigned integer flow was caused by https://github.com/bitcoin/bitcoin/pull/27213#discussion_r1241362625 (fixed now!) - the counter wasn't incremented for new `pszDest` connections, but still decremented on disconnection, thus the overflow.
(https://github.com/bitcoin/bitcoin/pull/27213#issuecomment-1623767306)
> What is (was?) the reason for [#27213 (comment)](https://github.com/bitcoin/bitcoin/pull/27213#issuecomment-1611194968)?
The unsigned integer flow was caused by https://github.com/bitcoin/bitcoin/pull/27213#discussion_r1241362625 (fixed now!) - the counter wasn't incremented for new `pszDest` connections, but still decremented on disconnection, thus the overflow.
💬 MarcoFalke commented on pull request "test: Restore unlimited timeout in IndexWaitSynced":
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623778841)
We've been plagued by intermittent timeouts locally (for months/years) and now in CI (for days), but never a thread that never finished. So I think it should be evident that this or #https://github.com/bitcoin/bitcoin/pull/28026 should be preferred. After all, it is no different than any other deadlock or infinite loop anywhere else in the code.
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623778841)
We've been plagued by intermittent timeouts locally (for months/years) and now in CI (for days), but never a thread that never finished. So I think it should be evident that this or #https://github.com/bitcoin/bitcoin/pull/28026 should be preferred. After all, it is no different than any other deadlock or infinite loop anywhere else in the code.
💬 jamesob commented on pull request "Rework validation logic for assumeutxo":
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1254538118)
@mzumsande Yep, I don't see any reason that couldn't be done.
(https://github.com/bitcoin/bitcoin/pull/27746#discussion_r1254538118)
@mzumsande Yep, I don't see any reason that couldn't be done.
💬 furszy commented on pull request "test: Restore unlimited timeout in IndexWaitSynced":
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623813703)
Actually, it is not when the thread never finishes. The thread could have finished, but never set the `m_synced` flag to true. Which would make `BlockUntilSyncedToCurrentChain` never return true. Which actually could happen on all the index sync errors.
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623813703)
Actually, it is not when the thread never finishes. The thread could have finished, but never set the `m_synced` flag to true. Which would make `BlockUntilSyncedToCurrentChain` never return true. Which actually could happen on all the index sync errors.
💬 instagibbs commented on pull request "[POLICY] Ephemeral anchors":
(https://github.com/bitcoin/bitcoin/pull/26403#issuecomment-1623814942)
Random thought:
OP_TRUE is txid-malleable by block maker. e.g., they could theoretically add in superfluous pushes in the `scriptSig` and this would not fail validation because `CLEANSTACK` is a policy-only rule.
In this particular V3 context, it just means your CPFP could change txid, wouldn't do anything else. Maybe in a more general context if we weren't restricted to V3 topology this would be an issue? In the context of keyless anchors, I'm not sure that will ever make sense anyways.
...
(https://github.com/bitcoin/bitcoin/pull/26403#issuecomment-1623814942)
Random thought:
OP_TRUE is txid-malleable by block maker. e.g., they could theoretically add in superfluous pushes in the `scriptSig` and this would not fail validation because `CLEANSTACK` is a policy-only rule.
In this particular V3 context, it just means your CPFP could change txid, wouldn't do anything else. Maybe in a more general context if we weren't restricted to V3 topology this would be an issue? In the context of keyless anchors, I'm not sure that will ever make sense anyways.
...
💬 ajtowns commented on pull request "test: Restore unlimited timeout in IndexWaitSynced":
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623825136)
utACK fabed7eb796637c02e3677ebbe183d90b258ba69
Could also restore the original behaviour by doing something like:
```c++
void IndexWaitSynced(BaseIndex& index, std::chrono::microseconds timeout)
{
const auto end = SteadyClock::now() + timeout;
while (!index.BlockUntilSyncedToCurrentChain()) {
Assert(timeout <= 0s || SteadyClock::now < end);
UninterruptibleSleep(100ms);
}
}
```
and calling `IndexWaitSynced(index, 10s)` normally, but `IndexWaitSynced(i
...
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623825136)
utACK fabed7eb796637c02e3677ebbe183d90b258ba69
Could also restore the original behaviour by doing something like:
```c++
void IndexWaitSynced(BaseIndex& index, std::chrono::microseconds timeout)
{
const auto end = SteadyClock::now() + timeout;
while (!index.BlockUntilSyncedToCurrentChain()) {
Assert(timeout <= 0s || SteadyClock::now < end);
UninterruptibleSleep(100ms);
}
}
```
and calling `IndexWaitSynced(index, 10s)` normally, but `IndexWaitSynced(i
...
💬 ajtowns commented on pull request "test: bugfix, synchronize indexes synchronously":
(https://github.com/bitcoin/bitcoin/pull/28026#issuecomment-1623831541)
> I think I'd prefer that option because then we wouldn't need to add a test-only arg to `BaseIndex::Start`, plus having the same thread structure as in production seems more natural and more robust with respect to possible future changes of the init sequence and unit tests.
I think I (weakly) agree with this -- having the code be non-threaded in tests but threading in the real use seems like an annoying difference.
(https://github.com/bitcoin/bitcoin/pull/28026#issuecomment-1623831541)
> I think I'd prefer that option because then we wouldn't need to add a test-only arg to `BaseIndex::Start`, plus having the same thread structure as in production seems more natural and more robust with respect to possible future changes of the init sequence and unit tests.
I think I (weakly) agree with this -- having the code be non-threaded in tests but threading in the real use seems like an annoying difference.
💬 willcl-ark commented on pull request "p2p: Diversify automatic outbound connections with respect to networks":
(https://github.com/bitcoin/bitcoin/pull/27213#discussion_r1254429298)
nit: could use brace initialization here
(https://github.com/bitcoin/bitcoin/pull/27213#discussion_r1254429298)
nit: could use brace initialization here
🤔 willcl-ark reviewed a pull request: "p2p: Diversify automatic outbound connections with respect to networks"
(https://github.com/bitcoin/bitcoin/pull/27213#pullrequestreview-1516531774)
Approach and lightly tested ACK.
Slight tangent, but also slightly related to the discussion on whether IPV4 and IPV6 should be grouped... I noticed during testing that a majority of my network specific connection attempts were to IPV6 addresses, even though I don't have an IPV6 address and can't make connections to it... This appears to be because all networks are set as [Reachable by default ](https://github.com/bitcoin/bitcoin/blob/c325f0fbae2d6472a78be733d499783f8b69d6b8/src/net.h#L152-L1
...
(https://github.com/bitcoin/bitcoin/pull/27213#pullrequestreview-1516531774)
Approach and lightly tested ACK.
Slight tangent, but also slightly related to the discussion on whether IPV4 and IPV6 should be grouped... I noticed during testing that a majority of my network specific connection attempts were to IPV6 addresses, even though I don't have an IPV6 address and can't make connections to it... This appears to be because all networks are set as [Reachable by default ](https://github.com/bitcoin/bitcoin/blob/c325f0fbae2d6472a78be733d499783f8b69d6b8/src/net.h#L152-L1
...
💬 willcl-ark commented on pull request "p2p: Diversify automatic outbound connections with respect to networks":
(https://github.com/bitcoin/bitcoin/pull/27213#discussion_r1254495003)
The commit message says every ~1min, but this means it will be ~5min via GetExponentialRand I think? This seems to be more in line with timings I have observed during testing, e.g.
```log
2023-07-05T14:04:26Z [net] Making network specific connection to ipv6_addr:8333
2023-07-05T14:15:16Z [net] Making network specific connection to onion_addr.onion:8333
```
(https://github.com/bitcoin/bitcoin/pull/27213#discussion_r1254495003)
The commit message says every ~1min, but this means it will be ~5min via GetExponentialRand I think? This seems to be more in line with timings I have observed during testing, e.g.
```log
2023-07-05T14:04:26Z [net] Making network specific connection to ipv6_addr:8333
2023-07-05T14:15:16Z [net] Making network specific connection to onion_addr.onion:8333
```
📝 achow101 opened a pull request: "rpc: Drop migratewallet experimental warning"
(https://github.com/bitcoin/bitcoin/pull/28037)
The migration process itself hasn't fundamentally changed since it was added, so I think it's reasonable to say that it is no longer experimental.
(https://github.com/bitcoin/bitcoin/pull/28037)
The migration process itself hasn't fundamentally changed since it was added, so I think it's reasonable to say that it is no longer experimental.
💬 mzumsande commented on pull request "test: Restore unlimited timeout in IndexWaitSynced":
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623848833)
ACK fabed7eb796637c02e3677ebbe183d90b258ba69
as per https://github.com/bitcoin/bitcoin/pull/28026#pullrequestreview-1514862606 I like this approach more than running the sync synchronously.
> Could also restore the original behaviour by doing something like:
The problem in the first place was that that the tests for txindex and blockfilterindex would have rare intermittent timeouts. So instead of making guesses about the slowest environment the tests could be run in I think it's ok to j
...
(https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623848833)
ACK fabed7eb796637c02e3677ebbe183d90b258ba69
as per https://github.com/bitcoin/bitcoin/pull/28026#pullrequestreview-1514862606 I like this approach more than running the sync synchronously.
> Could also restore the original behaviour by doing something like:
The problem in the first place was that that the tests for txindex and blockfilterindex would have rare intermittent timeouts. So instead of making guesses about the slowest environment the tests could be run in I think it's ok to j
...