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

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

Open
Tracked by #4144
mkoura opened this issue Jun 6, 2022 · 5 comments
Open
Tracked by #4144

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

mkoura opened this issue Jun 6, 2022 · 5 comments
Assignees
Labels
area: leadership-schedule comp: cardano-cli era: babbage in-scope This item is being worked and will be part of an upcoming release priority medium issues/PRs that SHOULD be addressed. This should be done for the release, but acceptable if it doesn type: bug Something is not working user type: internal Created by an IOG employee Vasil

Comments

@mkoura
Copy link
Contributor

mkoura commented Jun 6, 2022

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)
@mkoura mkoura added bug Something isn't working Vasil labels Jun 6, 2022
@CarlosLopezDeLara
Copy link
Contributor

@newhoggy would you please take a look.

@CarlosLopezDeLara CarlosLopezDeLara added priority medium issues/PRs that SHOULD be addressed. This should be done for the release, but acceptable if it doesn 1.35.1 Include in 1.35.1 labels Jun 30, 2022
@CarlosLopezDeLara CarlosLopezDeLara added 1.35.2 and removed 1.35.1 Include in 1.35.1 labels Jul 8, 2022
@Jimbo4350
Copy link
Contributor

Again, not a bug!

@Jimbo4350 Jimbo4350 removed the bug Something isn't working label Jul 13, 2022
@Jimbo4350 Jimbo4350 changed the title [BUG] - user-unfriendly error message from query leadership-schedule user-unfriendly error message from query leadership-schedule Jul 20, 2022
@CarlosLopezDeLara CarlosLopezDeLara added in-scope This item is being worked and will be part of an upcoming release and removed 1.35.2 labels Jul 22, 2022
@CarlosLopezDeLara
Copy link
Contributor

@sunapi386
Copy link

Bump. The current failure message is not easily understood. It seems PastHorizon is the key word here.

Example output

$ cardano-cli query leadership-schedule --mainnet --next --vrf-signing-key-file cnode/vrf.skey --genesis ~/cnode/mainnet-shelley-genesis.json  --stake-pool-id (cat ~/cnode/stakepoolid.txt) 

Command failed: query leadership-schedule  Error: Error while calculating the slot range: PastHorizon {pastHorizonCallStack = [("runQuery",SrcLoc {srcLocPackage = "ouroboros-consensus-0.1.0.1-7c322785250225f4449e01befaf06c1fc7e2973dfdc3903fc7294d5ea4ac135c", 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.1-7c322785250225f4449e01befaf06c1fc7e2973dfdc3903fc7294d5ea4ac135c", 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.1-7c322785250225f4449e01befaf06c1fc7e2973dfdc3903fc7294d5ea4ac135c", 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-08f13db31beb60ccb749ee4d624fda37261d87619b648ae71316c5f8f8c39eab", 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-08f13db31beb60ccb749ee4d624fda37261d87619b648ae71316c5f8f8c39eab", 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-08f13db31beb60ccb749ee4d624fda37261d87619b648ae71316c5f8f8c39eab", 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-08f13db31beb60ccb749ee4d624fda37261d87619b648ae71316c5f8f8c39eab", 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 394))), pastHorizonSummary = [EraSummary {eraStart = Bound {boundTime = RelativeTime 0s, boundSlot = SlotNo 0, boundEpoch = EpochNo 0}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 89856000s, boundSlot = SlotNo 4492800, boundEpoch = EpochNo 208}), eraParams = EraParams {eraEpochSize = EpochSize 21600, eraSlotLength = SlotLength 20s, eraSafeZone = StandardSafeZone 4320}},EraSummary {eraStart = Bound {boundTime = RelativeTime 89856000s, boundSlot = SlotNo 4492800, boundEpoch = EpochNo 208}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 101952000s, boundSlot = SlotNo 16588800, boundEpoch = EpochNo 236}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}},EraSummary {eraStart = Bound {boundTime = RelativeTime 101952000s, boundSlot = SlotNo 16588800, boundEpoch = EpochNo 236}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 108432000s, boundSlot = SlotNo 23068800, boundEpoch = EpochNo 251}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}},EraSummary {eraStart = Bound {boundTime = RelativeTime 108432000s, boundSlot = SlotNo 23068800, boundEpoch = EpochNo 251}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 125280000s, boundSlot = SlotNo 39916800, boundEpoch = EpochNo 290}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}},EraSummary {eraStart = Bound {boundTime = RelativeTime 125280000s, boundSlot = SlotNo 39916800, boundEpoch = EpochNo 290}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 157680000s, boundSlot = SlotNo 72316800, boundEpoch = EpochNo 365}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}},EraSummary {eraStart = Bound {boundTime = RelativeTime 157680000s, boundSlot = SlotNo 72316800, boundEpoch = EpochNo 365}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 170208000s, boundSlot = SlotNo 84844800, boundEpoch = EpochNo 394}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}}]}

More understandable to simply to say Error: Not enough blocks sync'd to calculate! Try again later after slot 84715200 is sync'd..

For example, in comparison with cncli script's output:

NEXT_EPOCH:
{
  "status": "error",
  "errorMessage": "Not enough blocks sync'd to calculate! Try again later after slot 84715200 is sync'd."
}

@andrejpodzimek
Copy link

andrejpodzimek commented Mar 11, 2024

I’m still getting this massive blah with --next 😵‍💫:

Command failed: query leadership-schedule Error: Error while calculating the slot range: PastHorizon {pastHorizonCallStack = [("runQuery",SrcLoc {srcLocPackage = "ouroboros-consensus-0.14.0.0-e564fad031a192a3c46ac3060ab48f7439b270a8aeb5ba448579929af4580fff", srcLocModule = "Ouroboros.Consensus.HardFork.History.Qry", srcLocFile = "src/ouroboros-consensus/Ouroboros/Consensus/HardFork/History/Qry.hs", srcLocStartLine = 429, srcLocStartCol = 44, srcLocEndLine = 429, srcLocEndCol = 64}),("interpretQuery",SrcLoc {srcLocPackage = "ouroboros-consensus-0.14.0.0-e564fad031a192a3c46ac3060ab48f7439b270a8aeb5ba448579929af4580fff", srcLocModule = "Ouroboros.Consensus.HardFork.History.EpochInfo", srcLocFile = "src/ouroboros-consensus/Ouroboros/Consensus/HardFork/History/EpochInfo.hs", srcLocStartLine = 44, srcLocStartCol = 50, srcLocEndLine = 44, srcLocEndCol = 68}),("interpretQuery'",SrcLoc {srcLocPackage = "ouroboros-consensus-0.14.0.0-e564fad031a192a3c46ac3060ab48f7439b270a8aeb5ba448579929af4580fff", srcLocModule = "Ouroboros.Consensus.HardFork.History.EpochInfo", srcLocFile = "src/ouroboros-consensus/Ouroboros/Consensus/HardFork/History/EpochInfo.hs", srcLocStartLine = 33, srcLocStartCol = 31, srcLocEndLine = 33, srcLocEndCol = 63}),("epochInfoSize_",SrcLoc {srcLocPackage = "cardano-slotting-0.1.2.0-4a00ec25bf3c064a096907637766ab66a840d0883507bd2a67596a6ef5146e98", 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.2.0-4a00ec25bf3c064a096907637766ab66a840d0883507bd2a67596a6ef5146e98", 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.2.0-4a00ec25bf3c064a096907637766ab66a840d0883507bd2a67596a6ef5146e98", 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.2.0-4a00ec25bf3c064a096907637766ab66a840d0883507bd2a67596a6ef5146e98", 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 473))), pastHorizonSummary = [EraSummary {eraStart = Bound {boundTime = RelativeTime 0s, boundSlot = SlotNo 0, boundEpoch = EpochNo 0}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 89856000s, boundSlot = SlotNo 4492800, boundEpoch = EpochNo 208}), eraParams = EraParams {eraEpochSize = EpochSize 21600, eraSlotLength = SlotLength 20s, eraSafeZone = StandardSafeZone 4320}},EraSummary {eraStart = Bound {boundTime = RelativeTime 89856000s, boundSlot = SlotNo 4492800, boundEpoch = EpochNo 208}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 101952000s, boundSlot = SlotNo 16588800, boundEpoch = EpochNo 236}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}},EraSummary {eraStart = Bound {boundTime = RelativeTime 101952000s, boundSlot = SlotNo 16588800, boundEpoch = EpochNo 236}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 108432000s, boundSlot = SlotNo 23068800, boundEpoch = EpochNo 251}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}},EraSummary {eraStart = Bound {boundTime = RelativeTime 108432000s, boundSlot = SlotNo 23068800, boundEpoch = EpochNo 251}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 125280000s, boundSlot = SlotNo 39916800, boundEpoch = EpochNo 290}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}},EraSummary {eraStart = Bound {boundTime = RelativeTime 125280000s, boundSlot = SlotNo 39916800, boundEpoch = EpochNo 290}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 157680000s, boundSlot = SlotNo 72316800, boundEpoch = EpochNo 365}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}},EraSummary {eraStart = Bound {boundTime = RelativeTime 157680000s, boundSlot = SlotNo 72316800, boundEpoch = EpochNo 365}, eraEnd = EraEnd (Bound {boundTime = RelativeTime 204336000s, boundSlot = SlotNo 118972800, boundEpoch = EpochNo 473}), eraParams = EraParams {eraEpochSize = EpochSize 432000, eraSlotLength = SlotLength 1s, eraSafeZone = StandardSafeZone 129600}}]}

Command:

cardano-cli query leadership-schedule \
    --socket-path /run/cardano-validator/socket \
    --genesis config/mainnet-shelley-genesis.json \
    --mainnet \
    --vrf-signing-key-file keys/mainnet/vrf.skey \
    --stake-pool-id <some pool ID> \
    --next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: leadership-schedule comp: cardano-cli era: babbage in-scope This item is being worked and will be part of an upcoming release priority medium issues/PRs that SHOULD be addressed. This should be done for the release, but acceptable if it doesn type: bug Something is not working user type: internal Created by an IOG employee Vasil
Projects
None yet
Development

No branches or pull requests

9 participants