jam.types.protocol.epoch module
Epoch-related protocol types for the JAM protocol.
- class jam.types.protocol.epoch.EpochMark(entropy: ByteArray32, tickets_entropy: ByteArray32, validators: ValidatorArray)[source]
-
Epoch mark structure.
- entropy: ByteArray32
- tickets_entropy: ByteArray32
- validators: ValidatorArray
- __init__(entropy: ByteArray32, tickets_entropy: ByteArray32, validators: ValidatorArray) None
Initialize the Codable.
- Parameters:
codec – Optional codec to use for encoding/decoding
enc_sequence – Optional function that returns sequence of fields to encode
- static decode_from(buffer: bytes | bytearray | memoryview, offset: int = 0) Tuple[T, int]
Decode from buffer. Must be implemented by subclasses or added via decorator.
- Parameters:
buffer – Buffer to decode from
offset – Starting position in buffer
- Returns:
The decoded value
Number of bytes read
- Return type:
Tuple containing