Skip to content

Commit 7e72d3f

Browse files
committed
WIP
1 parent aca5dee commit 7e72d3f

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

cabal.project

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ source-repository-package
101101
type: git
102102
location: https://github.com/tweag/cardano-canonical-ledger.git
103103
subdir: scls-cbor
104-
tag: 09f2b80d6d0c7419053e3f9e70ff57acbcff0eec
104+
tag: d622dd31d05006af9220af4cf4b0bf87fae2971b
105105

106106
source-repository-package
107107
type: git
108108
location: https://github.com/tweag/cardano-canonical-ledger.git
109109
subdir: scls-format
110-
tag: 09f2b80d6d0c7419053e3f9e70ff57acbcff0eec
110+
tag: d622dd31d05006af9220af4cf4b0bf87fae2971b
111111

112112
source-repository-package
113113
type: git
114114
location: https://github.com/tweag/cardano-canonical-ledger.git
115115
subdir: merkle-tree-incremental
116-
tag: 09f2b80d6d0c7419053e3f9e70ff57acbcff0eec
116+
tag: d622dd31d05006af9220af4cf4b0bf87fae2971b

eras/conway/impl/scls-export/src/Cardano/Ledger/Export/Namespace/UTxO.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ instance FromCanonicalCBOR V1 (Babbage.BabbageTxOut MaryEra) where
189189
t -> fail $ "Unknown BabbageTxOut tag: " <> show t
190190

191191

192-
instance Typeable kr => ToCanonicalCBOR V1 (Credential kr) where
192+
instance ToCanonicalCBOR V1 (Credential kr) where
193193
toCanonicalCBOR v (ScriptHashObj sh) = toCanonicalCBOR v (0::Word8, sh)
194194
toCanonicalCBOR v (KeyHashObj kh) = toCanonicalCBOR v (1::Word8, kh)
195195

@@ -225,7 +225,7 @@ deriving via (LedgerCBOR v MaryValue) instance ToCanonicalCBOR v MaryValue
225225
deriving via (LedgerCBOR v MaryValue) instance FromCanonicalCBOR v MaryValue
226226

227227

228-
deriving via (LedgerCBOR v (KeyHash kr)) instance Typeable kr => ToCanonicalCBOR v (KeyHash kr)
228+
deriving via (LedgerCBOR v (KeyHash kr)) instance ToCanonicalCBOR v (KeyHash kr)
229229
deriving via (LedgerCBOR v (KeyHash kr)) instance Typeable kr => FromCanonicalCBOR v (KeyHash kr)
230230
deriving via (LedgerCBOR v (ScriptHash)) instance FromCanonicalCBOR v ScriptHash
231231
deriving via (LedgerCBOR v (ScriptHash)) instance ToCanonicalCBOR v ScriptHash

libs/ledger-state/app-canonical/Main.hs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module Main where
1515
import Control.Exception (throwIO)
1616
import Data.Bifunctor (first)
1717
import Control.Monad
18+
import Data.Function ((&))
19+
import Cardano.SCLS.Internal.Serializer.Dump.Plan
1820
import qualified Data.ByteString.Lazy as LBS
1921
import qualified Data.Text as T
2022
import Cardano.Ledger.Mary (MaryEra)
@@ -112,16 +114,17 @@ main = do
112114
fileName
113115
Mainnet
114116
(SlotNo 1)
115-
$ S.each
116-
[ "utxo" S.:>
117-
S.each
118-
[ ChunkEntry
119-
(UtxoKeyIn txin)
120-
(RawBytes $ toStrictByteString $ toCanonicalCBOR (Proxy :: Proxy V1) $ txout
121-
)
122-
| (txin, txout) <- Map.toList utxo
123-
]
124-
]
117+
(defaultSerializationPlan & addChunks
118+
(S.each
119+
[ "utxo" S.:>
120+
S.each
121+
[ ChunkEntry
122+
(UtxoKeyIn txin)
123+
(RawBytes $ toStrictByteString $ toCanonicalCBOR (Proxy :: Proxy V1) $ txout
124+
)
125+
| (txin, txout) <- Map.toList utxo
126+
]
127+
]))
125128

126129
data TxIn' = TxIn' TxId Word16
127130

0 commit comments

Comments
 (0)