Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametrize LedgerTables by blk #1317

Open
jasagredo opened this issue Nov 21, 2024 · 0 comments
Open

Parametrize LedgerTables by blk #1317

jasagredo opened this issue Nov 21, 2024 · 0 comments
Labels
enhancement New feature or request UTxO-HD

Comments

@jasagredo
Copy link
Contributor

          I'm not too happy with the `Castable` constraint, and I already have ideas for how to get rid of it. But maybe we should do it in a follow-up to this main body of UTXO-HD work.

The idea is to not parameterise LedgerTables by the ledger state type l but by the block type blk. Castable is currently capturing the fact that key/value types are the same regardless of whether l ~ LedgerState blk, or l ~ ExtLedgerState blk, or l ~ Ticked (LedgerState blk). This is true for all block types:

type instance Key   (LedgerTables l) = Key l
type instance Value (LedgerTables l) = Value l
type instance Key   (Ticked1 l)      = Key l
type instance Value (Ticked1 l)      = Value l

The reason I did not implement this change initially is that I trouble fitting this into the code, because some parts are blissfully unaware of the fact that a type parameter l, representing (ticked/extended) ledger states, always has a blk type parameter in practice. It would be a largish refactoring to make code aware of the blk parameter where necessary.

Originally posted by @jorisdral in #1267 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UTxO-HD
Projects
None yet
Development

No branches or pull requests

1 participant