IntersectMBO / IntersectMBO/cardano-ledger

Investigate how and where `encodedSizeExpr` is being used

Open
#3,071 1 comment 0 reactions 0 assignees View on GitHub
:credit_card: technical-debt
Dominant language
Haskell
Stars
295
Forks
179
Avg merge
4d 7h
Merged PRs (30d)
29

Description

There is a fairly involved computation attached to `ToCBOR` type class in the form of `encodedSizeExpr` and `encodedListSizeExpr` functions. Considering that most of types in ledger lack an explicit implementation it begs a question: Is it still being used?

Close this ticket when these questions have been answered:

* [ ] - Where is `encodedSizeExpr` is being used (which repos, packages) and how?
* [ ] - If they are used then instances for which types are actually being used? Do we need to implement these functions for some types or default implementation is sufficient?
* [ ] - If they aren't used can we deprecate these functions and eventually get rid of them?

Upon closing this issue create a new ticket that will track a task of either:
* Deprecate `Size`
* Improve documentation of `encodedSizeExpr` and `encodedListSizeExpr` . Survey all types and improve their `ToCBOR` instance implementation.

Contributor guide

Open the contributing guide

Research direction

Start by searching the repository and its related packages for ToCBOR, encodedSizeExpr, encodedListSizeExpr, and Size, then trace the instances that use them. Done means documenting where and how they are used, determining whether defaults are sufficient, and creating the follow-up ticket for deprecation or improved documentation and instance coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
blockchain
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.