-
Notifications
You must be signed in to change notification settings - Fork 220
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
[ADP-3350] Add Read.ChainPoint
#4539
[ADP-3350] Add Read.ChainPoint
#4539
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -46,15 +51,24 @@ import Cardano.Wallet.Read.Eras.KnownEras | |||
( Era (..) | |||
, IsEra (..) | |||
) | |||
import Cardano.Wallet.Read.Hash | |||
( Blake2b_256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one could be exported from cryptography-primitive
lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(See the other comment.)
( Blake2b_224 | ||
, Blake2b_256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about exporting from here https://github.com/cardano-foundation/cardano-wallet/blob/master/lib/crypto-primitives/src/Cryptography/Hash/Blake.hs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sympathize, but the problem is that Cardano.Crypto.Hash.Blake2b
does not re-export from cryptonite
— rather, it defines a distinct type Blake2b_256
here:
We will have to unify / merge in re-export the APIs at some point. At the moment, I think that the high-level API design of the cardano-crypto-classes
is superior to cryptonite
, but it covers only those algorithms and use cases that are needed by Cardano.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This pull request adds a data type
ChainPoint
to theCardano.Wallet.Read
hierarchy.In order to add this type, we also need to
Cardano.Crypto.Hash.Class
provides a very thoughtful API, we re-export it.RawHeaderHash
that is an era-independent string of bytes representing aHeaderHash
.Comments
ChainPoint
type is meant to be consistent with the other types in theCardano.Wallet.Read
hierarchy, which are in turn meant to be consistent with the ledger specification.SlotNo ~ Natural
. We stick to this type.primitive
types.Issue Number
ADP-3350