Skip to content

Commit 3e590a3

Browse files
neilmayhewerikd
authored andcommitted
Update for VerKeyVRF changes
1 parent 4c58501 commit 3e590a3

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

cardano-db-sync/cardano-db-sync.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ library
154154
, cardano-client
155155
, cardano-crypto
156156
, cardano-crypto-class
157-
, cardano-crypto-praos
158157
, cardano-crypto-wrapper
159158
, cardano-data
160159
, cardano-db

cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Generic/Block.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ blockProtoVersionPraos = Praos.hbProtVer . getHeaderBodyPraos . blockHeader
221221
blockSize :: ProtocolHeaderSupportsEnvelope p => ShelleyBlock p era -> Word64
222222
blockSize = fromIntegral . pHeaderBlockSize . blockHeader
223223

224-
blockVrfKeyView :: VerKeyVRF StandardCrypto -> Text
224+
blockVrfKeyView :: VerKeyVRF (VRF StandardCrypto) -> Text
225225
blockVrfKeyView = serialiseVerKeyVrfToBech32
226226

227227
blockVrfVkTPraos :: ShelleyBlock TPraosStandard era -> VerKeyVRF StandardCrypto

cardano-db-sync/src/Cardano/DbSync/Util/Bech32.hs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ module Cardano.DbSync.Util.Bech32 (
1414
) where
1515

1616
import Cardano.Crypto.Hash.Class (hashFromBytes, hashToBytes)
17-
import Cardano.Crypto.VRF.Class (rawDeserialiseVerKeyVRF, rawSerialiseVerKeyVRF)
18-
import Cardano.Ledger.Crypto (VRF (..), StandardCrypto ())
19-
import Cardano.Crypto.VRF.Praos (PraosVRF)
20-
import Cardano.Ledger.Keys (KeyHash (..), KeyRole (..), VerKeyVRF ())
17+
import Cardano.Crypto.VRF.Class (VerKeyVRF, rawDeserialiseVerKeyVRF, rawSerialiseVerKeyVRF)
18+
import Cardano.Ledger.Keys (KeyHash (..), KeyRole (..))
2119
import Cardano.Prelude
2220
import Cardano.Protocol.Crypto
2321
import Codec.Binary.Bech32
@@ -54,7 +52,7 @@ deserialiseFromBech32 s = decodeLenient' s >>= dataPartToBytes'
5452

5553

5654
-- | Serialise a Verification Key to bech32 address
57-
serialiseVerKeyVrfToBech32 :: VerKeyVRF PraosVRF -> Text
55+
serialiseVerKeyVrfToBech32 :: VerKeyVRF (VRF StandardCrypto) -> Text
5856
serialiseVerKeyVrfToBech32 =
5957
serialiseToBech32 "vrf_vk" . rawSerialiseVerKeyVRF
6058

@@ -63,11 +61,11 @@ serialiseVerKeyVrfToBech32 =
6361

6462

6563
-- | Deserialise a bech32 address to a Verification Key
66-
deserialiseVerKeyVrfFromBech32 :: Text -> Either DecodeError (VerKeyVRF StandardCrypto)
64+
deserialiseVerKeyVrfFromBech32 :: Text -> Either DecodeError (VerKeyVRF (VRF StandardCrypto))
6765
deserialiseVerKeyVrfFromBech32 text =
6866
deserialiseFromBech32 text >>= deserialiseFromRawBytes'
6967
where
70-
deserialiseFromRawBytes' :: ByteString -> Either DecodeError (VerKeyVRF StandardCrypto)
68+
deserialiseFromRawBytes' :: ByteString -> Either DecodeError (VerKeyVRF (VRF StandardCrypto))
7169
deserialiseFromRawBytes' =
7270
maybeToRight DecodeFromRawBytesError . rawDeserialiseVerKeyVRF
7371

0 commit comments

Comments
 (0)