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
Simplify MonadGen, this breaks the use of StateT on the outside of a GenT for the time being, it still works fine on the inside though and you can use distributeT to run it
It turns out that we need this exact configuration for Goblins' TinkerM:
We also simplify MonadGen significantly, with all functions being implemented in terms of toGen / fromGen. This comes at the cost of StateT and RWST instances, but you can still run these on the inside of the transformer and get a MonadGen, it's just slightly less conveniant. If anyone can figure out how to implement MonadTransControl for TreeT then they will be easy possible on the back of that.
I (@mhuesch) have spent a few days equivalent trying to hack around this issue with MonadTransControl, and haven't made much progress.
Proposed Solution
Make it work 🙂
I see 3 possible routes:
Solve MonadTransControl in full generality (what Jacob describes above)
Write instances specific to our TinkerM case, which might be able to cheat and avoid issues which arise for full generality.
Come up with an alternative way to thread genomes around.
I considered ReaderT for a bit, but we only want to consume genome when we tinker/conjure, and a ReaderT solution would have to meter out genome each time it did a bind (I think).
The text was updated successfully, but these errors were encountered:
566: Changes for epoch boundary integration r=nc6 a=nc6
Unfortunately we do need to serialise boundary blocks, because we need to create the initial one for testing.
569: Add ToCBOR and FromCBOR instances for ChainValidationState r=intricate a=mrBliss
This requires `ToCBOR` and `FromCBOR` instances for a whole bunch of other types
too.
The consensus storage layer needs these instances in order to write/read snapshots of the ledger state to/from disk.
Roundtrip property tests and golden tests still need to be written. Can somebody of the ledger team do this? Feel free to push more commits to this PR.
I tried to adhere to the existing style as much as I could, but I might have made some mistakes.
Co-authored-by: Nicholas Clarke <nick@topos.org.uk>
Co-authored-by: mrBliss <dewinant@gmail.com>
Co-authored-by: Luke Nadur <19835357+intricate@users.noreply.github.com>
Background
From the
hedgehog-1.0
Changelog, we see:It turns out that we need this exact configuration for Goblins'
TinkerM
:More context is given here:
I (@mhuesch) have spent a few days equivalent trying to hack around this issue with
MonadTransControl
, and haven't made much progress.Proposed Solution
Make it work 🙂
I see 3 possible routes:
TinkerM
case, which might be able to cheat and avoid issues which arise for full generality.I considered ReaderT for a bit, but we only want to consume genome when we tinker/conjure, and a ReaderT solution would have to meter out genome each time it did a bind (I think).
The text was updated successfully, but these errors were encountered: