cardano-wallet-core-2022.7.1: The Wallet Backend for a Cardano node.
Copyright © 2021 IOHK
License Apache-2.0
Safe Haskell None
Language Haskell2010

Cardano.Wallet.Primitive.Migration.Planning

Description

This module contains an algorithm for planning migrations at a high level.

It determines how to partition the UTxO set into entries of different types, and in which order to add entries to selections, in order to maximize the number of entries that can be successfully migrated.

Use createPlan to create a migration plan.

Synopsis

Migration planning

createPlan :: TxConstraints -> CategorizedUTxO input -> RewardWithdrawal -> MigrationPlan input Source #

Creates a migration plan for the given categorized UTxO set and reward withdrawal amount.

See MigrationPlan .

data MigrationPlan input Source #

Represents a plan for migrating a set of UTxO entries.

Use createPlan to create a migration plan.

Constructors

MigrationPlan

Fields

Instances

Instances details
Eq input => Eq ( MigrationPlan input) Source #
Instance details

Defined in Cardano.Wallet.Primitive.Migration.Planning

Show input => Show ( MigrationPlan input) Source #
Instance details

Defined in Cardano.Wallet.Primitive.Migration.Planning

Generic ( MigrationPlan input) Source #
Instance details

Defined in Cardano.Wallet.Primitive.Migration.Planning

Associated Types

type Rep ( MigrationPlan input) :: Type -> Type Source #

type Rep ( MigrationPlan input) Source #
Instance details

Defined in Cardano.Wallet.Primitive.Migration.Planning

type Rep ( MigrationPlan input) = D1 (' MetaData "MigrationPlan" "Cardano.Wallet.Primitive.Migration.Planning" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' False ) ( C1 (' MetaCons "MigrationPlan" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "selections") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [ Selection input]) :*: ( S1 (' MetaSel (' Just "unselected") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( CategorizedUTxO input)) :*: S1 (' MetaSel (' Just "totalFee") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Coin ))))

UTxO entry categorization

data UTxOEntryCategory Source #

Constructors

Supporter

A coin or bundle that is capable of paying for its own marginal fee and the base transaction fee.

Freerider

A coin or bundle that is not capable of paying for itself.

Ignorable

A coin that should not be added to a selection, because its value is lower than the marginal fee for an input.