Open lehins opened 1 week ago
CC @WhatisRT What do you think of this idea?
Is the issue here that intra-era HFs don't have a translation function? Because otherwise I'd have expected these things to live there. Is it difficult to have such a translation function? If that's the issue, then that seems reasonable to me.
Is the issue here that intra-era HFs don't have a translation function?
Yes, precisely.
Is it difficult to have such a translation function?
Yes, in fact it is impossible, because translation is parametrized on era transition. It is implemented in terms of type class instances on the era we are translating into. Moreover, those translation functions are called by consensus' hard fork combinator, so we don't even have a way to indicate that we need to have a piece of code executed on an intra-era hard fork.
If that's the issue, then that seems reasonable to me.
Perfect. Thank you.
This is a rule that could be used to change the state in some ways on a epoch transition that handles intra-era hardforks. It could be useful for things like:
GenDelegs
#4620Probably many use case will come to mind once we have this rule implemented in Ledger.
Implementation would be pretty straightforward.
EPOCH
rule would invoke theHARDFORK
rule if protocol version inprevPParams
is different fromcurPParams
after they have been rotated at the end of theEPOCH
rule, but before we setup the pulser. Signal for the rule would be the newProtocolVersion
.