cardano-node
cardano-node copied to clipboard
user-unfriendly error message from `query leadership-schedule`
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 (2b2d5dd4e2c349c6075f8abb338bce1911d09fe0)
@newhoggy would you please take a look.
Again, not a bug!
Is it enough to proceed --> https://input-output-rnd.slack.com/archives/CFKLUH4R0/p1658335111296419
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."
}
I’m still getting this massive blah with --next
:face_with_spiral_eyes::
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