| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Conformance.Receipt
Description
Validated run receipts are the only source of execution credit.
Synopsis
- data Outcome
- data Verdict
- data RefusalInfo = RefusalInfo {
- refusalScript :: !Text
- refusalReason :: !Text
- refusalPhase :: !Text
- refusalHashes :: ![Text]
- refusalBranch :: !(Maybe Text)
- refusalLimit :: !(Maybe Text)
- refusalReplay :: !(Maybe [ReplayEvidence])
- data Receipt = Receipt {
- receiptRow :: !Text
- receiptOutcome :: !Outcome
- receiptVerdict :: !Verdict
- receiptTransactions :: ![Text]
- receiptRefusal :: !(Maybe RefusalInfo)
- receiptMem :: !(Maybe Integer)
- receiptCpu :: !(Maybe Integer)
- receiptTxSize :: !(Maybe Integer)
- receiptBase :: !Text
- receiptNode :: !Text
- receiptBlueprint :: !Text
- receiptVenue :: !Text
- receiptRejected :: !(Maybe Text)
- receiptDirty :: !Bool
- receiptReplayCorrespondence :: !(Maybe ReplayCorrespondence)
- maxReceiptBytes :: Int
- checkReceiptSize :: Receipt -> Either String ()
- loadReceipts :: FilePath -> IO (Either String [Receipt])
- writeReceiptFile :: FilePath -> Receipt -> IO ()
- currentBase :: IO (Maybe Text)
Documentation
Instances
| FromJSON Outcome Source # | |
Defined in Conformance.Receipt | |
| ToJSON Outcome Source # | |
| Show Outcome Source # | |
Defined in Conformance.Receipt | |
| Eq Outcome Source # | |
Defined in Conformance.Receipt | |
Instances
| FromJSON Verdict Source # | |
Defined in Conformance.Receipt | |
| ToJSON Verdict Source # | |
| Bounded Verdict Source # | |
Defined in Conformance.Receipt | |
| Enum Verdict Source # | |
Defined in Conformance.Receipt Methods succ :: Verdict -> Verdict Source # pred :: Verdict -> Verdict Source # toEnum :: Int -> Verdict Source # fromEnum :: Verdict -> Int Source # enumFrom :: Verdict -> [Verdict] Source # enumFromThen :: Verdict -> Verdict -> [Verdict] Source # enumFromTo :: Verdict -> Verdict -> [Verdict] Source # enumFromThenTo :: Verdict -> Verdict -> Verdict -> [Verdict] Source # | |
| Show Verdict Source # | |
Defined in Conformance.Receipt | |
| Eq Verdict Source # | |
Defined in Conformance.Receipt | |
data RefusalInfo Source #
The refusal attribution for a refused row: the scripts that
refused — one role, or several +-joined roles in ledger-reported
order when a malformed transaction trips two validators at once —
and the node's phase-2 reason verbatim.
Constructors
| RefusalInfo | |
Fields
| |
Instances
| FromJSON RefusalInfo Source # | |
Defined in Conformance.Receipt Methods parseJSON :: Value -> Parser RefusalInfo parseJSONList :: Value -> Parser [RefusalInfo] omittedField :: Maybe RefusalInfo | |
| ToJSON RefusalInfo Source # | |
Defined in Conformance.Receipt Methods toJSON :: RefusalInfo -> Value toEncoding :: RefusalInfo -> Encoding toJSONList :: [RefusalInfo] -> Value toEncodingList :: [RefusalInfo] -> Encoding omitField :: RefusalInfo -> Bool | |
| Show RefusalInfo Source # | |
Defined in Conformance.Receipt Methods showsPrec :: Int -> RefusalInfo -> ShowS Source # show :: RefusalInfo -> String Source # showList :: [RefusalInfo] -> ShowS Source # | |
| Eq RefusalInfo Source # | |
Defined in Conformance.Receipt Methods (==) :: RefusalInfo -> RefusalInfo -> Bool Source # (/=) :: RefusalInfo -> RefusalInfo -> Bool Source # | |
Constructors
| Receipt | |
Fields
| |
Instances
| FromJSON Receipt Source # | |
Defined in Conformance.Receipt | |
| ToJSON Receipt Source # | |
| Show Receipt Source # | |
Defined in Conformance.Receipt | |
| Eq Receipt Source # | |
Defined in Conformance.Receipt | |
maxReceiptBytes :: Int Source #
The public receipt bound remains unchanged.
checkReceiptSize :: Receipt -> Either String () Source #
loadReceipts :: FilePath -> IO (Either String [Receipt]) Source #
Read and validate every receipt; missing directories and duplicate rows fail closed.
writeReceiptFile :: FilePath -> Receipt -> IO () Source #
The caller owns the receipt directory and its lifetime.
currentBase :: IO (Maybe Text) Source #