You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible with #1943, with the change from TimeInterpreter IO to TimeInterpreter (ExceptT IO PastHorizonException) (Sorry, I think I indicated some time that the Nothing of currentEpoch could "include" PastHorizonException, but that is not the case.)
There should be reasons for failure:
Current time is behind genesis. Action: 🤷♂️
Node is in the Byron era of Byron;Shelley, and the current time is beyond our forecast zone. Action: Wait for the node to sync more
A concrete example of PastHorizonException behaviour here, in case it is useful for context.
1992: Add user advice to `UnableToDetermineCurrentEpoch` error. r=jonathanknowles a=jonathanknowles
# Issue Number
#1939
# Overview
This PR revises the error we show if we cannot determine the current epoch, inviting the user to wait and try again.
# Comments
Ideally, we'd be able to give the user some indication of _how long_ they should wait, but assuming we cannot reliably know this information, letting them know that waiting may resolve the issue is arguably better than giving no advice at all.
Co-authored-by: Jonathan Knowles <jonathan.knowles@iohk.io>
Context
As part of the work to track stake pool retirements, we must reject attempts to join stake pools that have already retired.
In order to do this, we must compare the pool's retirement epoch with the current epoch.
However, determining the current epoch is an operation that might fail:
https://github.com/input-output-hk/cardano-wallet/blob/05d377418b02e59e1299a0eaee135802c52735d2/lib/core/src/Cardano/Wallet/Primitive/Slotting.hs#L108-L109
If we encounter this condition, we currently report the following error:
https://github.com/input-output-hk/cardano-wallet/blob/05d377418b02e59e1299a0eaee135802c52735d2/lib/core/src/Cardano/Wallet/Api/Server.hs#L1902-L1906
Decision
Determine the conditions under which this operation may fail, and if necessary, update the error message to be more informative.
Acceptance Criteria
ErrUnableToDetermineCurrentEpoch
should describe a course of action for the user to take.Development
See #1992
QA
See #1992
The text was updated successfully, but these errors were encountered: