Skip to content

Commit a707172

Browse files
committed
add pragueTime
1 parent 6895af0 commit a707172

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

geth/genesis.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
"target": 3,
2323
"max": 6,
2424
"baseFeeUpdateFraction": 3338477
25+
},
26+
"prague": {
27+
"target": 6,
28+
"max": 9,
29+
"baseFeeUpdateFraction": 5007716
2530
}
2631
}
2732

geth/utils/validation.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ def validate_geth_kwargs(geth_kwargs: GethKwargsTypedDict) -> None:
7272
raise PyGethValueError(f"error while validating geth_kwargs: {e}")
7373

7474

75-
class DefaultBlobSchedule(BaseModel):
76-
cancun: dict[str, Any] = {
77-
"target": 3,
78-
"max": 6,
79-
"baseFeeUpdateFraction": 3338477,
80-
}
81-
82-
8375
class GenesisDataConfig(BaseModel):
8476
chainId: int = 0
8577
ethash: dict[str, Any] = {} # so that geth treats config as PoW -> PoS transition
@@ -103,15 +95,22 @@ class GenesisDataConfig(BaseModel):
10395
# post-merge, timestamp is used for network transitions
10496
shanghaiTime: int = 0
10597
cancunTime: int = 0
98+
pragueTime: int = 0
10699
# blobs
107-
blobSchedule: dict[str, Any] = DefaultBlobSchedule().model_dump()
100+
blobSchedule: dict[str, Any] = {}
108101

109102
@model_validator(mode="after")
110103
def check_blob_schedule_required(
111104
self,
112105
) -> GenesisDataConfig:
113106
if self.cancunTime > 0 and self.blobSchedule.get("cancun") is None:
114-
raise PyGethValueError("blobSchedule is required when cancunTime is set")
107+
raise PyGethValueError(
108+
"blobSchedule 'cancun' value is required when cancunTime is set"
109+
)
110+
if self.pragueTime > 0 and self.blobSchedule.get("prague") is None:
111+
raise PyGethValueError(
112+
"blobSchedule 'prague' value is required when pragueTime is set"
113+
)
115114
return self
116115

117116

newsfragments/251.feature.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Adds support for geth ``v1.15.0``, ``v1.15.1``, ``v1.15.2``, and ``v1.15.3``, and add new ``blobSchedule`` field to genesis data config.
1+
Adds support for geth ``v1.15.0`` through ``v1.15.4``, add new fields ``blobSchedule`` and ``pragueTime`` to genesis data config.

0 commit comments

Comments
 (0)