IntersectMBO / IntersectMBO/cardano-base

Clear away psbFromBytes

Open
#291 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
105
Forks
54
Avg merge
9d 2h
Merged PRs (30d)
4

Description

As observed [here](https://github.com/input-output-hk/cardano-base/pull/289#discussion_r923916441), this function has some severe issues with referential transparency, and is thus generally not safe. While [this PR](https://github.com/input-output-hk/cardano-base/pull/289) deprecates both `psbFromBytes` (and `psbZero`) using a `DEPRECATED` pragma, as well as removing its uses internal to `cardano-base` itself, this function is still used internally to `cardano-crypto-class`:

* `psbFromByteString`
* `IsString (PinnedSizedBytes n)`

While these should both be modified to _not_ use `psbFromBytes`, the `IsString` instance is rather horrifying: much like the same instance for `ByteString`, is hugely problematic for mostly the same reasons. I would propose removing this `IsString` instance wholesale, and replacing it with a quasi-quoter.

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.