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

Health endpoint reports 'Alonzo' even in the 'Babbage' era. #233

Closed
2 of 4 tasks
KtorZ opened this issue Jul 5, 2022 · 0 comments
Closed
2 of 4 tasks

Health endpoint reports 'Alonzo' even in the 'Babbage' era. #233

KtorZ opened this issue Jul 5, 2022 · 0 comments
Assignees
Labels
bug Something isn't working help welcomed Good for newcomers server Issues which regard the server

Comments

@KtorZ
Copy link
Member

KtorZ commented Jul 5, 2022

What Git revision are you using?

v5.5.0

What operating system are you using, and which version?

  • Linux / Ubuntu
  • Linux / Other
  • OSX
  • Windows

Describe what the problem is?

"lastTipUpdate":"2022-07-03T21:12:13.666894572Z","networkSynchronization":0.99999,"currentEra":"Alonzo","metrics":{"activeConnections":0,"runtimeStats":{"cpuTime":6686436,"currentHeapSize":0,"gcCpuTime":0,"maxHeapSize":0},"sessionDurations":{"max":0,"mean":0,"min":0},"totalConnections":0,"totalMessages":0,"totalUnrouted":0},"connectionStatus":"connected","currentEpoch":215,"slotInEpoch":3064}}},"version":"v5.5.0"}

Current era is still Alonzo in ogmios after Vasil HF.

What should be the expected behavior?

Reported era should be Babbage in this case, because the testnet has forked.

Solution

Culprit is:

notifyResult $ case eraIndexToInt eraIndex of
0 -> Byron
1 -> Shelley
2 -> Allegra
3 -> Mary
_ -> Alonzo
continue

which doesn't raise any warning or error for the wildcard pattern-match. This is unfortunate since the EraIndex already is a well-typed sum-of-product 😬 ... so instead of converting to an open type (here, Int), we should instead pattern match on the era index.

@KtorZ KtorZ added bug Something isn't working help welcomed Good for newcomers server Issues which regard the server labels Jul 5, 2022
@KtorZ KtorZ self-assigned this Jul 5, 2022
@KtorZ KtorZ closed this as completed in 89ad208 Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help welcomed Good for newcomers server Issues which regard the server
Projects
None yet
Development

No branches or pull requests

1 participant