DO NOT MERGE: MK synthetic re-addition - #2088
Draft
jasagredo wants to merge 42 commits into
Draft
Conversation
jasagredo
force-pushed
the
js/utxo-hd-4-skin
branch
2 times, most recently
from
June 22, 2026 13:45
513d346 to
d05eaee
Compare
jasagredo
force-pushed
the
js/utxo-hd-4
branch
2 times, most recently
from
June 26, 2026 13:38
6861cb2 to
96c3086
Compare
jasagredo
force-pushed
the
js/utxo-hd-4-skin
branch
from
June 26, 2026 14:05
d05eaee to
a090135
Compare
dnadales
approved these changes
Jun 26, 2026
dnadales
left a comment
Member
There was a problem hiding this comment.
It all seems like a syntactic change indeed 👍 (with no semantic changes)
…ry in Basics WIP (red, expected): re-adds the mk parameter to the LedgerState data family and restores main's kind vocabulary (MapKind/StateKind/LedgerStateKind), the skin newtypes (LedgerTables/EmptyMK/KeysMK/ValuesMK/DiffMK), the HasLedgerTables class and forget/emptyLedgerTables, re-kinds LedgerCfg to StateKind, and gives decodeValues an EmptyMK hint. The IsLedger/GetTip/ApplyBlock 'l' cascade and the lib-wide instance/signature sweep are the continuation (see mk-skin-plan.md). Scope reduced to the five production libs; testlibs/test-suites left red.
Re-kind IsLedger to StateKind (concrete-mk superclasses, since main's quantified forall mk. EqMK mk => ... form needs type families in quantified constraints, which GHC forbids under the single-arg skin); GetTip to LedgerStateKind with getTip :: l mk -> Point l; applyChainTick(LedgerResult) re-dressed to l blk EmptyMK -> (Ticked l blk DiffMK) matching main; enable QuantifiedConstraints. Errors have moved downstream to Ledger/Abstract (ApplyBlock). Still WIP-red.
Keep the branch's genuine apply restructuring visible (explicit Values, (state, Diff) tuples, forward) — that is redesign, not packaging, and should show in the review diff. Only annotate the state positions with EmptyMK so the state mk- vocabulary cancels against main; bodies unchanged. Revert applyChainTick to the branch's (Ticked l blk EmptyMK, Diff blk) tuple (consistent with the apply bodies) rather than main's bundled Ticked l blk DiffMK. Errors now fan out to the sibling Ledger/* signature sweep.
CommonProtocolParams/SupportsPeerSelection/SupportsPeras (poly mk reads), Inspect (mk1/mk2 before/after), SupportsMempool (tableless ticked state -> EmptyMK).
…p rhythm + frontier
…st, InFutureCheck, BlockchainTime, State/Types, HeaderValidation mk-annotate state signatures (poly mk reads; EmptyMK tableless states; the TranslateLedgerState field's x->EmptyMK / y->EmptyMK+Diff). Add EmptyMK to InFutureCheck's explicit Abstract import.
…Extended (ExtLedgerState mk) ExtLedgerState regains its mk param (data type + Ticked instance + deriving + apply helper + disk codecs); CrossEraForecaster's state arg -> state x EmptyMK; SupportsProtocol ticked/state -> EmptyMK. This unblocks the Storage/Node consumers (the new build frontier).
Forker/ReadOnlyForker re-kinded to StateKind (Ap too); forker state fields -> EmptyMK; Snapshots states -> EmptyMK (+ EmptyMK import). Export StateKind from Basics. ProtocolInfo genesis state + HeaderStateHistory -> EmptyMK. Revert applyHelper's spurious mk. Fix plan terminology (main -> prepare-11.1, the actual review base).
… tip fields -> EmptyMK)
…Seq -> StateKind, states -> EmptyMK)
…teKind, states -> EmptyMK) — LedgerDB subsystem complete
… Dual data instances ChainDB consumer states -> EmptyMK; Ledger/Query QFNoTables state -> EmptyMK; Dual LedgerState/Ticked data instances threaded (main sub-state -> mk, aux -> EmptyMK + separate Values a). Dual apply bodies + HFC SingleEraBlock/combinator are the next (involved) frontier. WIP-red.
…ntier = Dual bodies + HFC combinator
…ainSel — Dual green
…m mk); lib green except HFC
…ate.hs type-level HFC LedgerState gets a PHANTOM mk; telescope functor restored to Flip LedgerState EmptyMK (Data.SOP.Functors). Basics green. State.hs type sigs done; its bodies still need the unFlip/Flip wrapping sweep (mirror prepare-11.1's Flip usage but at fixed EmptyMK). WIP-red.
…ate/Ledger Flip body-sweep
…ed instance + FlipTickedLedgerState + GetTip/forecast/functor types State.hs telescope bodies done (unFlip/Flip on Current/Product destructure). Ledger.hs: restored FlipTickedLedgerState newtype, Ticked HFC instance (phantom mk, telescope FlipTickedLedgerState EmptyMK), GetTip unwraps, AnnForecast/inspect/ledgerInfo functor types. Remaining: ~22 Ledger.hs apply/forward BODY sites need unFlip/getFlipTickedLedgerState wrapping (the telescope hmap/zip seams) + 3 consumers. WIP-red.
…mer sweep underway Ledger.hs apply/forward/forecast/inspect bodies threaded (unFlip/getFlipTickedLedgerState at telescope seams). HFC PeerSelection/CommonProtocolParams/InitStorage + Mempool arState done. Remaining: HFC consumer sweep (Query x7, Mempool bodies, Degenerate/Embed/Serialisation/ Node/Forging) — same unFlip + EmptyMK-import pattern — plus Mempool/Impl/Common, ChainSync, then diffusion/lsm/cardano libs. WIP-red.
…ool type-level + distribExtLedgerState CommonProtocolParams accessor result kept poly-mk (phantom), telescope arg EmptyMK. HFC Mempool ticked states -> EmptyMK. Query distribution/Situated functors -> Flip ExtLedgerState/LedgerState EmptyMK; distribExtLedgerState body threaded. Remaining: Query bodies (go/Situated), + Degenerate/Embed/Serialisation/Node/Forging, Mempool/Impl/Common, ChainSync; then diffusion/lsm/cardano. WIP-red.
…ommon/Client/Governor mk-annotate
…l/Update/Query + SerialiseDisk mk-annotate
…lipTicked isomorphisms at EmptyMK
…— lib green (239 modules)
…usion/lsm/cardano
…tyMK - GSM: getCurrentLedger results m/STM (LedgerState blk) -> EmptyMK - NodeKernel: getPeersFromCurrentLedger callback -> EmptyMK; afterSlotNo poly mk - Node: openChainDB initial-ledger pair -> (ExtLedgerState blk EmptyMK, Values blk)
Port lib:lsm to the mk-skin. The handle accessors (read, takeHandleSnapshot) take the pure ledger state at EmptyMK, matching e6fad06's signatures. Also restore the EmptyMK in the streaming Yield/Sink type aliases in LedgerDB.API, which the lsm backend's LedgerTablesHandle-based YieldArgs requires (l :: StateKind); the in-memory backend never threads a handle through Yield/Sink, so the omission only surfaced here.
… state (consensus+diffusion+lsm green; cardano in progress)
…/serialisation mk-skin (WIP base) protocol lib confirmed green (no source changes needed). Re-dress Byron (phantom mk) and Shelley (shelleyLedgerTables field + Ticked) to prepare-11.1 mk vocabulary. Cardano lib files (Block/CanHardFork/Node) and the remaining Shelley modules still to do.
…ttern synonyms (EmptyMK telescope)
…a-translation wrapping at EmptyMK; shelleyLedgerTables fields
… init (EmptyMK ExtLedgerState; Flip telescope in genesis-funds injection)
…EN; note transPraosLS divergence
jasagredo
force-pushed
the
js/utxo-hd-4-skin
branch
from
July 3, 2026 15:39
a090135 to
ed57506
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a meaningful description of the PR and link the relevant issues
this PR might resolve.
Also note that:
WARNING
To update your feature branch if it's stale, please rebase it manually on top of
main. Don't update your feature branch by mergingmaininto it. Your pull request will not pass CI if you do.