π Sjors opened a pull request: "Log successful AcceptBlockHeader()"
(https://github.com/bitcoin/bitcoin/pull/27276)
Knowing when a header was first seen may help distinguish between a regular reorg and a selfish mining or eclipse attack.
(https://github.com/bitcoin/bitcoin/pull/27276)
Knowing when a header was first seen may help distinguish between a regular reorg and a selfish mining or eclipse attack.
π fanquake merged a pull request: "refactor: wallet, do not translate init options names"
(https://github.com/bitcoin/bitcoin/pull/25666)
(https://github.com/bitcoin/bitcoin/pull/25666)
π¬ Bushstar commented on pull request "refactor: remove unused param from legacy pubkey interface":
(https://github.com/bitcoin/bitcoin/pull/27274#discussion_r1141353847)
Updated as per the suggestion.
(https://github.com/bitcoin/bitcoin/pull/27274#discussion_r1141353847)
Updated as per the suggestion.
π¬ TheCharlatan commented on pull request "refactor, kernel: Decouple ArgsManager from blockstorage":
(https://github.com/bitcoin/bitcoin/pull/27125#issuecomment-1475248494)
Updated 54d8644dce180197fa657e9b68d6de63cf4c8072 -> 9f5600742c65a2421c9fe5a2a2670e86a25ef696 ([removeBlockstorageArgs_9](https://github.com/TheCharlatan/bitcoin/tree/removeBlockstorageArgs_9) -> [removeBlockstorageArgs_10](https://github.com/TheCharlatan/bitcoin/tree/removeBlockstorageArgs_10), [compare](https://github.com/TheCharlatan/bitcoin/compare/removeBlockstorageArgs_9..removeBlockstorageArgs_10)) to split a commit moving methods and instantiating a block manager in zmq, and replacing the
...
(https://github.com/bitcoin/bitcoin/pull/27125#issuecomment-1475248494)
Updated 54d8644dce180197fa657e9b68d6de63cf4c8072 -> 9f5600742c65a2421c9fe5a2a2670e86a25ef696 ([removeBlockstorageArgs_9](https://github.com/TheCharlatan/bitcoin/tree/removeBlockstorageArgs_9) -> [removeBlockstorageArgs_10](https://github.com/TheCharlatan/bitcoin/tree/removeBlockstorageArgs_10), [compare](https://github.com/TheCharlatan/bitcoin/compare/removeBlockstorageArgs_9..removeBlockstorageArgs_10)) to split a commit moving methods and instantiating a block manager in zmq, and replacing the
...
π Sjors opened a pull request: "Move tx enqueue messages to mempool log"
(https://github.com/bitcoin/bitcoin/pull/27277)
When running with `-debug=validation` the log is filled with:
```
2023-03-19T12:46:01Z [validation] Enqueuing TransactionAddedToMempool: txid=37c8e1ef87d75a67fbaf44e116018fbc70d9c4ef0e27e2ae56861395101f9b8e wtxid=24e2d76012f9cde451d085ead4feab136feddae6cb55d37221a81aac6c0eaf42
2023-03-19T12:46:01Z [validation] TransactionAddedToMempool: txid=37c8e1ef87d75a67fbaf44e116018fbc70d9c4ef0e27e2ae56861395101f9b8e wtxid=24e2d76012f9cde451d085ead4feab136feddae6cb55d37221a81aac6c0eaf42
```
These l
...
(https://github.com/bitcoin/bitcoin/pull/27277)
When running with `-debug=validation` the log is filled with:
```
2023-03-19T12:46:01Z [validation] Enqueuing TransactionAddedToMempool: txid=37c8e1ef87d75a67fbaf44e116018fbc70d9c4ef0e27e2ae56861395101f9b8e wtxid=24e2d76012f9cde451d085ead4feab136feddae6cb55d37221a81aac6c0eaf42
2023-03-19T12:46:01Z [validation] TransactionAddedToMempool: txid=37c8e1ef87d75a67fbaf44e116018fbc70d9c4ef0e27e2ae56861395101f9b8e wtxid=24e2d76012f9cde451d085ead4feab136feddae6cb55d37221a81aac6c0eaf42
```
These l
...
π¬ dergoegge commented on pull request "Log successful AcceptBlockHeader()":
(https://github.com/bitcoin/bitcoin/pull/27276#discussion_r1141357586)
```suggestion
LogPrint(BCLog::VALIDATION, "added new block header %s\n", hash.ToString());
```
We have an option for logging source locations `-logsourcelocations`.
(https://github.com/bitcoin/bitcoin/pull/27276#discussion_r1141357586)
```suggestion
LogPrint(BCLog::VALIDATION, "added new block header %s\n", hash.ToString());
```
We have an option for logging source locations `-logsourcelocations`.
π¬ Sjors commented on pull request "Log successful AcceptBlockHeader()":
(https://github.com/bitcoin/bitcoin/pull/27276#discussion_r1141360805)
Done!
(https://github.com/bitcoin/bitcoin/pull/27276#discussion_r1141360805)
Done!
π¬ Sjors commented on pull request "Move tx enqueue messages to mempool log":
(https://github.com/bitcoin/bitcoin/pull/27277#issuecomment-1475261120)
Still investigating the linter issueβ¦
```
src/validationinterface.cpp: Expected 0 argument(s) after format string but found 1 argument(s): LogPrint(category, fmt "\n", __VA_ARGS__)
```
(https://github.com/bitcoin/bitcoin/pull/27277#issuecomment-1475261120)
Still investigating the linter issueβ¦
```
src/validationinterface.cpp: Expected 0 argument(s) after format string but found 1 argument(s): LogPrint(category, fmt "\n", __VA_ARGS__)
```
π¬ dergoegge commented on pull request "refactor, net: End friendship of CNode, CConnman and ConnmanTestMsg":
(https://github.com/bitcoin/bitcoin/pull/27257#discussion_r1141365401)
Done!
(https://github.com/bitcoin/bitcoin/pull/27257#discussion_r1141365401)
Done!
π¬ dergoegge commented on pull request "refactor, net: End friendship of CNode, CConnman and ConnmanTestMsg":
(https://github.com/bitcoin/bitcoin/pull/27257#issuecomment-1475261198)
Rebased
(https://github.com/bitcoin/bitcoin/pull/27257#issuecomment-1475261198)
Rebased
π¬ Sjors commented on pull request "Move tx enqueue messages to mempool log":
(https://github.com/bitcoin/bitcoin/pull/27277#discussion_r1141366114)
Note: I don't know if there was any particular reason why the endline characters are vertically aligned. If there's no reason, then it would be easier to move them all to the left.
cc @kczyz
(https://github.com/bitcoin/bitcoin/pull/27277#discussion_r1141366114)
Note: I don't know if there was any particular reason why the endline characters are vertically aligned. If there's no reason, then it would be easier to move them all to the left.
cc @kczyz
π¬ jamesob commented on pull request "Log successful AcceptBlockHeader()":
(https://github.com/bitcoin/bitcoin/pull/27276#issuecomment-1475264929)
Beat me to it! I was just about to open this PR :).
For what it's worth, I think that the right approach here is to make this message `LogPrintf()` and omit it when in initial block download, the rationale being that if something weird happens on the network (like the inspiration for this PR last night), having a lot of data available to investigate would be nice, and most people don't run with verbose logging. Since the additional log volume here is quite minimal (one extra line per block, b
...
(https://github.com/bitcoin/bitcoin/pull/27276#issuecomment-1475264929)
Beat me to it! I was just about to open this PR :).
For what it's worth, I think that the right approach here is to make this message `LogPrintf()` and omit it when in initial block download, the rationale being that if something weird happens on the network (like the inspiration for this PR last night), having a lot of data available to investigate would be nice, and most people don't run with verbose logging. Since the additional log volume here is quite minimal (one extra line per block, b
...
π¬ Sjors commented on pull request "Log successful AcceptBlockHeader()":
(https://github.com/bitcoin/bitcoin/pull/27276#issuecomment-1475269967)
I opened #27277 to make `-debug=validation` less noisy, making it a more attractive setting. At least _after_ IBD, since it produces ~4 lines per block: AcceptBlockHeader, NewPoWValidBlock, Pre-allocating and BlockChecked.
(https://github.com/bitcoin/bitcoin/pull/27276#issuecomment-1475269967)
I opened #27277 to make `-debug=validation` less noisy, making it a more attractive setting. At least _after_ IBD, since it produces ~4 lines per block: AcceptBlockHeader, NewPoWValidBlock, Pre-allocating and BlockChecked.
π¬ fanquake commented on pull request "Log successful AcceptBlockHeader()":
(https://github.com/bitcoin/bitcoin/pull/27276#issuecomment-1475270418)
cc @0xB10C
(https://github.com/bitcoin/bitcoin/pull/27276#issuecomment-1475270418)
cc @0xB10C
π jamesob opened a pull request: "Log new headers"
(https://github.com/bitcoin/bitcoin/pull/27278)
Alternate to #27276.
Devs were [suprised to realize](https://twitter.com/jamesob/status/1637191706691903488) last night that we don't have definitive logging for when a given header was first received.
This logs to the main stream when new headers are received outside of IBD, as well as when headers come in over cmpctblocks. The rationale of not hiding these under log categories is that they may be useful to have widely available when debugging strange network activity, and the marginal v
...
(https://github.com/bitcoin/bitcoin/pull/27278)
Alternate to #27276.
Devs were [suprised to realize](https://twitter.com/jamesob/status/1637191706691903488) last night that we don't have definitive logging for when a given header was first received.
This logs to the main stream when new headers are received outside of IBD, as well as when headers come in over cmpctblocks. The rationale of not hiding these under log categories is that they may be useful to have widely available when debugging strange network activity, and the marginal v
...
π¬ Sjors commented on pull request "Log new headers":
(https://github.com/bitcoin/bitcoin/pull/27278#issuecomment-1475273413)
The second commit 8828f03db8fab18d56a638729f4a6afa007c259e (compact blocks) is useful regardless of whether this PR or #27276 makes it in. I'll let you rebase it in the latter case, since it makes my PR less trivial to review :-)
(https://github.com/bitcoin/bitcoin/pull/27278#issuecomment-1475273413)
The second commit 8828f03db8fab18d56a638729f4a6afa007c259e (compact blocks) is useful regardless of whether this PR or #27276 makes it in. I'll let you rebase it in the latter case, since it makes my PR less trivial to review :-)
π¬ Sjors commented on pull request "Log new headers":
(https://github.com/bitcoin/bitcoin/pull/27278#discussion_r1141374362)
Maybe use `LogPrint(BCLog::VALIDATION,` when in IBD?
(https://github.com/bitcoin/bitcoin/pull/27278#discussion_r1141374362)
Maybe use `LogPrint(BCLog::VALIDATION,` when in IBD?
π¬ jonatack commented on pull request "Move log messages: tx enqueue to mempool, allocation to blockstorage":
(https://github.com/bitcoin/bitcoin/pull/27277#discussion_r1141375638)
An alternative you could consider would be to use the `trace` log level, so this would be logged only if the `trace` loglevel is set with -loglevel, either globally or for this category.
```suggestion
LogPrintLevel(BCLog::VALIDATION, BCLog::Level::Trace, "Pre-allocating up to position 0x%x in %s%05u.dat\n", new_size, m_prefix, pos.nFile);
```
```
$ ./src/bitcoind -help-debug | grep -A10 loglevel
-loglevel=<level>|<category>:<level>
Set the global or per-catego
...
(https://github.com/bitcoin/bitcoin/pull/27277#discussion_r1141375638)
An alternative you could consider would be to use the `trace` log level, so this would be logged only if the `trace` loglevel is set with -loglevel, either globally or for this category.
```suggestion
LogPrintLevel(BCLog::VALIDATION, BCLog::Level::Trace, "Pre-allocating up to position 0x%x in %s%05u.dat\n", new_size, m_prefix, pos.nFile);
```
```
$ ./src/bitcoind -help-debug | grep -A10 loglevel
-loglevel=<level>|<category>:<level>
Set the global or per-catego
...
π¬ jonatack commented on pull request "Move log messages: tx enqueue to mempool, allocation to blockstorage":
(https://github.com/bitcoin/bitcoin/pull/27277#discussion_r1141376463)
(Just changing the category might only shift verbose logging from one place to another. The idea of the log levels is to allow more granular control over detail).
```cpp
from src/logging.h
enum class Level {
Trace = 0, // High-volume or detailed logging for development/debugging
Debug, // Reasonably noisy logging, but still usable in production
Info, // Default
Warning,
Error,
```
(https://github.com/bitcoin/bitcoin/pull/27277#discussion_r1141376463)
(Just changing the category might only shift verbose logging from one place to another. The idea of the log levels is to allow more granular control over detail).
```cpp
from src/logging.h
enum class Level {
Trace = 0, // High-volume or detailed logging for development/debugging
Debug, // Reasonably noisy logging, but still usable in production
Info, // Default
Warning,
Error,
```
π¬ Sjors commented on pull request "Move log messages: tx enqueue to mempool, allocation to blockstorage":
(https://github.com/bitcoin/bitcoin/pull/27277#discussion_r1141376879)
I think blockstorage is correct place for this in any case. E.g. it also logs `Leaving block file`. I don't know if it makes sense to reduce the log level.
(https://github.com/bitcoin/bitcoin/pull/27277#discussion_r1141376879)
I think blockstorage is correct place for this in any case. E.g. it also logs `Leaving block file`. I don't know if it makes sense to reduce the log level.