ProtocolParams

scalus.cardano.ledger.ProtocolParams
See theProtocolParams companion object
case class ProtocolParams(collateralPercentage: Long, committeeMaxTermLength: Long, committeeMinSize: Long, costModels: CostModels, dRepActivity: Long, dRepDeposit: Long, dRepVotingThresholds: DRepVotingThresholds, executionUnitPrices: ExUnitPrices, govActionDeposit: Long, govActionLifetime: Long, maxBlockBodySize: Long, maxBlockExecutionUnits: ExUnits, maxBlockHeaderSize: Long, maxCollateralInputs: Long, maxTxExecutionUnits: ExUnits, maxTxSize: Long, maxValueSize: Long, minFeeRefScriptCostPerByte: Long, minPoolCost: Long, monetaryExpansion: UnitInterval, poolPledgeInfluence: NonNegativeInterval, poolRetireMaxEpoch: Long, poolVotingThresholds: PoolVotingThresholds, protocolVersion: ProtocolVersion, stakeAddressDeposit: Long, stakePoolDeposit: Long, stakePoolTargetNum: Long, treasuryCut: UnitInterval, txFeeFixed: Long, txFeePerByte: Long, utxoCostPerByte: Long)

Protocol parameters for the Cardano blockchain of Babbage era Field names are taken from the cardano-cli query protocol-parameters output

monetaryExpansion (rho), treasuryCut (tau) and poolPledgeInfluence (a0) are exact rationals, as in the ledger (UnitInterval and NonNegativeInterval), because the reward calculation uses them exactly. spec [DM-16] to [DM-19]

Attributes

Note

These names are different from CIP-55, don't ask me why.

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(collateralPercentage: Long, committeeMaxTermLength: Long, committeeMinSize: Long, costModels: CostModels, dRepActivity: Long, dRepDeposit: Long, dRepVotingThresholds: DRepVotingThresholds, executionUnitPrices: ExUnitPrices, govActionDeposit: Long, govActionLifetime: Long, maxBlockBodySize: Long, maxBlockExecutionUnits: ExUnits, maxBlockHeaderSize: Long, maxCollateralInputs: Long, maxTxExecutionUnits: ExUnits, maxTxSize: Long, maxValueSize: Long, minFeeRefScriptCostPerByte: Long, minPoolCost: Long, monetaryExpansion: Double, poolPledgeInfluence: Double, poolRetireMaxEpoch: Long, poolVotingThresholds: PoolVotingThresholds, protocolVersion: ProtocolVersion, stakeAddressDeposit: Long, stakePoolDeposit: Long, stakePoolTargetNum: Long, treasuryCut: Double, txFeeFixed: Long, txFeePerByte: Long, utxoCostPerByte: Long)

The 1.4 constructor, with rho, a0 and tau as Double. Each converts to the shortest decimal that reads back as that Double, as the JSON readers do, so 0.003 is 3/1000. spec [DM-20a], D119

The 1.4 constructor, with rho, a0 and tau as Double. Each converts to the shortest decimal that reads back as that Double, as the JSON readers do, so 0.003 is 3/1000. spec [DM-20a], D119

Attributes

Throws
IllegalArgumentException

if rho or tau is not in [0, 1], or a0 is negative; the message names the field

Concrete methods

def copy(collateralPercentage: Long = ..., committeeMaxTermLength: Long = ..., committeeMinSize: Long = ..., costModels: CostModels = ..., dRepActivity: Long = ..., dRepDeposit: Long = ..., dRepVotingThresholds: DRepVotingThresholds = ..., executionUnitPrices: ExUnitPrices = ..., govActionDeposit: Long = ..., govActionLifetime: Long = ..., maxBlockBodySize: Long = ..., maxBlockExecutionUnits: ExUnits = ..., maxBlockHeaderSize: Long = ..., maxCollateralInputs: Long = ..., maxTxExecutionUnits: ExUnits = ..., maxTxSize: Long = ..., maxValueSize: Long = ..., minFeeRefScriptCostPerByte: Long = ..., minPoolCost: Long = ..., monetaryExpansion: UnitInterval = ..., poolPledgeInfluence: NonNegativeInterval = ..., poolRetireMaxEpoch: Long = ..., poolVotingThresholds: PoolVotingThresholds = ..., protocolVersion: ProtocolVersion = ..., stakeAddressDeposit: Long = ..., stakePoolDeposit: Long = ..., stakePoolTargetNum: Long = ..., treasuryCut: UnitInterval = ..., txFeeFixed: Long = ..., txFeePerByte: Long = ..., utxoCostPerByte: Long = ...): ProtocolParams

The copy of a case class, written out because the 1.4 copy below suppresses the synthetic one. D119

The copy of a case class, written out because the 1.4 copy below suppresses the synthetic one. D119

Attributes

def copy(collateralPercentage: Long, committeeMaxTermLength: Long, committeeMinSize: Long, costModels: CostModels, dRepActivity: Long, dRepDeposit: Long, dRepVotingThresholds: DRepVotingThresholds, executionUnitPrices: ExUnitPrices, govActionDeposit: Long, govActionLifetime: Long, maxBlockBodySize: Long, maxBlockExecutionUnits: ExUnits, maxBlockHeaderSize: Long, maxCollateralInputs: Long, maxTxExecutionUnits: ExUnits, maxTxSize: Long, maxValueSize: Long, minFeeRefScriptCostPerByte: Long, minPoolCost: Long, monetaryExpansion: Double, poolPledgeInfluence: Double, poolRetireMaxEpoch: Long, poolVotingThresholds: PoolVotingThresholds, protocolVersion: ProtocolVersion, stakeAddressDeposit: Long, stakePoolDeposit: Long, stakePoolTargetNum: Long, treasuryCut: Double, txFeeFixed: Long, txFeePerByte: Long, utxoCostPerByte: Long): ProtocolParams

The 1.4 copy, with rho, a0 and tau as Double, converted as the 1.4 constructor converts them. No defaults: only one overload may have them. D119

The 1.4 copy, with rho, a0 and tau as Double, converted as the 1.4 constructor converts them. No defaults: only one overload may have them. D119

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product