-
Notifications
You must be signed in to change notification settings - Fork 26
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 #69 from ethpandaops/skylenet/local-setup
- Loading branch information
Showing
5 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -5,4 +5,6 @@ config.yaml | |
test-config.yaml | ||
config-*.yaml | ||
log-* | ||
tmp-* | ||
tmp-* | ||
|
||
.hack/devnet/generated-**.yaml |
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,7 @@ | ||
#!/bin/bash | ||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
ENCLAVE_NAME="${ENCLAVE_NAME:-dora}" | ||
kurtosis enclave rm -f "$ENCLAVE_NAME" | ||
|
||
echo "Cleaning up generated files..." | ||
rm -f "${__dir}/generated-*.yaml" |
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,10 @@ | ||
participants: | ||
- el_type: geth | ||
el_image: ethereum/client-go:stable | ||
cl_type: lighthouse | ||
cl_image: sigp/lighthouse:latest | ||
count: 4 | ||
network_params: | ||
seconds_per_slot: 12 | ||
additional_services: [] | ||
snooper_enabled: false |
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 @@ | ||
#!/bin/bash | ||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
## Run devnet using kurtosis | ||
ENCLAVE_NAME="${ENCLAVE_NAME:-dora}" | ||
if kurtosis enclave inspect "$ENCLAVE_NAME" > /dev/null; then | ||
echo "Kurtosis enclave '$ENCLAVE_NAME' is already up." | ||
else | ||
kurtosis run github.com/ethpandaops/ethereum-package --enclave "$ENCLAVE_NAME" --args-file "${__dir}/kurtosis.devnet.config.yaml" | ||
fi | ||
|
||
# Get chain config | ||
kurtosis files inspect dora el_cl_genesis_data ./config.yaml | tail -n +2 > "${__dir}/generated-chain-config.yaml" | ||
|
||
## Generate Dora config | ||
ENCLAVE_UUID=$(kurtosis enclave inspect "$ENCLAVE_NAME" --full-uuids | grep 'UUID:' | awk '{print $2}') | ||
|
||
BEACON_NODDES=$(docker ps -aq -f "label=enclave_uuid=$ENCLAVE_UUID" \ | ||
-f "label=com.kurtosistech.app-id=kurtosis" \ | ||
-f "label=com.kurtosistech.custom.ethereum-package.client-type=beacon" | tac) | ||
|
||
EXECUTION_NODES=$(docker ps -aq -f "label=enclave_uuid=$ENCLAVE_UUID" \ | ||
-f "label=com.kurtosistech.app-id=kurtosis" \ | ||
-f "label=com.kurtosistech.custom.ethereum-package.client-type=execution" | tac) | ||
|
||
cat <<EOF > "${__dir}/generated-dora-config.yaml" | ||
logging: | ||
outputLevel: "info" | ||
chain: | ||
name: $ENCLAVE_NAME | ||
configPath: "${__dir}/generated-chain-config.yaml" | ||
server: | ||
host: "0.0.0.0" | ||
port: "8080" | ||
frontend: | ||
enabled: true | ||
debug: false | ||
minimize: false | ||
siteName: "Dora the Explorer" | ||
siteSubtitle: "$ENCLAVE_NAME - Kurtosis" | ||
ethExplorerLink: "" | ||
beaconapi: | ||
localCacheSize: 10 | ||
redisCacheAddr: "" | ||
redisCachePrefix: "" | ||
endpoints: | ||
$(docker inspect -f " - { name: {{ with index .Config.Labels \"com.kurtosistech.id\"}}{{.}}{{end}}, url: http://{{ with index .NetworkSettings.Networks \"kt-$ENCLAVE_NAME\"}}{{.IPAddress }}:4000{{end}} }" $BEACON_NODDES) | ||
executionapi: | ||
depositLogBatchSize: 1000 | ||
endpoints: | ||
$(docker inspect -f " - { name: {{ with index .Config.Labels \"com.kurtosistech.id\"}}{{.}}{{end}}, url: http://{{ with index .NetworkSettings.Networks \"kt-$ENCLAVE_NAME\"}}{{.IPAddress }}:8545{{end}} }" $EXECUTION_NODES) | ||
indexer: | ||
inMemoryEpochs: 8 | ||
cachePersistenceDelay: 8 | ||
disableIndexWriter: false | ||
syncEpochCooldown: 1 | ||
database: | ||
engine: "sqlite" | ||
sqlite: | ||
file: "./tmp-database.sqlite" | ||
EOF | ||
|
||
|
||
cat <<EOF | ||
============================================================================================================ | ||
Dora config at ${__dir}/generated-dora-config.yaml | ||
Chain config at ${__dir}/generated-chain-config.yaml | ||
============================================================================================================ | ||
EOF |
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