singular-registry
Safe HaskellNone
LanguageGHC2021

Singular.Registry.Lifecycle

Description

Funding and evaluation for the public-node lifecycle. The devnet row suites keep their own fixtures; these helpers never submit a refusal probe.

Synopsis

Documentation

lifecycleRequested :: Network -> [String] -> Bool Source #

Public external nodes use the lifecycle automatically: a chain point on a network other than the factory devnet (network magic 42). The explicit flag also exercises that path on the devnet.

protocolFeeReserve :: PParams ConwayEra -> [(TxIn, TxOut ConwayEra)] -> Coin Source #

A funding allowance, not the fee charged: one maximum-size transaction, the live aggregate execution limit, and the actual reference scripts. Each submitted transaction is subsequently evaluated and balanced exactly.

minimumCoin :: PParams ConwayEra -> TxOut ConwayEra -> Coin Source #

Ten percent above the live minimum, recomputed with the final coin width.

fundedOutput :: PParams ConwayEra -> [(TxIn, TxOut ConwayEra)] -> Addr -> Coin -> TxOut ConwayEra Source #

Only the change and live fee allowance are added to actual deposits.

collateralOutput :: PParams ConwayEra -> [(TxIn, TxOut ConwayEra)] -> Addr -> TxOut ConwayEra Source #

requestLockedCoin :: PParams ConwayEra -> CageConfig -> TokenId -> Addr -> ByteString -> Edge -> Integer -> Coin Source #

The lovelace one request output must lock: the tip plus the deposit the fold returns. Named for what it locks, not for the datum field, which is the deposit alone (#183).

sizedOutput :: Bool -> PParams ConwayEra -> TxOut ConwayEra -> TxOut ConwayEra Source #

verifyLifecycleBudget :: Bool -> PParams ConwayEra -> ConwayTx -> IO () Source #

Connected-fold builders already balance node-evaluated budgets. Check their aggregate before signing without changing semantic refund outputs.

fundingRequirement :: Addr -> PParams ConwayEra -> [TxOut ConwayEra] -> Coin Source #

fundLifecycle :: Wallet -> Capabilities NoWitness IO -> [TxOut ConwayEra] -> IO [(TxIn, TxOut ConwayEra)] Source #

Fund exactly the requested actors, then return the confirmed output references.

fundingView :: [TxIn] -> Session NoWitness IO -> Session NoWitness IO Source #

Keep request funding away from references and inputs reserved for later steps.

checkExecutionLimit :: ExUnits -> [ExUnits] -> Either String ExUnits Source #

prepareLifecycleTx :: Bool -> Session NoWitness IO -> [(TxIn, TxOut ConwayEra)] -> Int -> ConwayTx -> IO ConwayTx Source #

Evaluate before signing, replace every declared budget with the node's measured cost, and charge the actual fee from the final change output only. Re-evaluate the final fee/body until both budgets and fee are stable.