Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
Attestations can be aggregated by common data to save space and bandwidth.
"""

from __future__ import annotations

from lean_spec.subspecs.xmss.aggregation import TypeOneMultiSignature
from lean_spec.subspecs.xmss.containers import Signature
from lean_spec.types import AggregationBits, Checkpoint, Container, Slot, ValidatorIndex
Expand Down
2 changes: 0 additions & 2 deletions src/lean_spec/forks/lstar/containers/block/types.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Block-specific SSZ types for the Lean Ethereum consensus specification."""

from __future__ import annotations

from lean_spec.subspecs.chain.config import VALIDATOR_REGISTRY_LIMIT
from lean_spec.types import SSZList

Expand Down
2 changes: 0 additions & 2 deletions src/lean_spec/forks/lstar/containers/state/state.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""State Container for the Lean Ethereum consensus specification."""

from __future__ import annotations

from lean_spec.forks.lstar.containers.block import BlockHeader
from lean_spec.forks.lstar.containers.config import Config
from lean_spec.forks.lstar.containers.state.types import (
Expand Down
8 changes: 4 additions & 4 deletions src/lean_spec/forks/lstar/containers/state/types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""State-specific SSZ types for the Lean Ethereum consensus specification."""

from __future__ import annotations
from typing import Self

from lean_spec.subspecs.chain.config import HISTORICAL_ROOTS_LIMIT, VALIDATOR_REGISTRY_LIMIT
from lean_spec.types import Boolean, Bytes32, Slot, SSZList
Expand Down Expand Up @@ -67,7 +67,7 @@ def with_justified(
finalized_slot: Slot,
target_slot: Slot,
value: Boolean,
) -> JustifiedSlots:
) -> Self:
"""
Return a new bitfield with the justification status updated.

Expand Down Expand Up @@ -112,7 +112,7 @@ def with_justified(

return self.model_copy(update={"data": new_data})

def extend_to_slot(self, finalized_slot: Slot, target_slot: Slot) -> JustifiedSlots:
def extend_to_slot(self, finalized_slot: Slot, target_slot: Slot) -> Self:
"""
Extend the tracking capacity to cover a new target slot.

Expand Down Expand Up @@ -147,7 +147,7 @@ def extend_to_slot(self, finalized_slot: Slot, target_slot: Slot) -> JustifiedSl
# We extend the existing data with False values to bridge the gap.
return self.model_copy(update={"data": list(self.data) + [Boolean(False)] * gap_size})

def shift_window(self, delta: int) -> JustifiedSlots:
def shift_window(self, delta: int) -> Self:
"""
Advance the tracking window by dropping slots that became finalized.

Expand Down
2 changes: 0 additions & 2 deletions src/lean_spec/forks/lstar/containers/validator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Validator container for the Lean Ethereum consensus specification."""

from __future__ import annotations

from lean_spec.subspecs.chain.config import VALIDATOR_REGISTRY_LIMIT
from lean_spec.subspecs.xmss.containers import PublicKey
from lean_spec.types import Bytes52, Container, SSZList, ValidatorIndex
Expand Down
2 changes: 0 additions & 2 deletions src/lean_spec/subspecs/xmss/rand.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Random data generator for the XMSS signature scheme."""

from __future__ import annotations

import secrets

from lean_spec.types import StrictBaseModel
Expand Down
Loading