More granular debug #8484

pull rebroad wants to merge 1 commits into bitcoin:master from rebroad:MoreGranularDebug changing 2 files +36 −31
  1. rebroad commented at 3:25 AM on August 8, 2016: contributor

    This pull request has been shunk down to size with other changes now to be in separate pull requests.

    The change request here simply splits moves some of "net" debugging into "net2", "block" and "tx".

    This is a cut-down version of #8728 which also seeks to make debug message conform to a style.

    Sorry for all the pull requests as a result of breaking this up, but I felt there was too much to it in it's previous format, and therefore was unlikely any of it would be merged.

  2. rebroad force-pushed on Aug 8, 2016
  3. rebroad force-pushed on Aug 8, 2016
  4. jonasschnelli added the label Docs and Output on Aug 8, 2016
  5. sipa commented at 6:15 AM on August 10, 2016: member

    Concept ACK

  6. MarcoFalke commented at 6:18 AM on August 10, 2016: member

    Wouldn't need init.cpp (debugCategories) an update as well?

  7. laanwj commented at 1:14 PM on August 11, 2016: member

    Wouldn't need init.cpp (debugCategories) an update as well?

    Yes, needs to be documented in option help.

  8. rebroad commented at 1:01 AM on August 21, 2016: contributor

    ok, will add a commit to update option help... shall I list each debug string e.g. "tx, tx2, tx3"? or is it better to show the level of granularity another way, e.g. "tx{,2,3}" or "tx[1:3]", "tx[1-3]"...? not sure if there's a standard for denoting this sort of thing.

  9. rebroad renamed this:
    More granular debug
    [WIP] More granular debug
    on Aug 26, 2016
  10. rebroad force-pushed on Aug 26, 2016
  11. rebroad commented at 5:13 AM on August 26, 2016: contributor

    @laanwj init.cpp now updated to show usage

  12. rebroad renamed this:
    [WIP] More granular debug
    More granular debug
    on Aug 26, 2016
  13. in src/init.cpp:None in c4f7607488 outdated
     412 | @@ -413,7 +413,7 @@ std::string HelpMessage(HelpMessageMode mode)
     413 |          strUsage += HelpMessageOpt("-limitdescendantsize=<n>", strprintf("Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT));
     414 |          strUsage += HelpMessageOpt("-bip9params=deployment:start:end", "Use given start/end times for specified BIP9 deployment (regtest-only)");
     415 |      }
     416 | -    string debugCategories = "addrman, alert, bench, coindb, db, http, libevent, lock, mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, selectcoins, tor, zmq"; // Don't translate these and qt below
     417 | +    string debugCategories = "addrman, alert, bench, block, coindb, db, estimatefee{,2}, http, libevent, lock, mempool(,2}, mempoolrej, net{,2}, proxy, prune, rand, reindex, rpc, selectcoins, tx{,2}, tor, zmq"; // Don't translate these and qt below
    


    MarcoFalke commented at 8:21 AM on August 26, 2016:

    Can you also add cmpctblock?


    MarcoFalke commented at 8:23 AM on August 26, 2016:

    μNit: I was wondering if it could help to add a "rule of thumb" somewhere to explain when to use category vs. category2.


    rebroad commented at 9:23 AM on August 28, 2016:

    @MarcoFalke Done. I propose that for future use, "cmpctblock" be restricted to the actual debug's relating to creation/etc of compact blocks, but for the transmission and download that block{,2} etc be used (since "block", "tx" are subsets of "net"). Sound ok?

    Regarding rule of thumb, happy to do this (perhaps in a future pull) - best put into init.cpp or into a readme file somewhere?

  14. rebroad force-pushed on Aug 28, 2016
  15. rebroad force-pushed on Aug 28, 2016
  16. rebroad force-pushed on Aug 28, 2016
  17. rebroad commented at 9:40 AM on August 28, 2016: contributor

    On a slightly OT note - can someone tell me how one gets notifications when someone comments on a pull request? My currently practice is to scan through my pull requests to see if comments have appeared, but I suspect there may be a better way!!

  18. rebroad force-pushed on Aug 28, 2016
  19. rebroad renamed this:
    More granular debug
    [WIP] More granular debug
    on Aug 28, 2016
  20. rebroad closed this on Aug 28, 2016

  21. sipa commented at 11:35 AM on August 28, 2016: member

    @rebroad You already have another pull request from the same branch.

  22. rebroad reopened this on Aug 29, 2016

  23. rebroad force-pushed on Aug 29, 2016
  24. rebroad force-pushed on Aug 29, 2016
  25. rebroad force-pushed on Aug 29, 2016
  26. rebroad commented at 7:30 AM on August 29, 2016: contributor

    still testing. will re-open when more done.

  27. rebroad closed this on Aug 29, 2016

  28. rebroad reopened this on Aug 29, 2016

  29. rebroad force-pushed on Aug 29, 2016
  30. rebroad closed this on Aug 29, 2016

  31. sipa commented at 7:47 AM on August 29, 2016: member

    Can you please stop opening and closing this PR?

  32. MarcoFalke commented at 7:50 AM on August 29, 2016: member

    @rebroad Just leave this open. You can do as much testing as you want locally, but be sure to compile and run the tests before you push.

  33. MarcoFalke reopened this on Aug 29, 2016

  34. in src/main.cpp:None in 0bb22d6a2d outdated
    4784 | @@ -4775,12 +4785,15 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
    4785 |                      CBlock block;
    4786 |                      if (!ReadBlockFromDisk(block, (*mi).second, consensusParams))
    4787 |                          assert(!"cannot load block from disk");
    4788 | -                    if (inv.type == MSG_BLOCK)
    4789 | +                    if (inv.type == MSG_BLOCK) {
    4790 | +                        LogPrint(fRecent ? "block" : "block2", "sending regular %s (%d) to peer=%d\n", inv.ToString(), nHeight, pfrom->id);
    


    n1bor commented at 2:19 PM on August 29, 2016:

    Any reason not to add the size of the block too? Useful to analyse bandwidth usage by block height. Although that is logged in beginmessage/endmessage already so a nasty bit of awking should be able to join them together.


    rebroad commented at 4:19 PM on August 29, 2016:

    do you mean log the size when sending it or when receiving it, or both?

  35. paveljanik commented at 7:24 AM on September 1, 2016: contributor
  36. rebroad force-pushed on Sep 8, 2016
  37. rebroad force-pushed on Sep 8, 2016
  38. rebroad force-pushed on Sep 14, 2016
  39. Make net debug more granular (move some into net2, block, tx) 168df73500
  40. rebroad force-pushed on Sep 14, 2016
  41. rebroad renamed this:
    [WIP] More granular debug
    More granular debug
    on Sep 14, 2016
  42. rebroad closed this on Sep 14, 2016

  43. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me