Koz Ross
Koz Ross
@michaelpj I now get this error on a build attempt, so clearly _something_ isn't there: ``` Resolving dependencies... cabal: Could not resolve dependencies: [__0] next goal: secp256k1-haskell (user goal) [__0]...
Good to know, thanks!
@michaelpj - do you happen to know the answer to this?
There seems to be an odd distinction between `PackedBytes` and `PinnedSizedBytes` at play here. Is there a reason we can't just use the same type for both?
I understand they are implemented quite differently: why _can't_ we unify their representations? I don't really see why they need to be separate in the first place.
Yeah, I guess that's true, but at the same time, I feel that making both things use `ByteArray` underneath would make such conversions easier. We could also share APIs in...
I'm also wondering if there'd ever come a time when we might want to generate hashes via the FFI: we don't need this _currently_, but we might one day.
Interesting - I've learned something new today. In that case, the difference in representation definitely makes sense. It would still be nice to have a safe conversion though.
I have something of a personal usability stake in this, as a task I will have soon will be adding golden tests to ensure that the SECP256k1 serializations are behaving...
@tdammers - I mention `psbFromByteString` as a problem in the initial post, so 100% agreed. `psbFromByteStringCheck` is actually implemented by [making a copy](https://github.com/input-output-hk/cardano-base/blob/master/cardano-crypto-class/src/Cardano/Crypto/PinnedSizedBytes.hs#L180-L191), which _should_ avoid the sharing behaviour. Is...