Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(kt-devnet): improve memstore devnet justfile and yaml #30

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 10 additions & 3 deletions kurtosis-devnet/eigenda-memstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ optimism_package:
chains:
- participants:
- el_type: op-geth
el_image: ""
# latest tag is currently broken until the next stable release, see https://github.com/ethereum-optimism/op-geth/pull/515
# Also see discussion in https://discord.com/channels/1244729134312198194/1260624141497798706/1342556343495692320
el_image: "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:optimism"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:optimism" latest?

I have tried "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101411.8" worked. Should we use it as default? then update later

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not. protolambda suggested I use the optimism tag. I've been using it and it works. Not exactly sure what it is, think its a moving target like latest but is not affected by their latest tagging bug.

el_log_level: ""
el_extra_env_vars: {}
el_extra_labels: {}
Expand All @@ -47,7 +49,12 @@ optimism_package:
fund_dev_accounts: true
batcher_params:
image: {{ localDockerImage "op-batcher" }}
extra_params: []
extra_params:
- --altda.max-concurrent-da-requests=1
- --max-channel-duration=25
- --target-num-frames=1
- --max-l1-tx-size-bytes=1000
- --batch-type=1
proposer_params:
image: {{ localDockerImage "op-proposer" }}
extra_params: []
Expand All @@ -69,7 +76,7 @@ optimism_package:
- "3100"
- --memstore.enabled
- --memstore.expiration
- "1m"
- "30m"
additional_services:
- da_server
global_log_level: "info"
Expand Down
67 changes: 66 additions & 1 deletion kurtosis-devnet/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,72 @@ eigenda-memstore-devnet: (devnet "eigenda-memstore.yaml")
[group('eigenda')]
eigenda-memstore-devnet-clean:
kurtosis enclave rm eigenda-memstore-devnet --force

# Cause proxy to start returning 503 errors to batcher, as a signal
# to failover to ethDA. Use `eigenda-memstore-devnet-failback` to revert.
[group('eigenda')]
eigenda-memstore-devnet-failover:
#!/usr/bin/env bash
PROXY_ENDPOINT=$(kurtosis port print eigenda-memstore-devnet da-server-op-kurtosis http)
curl -X PATCH $PROXY_ENDPOINT/memstore/config -d '{"PutReturnsFailoverError": true}'
[group('eigenda')]
eigenda-memstore-devnet-failback:
#!/usr/bin/env bash
PROXY_ENDPOINT=$(kurtosis port print eigenda-memstore-devnet da-server-op-kurtosis http)
curl -X PATCH $PROXY_ENDPOINT/memstore/config -d '{"PutReturnsFailoverError": false}'
[group('eigenda')]
eigenda-memstore-devnet-sync-status:
#!/usr/bin/env bash
OPNODE_ENDPOINT=$(kurtosis port print eigenda-memstore-devnet op-cl-1-op-node-op-geth-op-kurtosis http)
cast rpc optimism_syncStatus --rpc-url $OPNODE_ENDPOINT | jq
[group('eigenda')]
eigenda-memstore-devnet-configs-l1-l2:
#!/usr/bin/env bash
echo "OP-NODE ROLLUP CONFIG:"
OPNODE_ENDPOINT=$(kurtosis port print eigenda-memstore-devnet op-cl-1-op-node-op-geth-op-kurtosis http)
cast rpc optimism_rollupConfig --rpc-url $OPNODE_ENDPOINT | jq
echo "TEKU L1-CL SPEC:"
TEKU_ENDPOINT=$(kurtosis port print eigenda-memstore-devnet cl-1-teku-geth http)
curl $TEKU_ENDPOINT/eth/v1/config/spec | jq
# We unfortunately have to restart the batcher in this ugly way right now just to change even a single flag.
# This is b/c op's kurtosis setup right now is not idempotent so if we change a param in eigenda-memstore.yaml
# and rerun `just eigenda-memstore-devnet`, the entire devnet gets respun up which takes a long time.
# Track progress for fixing this in https://github.com/ethereum-optimism/optimism/issues/14390.
# Kurtosis also doesn't have a simple way to update a running service's config, like `kubectl edit` for k8s.
# See https://github.com/kurtosis-tech/kurtosis/issues/2628 for this issue.
# Restart batcher with new flags or image.
[group('eigenda')]
eigenda-memstore-devnet-restart-batcher:
#!/usr/bin/env bash
# IMAGE=op-batcher:eigenda-memstore-devnet
IMAGE=us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher:v1.10.0
kurtosis service add eigenda-memstore-devnet op-batcher-op-kurtosis \
$IMAGE \
--ports "http=8548,metrics=9001" \
-- op-batcher \
--l2-eth-rpc=http://op-el-1-op-geth-op-node-op-kurtosis:8545 \
--rollup-rpc=http://op-cl-1-op-node-op-geth-op-kurtosis:8547 \
--poll-interval=1s \
--sub-safety-margin=6 \
--num-confirmations=1 \
--safe-abort-nonce-too-low-count=3 \
--resubmission-timeout=30s \
--rpc.addr=0.0.0.0 \
--rpc.port=8548 \
--rpc.enable-admin \
--metrics.enabled \
--metrics.addr=0.0.0.0 \
--metrics.port=9001 \
--l1-eth-rpc=http://el-1-geth-teku:8545 \
--private-key=0xb3d2d558e3491a3709b7c451100a0366b5872520c7aa020c17a0e7fa35b6a8df \
--data-availability-type=calldata \
--altda.enabled=True \
--altda.da-server=http://da-server-op-kurtosis:3100 \
--altda.da-service \
--altda.max-concurrent-da-requests=1 \
--max-channel-duration=25 \
--target-num-frames=1 \
--max-l1-tx-size-bytes=1000 \
--batch-type=1

# Simple devnet
simple-devnet: (devnet "simple.yaml")
Expand Down
Loading