Skip to content

user-unfriendly error message from query leadership-schedule #4002

Open
@mkoura

Description

@mkoura

Internal

Area
Other Any other topic (Delegation, Ranking, ...).

Summary
Running cardano-cli query leadership-schedule at a time in an epoch when stake distribution is unstable leads to error like

cardano-cli query leadership-schedule --genesis /scratch/cardano-node-tests/state-cluster0/shelley/genesis.json --vrf-signing-key-file /scratch/cardano-node-tests/state-cluster0/nodes/node-pool3/vrf.skey --cold-verification-key-file /scratch/cardano-node-tests/state-cluster0/nodes/node-pool3/cold.vkey --next --testnet-magic 42 --cardano-mode

Command failed: query leadership-schedule Error: Error while calculating the slot range: PastHorizon {pastHorizonCallStack = [("runQuery",SrcLoc {srcLocPackage = "ouroboros-consensus-0.1.0.0-3WJNO431PEsEUwRPtCeeUr", srcLocModule = "Ouroboros.Consensus.HardFork.History.Qry", srcLocFile = "src/Ouroboros/Consensus/HardFork/History/Qry.hs", srcLocStartLine = 430, srcLocStartCol = 44, srcLocEndLine = 430, srcLocEndCol = 64}),("interpretQuery",SrcLoc {srcLocPackage = "ouroboros-consensus-0.1.0.0-3WJNO431PEsEUwRPtCeeUr", srcLocModule = "Ouroboros.Consensus.HardFork.History.EpochInfo", srcLocFile = "src/Ouroboros/Consensus/HardFork/History/EpochInfo.hs", srcLocStartLine = 45, srcLocStartCol = 50, srcLocEndLine = 45, srcLocEndCol = 68}),("interpretQuery'",SrcLoc {srcLocPackage = "ouroboros-consensus-0.1.0.0-3WJNO431PEsEUwRPtCeeUr", srcLocModule = "Ouroboros.Consensus.HardFork.History.EpochInfo", srcLocFile = "src/Ouroboros/Consensus/HardFork/History/EpochInfo.hs", srcLocStartLine = 34, srcLocStartCol = 31, srcLocEndLine = 34, srcLocEndCol = 63}),("epochInfoSize_",SrcLoc {srcLocPackage = "cardano-slotting-0.1.0.0-6VyoKllhKMr9HEkTJGSq3p", srcLocModule = "Cardano.Slotting.EpochInfo.API", srcLocFile = "src/Cardano/Slotting/EpochInfo/API.hs", srcLocStartLine = 45, srcLocStartCol = 9, srcLocEndLine = 45, srcLocEndCol = 23}),("epochInfoSize",SrcLoc {srcLocPackage = "cardano-slotting-0.1.0.0-6VyoKllhKMr9HEkTJGSq3p", srcLocModule = "Cardano.Slotting.EpochInfo.API", srcLocFile = "src/Cardano/Slotting/EpochInfo/API.hs", srcLocStartLine = 122, srcLocStartCol = 26, srcLocEndLine = 122, srcLocEndCol = 42}),("epochInfoSize_",SrcLoc {srcLocPackage = "cardano-slotting-0.1.0.0-6VyoKllhKMr9HEkTJGSq3p", srcLocModule = "Cardano.Slotting.EpochInfo.API", srcLocFile = "src/Cardano/Slotting/EpochInfo/API.hs", srcLocStartLine = 45, srcLocStartCol = 9, srcLocEndLine = 45, srcLocEndCol = 23}),("epochInfoSize",SrcLoc {srcLocPackage = "cardano-slotting-0.1.0.0-6VyoKllhKMr9HEkTJGSq3p", srcLocModule = "Cardano.Slotting.EpochInfo.API", srcLocFile = "src/Cardano/Slotting/EpochInfo/API.hs", srcLocStartLine = 78, srcLocStartCol = 9, srcLocEndLine = 78, srcLocEndCol = 40})], pastHorizonExpression = Some (EEpochSize (ELit (EpochNo 31))), pastHorizonSummary = [EraSummary {eraStart = Bound {boundTime = RelativeTime 0s, boundSlot = SlotNo 0, boundEpoch = EpochNo 0}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 200s, boundSlot = SlotNo 100, boundEpoch = EpochNo 1}), eraParams = EraParams {eraEpochSize = EpochSize 100, eraSlotLength = SlotLength 2s, eraSafeZone = StandardSafeZone 20}},EraSummary {eraStart = Bound {boundTime = RelativeTime 200s, boundSlot = SlotNo 100, boundEpoch = EpochNo 1}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 400s, boundSlot = SlotNo 1100, boundEpoch = EpochNo 2}), eraParams = EraParams {eraEpochSize = EpochSize 1000, eraSlotLength = SlotLength 0.2s, eraSafeZone = StandardSafeZone 300}},EraSummary {eraStart = Bound {boundTime = RelativeTime 400s, boundSlot = SlotNo 1100, boundEpoch = EpochNo 2}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 600s, boundSlot = SlotNo 2100, boundEpoch = EpochNo 3}), eraParams = EraParams {eraEpochSize = EpochSize 1000, eraSlotLength = SlotLength 0.2s, eraSafeZone = StandardSafeZone 300}},EraSummary {eraStart = Bound {boundTime = RelativeTime 600s, boundSlot = SlotNo 2100, boundEpoch = EpochNo 3}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 800s, boundSlot = SlotNo 3100, boundEpoch = EpochNo 4}), eraParams = EraParams {eraEpochSize = EpochSize 1000, eraSlotLength = SlotLength 0.2s, eraSafeZone = StandardSafeZone 300}},EraSummary {eraStart = Bound {boundTime = RelativeTime 800s, boundSlot = SlotNo 3100, boundEpoch = EpochNo 4}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 6200s, boundSlot = SlotNo 30100, boundEpoch = EpochNo 31}), eraParams = EraParams {eraEpochSize = EpochSize 1000, eraSlotLength = SlotLength 0.2s, eraSafeZone = StandardSafeZone 300}}]}

In previous node release the error message contained string "current stake distribution is currently unstable" which is more indicative of what is the actual problem.

System info (please complete the following information):

  • OS Name: Fedora 35
  • Node version: latest master (2b2d5dd)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions