-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ethpandaops/bbusa/op_geth
feat: add op_geth
- Loading branch information
Showing
12 changed files
with
499 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
## Welcome to Optimism Package | ||
default package for Optimism | ||
```yaml | ||
optimism_package: | ||
participants: | ||
- el_type: op-geth | ||
el_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:latest | ||
cl_type: op-node | ||
cl_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:develop | ||
count: 1 | ||
network_params: | ||
network: kurtosis | ||
network_id: "2151908" | ||
seconds_per_slot: 2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
constants = import_module( | ||
"github.com/kurtosis-tech/ethereum-package/src/package_io/constants.star" | ||
) | ||
shared_utils = import_module( | ||
"github.com/kurtosis-tech/ethereum-package/src/shared_utils/shared_utils.star" | ||
) | ||
|
||
op_geth = import_module("./op-geth/op_geth_launcher.star") | ||
|
||
|
||
def launch( | ||
plan, | ||
jwt_file, | ||
network_params, | ||
el_cl_data, | ||
participants, | ||
num_participants, | ||
): | ||
el_launchers = { | ||
"op-geth": { | ||
"launcher": op_geth.new_op_geth_launcher( | ||
el_cl_data, | ||
jwt_file, | ||
network_params.network, | ||
network_params.network_id, | ||
), | ||
"launch_method": op_geth.launch, | ||
}, | ||
} | ||
|
||
all_el_contexts = [] | ||
|
||
for index, participant in enumerate(participants): | ||
cl_type = participant.cl_type | ||
el_type = participant.el_type | ||
|
||
if el_type not in el_launchers: | ||
fail( | ||
"Unsupported launcher '{0}', need one of '{1}'".format( | ||
el_type, ",".join(el_launchers.keys()) | ||
) | ||
) | ||
|
||
el_launcher, launch_method = ( | ||
el_launchers[el_type]["launcher"], | ||
el_launchers[el_type]["launch_method"], | ||
) | ||
|
||
# Zero-pad the index using the calculated zfill value | ||
index_str = shared_utils.zfill_custom(index + 1, len(str(len(participants)))) | ||
|
||
el_service_name = "op-el-{0}-{1}-{2}".format(index_str, el_type, cl_type) | ||
|
||
el_context = launch_method( | ||
plan, | ||
el_launcher, | ||
el_service_name, | ||
participant.el_image, | ||
all_el_contexts, | ||
) | ||
# # Add participant el additional prometheus metrics | ||
# for metrics_info in el_context.el_metrics_info: | ||
# if metrics_info != None: | ||
# metrics_info["config"] = participant.prometheus_config | ||
|
||
all_el_contexts.append(el_context) | ||
|
||
plan.print("Successfully added {0} EL participants".format(num_participants)) | ||
return all_el_contexts |
Oops, something went wrong.