harmony-one / harmony

The core protocol of harmony
https://harmony.one
GNU Lesser General Public License v3.0
1.47k stars 289 forks source link

feat(Makefile) - cover verbose mode for the local debug #4755

Closed mur-me closed 1 month ago

mur-me commented 1 month ago

Issue

Our devs need a convenient way to run debug and debug-ext in the verbose mode, so I've created this PR to handle this. VERBOSE variable can be enabled by:

  1. uncomment in the Makefile
  2. export VERBOSE=true in the current bash session
  3. as a variable before the make run like VERBOSE=true make debug

Test

Example run:

$ VERBOSE=true make clean debug
...
Harmony (C) 2023. harmony, version v8408-v2024.2.0-12-g5ad7789d-dirty (uladzislau@ 2024-09-11T12:11:50+0300)
~/go/src/github.com/harmony-one/harmony/bin ~/go/src/github.com/harmony-one/harmony
~/go/src/github.com/harmony-one/harmony
[WARN] - running with verbose logs
...
example of DEBUG log is below:
{
  "CGO_CFLAGS": "-I/home/uladzislau/.gvm/pkgsets/go1.22.5/global/src/github.com/harmony-one/bls/include -I/home/uladzislau/.gvm/pkgsets/go1.22.5/global/src/github.com/harmony-one/mcl/include",
...
}

Unit Test Coverage

Before:

<!-- copy/paste 'go test -cover' result in the directory you made change -->

After:

<!-- copy/paste 'go test -cover' result in the directory you made change -->

Test/Run Logs

Operational Checklist

  1. Does this PR introduce backward-incompatible changes to the on-disk data structure and/or the over-the-wire protocol?. (If no, skip to question 8.)

    YES|NO

  2. Describe the migration plan.. For each flag epoch, describe what changes take place at the flag epoch, the anticipated interactions between upgraded/non-upgraded nodes, and any special operational considerations for the migration.

  3. Describe how the plan was tested.

  4. How much minimum baking period after the last flag epoch should we allow on Pangaea before promotion onto mainnet?

  5. What are the planned flag epoch numbers and their ETAs on Pangaea?

  6. What are the planned flag epoch numbers and their ETAs on mainnet?

    Note that this must be enough to cover baking period on Pangaea.

  7. What should node operators know about this planned change?

  8. Does this PR introduce backward-incompatible changes NOT related to on-disk data structure and/or over-the-wire protocol? (If no, continue to question 11.)

    YES|NO

  9. Does the existing node.sh continue to work with this change?

  10. What should node operators know about this change?

  11. Does this PR introduce significant changes to the operational requirements of the node software, such as >20% increase in CPU, memory, and/or disk usage?

TODO