error while running instance on Geth and Prysm
SurenFTN opened this issue · 4 comments
provision-explorer-config.sh
`
#! /bin/bash
CL_PORT=$(kurtosis enclave inspect my-testnet | grep 4000/tcp | tr -s ' ' | cut -d " " -f 6 | sed -e 's/http://127.0.0.1://' | head -n 1)
echo "CL Node port is $CL_PORT"
EL_PORT=$(kurtosis enclave inspect my-testnet | grep 8545/tcp | tr -s ' ' | cut -d " " -f 5 | sed -e 's/127.0.0.1://' | head -n 1)
echo "EL Node port is $EL_PORT"
REDIS_PORT=$(kurtosis enclave inspect my-testnet | grep 6379/tcp | tr -s ' ' | cut -d " " -f 6 | sed -e 's/tcp://127.0.0.1://' | head -n 1)
echo "Redis port is $REDIS_PORT"
POSTGRES_PORT=$(kurtosis enclave inspect my-testnet | grep 5432/tcp | tr -s ' ' | cut -d " " -f 6 | sed -e 's/postgresql://127.0.0.1://' | head -n 1)
echo "Postgres port is $POSTGRES_PORT"
LBT_PORT=$(kurtosis enclave inspect my-testnet | grep 9000/tcp | tr -s ' ' | cut -d " " -f 6 | sed -e 's/tcp://127.0.0.1://' | tail -n 1)
echo "Little bigtable port is $LBT_PORT"
touch config.yml
cat >config.yml <<EOL
chain:
configPath: 'node'
readerDatabase:
name: db
host: 127.0.0.1
port: "$POSTGRES_PORT"
user: postgres
password: "pass"
writerDatabase:
name: db
host: 127.0.0.1
port: "$POSTGRES_PORT"
user: postgres
password: "pass"
bigtable:
project: explorer
instance: explorer
emulator: true
emulatorPort: $LBT_PORT
eth1ErigonEndpoint: 'http://127.0.0.1:$EL_PORT'
eth1GethEndpoint: 'http://127.0.0.1:$EL_PORT'
redisCacheEndpoint: '127.0.0.1:$REDIS_PORT'
tieredCacheProvider: 'redis'
frontend:
siteDomain: "localhost:8080"
siteName: 'Open Source Ethereum (ETH) Testnet Explorer' # Name of the site, displayed in the title tag
siteSubtitle: "Showing a local testnet."
server:
host: '0.0.0.0' # Address to listen on
port: '8080' # Port to listen on
readerDatabase:
name: db
host: 127.0.0.1
port: "$POSTGRES_PORT"
user: postgres
password: "pass"
writerDatabase:
name: db
host: 127.0.0.1
port: "$POSTGRES_PORT"
user: postgres
password: "pass"
sessionSecret: "11111111111111111111111111111111"
jwtSigningSecret: "1111111111111111111111111111111111111111111111111111111111111111"
jwtIssuer: "localhost"
jwtValidityInMinutes: 30
maxMailsPerEmailPerDay: 10
mail:
mailgun:
sender: no-reply@localhost
domain: mg.localhost
privateKey: "key-11111111111111111111111111111111"
csrfAuthKey: '1111111111111111111111111111111111111111111111111111111111111111'
indexer:
fullIndexOnStartup: false # Perform a one time full db index on startup
indexMissingEpochsOnStartup: true # Check for missing epochs and export them after startup
`
node:
host: 127.0.0.1
port: '$CL_PORT'
type: prysm
eth1DepositContractFirstBlock: 0
EOL
echo "generated config written to config.yml"
echo "initializing bigtable schema"
PROJECT="explorer"
INSTANCE="explorer"
HOST="127.0.0.1:$LBT_PORT"
go run ../cmd/misc/main.go -config config.yml -command initBigtableSchema
echo "bigtable schema initialization completed"
echo "provisioning postgres db schema"
go run ../cmd/misc/main.go -config config.yml -command applyDbSchema
echo "postgres db schema initialization completed"
`
network-params.json
`
{
"participants": [
{
"el_client_type": "geth",
"el_client_image": "",
"el_client_log_level": "",
"cl_client_type": "prysm",
"cl_client_image": "",
"cl_client_log_level": "",
"beacon_extra_params": [],
"el_extra_params": ["--http.api='admin,eth,net,debug,txpool' --syncmode full --gcmode archive"],
"validator_extra_params": [],
"builder_network_params": null,
"count": 3
}
],
"network_params": {
"preregistered_validator_keys_mnemonic": "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete",
"num_validator_keys_per_node": 64,
"network_id": "3151908",
"deposit_contract_address": "0x4242424242424242424242424242424242424242",
"seconds_per_slot": 4,
"genesis_delay": 10,
"capella_fork_epoch": 3,
"deneb_fork_epoch": 500
},
"global_client_log_level": "info",
"start_tx_spammer": false
}
`
Hey @SurenFTN I am Gyani a dev at Kurtosis! I see you are doing some bash magic in order to get the ports of the services that you are interested in
I just wanted to tell you that we have Go/TS and Rust SDKs that allow you to run Kurtosis and query / manipulate your enclave further
Here's the doc https://docs.kurtosis.com/SDK/
Here's an example of how I spin up the eth2-package, get some ports and do some more things with it
https://github.com/kurtosis-tech/protocolberg/blob/main/finalization_test.go#L108-L115
^ this line specifically shows you how you can get the public port to manipulate it further
Wanted to add another point which might help here - we have a command line call kurtosis port print <ENCLAVE-ID> <SERVICE-ID> <PORT-NAME>
, which prints the port directly (but the full URL), like this:
➜ scratch git:(main) kurtosis port print my-testnet cl-1-lighthouse-geth http
http://127.0.0.1:61163
I know it's still not the format you're looking for in your bash script, but if it would be useful, we could add a --format
flag to get you just the port number. perhaps that would be useful and you won't have to rearrange the bash parsing in case we change our output structure