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

block forging tracing details at default log level #528

Closed
dcoutts opened this issue Jan 31, 2020 · 3 comments
Closed

block forging tracing details at default log level #528

dcoutts opened this issue Jan 31, 2020 · 3 comments
Assignees
Milestone

Comments

@dcoutts
Copy link
Contributor

dcoutts commented Jan 31, 2020

We need to ensure that at the default tracing levels we get the crucial information needed to trace a tx through the mempool of multiple nodes and into a block, to see where it got to.

So at default logging level:

  • for TraceAdoptedBlock we must see the block hash and the txids included into the block

For log analysis this lets us correlate the new block hash with the txs that were included into it. From there on we can trace the block hash.

For unrelated reasons we must also trace at default log level:

  • TraceNoLedgerState
  • TraceNoLedgerView
  • TraceBlockFromFuture
  • TraceDidntAdoptBlock
  • TraceForgedInvalidBlock

These are all rare, but possible failures. These should be logged at "Error" level, not just "Warning".

@dcoutts
Copy link
Contributor Author

dcoutts commented Jan 31, 2020

So it looks like the TraceAdoptedBlock mentioned above ought to be included at the "Informational" severity level, not debug. Our default min severity level for the node is probably going to be set to Informational.

@CodiePP
Copy link
Contributor

CodiePP commented Feb 4, 2020

for analysing benchmarking runs we read the blocks <-> tx relation from ChainSyncServerEvent.TraceChainSyncServerReadBlocked.AddBlock events.
probably requires 'MaximumVerbosity' to also print the list of tx ids.

@CodiePP
Copy link
Contributor

CodiePP commented Feb 4, 2020

example:

{"at":"2019-12-05T07:27:42.02Z","env":"fromList [(\"value\",String \"Release-1.0.0\")]:0.1.10.1","ns":["cardano","node","ChainSyncBlockServer"],"data":{},"app":[],"msg":"{\"kind\":\"ChainSyncServerEvent.TraceChainSyncServerReadBlocked.AddBlock\",\"tip\":\"ad1611fa710e0124@3129\",\"addedBlock\":\"( header: ( hash: ad1611fa710e0124, previousHash: 360b63cbe8063333, slot: 3129, issuer: pub:66015c5e, delegate: pub:08eead5d), body: [Tx a17c1860bb4ac86c with inputs [TxInUtxo 09b723aa #0], outputs: [TxOut 2015999990000000 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa],Tx fc9cc64e495005a8 with inputs [TxInUtxo a17c1860 #0], outputs: [TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut 40309999800 lovelace -> 2cWKMJemoBahde4jY46AvTLaAkzMcRJRSNit75PLtdAyUxZD742i2QTUAcy5H3BMuoTAa, TxOut ....

@Jimbo4350 Jimbo4350 added this to the S6 2020-02-13 milestone Feb 5, 2020
iohk-bors bot added a commit that referenced this issue Feb 5, 2020
537: Update `TraceForgeEvent` logging details r=Jimbo4350 a=Jimbo4350

- Update tracer `TraceAdoptedBlock` to log the block hash and a list of txids in that block. 

Example output: `[cardano.node.Forge:Info:61] [2020-02-04 18:08:26.00 UTC] {"kind":"TraceAdoptedBlock","slot":6,"tx ids":"[txid: txid:6875a2f9]","block hash":"a6d8325832257989"}`


- Update the following tracers to `Error` severity:
 `TraceNoLedgerState`
 `TraceNoLedgerView`
 `TraceBlockFromFuture`
 `TraceDidntAdoptBlock`
 `TraceForgedInvalidBlock`

Relevant issue: #528 

Co-authored-by: Jordan Millar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants