Skip to content

Conversation

amesgen
Copy link
Member

@amesgen amesgen commented Aug 14, 2025

Description

Three commits:

  1. More consistent naming

  2. Higher severities for the GSM state transition messages. These are very rare, and (especially with Genesis enabled) strongly influence the behavior of a node, so Notice seems appropriate. GsmEventLeaveCaughtUp indicates that something is wrong as the chain isn't growing from the perspective of the node, so Warning is advisable.

  3. Add a metric for the GSM state (cardano_node_metrics_GSM_state_int) which encodes PreSyncing = 0, Syncing = 1 and CaughtUp = 2. Tooling such as Grafana can then easily display the GSM state over time.

Currently, the initial GSM state isn't traced, this is fixed by IntersectMBO/ouroboros-consensus#1628

Works towards IntersectMBO/ouroboros-consensus#1530

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.

These trace messages are quite rare and (especially with Genesis) the GSM state
has a significant effect on the behavior of the node.
@amesgen amesgen requested a review from a team as a code owner August 14, 2025 17:19
@amesgen amesgen self-assigned this Aug 18, 2025
@amesgen amesgen moved this to 👀 In review in Consensus Team Backlog Aug 18, 2025
Copy link
Contributor

@jutaro jutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amesgen amesgen added this pull request to the merge queue Aug 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Aug 21, 2025
@amesgen amesgen added this pull request to the merge queue Aug 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 21, 2025
@amesgen amesgen added this pull request to the merge queue Aug 21, 2025
Merged via the queue into master with commit 998a6a6 Aug 21, 2025
28 of 30 checks passed
@amesgen amesgen deleted the amesgen/gsm-chores branch August 21, 2025 16:48
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Consensus Team Backlog Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants