Update
- class cometa.protocol_params.update.Update(ptr)[source]
Bases:
objectRepresents a protocol parameter update proposal.
An Update consists of proposed parameter updates from genesis delegates and the epoch in which the update should be applied.
This is part of the Shelley-era update mechanism.
- classmethod new(epoch, proposed_updates)[source]
Creates a new Update with the given epoch and proposed updates.
- Parameters:
epoch (int) – The epoch in which the update should be applied.
proposed_updates (ProposedParamUpdates) – The proposed parameter updates from genesis delegates.
- Returns:
A new Update instance.
- Raises:
CardanoError – If creation fails.
- Return type:
- classmethod from_cbor(reader)[source]
Deserializes Update from CBOR data.
- Parameters:
reader (CborReader) – A CborReader positioned at the update data.
- Returns:
A new Update deserialized from the CBOR data.
- Raises:
CardanoError – If deserialization fails.
- Return type:
- to_cbor(writer)[source]
Serializes the update to CBOR format.
- Parameters:
writer (CborWriter) – A CborWriter to write the serialized data to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None
- property epoch: int
The epoch in which the update should be applied.
- Returns:
The target epoch number.
- property proposed_parameters: ProposedParamUpdates
The proposed parameter updates from genesis delegates.
- Returns:
The ProposedParamUpdates containing the updates.
- to_cip116_json(writer)[source]
Serializes this object to CIP-116 compliant JSON.
- Parameters:
writer (JsonWriter) – The JsonWriter to write the JSON to.
- Raises:
CardanoError – If serialization fails.
- Return type:
None