IntersectMBO / IntersectMBO/ouroboros-network

Reconsider `anchorFromPoint`

Open
#4,690 0 comments 0 reactions 0 assignees View on GitHub
technical debt
Dominant language
Haskell
Stars
296
Forks
104
Avg merge
2d 10h
Merged PRs (30d)
4

Description

`anchorFromPoint` is currently rendered like so:
https://github.com/input-output-hk/ouroboros-network/blob/d2fdcd0ca03dacec156f49d8932e511625938e7b/ouroboros-network-api/src/Ouroboros/Network/AnchoredFragment.hs#L160-L166

In https://github.com/input-output-hk/ouroboros-network/pull/4660#pullrequestreview-1600810364, we discussed a couple of avenues to remediating this function's partial nature, among them:
- Deprecating and deleting it (since it appears unused)
- Making the argument a `RealPoint`, a structure [defined in `ouroboros-consensus`](https://github.com/input-output-hk/ouroboros-consensus/blob/903ba3c7d2f8d8c015b59f0c664cf75c0f280c25/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Block/RealPoint.hs#L43-L45) that by construction cannot be genesis

Whether to do either of these things, or to do nothing, is an open question.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.