Skip to content

Commit eb9f329

Browse files
committed
generate-subnet-config: set attestation_committee_count to number of subnets
Each subnet maps to one attestation committee. The expanded config now automatically sets config.attestation_committee_count = N so clients receive the correct committee count via --attestation-committee-count and partition themselves accordingly.
1 parent 15ad47c commit eb9f329

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

generate-subnet-config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ def expand(template: dict, n_subnets: int) -> dict:
9696
_validate_template(validators)
9797

9898
result = copy.deepcopy(template)
99+
100+
# attestation_committee_count must equal the number of subnets so that
101+
# each client correctly partitions itself into N separate committees.
102+
if "config" not in result:
103+
result["config"] = {}
104+
result["config"]["attestation_committee_count"] = n_subnets
105+
99106
expanded: list[dict] = []
100107

101108
for i in range(n_subnets):
@@ -170,6 +177,7 @@ def main() -> None:
170177
print(
171178
f"Generated {output_path}:\n"
172179
f" {n_clients} client(s) × {n_subnets} subnet(s) = {n_nodes} nodes\n"
180+
f" config.attestation_committee_count = {n_subnets}\n"
173181
f" Each server contributes exactly 1 node per subnet (no intra-server subnet sharing)"
174182
)
175183

0 commit comments

Comments
 (0)