Skip to content

cumulus: Add better debug log output #8216

Closed
@skunert

Description

@skunert

Currently, parachain nodes do not offer enough information in many cases.

One example that I see often is that candidates are not getting backed frequently enough and the parachain skips some slots or forks.

Today engineers need to check the relaychain side to figure out what is going on. Initial diagnosis would be easier if parachain nodes would print something like:

block #5 (0xqabc) backed in relay chain block #10 (0xbla)

Technicalities

The solution should be to instantiate a tokio task, something similar to substrate-informant.

The task would take a RelayChainInterface and get a stream of imported relay chain headers. For each header, we can check the CandidateBacked digest and extract the parachain head that was packed. Then print the info in a similar format to our other debug prints. Good place to instantiate this task would be somewhere around here.

The regular debug print should have the following info:

  • Relay chain header hash + number
  • Backed parachain header hash + number
  • Included parachain header hash + number

If trace level is enabled, we could even print something like the average number of included blocks per relay block.

Zombienet for debugging and testing: https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/zombienet/examples/small_network.toml

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions