conformance
Safe HaskellNone
LanguageGHC2021

Conformance.Receipt

Description

Validated run receipts are the only source of execution credit.

Synopsis

Documentation

data Outcome Source #

Constructors

Accepted 
Refused 

Instances

Instances details
FromJSON Outcome Source # 
Instance details

Defined in Conformance.Receipt

Methods

parseJSON :: Value -> Parser Outcome

parseJSONList :: Value -> Parser [Outcome]

omittedField :: Maybe Outcome

ToJSON Outcome Source # 
Instance details

Defined in Conformance.Receipt

Methods

toJSON :: Outcome -> Value

toEncoding :: Outcome -> Encoding

toJSONList :: [Outcome] -> Value

toEncodingList :: [Outcome] -> Encoding

omitField :: Outcome -> Bool

Show Outcome Source # 
Instance details

Defined in Conformance.Receipt

Methods

showsPrec :: Int -> Outcome -> ShowS Source #

show :: Outcome -> String Source #

showList :: [Outcome] -> ShowS Source #

Eq Outcome Source # 
Instance details

Defined in Conformance.Receipt

Methods

(==) :: Outcome -> Outcome -> Bool Source #

(/=) :: Outcome -> Outcome -> Bool Source #

data Verdict Source #

Instances

Instances details
FromJSON Verdict Source # 
Instance details

Defined in Conformance.Receipt

Methods

parseJSON :: Value -> Parser Verdict

parseJSONList :: Value -> Parser [Verdict]

omittedField :: Maybe Verdict

ToJSON Verdict Source # 
Instance details

Defined in Conformance.Receipt

Methods

toJSON :: Verdict -> Value

toEncoding :: Verdict -> Encoding

toJSONList :: [Verdict] -> Value

toEncodingList :: [Verdict] -> Encoding

omitField :: Verdict -> Bool

Bounded Verdict Source # 
Instance details

Defined in Conformance.Receipt

Methods

minBound :: Verdict Source #

maxBound :: Verdict Source #

Enum Verdict Source # 
Instance details

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 # 
Instance details

Defined in Conformance.Receipt

Methods

showsPrec :: Int -> Verdict -> ShowS Source #

show :: Verdict -> String Source #

showList :: [Verdict] -> ShowS Source #

Eq Verdict Source # 
Instance details

Defined in Conformance.Receipt

Methods

(==) :: Verdict -> Verdict -> Bool Source #

(/=) :: Verdict -> Verdict -> Bool Source #

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

  • refusalScript :: !Text
     
  • refusalReason :: !Text
     
  • refusalPhase :: !Text

    observed phase (phase-2 for script-execution failures)

  • refusalHashes :: ![Text]

    extracted failure script hashes (structured attribution)

  • refusalBranch :: !(Maybe Text)

    named validator branch, when the compiled trace exposes one; Nothing states explicitly that none is available (never infer a branch name from the intended property)

  • refusalLimit :: !(Maybe Text)

    explicit attribution limit when no branch is available

  • refusalReplay :: !(Maybe [ReplayEvidence])

    the traced replay of each failing purpose of the refused transaction (absent on receipts written before it)

Instances

Instances details
FromJSON RefusalInfo Source # 
Instance details

Defined in Conformance.Receipt

Methods

parseJSON :: Value -> Parser RefusalInfo

parseJSONList :: Value -> Parser [RefusalInfo]

omittedField :: Maybe RefusalInfo

ToJSON RefusalInfo Source # 
Instance details

Defined in Conformance.Receipt

Methods

toJSON :: RefusalInfo -> Value

toEncoding :: RefusalInfo -> Encoding

toJSONList :: [RefusalInfo] -> Value

toEncodingList :: [RefusalInfo] -> Encoding

omitField :: RefusalInfo -> Bool

Show RefusalInfo Source # 
Instance details

Defined in Conformance.Receipt

Methods

showsPrec :: Int -> RefusalInfo -> ShowS Source #

show :: RefusalInfo -> String Source #

showList :: [RefusalInfo] -> ShowS Source #

Eq RefusalInfo Source # 
Instance details

Defined in Conformance.Receipt

Methods

(==) :: RefusalInfo -> RefusalInfo -> Bool Source #

(/=) :: RefusalInfo -> RefusalInfo -> Bool Source #

data Receipt Source #

Constructors

Receipt 

Fields

Instances

Instances details
FromJSON Receipt Source # 
Instance details

Defined in Conformance.Receipt

Methods

parseJSON :: Value -> Parser Receipt

parseJSONList :: Value -> Parser [Receipt]

omittedField :: Maybe Receipt

ToJSON Receipt Source # 
Instance details

Defined in Conformance.Receipt

Methods

toJSON :: Receipt -> Value

toEncoding :: Receipt -> Encoding

toJSONList :: [Receipt] -> Value

toEncodingList :: [Receipt] -> Encoding

omitField :: Receipt -> Bool

Show Receipt Source # 
Instance details

Defined in Conformance.Receipt

Methods

showsPrec :: Int -> Receipt -> ShowS Source #

show :: Receipt -> String Source #

showList :: [Receipt] -> ShowS Source #

Eq Receipt Source # 
Instance details

Defined in Conformance.Receipt

Methods

(==) :: Receipt -> Receipt -> Bool Source #

(/=) :: Receipt -> Receipt -> Bool Source #

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 #