From dbd921ff78142db8bd0e0e69597c3c9d03afe75e Mon Sep 17 00:00:00 2001 From: Thomas Dinsdale-Young Date: Fri, 29 Nov 2024 13:31:58 +0100 Subject: [PATCH 1/3] Add support for new GRPC endpoints and fix for changes in concordium-base. --- ChangeLog.md | 7 +++ concordium-client.cabal | 4 +- deps/concordium-base | 2 +- src/Concordium/Client/GRPC2.hs | 54 ++++++++++++++--- src/Concordium/Client/LegacyCommands.hs | 60 +++++++++++++++++++ src/Concordium/Client/Output.hs | 24 ++++---- src/Concordium/Client/Runner.hs | 30 ++++++++-- .../Client/Types/TransactionStatus.hs | 6 +- 8 files changed, 155 insertions(+), 32 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 7f945a63..d88216a3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,12 +2,19 @@ ## Unreleased +Note: due to API changes, this release may not work correctly with node versions prior to 8. + - Support node version 8 and protocol version 8. - Support for suspend/resume in validator update transactions. - Add command `consensus detailed-status` for getting detailed consensus status (from protocol version 6). - Add `raw GetConsensusDetailedStatus` that presents the detailed consensus status as JSON. - Update GHC version to 9.6.6 (lts-22.39). +- Add raw commands `GetScheduledReleaseAccounts`, `GetCooldownAccounts`, + `GetPreCooldownAccounts` and `GetPrePreCooldownAccounts` for querying + accounts with scheduled releases, cooldowns, pre-cooldowns and pre-pre-cooldowns. +- Raw commands `GetBlockTransactionEvents` and `GetTransactionStatus` include the `parameter` + for `ContractInitialized` events. ## 7.0.1 diff --git a/concordium-client.cabal b/concordium-client.cabal index dcb1dcb8..790a3588 100644 --- a/concordium-client.cabal +++ b/concordium-client.cabal @@ -1,11 +1,11 @@ cabal-version: 1.24 --- This file has been generated from package.yaml by hpack version 0.36.0. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: concordium-client -version: 7.0.1 +version: 7.0.2 description: Please see the README on GitHub at homepage: https://github.com/Concordium/concordium-client#readme bug-reports: https://github.com/Concordium/concordium-client/issues diff --git a/deps/concordium-base b/deps/concordium-base index a63b8994..a243440d 160000 --- a/deps/concordium-base +++ b/deps/concordium-base @@ -1 +1 @@ -Subproject commit a63b89940a32cc47a121209baf130946a7b7ad0f +Subproject commit a243440d6847bc0e334f6581fe308e7c851c07d6 diff --git a/src/Concordium/Client/GRPC2.hs b/src/Concordium/Client/GRPC2.hs index 68747148..c5ebbafa 100644 --- a/src/Concordium/Client/GRPC2.hs +++ b/src/Concordium/Client/GRPC2.hs @@ -1109,7 +1109,7 @@ instance FromProto Proto.ContractVersion where fromProtoFail "Unable to convert 'ContractVersion'." instance FromProto Proto.ContractTraceElement where - type Output Proto.ContractTraceElement = Event + type Output Proto.ContractTraceElement = SupplementedEvent fromProto ctElement = do cte <- case ctElement ^. Proto.maybe'element of Nothing -> @@ -1506,7 +1506,7 @@ instance FromProto Proto.TransactionType where <> "'." instance FromProto Proto.AccountCreationDetails where - type Output Proto.AccountCreationDetails = ValidResult + type Output Proto.AccountCreationDetails = SupplementedValidResult fromProto acDetails = do ecdAccount <- fromProto $ acDetails ^. ProtoFields.address ecdRegId <- fmap fst . fromProto $ acDetails ^. ProtoFields.regId @@ -1980,7 +1980,7 @@ instance FromProto Proto.UpdatePayload where return $ Updates.FinalizationCommitteeParametersUpdatePayload fcp instance FromProto Proto.BlockItemSummary where - type Output Proto.BlockItemSummary = TransactionSummary + type Output Proto.BlockItemSummary = SupplementedTransactionSummary fromProto biSummary = do -- Common block item summary fields let tsIndex = deMkWord64 $ biSummary ^. ProtoFields.index @@ -2021,7 +2021,7 @@ instance FromProto Proto.BlockItemSummary where return TransactionSummary{..} instance FromProto Proto.AccountTransactionDetails where - type Output Proto.AccountTransactionDetails = (Maybe TransactionType, ValidResult) + type Output Proto.AccountTransactionDetails = (Maybe TransactionType, SupplementedValidResult) fromProto atDetails = do let senderAcc = atDetails ^. ProtoFields.sender sender <- fromProto senderAcc @@ -2080,6 +2080,7 @@ instance FromProto Proto.AccountTransactionDetails where ecAmount <- fromProto $ cInitialized ^. ProtoFields.amount ecInitName <- fromProto $ cInitialized ^. ProtoFields.initName ecEvents <- mapM fromProto $ cInitialized ^. ProtoFields.events + ecParameter <- fmap Parameters.CTrue . fromProto $ cInitialized ^. ProtoFields.parameter return (Just TTInitContract, TxSuccess [ContractInitialized{..}]) ProtoFields.AccountTransactionEffects'ContractUpdateIssued' cuIssued -> do vrEvents <- mapM fromProto $ cuIssued ^. ProtoFields.effects @@ -2165,7 +2166,7 @@ instance FromProto Proto.AccountTransactionDetails where return (Just tType, TxSuccess{..}) instance FromProto (Proto.AccountAddress, Proto.DelegationEvent) where - type Output (Proto.AccountAddress, Proto.DelegationEvent) = Event + type Output (Proto.AccountAddress, Proto.DelegationEvent) = SupplementedEvent fromProto (senderAcc, dEvent) = do sender <- fromProto senderAcc de <- case dEvent ^. Proto.maybe'event of @@ -2208,7 +2209,7 @@ instance FromProto (Proto.AccountAddress, Proto.DelegationEvent) where return BakerRemoved{..} instance FromProto (Proto.AccountAddress, Proto.BakerEvent) where - type Output (Proto.AccountAddress, Proto.BakerEvent) = Event + type Output (Proto.AccountAddress, Proto.BakerEvent) = SupplementedEvent fromProto (senderAcc, bEvent) = do sender <- fromProto senderAcc be <- case bEvent ^. Proto.maybe'event of @@ -2280,7 +2281,7 @@ instance FromProto (Proto.AccountAddress, Proto.BakerEvent) where return BakerResumed{..} instance FromProto Proto.BlockItemStatus where - type Output Proto.BlockItemStatus = TransactionStatus + type Output Proto.BlockItemStatus = SupplementedTransactionStatus fromProto biStatus = do bis <- case biStatus ^. Proto.maybe'status of Nothing -> @@ -3064,6 +3065,13 @@ instance FromProto Proto.ConsensusDetailedStatus where cdsTerminalBlock <- mapM fromProto (consensusDetailedStatus ^. ProtoFields.maybe'terminalBlock) return ConsensusDetailedStatus{..} +instance FromProto Proto.AccountPending where + type Output Proto.AccountPending = AccountPending + fromProto acctPending = do + apAccountIndex <- fromProto (acctPending ^. ProtoFields.accountIndex) + apFirstTimestamp <- fromProto (acctPending ^. ProtoFields.firstTimestamp) + return AccountPending{..} + type LoggerMethod = Text -> IO () data GrpcConfig = GrpcConfig @@ -3181,7 +3189,7 @@ getBlockSpecialEvents bhInput = msg = toProto bhInput -- | Get all transaction events in a given block. -getBlockTransactionEvents :: (MonadIO m) => BlockHashInput -> ClientMonad m (GRPCResult (FromProtoResult (Seq.Seq TransactionSummary))) +getBlockTransactionEvents :: (MonadIO m) => BlockHashInput -> ClientMonad m (GRPCResult (FromProtoResult (Seq.Seq SupplementedTransactionSummary))) getBlockTransactionEvents bhInput = withServerStreamCollect (call @"getBlockTransactionEvents") msg ((fmap . mapM) fromProto) where @@ -3361,7 +3369,7 @@ getBlockFinalizationSummary bhInput = withUnary (call @"getBlockFinalizationSumm msg = toProto bhInput -- | Get the status of and information about a specific block item (transaction). -getBlockItemStatus :: (MonadIO m) => TransactionHash -> ClientMonad m (GRPCResult (FromProtoResult TransactionStatus)) +getBlockItemStatus :: (MonadIO m) => TransactionHash -> ClientMonad m (GRPCResult (FromProtoResult SupplementedTransactionStatus)) getBlockItemStatus tHash = withUnary (call @"getBlockItemStatus") msg (fmap fromProto) where msg = toProto tHash @@ -3455,6 +3463,34 @@ getNextUpdateSequenceNumbers bhInput = withUnary (call @"getNextUpdateSequenceNu where msg = toProto bhInput +-- | Get all accounts that have scheduled releases. +getScheduledReleaseAccounts :: (MonadIO m) => BlockHashInput -> ClientMonad m (GRPCResult (FromProtoResult (Seq.Seq AccountPending))) +getScheduledReleaseAccounts bhInput = + withServerStreamCollect (call @"getScheduledReleaseAccounts") msg (fmap (mapM fromProto)) + where + msg = toProto bhInput + +-- | Get all accounts that have stake in cooldown. +getCooldownAccounts :: (MonadIO m) => BlockHashInput -> ClientMonad m (GRPCResult (FromProtoResult (Seq.Seq AccountPending))) +getCooldownAccounts bhInput = + withServerStreamCollect (call @"getCooldownAccounts") msg (fmap (mapM fromProto)) + where + msg = toProto bhInput + +-- | Get all accounts that have stake in pre-cooldown. +getPreCooldownAccounts :: (MonadIO m) => BlockHashInput -> ClientMonad m (GRPCResult (FromProtoResult (Seq.Seq AccountIndex))) +getPreCooldownAccounts bhInput = + withServerStreamCollect (call @"getPreCooldownAccounts") msg (fmap (mapM fromProto)) + where + msg = toProto bhInput + +-- | Get all accounts that have stake in pre-pre-cooldown. +getPrePreCooldownAccounts :: (MonadIO m) => BlockHashInput -> ClientMonad m (GRPCResult (FromProtoResult (Seq.Seq AccountIndex))) +getPrePreCooldownAccounts bhInput = + withServerStreamCollect (call @"getPrePreCooldownAccounts") msg (fmap (mapM fromProto)) + where + msg = toProto bhInput + -- | Get information related to the baker election for a particular block. getElectionInfo :: (MonadIO m) => BlockHashInput -> ClientMonad m (GRPCResult (FromProtoResult BlockBirkParameters)) getElectionInfo bhInput = withUnary (call @"getElectionInfo") msg (fmap fromProto) diff --git a/src/Concordium/Client/LegacyCommands.hs b/src/Concordium/Client/LegacyCommands.hs index 09ef5a75..719a71ba 100644 --- a/src/Concordium/Client/LegacyCommands.hs +++ b/src/Concordium/Client/LegacyCommands.hs @@ -169,6 +169,18 @@ data LegacyCmd {legacyEpoch :: !EpochSpecifier} | GetFirstBlockEpoch {legacyEpoch :: !EpochSpecifier} + | -- | Get the list of accounts with scheduled releases. + GetScheduledReleaseAccounts + {legacyBlockHash :: !(Maybe Text)} + | -- | Get the list of accounts with stake in cooldown. + GetCooldownAccounts + {legacyBlockHash :: !(Maybe Text)} + | -- | Get the list of accounts with stake in pre-cooldown. + GetPreCooldownAccounts + {legacyBlockHash :: !(Maybe Text)} + | -- | Get the list of accounts with stake in pre-pre-cooldown. + GetPrePreCooldownAccounts + {legacyBlockHash :: !(Maybe Text)} deriving (Show) legacyProgramOptions :: Parser LegacyCmd @@ -213,6 +225,10 @@ legacyProgramOptions = <> getAnonymityRevokersCommand <> getCryptographicParametersCommand <> getNextUpdateSequenceNumbersCommand + <> getScheduledReleaseAccountsCommand + <> getCooldownAccountsCommand + <> getPreCooldownAccountsCommand + <> getPrePreCooldownAccountsCommand <> getBakersRewardPeriodCommand "GetValidatorsRewardPeriod" <> getBlockCertificatesCommand <> getBakerEarliestWinTimeCommand "GetValidatorEarliestWinTime" @@ -426,6 +442,50 @@ getNextUpdateSequenceNumbersCommand = (progDesc "Query the gRPC server for the next update sequence numbers for all update queues.") ) +getScheduledReleaseAccountsCommand :: Mod CommandFields LegacyCmd +getScheduledReleaseAccountsCommand = + command + "GetScheduledReleaseAccounts" + ( info + ( GetScheduledReleaseAccounts + <$> optional (strArgument (metavar "BLOCK-HASH" <> help "Hash of the block to query (default: Query the best block)")) + ) + (progDesc "Query the gRPC server for all accounts that have scheduled releases, with the timestamp of the first pending scheduled release for that account.") + ) + +getCooldownAccountsCommand :: Mod CommandFields LegacyCmd +getCooldownAccountsCommand = + command + "GetCooldownAccounts" + ( info + ( GetCooldownAccounts + <$> optional (strArgument (metavar "BLOCK-HASH" <> help "Hash of the block to query (default: Query the best block)")) + ) + (progDesc "Query the gRPC server for all accounts that have stake in cooldown, with the timestamp of the first pending cooldown expiry for each account.") + ) + +getPreCooldownAccountsCommand :: Mod CommandFields LegacyCmd +getPreCooldownAccountsCommand = + command + "GetPreCooldownAccounts" + ( info + ( GetPreCooldownAccounts + <$> optional (strArgument (metavar "BLOCK-HASH" <> help "Hash of the block to query (default: Query the best block)")) + ) + (progDesc "Query the gRPC server for all accounts that have stake in pre-cooldown.") + ) + +getPrePreCooldownAccountsCommand :: Mod CommandFields LegacyCmd +getPrePreCooldownAccountsCommand = + command + "GetPrePreCooldownAccounts" + ( info + ( GetPrePreCooldownAccounts + <$> optional (strArgument (metavar "BLOCK-HASH" <> help "Hash of the block to query (default: Query the best block)")) + ) + (progDesc "Query the gRPC server for all accounts that have stake in pre-pre-cooldown.") + ) + getBakersRewardPeriodCommand :: String -> Mod CommandFields LegacyCmd getBakersRewardPeriodCommand name = command diff --git a/src/Concordium/Client/Output.hs b/src/Concordium/Client/Output.hs index ff1878d6..144c0624 100644 --- a/src/Concordium/Client/Output.hs +++ b/src/Concordium/Client/Output.hs @@ -43,7 +43,7 @@ import Codec.CBOR.Read import qualified Concordium.Client.Types.ConsensusStatus as ConsensusStatus import Concordium.Client.Types.Contract.BuildInfo (showBuildInfo) import Concordium.Common.Time (DurationSeconds (durationSeconds)) -import Concordium.Types.Execution (Event (ecEvents)) +import Concordium.Types.Execution (Event' (ecEvents), SupplementedEvent) import Control.Monad import Control.Monad.Writer import qualified Data.Aeson as AE @@ -609,9 +609,9 @@ showAccountKeyPair = showPrettyJSON data TransactionBlockResult = NoBlocks - | SingleBlock Types.BlockHash Types.TransactionSummary - | MultipleBlocksUnambiguous [Types.BlockHash] Types.TransactionSummary - | MultipleBlocksAmbiguous [(Types.BlockHash, Types.TransactionSummary)] + | SingleBlock Types.BlockHash Types.SupplementedTransactionSummary + | MultipleBlocksUnambiguous [Types.BlockHash] Types.SupplementedTransactionSummary + | MultipleBlocksAmbiguous [(Types.BlockHash, Types.SupplementedTransactionSummary)] parseTransactionBlockResult :: TransactionStatusResult -> TransactionBlockResult parseTransactionBlockResult status = @@ -637,7 +637,7 @@ parseTransactionBlockResult status = printTransactionStatus :: TransactionStatusResult -> Bool -> - Maybe (Map.Map Types.BlockHash [(Types.Event, Maybe CI.ContractInfo)]) -> + Maybe (Map.Map Types.BlockHash [(Types.SupplementedEvent, Maybe CI.ContractInfo)]) -> Printer printTransactionStatus status verbose contrInfoWithSchemas = case tsrState status of @@ -699,10 +699,10 @@ printTransactionStatus status verbose contrInfoWithSchemas = tell ["Transaction is finalized into multiple blocks - this should never happen and may indicate a serious problem with the chain!"] where -- Look up event and schema data associated with the transaction in block with hash h. - lookupContrInfo :: Types.BlockHash -> Maybe [(Event, Maybe CI.ContractInfo)] + lookupContrInfo :: Types.BlockHash -> Maybe [(SupplementedEvent, Maybe CI.ContractInfo)] lookupContrInfo h = contrInfoWithSchemas >>= (Map.!? h) - showOutcomeFragment :: Types.TransactionSummary -> String + showOutcomeFragment :: Types.SupplementedTransactionSummary -> String showOutcomeFragment outcome = printf "status \"%s\" and cost %s" @@ -712,7 +712,7 @@ printTransactionStatus status verbose contrInfoWithSchemas = Types.TxSuccess _ -> "success" Types.TxReject _ -> "rejected" -showOutcomeCost :: Types.TransactionSummary -> String +showOutcomeCost :: Types.SupplementedTransactionSummary -> String showOutcomeCost outcome = showCost (Types.tsCost outcome) (Types.tsEnergyCost outcome) showCost :: Types.Amount -> Types.Energy -> String @@ -723,9 +723,9 @@ showOutcomeResult :: -- | Whether the output should be verbose. Verbose -> -- | Map holding contract info that should be used for displaying events of the outcome. - Maybe [(Types.Event, Maybe CI.ContractInfo)] -> + Maybe [(Types.SupplementedEvent, Maybe CI.ContractInfo)] -> -- | The transaction outcome to show. - Types.ValidResult -> + Types.SupplementedValidResult -> [String] showOutcomeResult verbose contrInfoWithEventsM = \case Types.TxSuccess es -> @@ -756,7 +756,7 @@ showOutcomeResult verbose contrInfoWithEventsM = \case -- -- The reason for using a @Maybe String@ is that the output is only produced -- if the verbose flag is set. - fHelper :: (Int, [Maybe String]) -> (Event, Maybe CI.ContractInfo) -> (Int, [Maybe String]) + fHelper :: (Int, [Maybe String]) -> (SupplementedEvent, Maybe CI.ContractInfo) -> (Int, [Maybe String]) fHelper (idt, out) (ev, cInfo) = let -- compute the new indentation level for the current event (idtCurrent) and @@ -791,7 +791,7 @@ showEvent :: -- | Contract information holding schema information to be used for displaying the event. Maybe CI.ContractInfo -> -- | The event to show. - Types.Event -> + Types.SupplementedEvent -> Maybe String showEvent verbose ciM = \case Types.ModuleDeployed ref -> diff --git a/src/Concordium/Client/Runner.hs b/src/Concordium/Client/Runner.hs index 73e75ded..e6fd8bf1 100644 --- a/src/Concordium/Client/Runner.hs +++ b/src/Concordium/Client/Runner.hs @@ -588,7 +588,7 @@ getContractInfoWithSchemas :: -- | The block to retrieve the contract info from. BlockHashInput -> -- | The event for which the contract info will be retrieved. - Types.Event -> + Types.SupplementedEvent -> ClientMonad m (Maybe CI.ContractInfo) getContractInfoWithSchemas schemaFile blockHash ev = do -- Get contract address. @@ -622,7 +622,7 @@ getTxContractInfoWithSchemas :: Maybe FilePath -> -- | The transaction result for which the contract info will be retrieved. TransactionStatusResult -> - ClientMonad m (Map.Map Types.BlockHash [(Types.Event, Maybe CI.ContractInfo)]) + ClientMonad m (Map.Map Types.BlockHash [(Types.SupplementedEvent, Maybe CI.ContractInfo)]) getTxContractInfoWithSchemas schemaFile status = do -- Which blocks should be used in the ContractInfo queries? let bhEvents = [(bh, evsE) | (bh, Right evsE) <- extractFromTsr' getEvents status] @@ -634,14 +634,14 @@ getTxContractInfoWithSchemas schemaFile status = do return (bh, evToSt) return $ Map.fromList bhToEv where - getEvents :: Types.TransactionSummary -> Either String [Types.Event] + getEvents :: Types.SupplementedTransactionSummary -> Either String [Types.SupplementedEvent] getEvents tSum = case Types.tsResult tSum of Types.TxSuccess{..} -> Right vrEvents Types.TxReject{..} -> Left $ showRejectReason True vrRejectReason -- A different variant of extractFromTsr' which also takes into -- account MultipleBlocksUnambiguous and MultipleBlocksAmbiguous. - extractFromTsr' :: (Types.TransactionSummary -> a) -> TransactionStatusResult -> [(Types.BlockHash, a)] + extractFromTsr' :: (Types.SupplementedTransactionSummary -> a) -> TransactionStatusResult -> [(Types.BlockHash, a)] extractFromTsr' f tsr = case parseTransactionBlockResult tsr of NoBlocks -> [] @@ -2802,7 +2802,7 @@ mkContractAddress index subindex = Types.ContractAddress (Types.ContractIndex in -- | Try to extract event information from a TransactionStatusResult. -- The Maybe returned by the supplied function is mapped to Either with an error message. -- 'Nothing' is mapped to 'Nothing' -extractFromTsr :: (Types.Event -> Maybe a) -> Maybe TransactionStatusResult -> Maybe (Either String a) +extractFromTsr :: (Types.SupplementedEvent -> Maybe a) -> Maybe TransactionStatusResult -> Maybe (Either String a) extractFromTsr _ Nothing = Nothing -- occurs when ioTail is disabled. extractFromTsr eventMatcher (Just tsr) = Just $ case parseTransactionBlockResult tsr of SingleBlock _ tSummary -> getEvents tSummary >>= maybeToRight "transaction not included in any blocks" . findModRef @@ -4319,6 +4319,26 @@ processLegacyCmd action backend = readBlockHashOrDefault Best block >>= getNextUpdateSequenceNumbers >>= printResponseValueAsJSON + GetScheduledReleaseAccounts block -> + withClient backend $ + readBlockHashOrDefault Best block + >>= getScheduledReleaseAccounts + >>= printResponseValueAsJSON + GetCooldownAccounts block -> + withClient backend $ + readBlockHashOrDefault Best block + >>= getCooldownAccounts + >>= printResponseValueAsJSON + GetPreCooldownAccounts block -> + withClient backend $ + readBlockHashOrDefault Best block + >>= getPreCooldownAccounts + >>= printResponseValueAsJSON + GetPrePreCooldownAccounts block -> + withClient backend $ + readBlockHashOrDefault Best block + >>= getPrePreCooldownAccounts + >>= printResponseValueAsJSON GetBakersRewardPeriod block -> withClient backend $ readBlockHashOrDefault Best block diff --git a/src/Concordium/Client/Types/TransactionStatus.hs b/src/Concordium/Client/Types/TransactionStatus.hs index 765e8e66..e2de4d1f 100644 --- a/src/Concordium/Client/Types/TransactionStatus.hs +++ b/src/Concordium/Client/Types/TransactionStatus.hs @@ -19,7 +19,7 @@ $(deriveJSON defaultOptions{constructorTagModifier = firstLower} ''TransactionSt type TransactionBlockResults' a = Map.Map BlockHash (TransactionSummary' a) -type TransactionBlockResults = TransactionBlockResults' ValidResult +type TransactionBlockResults = TransactionBlockResults' SupplementedValidResult data TransactionStatusResult' a = TransactionStatusResult { tsrState :: !TransactionState, @@ -27,13 +27,13 @@ data TransactionStatusResult' a = TransactionStatusResult } deriving (Eq, Show) -type TransactionStatusResult = TransactionStatusResult' ValidResult +type TransactionStatusResult = TransactionStatusResult' SupplementedValidResult -- | Convert a @TransactionStatus@ instance into a @TransactionStatusResult@ instance. -- Returns a @Left@ wrapping an error message if either the transaction summary contained in the -- input is @Nothing@, or the input is of variant @Committed@ or @Finalized@. Returns a @Right@ -- wrapping the corresponding @TransactionStatusResult@ otherwise. -transactionStatusToTransactionStatusResult :: Queries.TransactionStatus -> Either String TransactionStatusResult +transactionStatusToTransactionStatusResult :: Queries.SupplementedTransactionStatus -> Either String TransactionStatusResult transactionStatusToTransactionStatusResult tStatus = do (tsrState, tsrResults) <- do case tStatus of From a103ab2963fae0742379d40393aebaa79f462f9e Mon Sep 17 00:00:00 2001 From: Thomas Dinsdale-Young Date: Fri, 29 Nov 2024 15:02:14 +0100 Subject: [PATCH 2/3] Fix tests. --- test/SimpleClientTests/TransactionSpec.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/SimpleClientTests/TransactionSpec.hs b/test/SimpleClientTests/TransactionSpec.hs index f4cd105b..d5152fd8 100644 --- a/test/SimpleClientTests/TransactionSpec.hs +++ b/test/SimpleClientTests/TransactionSpec.hs @@ -83,13 +83,13 @@ exampleBlockHash3 = read "941c24374cd077de2120fb58732306c3115a08bb7b7cda120a04fe exampleBlockHash4 :: Types.BlockHash exampleBlockHash4 = read "be880f81dfbcc0a049c3defe483327d0a2a3002a186a06d34bcd93a9be7f9994" -exampleEvent :: Types.Event +exampleEvent :: Types.SupplementedEvent exampleEvent = Types.Transferred (Types.AddressAccount exampleAccountAddr1) 10 (Types.AddressAccount exampleAccountAddr2) exampleRejectReason :: Types.RejectReason exampleRejectReason = Types.AmountTooLarge (Types.AddressAccount exampleAccountAddr1) 11 -outcomeSuccess1a :: Types.TransactionSummary +outcomeSuccess1a :: Types.SupplementedTransactionSummary outcomeSuccess1a = Types.TransactionSummary { Types.tsSender = Just exampleAccountAddr1, @@ -101,7 +101,7 @@ outcomeSuccess1a = Types.tsIndex = Types.TransactionIndex 0 } -outcomeSuccess1b :: Types.TransactionSummary +outcomeSuccess1b :: Types.SupplementedTransactionSummary outcomeSuccess1b = Types.TransactionSummary { Types.tsSender = Just exampleAccountAddr1, @@ -113,7 +113,7 @@ outcomeSuccess1b = Types.tsIndex = 0 } -outcomeSuccess2 :: Types.TransactionSummary +outcomeSuccess2 :: Types.SupplementedTransactionSummary outcomeSuccess2 = Types.TransactionSummary { Types.tsSender = Just exampleAccountAddr1, @@ -125,7 +125,7 @@ outcomeSuccess2 = Types.tsIndex = 0 } -outcomeFailure :: Types.TransactionSummary +outcomeFailure :: Types.SupplementedTransactionSummary outcomeFailure = Types.TransactionSummary { Types.tsSender = Just exampleAccountAddr1, From b91aa0f64c338f97e011fa78ee509fa962d53045 Mon Sep 17 00:00:00 2001 From: Thomas Dinsdale-Young Date: Tue, 3 Dec 2024 11:24:31 +0100 Subject: [PATCH 3/3] Update base after merge. --- deps/concordium-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/concordium-base b/deps/concordium-base index a243440d..bbccabff 160000 --- a/deps/concordium-base +++ b/deps/concordium-base @@ -1 +1 @@ -Subproject commit a243440d6847bc0e334f6581fe308e7c851c07d6 +Subproject commit bbccabff8d521698a7975d7b266a438a9df1d131