Skip to content

Commit 3daa062

Browse files
committed
change uint64 to upper case
1 parent 5f1712b commit 3daa062

9 files changed

Lines changed: 24 additions & 24 deletions

File tree

src/lean_spec/subspecs/chain/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pydantic import BaseModel, ConfigDict
99
from typing_extensions import Final
1010

11-
from lean_spec.types import BasisPoint, uint64
11+
from lean_spec.types import BasisPoint, Uint64
1212

1313
# --- Time Parameters ---
1414

@@ -73,15 +73,15 @@ class _ChainConfig(BaseModel):
7373
model_config = ConfigDict(frozen=True, extra="forbid")
7474

7575
# Time Parameters
76-
slot_duration_ms: uint64
76+
slot_duration_ms: Uint64
7777
proposer_reorg_cutoff_bps: BasisPoint
7878
vote_due_bps: BasisPoint
7979
fast_confirm_due_bps: BasisPoint
8080
view_freeze_cutoff_bps: BasisPoint
8181

8282
# State List Length Presets
83-
historical_roots_limit: uint64
84-
validator_registry_limit: uint64
83+
historical_roots_limit: Uint64
84+
validator_registry_limit: Uint64
8585

8686

8787
# The Devnet Chain Configuration.

src/lean_spec/subspecs/containers/block.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pydantic import Field
44
from typing_extensions import Annotated
55

6-
from lean_spec.types import Bytes32, StrictBaseModel, uint64
6+
from lean_spec.types import Bytes32, StrictBaseModel, Uint64
77

88
from ..chain import config
99
from .vote import Vote
@@ -26,10 +26,10 @@ class BlockBody(StrictBaseModel):
2626
class BlockHeader(StrictBaseModel):
2727
"""The header of a block, containing metadata."""
2828

29-
slot: uint64
29+
slot: Uint64
3030
"""The slot in which the block was proposed."""
3131

32-
proposer_index: uint64
32+
proposer_index: Uint64
3333
"""The index of the validator that proposed the block."""
3434

3535
parent_root: Bytes32
@@ -45,10 +45,10 @@ class BlockHeader(StrictBaseModel):
4545
class Block(StrictBaseModel):
4646
"""Represents a single block in the chain."""
4747

48-
slot: uint64
48+
slot: Uint64
4949
"""The slot in which the block was proposed."""
5050

51-
proposer_index: uint64
51+
proposer_index: Uint64
5252
"""The index of the validator that proposed the block."""
5353

5454
parent_root: Bytes32
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Checkpoint Container."""
22

3-
from lean_spec.types import Bytes32, StrictBaseModel, uint64
3+
from lean_spec.types import Bytes32, StrictBaseModel, Uint64
44

55

66
class Checkpoint(StrictBaseModel):
@@ -9,5 +9,5 @@ class Checkpoint(StrictBaseModel):
99
root: Bytes32
1010
"""The root hash of the checkpoint's block."""
1111

12-
slot: uint64
12+
slot: Uint64
1313
"""The slot number of the checkpoint's block."""
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Consensus Configuration Container."""
22

3-
from lean_spec.types import StrictBaseModel, uint64
3+
from lean_spec.types import StrictBaseModel, Uint64
44

55

66
class Config(StrictBaseModel):
@@ -11,8 +11,8 @@ class Config(StrictBaseModel):
1111
in the absence of more complex mechanisms like RANDAO or deposits.
1212
"""
1313

14-
num_validators: uint64
14+
num_validators: Uint64
1515
"""The total number of validators in the network."""
1616

17-
genesis_time: uint64
17+
genesis_time: Uint64
1818
"""The timestamp of the genesis block."""

src/lean_spec/subspecs/containers/state.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing_extensions import Annotated
55

66
from lean_spec.subspecs.chain import DEVNET_CONFIG
7-
from lean_spec.types import Bytes32, StrictBaseModel, uint64
7+
from lean_spec.types import Bytes32, StrictBaseModel, Uint64
88

99
from .block import BlockHeader
1010
from .checkpoint import Checkpoint
@@ -19,7 +19,7 @@ class State(StrictBaseModel):
1919
"""The chain's configuration parameters."""
2020

2121
# Slot and block tracking
22-
slot: uint64
22+
slot: Uint64
2323
"""The current slot number."""
2424

2525
latest_block_header: BlockHeader

src/lean_spec/subspecs/containers/vote.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
"""Vote Containers."""
22

3-
from lean_spec.types import Bytes32, StrictBaseModel, uint64
3+
from lean_spec.types import Bytes32, StrictBaseModel, Uint64
44

55
from .checkpoint import Checkpoint
66

77

88
class Vote(StrictBaseModel):
99
"""Represents a validator's vote for chain head."""
1010

11-
validator_id: uint64
11+
validator_id: Uint64
1212
"""The index of the voting validator."""
1313

14-
slot: uint64
14+
slot: Uint64
1515
"""The slot for which this vote is cast."""
1616

1717
head: Checkpoint

src/lean_spec/types/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
from .base import StrictBaseModel
44
from .basispt import BasisPoint
55
from .hash import Bytes32
6-
from .uint64 import uint64
6+
from .uint64 import Uint64
77

88
__all__ = [
9-
"uint64",
9+
"Uint64",
1010
"BasisPoint",
1111
"Bytes32",
1212
"StrictBaseModel",

src/lean_spec/types/basispt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
from pydantic import Field
44
from typing_extensions import Annotated
55

6-
from ..types.uint64 import uint64
6+
from ..types.uint64 import Uint64
77

88
BasisPoint = Annotated[
9-
uint64,
9+
Uint64,
1010
Field(le=10000, description="A value in basis points (1/10000)."),
1111
]
1212
"""

src/lean_spec/types/uint64.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
UINT64_MAX = 2**64
77
"""The maximum value for an unsigned 64-bit integer (2**64)."""
88

9-
uint64 = Annotated[int, Field(ge=0, lt=UINT64_MAX)]
9+
Uint64 = Annotated[int, Field(ge=0, lt=UINT64_MAX)]
1010
"""A type alias to represent a uint64."""

0 commit comments

Comments
 (0)