singular-registry
LicenseApache-2.0
Safe HaskellNone
LanguageGHC2021

Singular.State.Refusal

Description

A builder returns a Refusal instead of a transaction it knows the Singular state validator, the application's validator or the ledger would refuse. Every refusal names a fact about the chain or the arguments that the caller can act on. A failed read of the chain is not a refusal: it throws, as the other builders' reads do.

Synopsis

Documentation

data Refusal Source #

Why a builder declined.

Constructors

PayerHasNoFunding

The payer's address holds no ADA-only output for fee and collateral.

PayerIsNotAKey

The payer's payment credential is a script, which cannot sign.

SeedNotAtPayer TxIn

The seed is not an unspent output of the payer.

ReferenceScriptMissing TxIn

The reference output named for a script is not on the chain.

ReferenceScriptMismatch TxIn (Maybe ScriptHash) ScriptHash

The reference output carries no script, or another one: the hash it carries, when it carries a script, and the expected hash.

NoRegistryState RegistryIdentity

No output holds the state token of the registry.

AmbiguousRegistryState Int

Several outputs hold the state token; the count found.

NotARegistryState TxIn

The output that holds the state token is not a state of the registry.

TrieRefused TrieFailure

The registry's public history cannot be replayed into its trie.

NothingToFold

There is nothing to fold.

DuplicateRequest TxIn

The same pending registration is named twice.

DuplicateKey ByteString

Two pending registrations name the same key.

KeyAlreadyRegistered ByteString

The key is already registered: its leaf is not unknown.

KeyNotActive ByteString

A termination can only consume an active key.

PendingNotFound TxIn

The output to fold is not on the chain.

NotAPendingRegistration TxIn

The output is not a pending registration the application decodes and authenticates: it holds no approval, or another, than the registration it carries commits.

PendingOfAnotherRegistry TxIn

The pending registration belongs to another registry.

DepositBelowHolding TxIn Coin Coin

The deposit is below the minimum ADA of the holding it commits, so no fold could ever deliver it; the deposit and that minimum.

ProcessingWindowClosed

No validity interval at the tip ends before every processing deadline.

BuildFailed Text

The transaction builder itself failed; its message.

CapacityExceeded CapacityLimit

The actual built transaction exceeds this protocol capacity.

Instances

Instances details
Show Refusal Source # 
Instance details

Defined in Singular.State.Refusal

Methods

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

show :: Refusal -> String Source #

showList :: [Refusal] -> ShowS Source #

Eq Refusal Source # 
Instance details

Defined in Singular.State.Refusal

Methods

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

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

data CapacityLimit Source #

Actual work or bytes exceeding the observed protocol limit: used, limit.

Constructors

TransactionSize Integer Integer 
ExecutionMemory Integer Integer 
ExecutionSteps Integer Integer 

Instances

Instances details
Show CapacityLimit Source # 
Instance details

Defined in Singular.State.Refusal

Methods

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

show :: CapacityLimit -> String Source #

showList :: [CapacityLimit] -> ShowS Source #

Eq CapacityLimit Source # 
Instance details

Defined in Singular.State.Refusal

Methods

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

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

capacityMessage :: CapacityLimit -> Text Source #

Name the actual protocol capacity, measured work and limit in plain text.