1

Basically, the title. What are the strategies around updating inherents over time and maintaining backwards-compatibility? How would I for example, take one inherent's InherentData, and update its type to be something else?

I imagine that it is not quite the same challenge of upgrading something such as runtime apis, which have versioning built in, which is why I ask.

1 Answer 1

1

There is no real pre-defined versioning for inherents.

I would propose that you just have different InherentIdentifiers per version of your inherent. Something like:

InherentType1

InherentType2

On the node side you can then just add both to the InherentData and the runtime can pick the one it knows.

2
  • That's a really reasonable solution, thank you! Would you accept a code change which allows decorating an inherent with a version number, and under-the-hood, it just gives a different identifier per inherent version? Commented May 17 at 10:27
  • Not sure we need this. The interface is already quite minimal and only expects that you pass the identifier.
    – bkchr
    Commented May 17 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.