Skip to content

Commit b3bd85a

Browse files
fix: Support multiple sequencers: Add missing EL/CL labels [24/N] (#315)
**Description** These will be useful when we switch to label-based parsing in devnet SDK in the optimism monorepo
1 parent 339980c commit b3bd85a

5 files changed

Lines changed: 58 additions & 8 deletions

File tree

src/l2/participant/cl/input_parser.star

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def _parse(args, participant_name, network_id, registry, cl_kind):
6565
cl_params["labels"] = {
6666
"op.kind": cl_kind,
6767
"op.network.id": str(network_id),
68+
"op.network.participant.name": participant_name,
6869
"op.cl.type": cl_params["type"],
6970
}
7071

src/l2/participant/el/input_parser.star

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def _parse(args, participant_name, network_id, registry, el_kind):
6969
el_params["labels"] = {
7070
"op.kind": el_kind,
7171
"op.network.id": str(network_id),
72+
"op.network.participant.name": participant_name,
7273
"op.el.type": el_params["type"],
7374
}
7475

test/l2/participant/cl/launcher_test.star

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ def test_l2_participant_cl_launcher_hildr(plan):
9999
)
100100
expect.eq(
101101
service_config.labels,
102-
{"op.kind": "cl", "op.network.id": "2151908", "op.cl.type": "hildr"},
102+
{
103+
"op.kind": "cl",
104+
"op.network.id": "2151908",
105+
"op.network.participant.name": "node0",
106+
"op.cl.type": "hildr",
107+
},
103108
)
104109
expect.eq(
105110
service_config.files["/network-configs"].artifact_names,
@@ -216,7 +221,12 @@ def test_l2_participant_cl_launcher_kona_node(plan):
216221
)
217222
expect.eq(
218223
service_config.labels,
219-
{"op.kind": "cl", "op.network.id": "2151908", "op.cl.type": "kona-node"},
224+
{
225+
"op.kind": "cl",
226+
"op.network.id": "2151908",
227+
"op.network.participant.name": "node0",
228+
"op.cl.type": "kona-node",
229+
},
220230
)
221231
expect.eq(
222232
service_config.files["/network-configs"].artifact_names,
@@ -317,7 +327,12 @@ def test_l2_participant_cl_launcher_op_node(plan):
317327
)
318328
expect.eq(
319329
service_config.labels,
320-
{"op.kind": "cl", "op.network.id": "2151908", "op.cl.type": "op-node"},
330+
{
331+
"op.kind": "cl",
332+
"op.network.id": "2151908",
333+
"op.network.participant.name": "node0",
334+
"op.cl.type": "op-node",
335+
},
321336
)
322337
expect.eq(
323338
service_config.files["/network-configs"].artifact_names,

test/l2/participant/el/launcher_test.star

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ def test_l2_participant_el_launcher_op_besu(plan):
109109
)
110110
expect.eq(
111111
service_config.labels,
112-
{"op.kind": "el", "op.network.id": "2151908", "op.el.type": "op-besu"},
112+
{
113+
"op.kind": "el",
114+
"op.network.id": "2151908",
115+
"op.network.participant.name": "node0",
116+
"op.el.type": "op-besu",
117+
},
113118
)
114119
expect.eq(
115120
service_config.files["/network-configs"].artifact_names,
@@ -180,7 +185,12 @@ def test_l2_participant_el_launcher_op_erigon(plan):
180185
)
181186
expect.eq(
182187
service_config.labels,
183-
{"op.kind": "el", "op.network.id": "2151908", "op.el.type": "op-erigon"},
188+
{
189+
"op.kind": "el",
190+
"op.network.id": "2151908",
191+
"op.network.participant.name": "node0",
192+
"op.el.type": "op-erigon",
193+
},
184194
)
185195
expect.eq(
186196
service_config.files["/network-configs"].artifact_names,
@@ -251,7 +261,12 @@ def test_l2_participant_el_launcher_op_geth(plan):
251261
)
252262
expect.eq(
253263
service_config.labels,
254-
{"op.kind": "el", "op.network.id": "2151908", "op.el.type": "op-geth"},
264+
{
265+
"op.kind": "el",
266+
"op.network.id": "2151908",
267+
"op.network.participant.name": "node0",
268+
"op.el.type": "op-geth",
269+
},
255270
)
256271
expect.eq(
257272
service_config.files["/network-configs"].artifact_names,
@@ -341,7 +356,12 @@ def test_l2_participant_el_launcher_op_nethermind(plan):
341356
)
342357
expect.eq(
343358
service_config.labels,
344-
{"op.kind": "el", "op.network.id": "2151908", "op.el.type": "op-nethermind"},
359+
{
360+
"op.kind": "el",
361+
"op.network.id": "2151908",
362+
"op.network.participant.name": "node0",
363+
"op.el.type": "op-nethermind",
364+
},
345365
)
346366
expect.eq(
347367
service_config.files["/network-configs"].artifact_names,
@@ -412,7 +432,12 @@ def test_l2_participant_el_launcher_op_reth(plan):
412432
)
413433
expect.eq(
414434
service_config.labels,
415-
{"op.kind": "el", "op.network.id": "2151908", "op.el.type": "op-reth"},
435+
{
436+
"op.kind": "el",
437+
"op.network.id": "2151908",
438+
"op.network.participant.name": "node0",
439+
"op.el.type": "op-reth",
440+
},
416441
)
417442
expect.eq(
418443
service_config.files["/network-configs"].artifact_names,

test/l2/participant/input_parser_test.star

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def test_l2_participant_input_parser_defaults(plan):
7272
labels={
7373
"op.kind": "cl",
7474
"op.network.id": "1000",
75+
"op.network.participant.name": "node0",
7576
"op.cl.type": "op-node",
7677
},
7778
ports={
@@ -91,6 +92,7 @@ def test_l2_participant_input_parser_defaults(plan):
9192
labels={
9293
"op.kind": "cl_builder",
9394
"op.network.id": "1000",
95+
"op.network.participant.name": "node0",
9496
"op.cl.type": "op-node",
9597
},
9698
ports={
@@ -110,6 +112,7 @@ def test_l2_participant_input_parser_defaults(plan):
110112
labels={
111113
"op.kind": "el",
112114
"op.network.id": "1000",
115+
"op.network.participant.name": "node0",
113116
"op.el.type": "op-geth",
114117
},
115118
ports={
@@ -131,6 +134,7 @@ def test_l2_participant_input_parser_defaults(plan):
131134
labels={
132135
"op.kind": "el_builder",
133136
"op.network.id": "1000",
137+
"op.network.participant.name": "node0",
134138
"op.el.type": "op-geth",
135139
},
136140
ports={
@@ -173,6 +177,7 @@ def test_l2_participant_input_parser_defaults(plan):
173177
labels={
174178
"op.kind": "cl",
175179
"op.network.id": "1000",
180+
"op.network.participant.name": "node1",
176181
"op.cl.type": "op-node",
177182
},
178183
ports={
@@ -192,6 +197,7 @@ def test_l2_participant_input_parser_defaults(plan):
192197
labels={
193198
"op.kind": "cl_builder",
194199
"op.network.id": "1000",
200+
"op.network.participant.name": "node1",
195201
"op.cl.type": "op-node",
196202
},
197203
ports={
@@ -211,6 +217,7 @@ def test_l2_participant_input_parser_defaults(plan):
211217
labels={
212218
"op.kind": "el",
213219
"op.network.id": "1000",
220+
"op.network.participant.name": "node1",
214221
"op.el.type": "op-geth",
215222
},
216223
ports={
@@ -232,6 +239,7 @@ def test_l2_participant_input_parser_defaults(plan):
232239
labels={
233240
"op.kind": "el_builder",
234241
"op.network.id": "1000",
242+
"op.network.participant.name": "node1",
235243
"op.el.type": "op-geth",
236244
},
237245
ports={

0 commit comments

Comments
 (0)