Skip to content

Commit

Permalink
Disable serialization of VState
Browse files Browse the repository at this point in the history
`VState` is still unused, therefore there is no need to unnecessarelly
break ledger serialization
  • Loading branch information
lehins committed May 23, 2023
1 parent de14cc4 commit ddb917e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions libs/cardano-ledger-core/src/Cardano/Ledger/CertState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,18 @@ instance Crypto c => DecShareCBOR (InstantaneousRewards c) where
pure $ InstantaneousRewards irR irT dR dT

instance Era era => EncCBOR (CertState era) where
encCBOR CertState {certPState, certDState, certVState} =
encodeListLen 3
<> encCBOR certVState
encCBOR CertState {certPState, certDState} =
encodeListLen 2
-- <> encCBOR certVState
<> encCBOR certPState
<> encCBOR certDState

instance Era era => DecShareCBOR (CertState era) where
type Share (CertState era) = (Interns (Credential 'Staking (EraCrypto era)), Interns (KeyHash 'StakePool (EraCrypto era)))
decSharePlusCBOR = decodeRecordNamedT "CertState" (const 3) $ do
certVState <- lift decCBOR -- TODO: add sharing of DRep credentials
decSharePlusCBOR = decodeRecordNamedT "CertState" (const 2) $ do
-- TODO: add deserialization with sharing of DRep credentials
-- certVState <- lift decCBOR
let certVState = def
certPState <- decSharePlusLensCBOR _2
certDState <- decSharePlusCBOR
pure CertState {certPState, certDState, certVState}
Expand Down

0 comments on commit ddb917e

Please sign in to comment.