PoolVotingThresholds
- class cometa.protocol_params.pool_voting_thresholds.PoolVotingThresholds(ptr)[source]
Bases:
objectVoting thresholds for stake pool operators (SPOs) in governance actions.
Different governance actions have different ratification requirements. These thresholds specify the percentage of stake held by all stake pools that must be met by the SPOs who vote Yes for approval.
- classmethod new(motion_no_confidence, committee_normal, committee_no_confidence, hard_fork_initiation, security_relevant_param)[source]
Creates a new PoolVotingThresholds instance.
- Parameters:
motion_no_confidence (UnitInterval) – Threshold for motion of no-confidence.
committee_normal (UnitInterval) – Threshold for electing committee in confidence state.
committee_no_confidence (UnitInterval) – Threshold for electing committee in no-confidence state.
hard_fork_initiation (UnitInterval) – Threshold for hard fork initiation.
security_relevant_param (UnitInterval) – Threshold for security-relevant parameter changes.
- Returns:
A new PoolVotingThresholds instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes PoolVotingThresholds from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the thresholds data.
- Returns:
A new PoolVotingThresholds deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the thresholds to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- property motion_no_confidence: UnitInterval
Threshold for motion of no-confidence.
- property committee_normal: UnitInterval
Threshold for electing committee when in confidence state.
- property committee_no_confidence: UnitInterval
Threshold for electing committee when in no-confidence state.
- property hard_fork_initiation: UnitInterval
Threshold for hard fork initiation.
- property security_relevant_param: UnitInterval
Threshold for security-relevant parameter changes.
- to_cip116_json(writer)[source]
Serializes this pool voting thresholds to CIP-116 compliant JSON.
- Parameters:
writer (JsonWriter) – The JsonWriter to write the JSON to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None