-
Notifications
You must be signed in to change notification settings - Fork 586
Description
Most of the necessary work for this was done in #17996.
Goal: the Root.create* methods in mina_ledger/root need to be able to accept an optional account conversion method. Or rather, the configured backing type must be either Stable_db (with no further config) or Converting_db with a mandatory account conversion method of some kind. This could even just be the planned genesis slot of the upcoming hard fork, but an entire Account.t -> Account.Hardfork.t method is fine too.
Why? The vesting parameter update method can only be determined at runtime based on the stop slots, so the components that initialize root ledgers will need to be able to set the update methods (in some way) themselves. As for it being optional, we may not have a hard fork planned, in which case there will be no account conversion method available to us at all!
So:
- Create a wrapper concrete
Rootimplementation overLedger.Db, perhaps, that exposes aRootinterface over a plainLedger.Db. Themake_convertingmethod is the only potentially weird one here: I think we should simply have it throw an exception for this concreteRoot. There isn't much else it could do. - Add a parameter to the
Root.Configtype (probably the backing type) for a mandatory account conversion method - Use the existing incomplete
Account.Hardfork.of_stablemethod as a temporary measure whencreate-ing roots.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status