From 252bf6ba1ae88c0e9e32d8b4339b739f9646f6f7 Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Thu, 11 Aug 2022 13:02:46 -0500 Subject: [PATCH] Update tx golden test with the CDDL format --- .../gen/Gen/Hedgehog/Roundtrip/CBOR.hs | 9 ++++++ cardano-api/src/Cardano/Api/Error.hs | 2 +- .../src/Cardano/Api/SerialiseLedgerCddl.hs | 9 ++++-- cardano-api/src/Cardano/Api/Tx.hs | 13 ++++++++ .../test/Test/Cardano/Api/Typed/CBOR.hs | 10 +++---- .../Cardano/CLI/Shelley/Run/Transaction.hs | 29 ++++++++++++++++-- cardano-cli/src/Cardano/CLI/Types.hs | 2 +- .../Test/Golden/Shelley/TextEnvelope/Tx/Tx.hs | 30 +++++++------------ .../Golden/Shelley/TextEnvelope/Tx/TxBody.hs | 5 ++-- .../Test/Golden/Shelley/Transaction/Build.hs | 10 +++---- .../Shelley/Transaction/CreateWitness.hs | 2 +- cardano-cli/test/Test/OptParse.hs | 16 +++++++++- cardano-cli/test/data/golden/alonzo/tx | 5 ++++ cardano-cli/test/data/golden/shelley/tx/tx | 8 ++--- .../test/data/golden/shelley/tx/txbody | 6 ++-- .../shelley/witnesses/singleSigningKeyWitness | 2 +- 16 files changed, 109 insertions(+), 49 deletions(-) create mode 100644 cardano-cli/test/data/golden/alonzo/tx diff --git a/cardano-api/gen/Gen/Hedgehog/Roundtrip/CBOR.hs b/cardano-api/gen/Gen/Hedgehog/Roundtrip/CBOR.hs index bd5d08cff8a..524c88efdbd 100644 --- a/cardano-api/gen/Gen/Hedgehog/Roundtrip/CBOR.hs +++ b/cardano-api/gen/Gen/Hedgehog/Roundtrip/CBOR.hs @@ -2,6 +2,7 @@ module Gen.Hedgehog.Roundtrip.CBOR ( roundtrip_CBOR + , roundtrip_CDDL_Tx ) where import Cardano.Api @@ -19,3 +20,11 @@ roundtrip_CBOR typeProxy gen = H.property $ do val <- H.forAll gen H.tripping val serialiseToCBOR (deserialiseFromCBOR typeProxy) + + +roundtrip_CDDL_Tx + :: IsCardanoEra era => CardanoEra era -> Gen (Tx era) -> Property +roundtrip_CDDL_Tx era gen = + H.property $ do + val <- H.forAll gen + H.tripping val serialiseTxLedgerCddl (deserialiseTxLedgerCddl era) diff --git a/cardano-api/src/Cardano/Api/Error.hs b/cardano-api/src/Cardano/Api/Error.hs index 2427fc81c40..458f94c9a0c 100644 --- a/cardano-api/src/Cardano/Api/Error.hs +++ b/cardano-api/src/Cardano/Api/Error.hs @@ -48,7 +48,7 @@ data FileError e = FileError FilePath e -- ^ Temporary path Handle | FileIOError FilePath IOException - deriving Show + deriving (Show, Eq) instance Error e => Error (FileError e) where displayError (FileErrorTempFile targetPath tempPath h)= diff --git a/cardano-api/src/Cardano/Api/SerialiseLedgerCddl.hs b/cardano-api/src/Cardano/Api/SerialiseLedgerCddl.hs index c336811ceb5..8accb3cae82 100644 --- a/cardano-api/src/Cardano/Api/SerialiseLedgerCddl.hs +++ b/cardano-api/src/Cardano/Api/SerialiseLedgerCddl.hs @@ -115,7 +115,7 @@ instance Error TextEnvelopeCddlError where <> List.intercalate ", " (map Text.unpack expTypes) <> " Actual: " <> Text.unpack actType displayError (TextEnvelopeCddlErrUnknownType unknownType) = - "Unknown TextEnvelopeCddl type:" <> Text.unpack unknownType + "Unknown TextEnvelopeCddl type: " <> Text.unpack unknownType displayError TextEnvelopeCddlErrByronKeyWitnessUnsupported = "TextEnvelopeCddl error: Byron key witnesses are currently unsupported." @@ -132,7 +132,6 @@ serialiseTxLedgerCddl tx = genType tx' = case getTxWitnesses tx' of [] -> "Unwitnessed " <> genTxType _ -> "Witnessed " <> genTxType - genTxType :: Text genTxType = case cardanoEra :: CardanoEra era of @@ -297,6 +296,12 @@ cddlTypeToEra "Unwitnessed Tx AllegraEra" = return $ AnyCardanoEra AllegraEra cddlTypeToEra "Unwitnessed Tx MaryEra" = return $ AnyCardanoEra MaryEra cddlTypeToEra "Unwitnessed Tx AlonzoEra" = return $ AnyCardanoEra AlonzoEra cddlTypeToEra "Unwitnessed Tx BabbageEra" = return $ AnyCardanoEra BabbageEra +cddlTypeToEra "Tx ByronEra" = return $ AnyCardanoEra ByronEra +cddlTypeToEra "Tx ShelleyEra" = return $ AnyCardanoEra ShelleyEra +cddlTypeToEra "Tx AllegraEra" = return $ AnyCardanoEra AllegraEra +cddlTypeToEra "Tx MaryEra" = return $ AnyCardanoEra MaryEra +cddlTypeToEra "Tx AlonzoEra" = return $ AnyCardanoEra AlonzoEra +cddlTypeToEra "Tx BabbageEra" = return $ AnyCardanoEra BabbageEra cddlTypeToEra "TxWitness ShelleyEra" = return $ AnyCardanoEra ShelleyEra cddlTypeToEra "TxWitness AllegraEra" = return $ AnyCardanoEra AllegraEra cddlTypeToEra "TxWitness MaryEra" = return $ AnyCardanoEra MaryEra diff --git a/cardano-api/src/Cardano/Api/Tx.hs b/cardano-api/src/Cardano/Api/Tx.hs index 25143298bda..80977bf3164 100644 --- a/cardano-api/src/Cardano/Api/Tx.hs +++ b/cardano-api/src/Cardano/Api/Tx.hs @@ -29,6 +29,7 @@ module Cardano.Api.Tx ( toShelleySigningKey, signByronTransaction, signShelleyTransaction, + -- ** Incremental signing and separate witnesses makeSignedTransaction, KeyWitness(..), @@ -57,7 +58,9 @@ import qualified Data.ByteString.Lazy as LBS import Data.Functor.Identity (Identity) import qualified Data.Map.Strict as Map import qualified Data.Set as Set +import Data.Type.Equality (TestEquality (..), (:~:) (Refl)) import qualified Data.Vector as Vector + -- -- Common types, consensus, network -- @@ -127,6 +130,16 @@ data Tx era where -> Ledger.Tx (ShelleyLedgerEra era) -> Tx era + +instance Show (InAnyCardanoEra Tx) where + show (InAnyCardanoEra _ tx) = show tx + +instance Eq (InAnyCardanoEra Tx) where + (==) (InAnyCardanoEra eraA txA) (InAnyCardanoEra eraB txB) = + case testEquality eraA eraB of + Nothing -> False + Just Refl -> txA == txB + -- The GADT in the ShelleyTx case requires a custom instance instance Eq (Tx era) where (==) (ByronTx txA) diff --git a/cardano-api/test/Test/Cardano/Api/Typed/CBOR.hs b/cardano-api/test/Test/Cardano/Api/Typed/CBOR.hs index add9a84d22b..dc59bedcc16 100644 --- a/cardano-api/test/Test/Cardano/Api/Typed/CBOR.hs +++ b/cardano-api/test/Test/Cardano/Api/Typed/CBOR.hs @@ -8,9 +8,9 @@ module Test.Cardano.Api.Typed.CBOR import Cardano.Api import Cardano.Prelude -import Data.String (IsString(..)) +import Data.String (IsString (..)) import Gen.Cardano.Api.Typed -import Gen.Hedgehog.Roundtrip.CBOR (roundtrip_CBOR) +import Gen.Hedgehog.Roundtrip.CBOR (roundtrip_CBOR, roundtrip_CDDL_Tx) import Hedgehog (Property, forAll, property, success, tripping) import Test.Cardano.Api.Typed.Orphans () import Test.Tasty (TestTree, testGroup) @@ -24,14 +24,14 @@ import Test.Tasty.Hedgehog (testPropertyNamed) test_roundtrip_txbody_CBOR :: [TestTree] test_roundtrip_txbody_CBOR = [ testPropertyNamed (show era) (fromString (show era)) $ - roundtrip_CBOR (proxyToAsType Proxy) (genTxBody era) - | AnyCardanoEra era <- [minBound..(AnyCardanoEra AlonzoEra)] -- TODO: Babbage era + roundtrip_CDDL_Tx era (makeSignedTransaction [] <$> genTxBody era) + | AnyCardanoEra era <- [minBound..(AnyCardanoEra BabbageEra)] ] test_roundtrip_tx_CBOR :: [TestTree] test_roundtrip_tx_CBOR = [ testPropertyNamed (show era) (fromString (show era)) $ roundtrip_CBOR (proxyToAsType Proxy) (genTx era) - | AnyCardanoEra era <- [minBound..(AnyCardanoEra AlonzoEra)] -- TODO: Babbage era + | AnyCardanoEra era <- [minBound..(AnyCardanoEra BabbageEra)] ] prop_roundtrip_witness_byron_CBOR :: Property diff --git a/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs b/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs index 3d5b9d26ab7..6d371597a6f 100644 --- a/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs +++ b/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs @@ -12,6 +12,7 @@ module Cardano.CLI.Shelley.Run.Transaction ( ShelleyTxCmdError(..) , renderShelleyTxCmdError , runTransactionCmd + , readCddlTx , readFileTx , readProtocolParametersSourceSpec , toTxOutInAnyEra @@ -1276,7 +1277,7 @@ runTxSign txOrTxBody witSigningData mnw (TxFile outTxFile) = do signedTx = makeSignedTransaction allKeyWits txbody firstExceptT ShelleyTxCmdWriteFileError . newExceptT $ - writeFileTextEnvelope outTxFile Nothing signedTx + writeTxFileTextEnvelopeCddl outTxFile signedTx (InputTxBodyFile (TxBodyFile txbodyFile)) -> do unwitnessed <- readFileTxBody txbodyFile @@ -1828,10 +1829,35 @@ readFileWitness fp = -- (respectively needs additional witnesses or totally unwitnessed) -- while UnwitnessedCliFormattedTxBody is CLI formatted TxBody and -- needs to be key witnessed. + data IncompleteTx = UnwitnessedCliFormattedTxBody (InAnyCardanoEra TxBody) | IncompleteCddlFormattedTx (InAnyCardanoEra Tx) + +readCddlTx :: FilePath -> IO (Either (FileError TextEnvelopeCddlError) CddlTx) +readCddlTx fp = readFileTextEnvelopeCddlAnyOf teTypes fp + where + teTypes = [ FromCDDLTx "Witnessed Tx ByronEra" CddlTx + , FromCDDLTx "Witnessed Tx ShelleyEra" CddlTx + , FromCDDLTx "Witnessed Tx AllegraEra" CddlTx + , FromCDDLTx "Witnessed Tx MaryEra" CddlTx + , FromCDDLTx "Witnessed Tx AlonzoEra" CddlTx + , FromCDDLTx "Witnessed Tx BabbageEra" CddlTx + , FromCDDLTx "Unwitnessed Tx ByronEra" CddlTx + , FromCDDLTx "Unwitnessed Tx ShelleyEra" CddlTx + , FromCDDLTx "Unwitnessed Tx AllegraEra" CddlTx + , FromCDDLTx "Unwitnessed Tx MaryEra" CddlTx + , FromCDDLTx "Unwitnessed Tx AlonzoEra" CddlTx + , FromCDDLTx "Unwitnessed Tx BabbageEra" CddlTx + , FromCDDLTx "Tx ByronEra" CddlTx + , FromCDDLTx "Tx ShelleyEra" CddlTx + , FromCDDLTx "Tx AllegraEra" CddlTx + , FromCDDLTx "Tx MaryEra" CddlTx + , FromCDDLTx "Tx AlonzoEra" CddlTx + , FromCDDLTx "Tx BabbageEra" CddlTx + ] + readFileTxBody :: FilePath -> ExceptT ShelleyTxCmdError IO IncompleteTx readFileTxBody fp = handleLeftT @@ -1877,7 +1903,6 @@ readFileTx fp = (\e -> unCddlTx <$> acceptTxCDDLSerialisation e) (readFileInAnyCardanoEra AsTx fp) - readFileInAnyCardanoEra :: ( HasTextEnvelope (thing ByronEra) , HasTextEnvelope (thing ShelleyEra) diff --git a/cardano-cli/src/Cardano/CLI/Types.hs b/cardano-cli/src/Cardano/CLI/Types.hs index b3dd7f99781..719d4bb63fb 100644 --- a/cardano-cli/src/Cardano/CLI/Types.hs +++ b/cardano-cli/src/Cardano/CLI/Types.hs @@ -75,7 +75,7 @@ data CBORObject = CBORBlockByron Byron.EpochSlots | CBORVoteByron deriving Show -newtype CddlTx = CddlTx {unCddlTx :: InAnyCardanoEra Tx} +newtype CddlTx = CddlTx {unCddlTx :: InAnyCardanoEra Tx} deriving (Show, Eq) -- Encompasses stake certificates, stake pool certificates, -- genesis delegate certificates and MIR certificates. diff --git a/cardano-cli/test/Test/Golden/Shelley/TextEnvelope/Tx/Tx.hs b/cardano-cli/test/Test/Golden/Shelley/TextEnvelope/Tx/Tx.hs index 1c7c65513a9..9e00db87dab 100644 --- a/cardano-cli/test/Test/Golden/Shelley/TextEnvelope/Tx/Tx.hs +++ b/cardano-cli/test/Test/Golden/Shelley/TextEnvelope/Tx/Tx.hs @@ -4,8 +4,8 @@ module Test.Golden.Shelley.TextEnvelope.Tx.Tx ( golden_shelleyTx ) where -import Cardano.Api (AsType (..), HasTextEnvelope (..)) import Cardano.Prelude + import Hedgehog (Property) import Test.OptParse @@ -20,29 +20,21 @@ import qualified Hedgehog.Extras.Test.Base as H golden_shelleyTx :: Property golden_shelleyTx = propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do -- Reference keys - let referenceTx = "test/data/golden/shelley/tx/tx" + let referenceTx = "test/data/golden/alonzo/tx" -- Key filepaths - paymentVerKey <- noteTempFile tempDir "payment-verification-key-file" - paymentSignKey <- noteTempFile tempDir "payment-signing-key-file" + paymentSignKey <- noteInputFile "test/data/golden/shelley/transaction-sign/utxo.skey" transactionFile <- noteTempFile tempDir "tx-file" transactionBodyFile <- noteTempFile tempDir "tx-body-file" - -- Generate payment signing key to sign transaction - void $ execCardanoCLI - [ "address","key-gen" - , "--verification-key-file", paymentVerKey - , "--signing-key-file", paymentSignKey - ] - -- Create transaction body void $ execCardanoCLI [ "transaction", "build-raw" - , "--shelley-era" - , "--tx-in", "91999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c3#0" - , "--tx-out", "addr1v9wmu83pzajplrtpsq6tsqdgwr98x888trpmah2u0ezznsge7del3+100000000" - , "--fee", "1000000" - , "--invalid-hereafter", "500000" + , "--alonzo-era" + , "--tx-in", "f62cd7bc15d8c6d2c8519fb8d13c57c0157ab6bab50af62bc63706feb966393d#0" + , "--tx-out", "addr_test1qpmxr8d8jcl25kyz2tz9a9sxv7jxglhddyf475045y8j3zxjcg9vquzkljyfn3rasfwwlkwu7hhm59gzxmsyxf3w9dps8832xh+1199989833223" + , "--tx-out", "addr_test1vpqgspvmh6m2m5pwangvdg499srfzre2dd96qq57nlnw6yctpasy4+10000000" + , "--fee", "166777" , "--out-file", transactionBodyFile ] @@ -51,12 +43,10 @@ golden_shelleyTx = propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do [ "transaction", "sign" , "--tx-body-file", transactionBodyFile , "--signing-key-file", paymentSignKey - , "--mainnet" + , "--testnet-magic", "42" , "--out-file", transactionFile ] - let txType = textEnvelopeType (AsTx AsShelleyEra) - -- Check the newly created files have not deviated from the -- golden files - checkTextEnvelopeFormat txType referenceTx transactionFile + checkTxCddlFormat referenceTx transactionFile diff --git a/cardano-cli/test/Test/Golden/Shelley/TextEnvelope/Tx/TxBody.hs b/cardano-cli/test/Test/Golden/Shelley/TextEnvelope/Tx/TxBody.hs index 72cf24c9f60..36598fb159d 100644 --- a/cardano-cli/test/Test/Golden/Shelley/TextEnvelope/Tx/TxBody.hs +++ b/cardano-cli/test/Test/Golden/Shelley/TextEnvelope/Tx/TxBody.hs @@ -4,8 +4,8 @@ module Test.Golden.Shelley.TextEnvelope.Tx.TxBody ( golden_shelleyTxBody ) where -import Cardano.Api (AsType (..), HasTextEnvelope (..)) import Cardano.Prelude + import Hedgehog (Property) import Test.OptParse @@ -34,8 +34,7 @@ golden_shelleyTxBody = propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do , "--out-file", transactionBodyFile ] - let txBodyType = textEnvelopeType AsMaryTxBody -- Check the newly created files have not deviated from the -- golden files - checkTextEnvelopeFormat txBodyType referenceTxBody transactionBodyFile + checkTxCddlFormat referenceTxBody transactionBodyFile diff --git a/cardano-cli/test/Test/Golden/Shelley/Transaction/Build.hs b/cardano-cli/test/Test/Golden/Shelley/Transaction/Build.hs index f068bfc4620..c2064d5ff99 100644 --- a/cardano-cli/test/Test/Golden/Shelley/Transaction/Build.hs +++ b/cardano-cli/test/Test/Golden/Shelley/Transaction/Build.hs @@ -41,7 +41,7 @@ golden_shelleyTransactionBuild = , "--tx-body-file", txBodyOutFile ] - H.assertFileOccurences 1 "TxBodyMary" txBodyOutFile + H.assertFileOccurences 1 "Tx MaryEra" txBodyOutFile H.assertEndsWithSingleNewline txBodyOutFile @@ -64,7 +64,7 @@ golden_shelleyTransactionBuild_CertificateScriptWitnessed = , "--tx-body-file", txBodyOutFile ] - H.assertFileOccurences 1 "TxBodyMary" txBodyOutFile + H.assertFileOccurences 1 "Tx MaryEra" txBodyOutFile H.assertEndsWithSingleNewline txBodyOutFile @@ -96,7 +96,7 @@ golden_shelleyTransactionBuild_Minting = , "--tx-body-file", txBodyOutFile ] - H.assertFileOccurences 1 "TxBodyMary" txBodyOutFile + H.assertFileOccurences 1 "Tx MaryEra" txBodyOutFile H.assertEndsWithSingleNewline txBodyOutFile @@ -120,7 +120,7 @@ golden_shelleyTransactionBuild_WithdrawalScriptWitnessed = , "--tx-body-file", txBodyOutFile ] - H.assertFileOccurences 1 "TxBodyMary" txBodyOutFile + H.assertFileOccurences 1 "Tx MaryEra" txBodyOutFile H.assertEndsWithSingleNewline txBodyOutFile @@ -140,6 +140,6 @@ golden_shelleyTransactionBuild_TxInScriptWitnessed = , "--tx-body-file", txBodyOutFile ] - H.assertFileOccurences 1 "TxBodyMary" txBodyOutFile + H.assertFileOccurences 1 "Tx MaryEra" txBodyOutFile H.assertEndsWithSingleNewline txBodyOutFile diff --git a/cardano-cli/test/Test/Golden/Shelley/Transaction/CreateWitness.hs b/cardano-cli/test/Test/Golden/Shelley/Transaction/CreateWitness.hs index c1bcf6cecac..50342e3b8c2 100644 --- a/cardano-cli/test/Test/Golden/Shelley/Transaction/CreateWitness.hs +++ b/cardano-cli/test/Test/Golden/Shelley/Transaction/CreateWitness.hs @@ -47,5 +47,5 @@ golden_shelleyTransactionSigningKeyWitness = propertyOnce $ H.moduleWorkspace "t , "--out-file", witnessOutFile ] - H.assertFileOccurences 1 "TxWitnessShelley" witnessOutFile + H.assertFileOccurences 1 "TxWitness ShelleyEra" witnessOutFile H.assertEndsWithSingleNewline txBodyOutFile diff --git a/cardano-cli/test/Test/OptParse.hs b/cardano-cli/test/Test/OptParse.hs index e2019f7d215..07be8e590fd 100644 --- a/cardano-cli/test/Test/OptParse.hs +++ b/cardano-cli/test/Test/OptParse.hs @@ -1,5 +1,6 @@ module Test.OptParse - ( checkTextEnvelopeFormat + ( checkTxCddlFormat + , checkTextEnvelopeFormat , equivalence , execCardanoCLI , propertyOnce @@ -17,6 +18,8 @@ import qualified GHC.Stack as GHC import Cardano.Api +import Cardano.CLI.Shelley.Run.Transaction + import qualified Hedgehog as H import qualified Hedgehog.Extras.Test.Process as H import Hedgehog.Internal.Property (Diff, MonadTest, liftTest, mkTest) @@ -64,6 +67,17 @@ checkTextEnvelopeFormat tve reference created = do equivalence refType createdType equivalence refTitle createdTitle +checkTxCddlFormat + :: (MonadTest m, MonadIO m, HasCallStack) + => FilePath -- ^ Reference/golden file + -> FilePath -- ^ Newly created file + -> m () +checkTxCddlFormat reference created = do + r <- liftIO $ readCddlTx reference + c <- liftIO $ readCddlTx created + r H.=== c + + -------------------------------------------------------------------------------- -- Helpers, Error rendering & Clean up -------------------------------------------------------------------------------- diff --git a/cardano-cli/test/data/golden/alonzo/tx b/cardano-cli/test/data/golden/alonzo/tx new file mode 100644 index 00000000000..934d3499fd2 --- /dev/null +++ b/cardano-cli/test/data/golden/alonzo/tx @@ -0,0 +1,5 @@ +{ + "type": "Tx AlonzoEra", + "description": "Ledger Cddl Format", + "cborHex": "84a30081825820f62cd7bc15d8c6d2c8519fb8d13c57c0157ab6bab50af62bc63706feb966393d0001828258390076619da7963eaa588252c45e960667a4647eed69135f51f5a10f2888d2c20ac07056fc8899c47d825cefd9dcf5efba150236e043262e2b431b0000011764f7be0782581d604088059bbeb6add02eecd0c6a2a52c06910f2a6b4ba0029e9fe6ed131a00989680021a00028b79a100818258208dc60533b5dfa60a530955a696323a2ef4f14e8bc95a8f84cf6c441fea4234275840043220211a264209f6e61903e60e80093b7b3a08e8bc5fe8f8707635acd69b6e0589e61aea544b87729983955decded90a59f9701042bebe57f2afba7c94fc02f5f6" +} diff --git a/cardano-cli/test/data/golden/shelley/tx/tx b/cardano-cli/test/data/golden/shelley/tx/tx index 09755fd0886..3afae9d5561 100644 --- a/cardano-cli/test/data/golden/shelley/tx/tx +++ b/cardano-cli/test/data/golden/shelley/tx/tx @@ -1,5 +1,5 @@ { - "type": "TxSignedShelley", - "description": "", - "cborHex": "83a4008182582091999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c300018182581d615dbe1e2117641f8d618034b801a870ca731ce758c3bedd5c7e4429c11a05f5e100021a000f4240031a0007a120a100818258202f5c56d5d354205130674e519c4abb18f14e36c86a03811c8a3b4ea4786702b3584068f460e722d1423c7d4ce286e9c1d43a3a70ac4f42ca4dd782fe03cb41ce23e91ec97b9b3d467ff435b8b4efc75c466a10fb9c2b76c42711f58a7a049416fb02f6" -} \ No newline at end of file + "type": "Tx AlonzoEra", + "description": "Ledger Cddl Format", + "cborHex": "84a30081825820256fe89fc62e787e470c54e6d17390309ed6ceed27f11b9f873dd55802a6272f0001828258390076619da7963eaa588252c45e960667a4647eed69135f51f5a10f2888d2c20ac07056fc8899c47d825cefd9dcf5efba150236e043262e2b431b0000011764f7be0782581d604088059bbeb6add02eecd0c6a2a52c06910f2a6b4ba0029e9fe6ed131a00989680021a00028b79a100818258206cf237caaf3218032c28fe858aaeeb835a8b315f45ec273970fb64b3dd1cc7dc58402271384dc35dc926468747e901aba167d03f17d1f01374f8631210af32b2dfb601d4949bd9e03158473493425a31db653a3de8460510c5da92ff01022eecc801f5f6" +} diff --git a/cardano-cli/test/data/golden/shelley/tx/txbody b/cardano-cli/test/data/golden/shelley/tx/txbody index 8df8523b552..45dbc95e7b4 100644 --- a/cardano-cli/test/data/golden/shelley/tx/txbody +++ b/cardano-cli/test/data/golden/shelley/tx/txbody @@ -1,5 +1,5 @@ { - "type": "TxBodyMary", - "description": "", - "cborHex": "83a4008182582091999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c300018182581d615dbe1e2117641f8d618034b801a870ca731ce758c3bedd5c7e4429c11a05f5e100021a000f4240031a0007a1209ffff6" + "type": "Unwitnessed Tx MaryEra", + "description": "Ledger Cddl Format", + "cborHex": "83a4008182582091999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c300018182581d615dbe1e2117641f8d618034b801a870ca731ce758c3bedd5c7e4429c11a05f5e100021a000f4240031a0007a120a0f6" } diff --git a/cardano-cli/test/data/golden/shelley/witnesses/singleSigningKeyWitness b/cardano-cli/test/data/golden/shelley/witnesses/singleSigningKeyWitness index 99252d96c68..1be1923ee75 100644 --- a/cardano-cli/test/data/golden/shelley/witnesses/singleSigningKeyWitness +++ b/cardano-cli/test/data/golden/shelley/witnesses/singleSigningKeyWitness @@ -2,4 +2,4 @@ "type": "TxWitness MaryEra", "description": "", "cborHex": "82008258208dc60533b5dfa60a530955a696323a2ef4f14e8bc95a8f84cf6c441fea42342758409f69aa4bf41acf78deaffb002c4f36157f3bad7c434a19b1ffe7e7df5f98f629e58503a762e83c1f60e54c9eb7eef9885b16c2b42ce1336914f2df9aa63b1407" -} +} \ No newline at end of file