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
46 changes: 16 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -689,49 +689,35 @@ network_params:


# BPO
# BPO1 epoch (default 18446744073709551615)
# BPO1-5 epoch (default 18446744073709551615)
bpo_1_epoch: 18446744073709551615
# Maximum number of blobs per block for BPO1 (default 12)
bpo_1_max_blobs: 12
# Target number of blobs per block for BPO1 (default 9)
bpo_1_target_blobs: 9
# Base fee update fraction for BPO1 (default 0)
# Maximum number of blobs per block for BPO1-5
# If only max is set, target is auto-calculated as 2/3 of max
# If only target is set, max is auto-calculated as 3/2 of target
bpo_1_max_blobs: 0
# Target number of blobs per block for BPO1-5
bpo_1_target_blobs: 0
# Base fee update fraction for BPO1-5 (default 0)
bpo_1_base_fee_update_fraction: 0

# BPO2 epoch (default 18446744073709551615)
bpo_2_epoch: 18446744073709551615
# Maximum number of blobs per block for BPO2 (default 12)
bpo_2_max_blobs: 12
# Target number of blobs per block for BPO2 (default 9)
bpo_2_target_blobs: 9
# Base fee update fraction for BPO2 (default 0)
bpo_2_max_blobs: 0
bpo_2_target_blobs: 0
bpo_2_base_fee_update_fraction: 0

# BPO3 epoch (default 18446744073709551615)
bpo_3_epoch: 18446744073709551615
# Maximum number of blobs per block for BPO3 (default 12)
bpo_3_max_blobs: 12
# Target number of blobs per block for BPO3 (default 9)
bpo_3_target_blobs: 9
# Base fee update fraction for BPO3 (default 0)
bpo_3_max_blobs: 0
bpo_3_target_blobs: 0
bpo_3_base_fee_update_fraction: 0

# BPO4 epoch (default 18446744073709551615)
bpo_4_epoch: 18446744073709551615
# Maximum number of blobs per block for BPO4 (default 12)
bpo_4_max_blobs: 12
# Target number of blobs per block for BPO4 (default 9)
bpo_4_target_blobs: 9
# Base fee update fraction for BPO4 (default 0)
bpo_4_max_blobs: 0
bpo_4_target_blobs: 0
bpo_4_base_fee_update_fraction: 0

# BPO5 epoch (default 18446744073709551615)
bpo_5_epoch: 18446744073709551615
# Maximum number of blobs per block for BPO5 (default 12)
bpo_5_max_blobs: 12
# Target number of blobs per block for BPO5 (default 9)
bpo_5_target_blobs: 9
# Base fee update fraction for BPO5 (default 0)
bpo_5_max_blobs: 0
bpo_5_target_blobs: 0
bpo_5_base_fee_update_fraction: 0

# Withdrawal type - available options (0x00, 0x01, 0x02)
Expand Down
61 changes: 41 additions & 20 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,27 @@ def parse_network_params(plan, input_args):
for sub_attr in input_args["network_params"]:
sub_value = input_args["network_params"][sub_attr]
result["network_params"][sub_attr] = sub_value

# Apply 2/3 ratio for BPO max and target blobs
for bpo_num in range(1, 6): # BPO 1 through 5
max_key = "bpo_{}_max_blobs".format(bpo_num)
target_key = "bpo_{}_target_blobs".format(bpo_num)

# If only max is set (non-zero), calculate target as 2/3 of max (rounded)
if result["network_params"].get(max_key) and not result[
"network_params"
].get(target_key):
result["network_params"][target_key] = int(
result["network_params"][max_key] * 2.0 / 3.0 + 0.5
)
# If only target is set (non-zero), calculate max as target * 3/2 (rounded)
elif result["network_params"].get(target_key) and not result[
"network_params"
].get(max_key):
result["network_params"][max_key] = int(
result["network_params"][target_key] * 3.0 / 2.0 + 0.5
)
# If both are set or both are 0, don't override
elif attr == "participants":
participants = []
for participant in input_args["participants"]:
Expand Down Expand Up @@ -1116,24 +1137,24 @@ def default_network_params():
"perfect_peerdas_enabled": False,
"gas_limit": 0,
"bpo_1_epoch": 18446744073709551615,
"bpo_1_max_blobs": 12,
"bpo_1_target_blobs": 9,
"bpo_1_max_blobs": 0,
"bpo_1_target_blobs": 0,
"bpo_1_base_fee_update_fraction": 0,
"bpo_2_epoch": 18446744073709551615,
"bpo_2_max_blobs": 12,
"bpo_2_target_blobs": 9,
"bpo_2_max_blobs": 0,
"bpo_2_target_blobs": 0,
"bpo_2_base_fee_update_fraction": 0,
"bpo_3_epoch": 18446744073709551615,
"bpo_3_max_blobs": 12,
"bpo_3_target_blobs": 9,
"bpo_3_max_blobs": 0,
"bpo_3_target_blobs": 0,
"bpo_3_base_fee_update_fraction": 0,
"bpo_4_epoch": 18446744073709551615,
"bpo_4_max_blobs": 12,
"bpo_4_target_blobs": 9,
"bpo_4_max_blobs": 0,
"bpo_4_target_blobs": 0,
"bpo_4_base_fee_update_fraction": 0,
"bpo_5_epoch": 18446744073709551615,
"bpo_5_max_blobs": 12,
"bpo_5_target_blobs": 9,
"bpo_5_max_blobs": 0,
"bpo_5_target_blobs": 0,
"bpo_5_base_fee_update_fraction": 0,
"withdrawal_type": "0x00",
"withdrawal_address": "0x8943545177806ED17B9F23F0a21ee5948eCaa776",
Expand Down Expand Up @@ -1184,24 +1205,24 @@ def default_minimal_network_params():
"perfect_peerdas_enabled": False,
"gas_limit": 0,
"bpo_1_epoch": 18446744073709551615,
"bpo_1_max_blobs": 12,
"bpo_1_target_blobs": 9,
"bpo_1_max_blobs": 0,
"bpo_1_target_blobs": 0,
"bpo_1_base_fee_update_fraction": 0,
"bpo_2_epoch": 18446744073709551615,
"bpo_2_max_blobs": 12,
"bpo_2_target_blobs": 9,
"bpo_2_max_blobs": 0,
"bpo_2_target_blobs": 0,
"bpo_2_base_fee_update_fraction": 0,
"bpo_3_epoch": 18446744073709551615,
"bpo_3_max_blobs": 12,
"bpo_3_target_blobs": 9,
"bpo_3_max_blobs": 0,
"bpo_3_target_blobs": 0,
"bpo_3_base_fee_update_fraction": 0,
"bpo_4_epoch": 18446744073709551615,
"bpo_4_max_blobs": 12,
"bpo_4_target_blobs": 9,
"bpo_4_max_blobs": 0,
"bpo_4_target_blobs": 0,
"bpo_4_base_fee_update_fraction": 0,
"bpo_5_epoch": 18446744073709551615,
"bpo_5_max_blobs": 12,
"bpo_5_target_blobs": 9,
"bpo_5_max_blobs": 0,
"bpo_5_target_blobs": 0,
"bpo_5_base_fee_update_fraction": 0,
"withdrawal_type": "0x00",
"withdrawal_address": "0x8943545177806ED17B9F23F0a21ee5948eCaa776",
Expand Down