-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2818: Gracefully handle decoding more summaries than statically known eras r=mrBliss a=mrBliss Old wallets (or other clients) that are only aware of Byron and Shelley should be able to communicate with nodes until the hard fork to Allegra actually takes place. At that moment, they will stop functioning as they don't know about Allegra. The `NodeToClient` versioning mechanism takes care of this. However, we have noticed that when the update proposal for Allegra becomes stable, the old clients' `Summary` decoder starts to fail with: Summary: expected between 1 and 2 eras but got 3 This is because after the update proposal for Allegra has become stable, the node (which is compatible with Allegra) will extend its `Summary` with an `EraSummary` of the Allegra era. The `Summary` decoder of the old client does not support more `EraSummary`s (3) than eras it is aware of (2) and fails. This is /before/ the hard fork has actually happened. While the window between this and the actual hard fork, at which point the old client would stop functioning anyway, is small, it would still be nicer if this were handled gracefully. So instead of failing when we receive more `EraSummary`s than eras we statically are aware of, we ignore them. For example, a client that thinks Shelley is the final era will ignore the `EraSummary` of Allegra (and Mary) and will keep acting as if Shelley is the final era. Of course, when the hard fork to the next era actually happens, the client will stop functioning as before. Note that this fix is too late for the upcoming Allegra hard fork: only clients that haven't been upgraded to the last release will run into this problem. Upgrading them to the next release that includes this fix already makes the problem go away, as they will gain support for Allegra (and Mary). This fix will thus only help the next time, i.e., when clients are running a version that supports Allegra and Mary (and includes this fix) but not the era after that, i.e., Alonzo, and the update proposal to Alonzo has become stable. Co-authored-by: Thomas Winant <thomas@well-typed.com>
- Loading branch information
Showing
3 changed files
with
106 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters