Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Regression, block hash truncated in TraceAdoptedBlock log #1738

Closed
AndrewWestberg opened this issue Aug 20, 2020 · 4 comments
Closed
Assignees
Labels
bug Something isn't working minorfix Something that needs to be fixed (e.g. a hard-coded constant), but that isnt a bug

Comments

@AndrewWestberg
Copy link

Exernal

Summary
We used to get the full block hash in TraceAdoptedBlock. In 1.19.0, it's now truncated. This makes it difficult to link to it in the block explorer. Instead of linking directly, we have to do a search now.

Steps to reproduce
Steps to reproduce the behavior:

  1. Watch the logs for TraceAdoptedBlock
  2. See the truncated blockHash

Expected behavior
Expected to get full block hash so it can easily be saved off or looked up in a 3rd party system.

System info (please complete the following information):

  • OS: Ubuntu
  • Version 20.04
  • Node version 1.19.0

Screenshots and attachments

{"at":"2020-08-20T13:13:55.01Z","env":"1.19.0:48140","ns":["cardano.node.Forge"],"data":{"blockSize":1803,"kind":"TraceAdoptedBlock","blockHash":"e5c7b24","slot":6362944},"app":[],"msg":"","pid":"701701","loc":null,"host":"papa","sev":"Info","thread":"53"}
@AndrewWestberg AndrewWestberg added the bug Something isn't working label Aug 20, 2020
@AndrewWestberg
Copy link
Author

The log is now quite useless. You can't even search for the block in the explorer.

Screenshot from 2020-08-20 08-36-31

Scitz0 added a commit to cardano-community/guild-operators that referenced this issue Aug 23, 2020
##### Added
- Sanity check before launching a second instance of cnode.sh [eaa16f6]

##### Removed
- `Pool >> Delegators` removed. [closes #435]
  - If/when a better option than dumping and parsing ledger-state dump arise re-adding it will be considered.
  - Utilize the community explorers listed at https://cardano-community.github.io/support-faq/#/explorers

##### Fixed
- Block Collector script adapted for cardano-node 1.19.0.
  - Block hash is now truncated in log, issue IntersectMBO/cardano-node#1738
- High cpu usage reported in a few cases when running Block Collector
  - Depending on log level, parsing and byte64 enc each entry with jq could potentially put high load on weaker systems. Replaced with grep to only parse entries containing specific traces.
rdlrt pushed a commit to cardano-community/guild-operators that referenced this issue Aug 24, 2020
* CNTools - 5.4.0

##### Added
- Sanity check before launching a second instance of cnode.sh [eaa16f6]

##### Removed
- `Pool >> Delegators` removed. [closes #435]
  - If/when a better option than dumping and parsing ledger-state dump arise re-adding it will be considered.
  - Utilize the community explorers listed at https://cardano-community.github.io/support-faq/#/explorers

##### Fixed
- Block Collector script adapted for cardano-node 1.19.0.
  - Block hash is now truncated in log, issue IntersectMBO/cardano-node#1738
- High cpu usage reported in a few cases when running Block Collector
  - Depending on log level, parsing and byte64 enc each entry with jq could potentially put high load on weaker systems. Replaced with grep to only parse entries containing specific traces.
@kevinhammond kevinhammond added minorfix Something that needs to be fixed (e.g. a hard-coded constant), but that isnt a bug logging and monitoring labels Aug 25, 2020
@CodiePP
Copy link
Contributor

CodiePP commented Aug 25, 2020

configuration .JSON might contain:
"TracingVerbosity": "NormalVerbosity",
which will truncate or leave out some information in the logged entries.
try to set this to:
"TracingVerbosity": "MaximalVerbosity",
to get everything output in the logs.

@CodiePP
Copy link
Contributor

CodiePP commented Aug 25, 2020

context: https://github.com/input-output-hk/cardano-node/blob/9cac96be5cc9ceb0ca208c4d7b826a1f3505e517/cardano-node/src/Cardano/Tracing/Render.hs#L114

renderHeaderHashForVerbosity
  :: ConvertRawHash blk
  => proxy blk
  -> TracingVerbosity
  -> HeaderHash blk
  -> Text
renderHeaderHashForVerbosity p verb =
  trim . renderHeaderHash p
 where
  trim :: Text -> Text
  trim = case verb of
    MinimalVerbosity -> Text.take 7
    NormalVerbosity -> Text.take 7
    MaximalVerbosity -> id

this function renders the hashes to text and only with verbosity set to MaximalVerbosity will output the complete hash, otherwise it truncates it to seven digits.

@AndrewWestberg
Copy link
Author

Closing this as there is a more than acceptable work-around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minorfix Something that needs to be fixed (e.g. a hard-coded constant), but that isnt a bug
Projects
None yet
Development

No branches or pull requests

3 participants