From 57fcbd1e0d60e44a6455b418988c96acb9629f77 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara Date: Tue, 2 Jul 2024 05:15:41 -0600 Subject: [PATCH] Remove check for DRep metadata size --- cabal.project | 8 ++++++++ .../src/Cardano/CLI/EraBased/Run/Governance/DRep.hs | 7 ++----- .../src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs | 3 --- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cabal.project b/cabal.project index f4bc98a779..f3f0109292 100644 --- a/cabal.project +++ b/cabal.project @@ -46,3 +46,11 @@ write-ghc-environment-files: always -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. + +source-repository-package + type: git + location: https://github.com/intersectmbo/cardano-api + tag: a94575d5b80a6457ea5a29e78f023161e5ec8727 + --sha256: sha256-R7AIWGIrshvn+GbfUJCGPhNWIT+C2oO4ftjb+E4ndT8= + subdir: + cardano-api \ No newline at end of file diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs index 743d1c8561..f27af4ae91 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs @@ -164,12 +164,9 @@ runGovernanceDRepMetadataHashCmd , mOutFile } = do metadataBytes <- firstExceptT ReadFileError $ newExceptT (readByteStringFile metadataFile) - (_metadata, metadataHash) <- - firstExceptT GovernanceCmdDRepMetadataValidationError - . hoistEither - $ validateAndHashDRepMetadata metadataBytes + let (_metadata, metadataHash) = hashDRepMetadata metadataBytes firstExceptT WriteFileError . newExceptT . writeByteStringOutput mOutFile . serialiseToRawBytesHex - $ metadataHash + $ metadataHash \ No newline at end of file diff --git a/cardano-cli/src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs b/cardano-cli/src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs index 6fa63a24ce..f12e984b4a 100644 --- a/cardano-cli/src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs +++ b/cardano-cli/src/Cardano/CLI/Types/Errors/GovernanceCmdError.hs @@ -50,7 +50,6 @@ data GovernanceCmdError | GovernanceCmdDecoderError !DecoderError | GovernanceCmdVerifyPollError !GovernancePollError | GovernanceCmdWriteFileError !(FileError ()) - | GovernanceCmdDRepMetadataValidationError !DRepMetadataValidationError -- Legacy - remove me after cardano-cli transitions to new era based structure | GovernanceCmdMIRCertNotSupportedInConway | GovernanceCmdGenesisDelegationNotSupportedInConway @@ -108,8 +107,6 @@ instance Error GovernanceCmdError where pretty $ renderGovernancePollError pollError GovernanceCmdWriteFileError fileError -> "Cannot write file: " <> prettyError fileError - GovernanceCmdDRepMetadataValidationError e -> - "DRep metadata validation error: " <> prettyError e GovernanceCmdMIRCertNotSupportedInConway -> "MIR certificates are not supported in Conway era onwards." GovernanceCmdGenesisDelegationNotSupportedInConway ->