Skip to content

Commit

Permalink
fix magi
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Jun 21, 2024
1 parent abe873d commit fee45bf
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .github/tests/magi.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
optimism_package:
participants:
- el_type: op-geth
cl_type: op-node
- el_type: op-geth
cl_type: magi
- el_type: op-reth
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: "The nightly test for ${{matrix.file_name}} on ethereum-package has failed find it here ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
args: "The nightly test for ${{matrix.file_name}} on optimism-package has failed find it here ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
61 changes: 32 additions & 29 deletions src/cl/magi/magi_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ def launch(
):
network_name = shared_utils.get_network_name(launcher.network)

beacon_node_identity_recipe = PostHttpRequestRecipe(
endpoint="/",
content_type="application/json",
body='{"jsonrpc":"2.0","method":"opp2p_self","params":[],"id":1}',
port_id=BEACON_HTTP_PORT_ID,
extract={
"enr": ".result.ENR",
"multiaddr": ".result.addresses[0]",
"peer_id": ".result.peerID",
},
)
# beacon_node_identity_recipe = PostHttpRequestRecipe(
# endpoint="/",
# content_type="application/json",
# body='{"jsonrpc":"2.0","method":"opp2p_self","params":[],"id":1}',
# port_id=BEACON_HTTP_PORT_ID,
# extract={
# "enr": ".result.ENR",
# "multiaddr": ".result.addresses[0]",
# "peer_id": ".result.peerID",
# },
# )

config = get_beacon_config(
plan,
Expand All @@ -91,7 +91,7 @@ def launch(
existing_cl_clients,
l1_config_env_vars,
gs_sequencer_private_key,
beacon_node_identity_recipe,
#beacon_node_identity_recipe,
sequencer_enabled,
)

Expand All @@ -102,24 +102,27 @@ def launch(
beacon_service.ip_address, beacon_http_port.number
)

response = plan.request(
recipe=beacon_node_identity_recipe, service_name=service_name
)
# response = plan.request(
# recipe=beacon_node_identity_recipe, service_name=service_name
# )

beacon_node_enr = response["extract.enr"]
beacon_multiaddr = response["extract.multiaddr"]
beacon_peer_id = response["extract.peer_id"]
# beacon_node_enr = response["extract.enr"]
# beacon_multiaddr = response["extract.multiaddr"]
# beacon_peer_id = response["extract.peer_id"]

return cl_context.new_cl_context(
"magi",
beacon_node_enr,
#beacon_node_enr,
None,
beacon_service.ip_address,
beacon_http_port.number,
beacon_http_url,
None,
service_name,
multiaddr=beacon_multiaddr,
peer_id=beacon_peer_id,
multiaddr=None,
peer_id=None,
# multiaddr=beacon_multiaddr,
# peer_id=beacon_peer_id,
)


Expand All @@ -133,7 +136,7 @@ def get_beacon_config(
existing_cl_clients,
l1_config_env_vars,
gs_sequencer_private_key,
beacon_node_identity_recipe,
#beacon_node_identity_recipe,
sequencer_enabled,
):
EXECUTION_ENGINE_ENDPOINT = "http://{0}:{1}".format(
Expand Down Expand Up @@ -187,13 +190,13 @@ def get_beacon_config(
cmd=cmd,
files=files,
private_ip_address_placeholder=constants.PRIVATE_IP_ADDRESS_PLACEHOLDER,
ready_conditions=ReadyCondition(
recipe=beacon_node_identity_recipe,
field="code",
assertion="==",
target_value=200,
timeout="1m",
),
# ready_conditions=ReadyCondition(
# recipe=beacon_node_identity_recipe,
# field="code",
# assertion="==",
# target_value=200,
# timeout="1m",
# ),
)


Expand Down
3 changes: 2 additions & 1 deletion src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ DEFAULT_EL_IMAGES = {

DEFAULT_CL_IMAGES = {
"op-node": "parithoshj/op-node:v1",
"magi": "a16zcrypto/magi:latest",
#"magi": "a16zcrypto/magi:latest",
"magi": "bbusa/magi:latest",
}

DEFAULT_BATCHER_IMAGES = {
Expand Down

0 comments on commit fee45bf

Please sign in to comment.