π¬ furszy commented on pull request "http: replace WorkQueue and single threads handling for ThreadPool":
(https://github.com/bitcoin/bitcoin/pull/33689#discussion_r2535431623)
> Exactly, let's exercise those differences, that's exactly what we want from our tests, to ruthlessly try to break the code, right?
Weβre going to side-track the discussion a bit, but Iβm not sure I completely agree.
Generally, I see unit tests as being meant for correctness, not stress testing. For example, we want to ensure certain behavior is always retained β itβs not about trying to break the code in a non-deterministic way. Thatβs what fuzz tests are for, where we randomize inputs. Iβ
...
(https://github.com/bitcoin/bitcoin/pull/33689#discussion_r2535431623)
> Exactly, let's exercise those differences, that's exactly what we want from our tests, to ruthlessly try to break the code, right?
Weβre going to side-track the discussion a bit, but Iβm not sure I completely agree.
Generally, I see unit tests as being meant for correctness, not stress testing. For example, we want to ensure certain behavior is always retained β itβs not about trying to break the code in a non-deterministic way. Thatβs what fuzz tests are for, where we randomize inputs. Iβ
...
π¬ hodlinator commented on pull request "refactor, docs: Embedded ASMap [2/3]: Refactor asmap internals and add documentation":
(https://github.com/bitcoin/bitcoin/pull/33878#discussion_r2535456270)
Agree with the rename suggestion, would make `assert(addr_bytes.size() == ip_bits.size());` less surprising below.
(https://github.com/bitcoin/bitcoin/pull/33878#discussion_r2535456270)
Agree with the rename suggestion, would make `assert(addr_bytes.size() == ip_bits.size());` less surprising below.
π¬ plebhash commented on issue "IPC via TCP Sockets":
(https://github.com/bitcoin/bitcoin/issues/32802#issuecomment-3543755211)
what about encryption?
assuming authentication is solved, would it be safe to use this outside of a controlled LAN environment?
(https://github.com/bitcoin/bitcoin/issues/32802#issuecomment-3543755211)
what about encryption?
assuming authentication is solved, would it be safe to use this outside of a controlled LAN environment?
π¬ furszy commented on pull request "http: replace WorkQueue and single threads handling for ThreadPool":
(https://github.com/bitcoin/bitcoin/pull/33689#discussion_r2535484827)
I imagine the problem is that you haven't compared the current http code with the `ThreadPool` code, which is pretty much the same but properly documented and test covered. That's one of the reasons behind the not modernization of the underlying sync mechanism in this PR, and why I added the "Note 2" paragraph as well as wrote https://github.com/bitcoin/bitcoin/pull/33689#issuecomment-3444568607.
Look at the current `WorkQueue`:
```c++
void Run() EXCLUSIVE_LOCKS_REQUIRED(!cs)
{
...
(https://github.com/bitcoin/bitcoin/pull/33689#discussion_r2535484827)
I imagine the problem is that you haven't compared the current http code with the `ThreadPool` code, which is pretty much the same but properly documented and test covered. That's one of the reasons behind the not modernization of the underlying sync mechanism in this PR, and why I added the "Note 2" paragraph as well as wrote https://github.com/bitcoin/bitcoin/pull/33689#issuecomment-3444568607.
Look at the current `WorkQueue`:
```c++
void Run() EXCLUSIVE_LOCKS_REQUIRED(!cs)
{
...
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535526914)
> > If the most recent evaluation of statement S failed, then sqlite3_finalize(S) returns the appropriate [error code](https://sqlite.org/rescode.html) or [extended error code](https://sqlite.org/rescode.html#extrc)
>
> I am not sure what is the best way to handle this. Ignoring the return value does not look good.
This text reads to me as `sqlite3_finalize` propagating any previous errors, e.g. from `sqlite3_step`. Since any errors from that should already be handled, I think it's ok to i
...
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535526914)
> > If the most recent evaluation of statement S failed, then sqlite3_finalize(S) returns the appropriate [error code](https://sqlite.org/rescode.html) or [extended error code](https://sqlite.org/rescode.html#extrc)
>
> I am not sure what is the best way to handle this. Ignoring the return value does not look good.
This text reads to me as `sqlite3_finalize` propagating any previous errors, e.g. from `sqlite3_step`. Since any errors from that should already be handled, I think it's ok to i
...
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535561586)
Done
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535561586)
Done
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535561856)
Done
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535561856)
Done
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535562445)
Done
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535562445)
Done
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535562616)
Done
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535562616)
Done
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535562832)
Removed
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535562832)
Removed
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535563023)
Done
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535563023)
Done
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535563262)
Done
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535563262)
Done
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535564145)
I've changed this to catch the exception and return `std::nullopt`.
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535564145)
I've changed this to catch the exception and return `std::nullopt`.
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535564673)
Changed to catch the exception.
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535564673)
Changed to catch the exception.
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535566375)
Done, returns an empty string now.
But the only time `sqlite3_column_text` should return NULL is if the column contains a NULL value. Empty strings are not NULL.
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535566375)
Done, returns an empty string now.
But the only time `sqlite3_column_text` should return NULL is if the column contains a NULL value. Empty strings are not NULL.
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535566840)
Done
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535566840)
Done
π¬ achow101 commented on pull request "wallet, sqlite: Encapsulate SQLite statements in a RAII class":
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535567070)
Done
(https://github.com/bitcoin/bitcoin/pull/33033#discussion_r2535567070)
Done
π¬ achow101 commented on pull request "Added rescan option for import descriptors":
(https://github.com/bitcoin/bitcoin/pull/31668#discussion_r2535608194)
It's unnecessary to log this kind of information. This would be more appropriate as a comment, but it's really not necessary at all (yes this test does that elsewhere, but it shouldn't).
(https://github.com/bitcoin/bitcoin/pull/31668#discussion_r2535608194)
It's unnecessary to log this kind of information. This would be more appropriate as a comment, but it's really not necessary at all (yes this test does that elsewhere, but it shouldn't).
π¬ achow101 commented on pull request "Added rescan option for import descriptors":
(https://github.com/bitcoin/bitcoin/pull/31668#discussion_r2535612380)
This log is unnecessary.
(https://github.com/bitcoin/bitcoin/pull/31668#discussion_r2535612380)
This log is unnecessary.
π¬ achow101 commented on pull request "Added rescan option for import descriptors":
(https://github.com/bitcoin/bitcoin/pull/31668#discussion_r2535612003)
It's not necessary to generate `COINBASE_MATURITY` blocks since we're not spending those coins. This also makes the previously existing comment incorrect as that states only 10 blocks are being mined.
(https://github.com/bitcoin/bitcoin/pull/31668#discussion_r2535612003)
It's not necessary to generate `COINBASE_MATURITY` blocks since we're not spending those coins. This also makes the previously existing comment incorrect as that states only 10 blocks are being mined.