forked from cerc-io/stack-orchestrator
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b13300ca81 | ||
|
|
6396de1ecf | ||
|
|
18a7e59a8a | ||
|
|
0a66b7e9d2 | ||
|
|
7edfa1bb29 | ||
|
|
8e184f509d |
@@ -24,7 +24,7 @@ import os
|
||||
from decouple import config
|
||||
import subprocess
|
||||
import click
|
||||
import importlib
|
||||
import importlib.resources
|
||||
from pathlib import Path
|
||||
from .util import include_exclude_check
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
import os
|
||||
from decouple import config
|
||||
import click
|
||||
import importlib
|
||||
import importlib.resources
|
||||
from python_on_whales import docker
|
||||
from .util import include_exclude_check
|
||||
|
||||
|
||||
@@ -14,6 +14,12 @@ services:
|
||||
|
||||
fixturenet-eth-geth-1:
|
||||
hostname: fixturenet-eth-geth-1
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
environment:
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
CERC_RUN_STATEDIFF: "detect"
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
env_file:
|
||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||
image: cerc/fixturenet-eth-geth:local
|
||||
@@ -27,12 +33,10 @@ services:
|
||||
- fixturenet-eth-bootnode-geth
|
||||
ports:
|
||||
- "8545"
|
||||
- "40000"
|
||||
|
||||
fixturenet-eth-geth-2:
|
||||
hostname: fixturenet-eth-geth-2
|
||||
environment:
|
||||
CERC_RUN_STATEDIFF: "detect"
|
||||
CERC_STATEDIFF_DB_NODE_ID: 2
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||
interval: 30s
|
||||
|
||||
@@ -18,3 +18,4 @@ CERC_STATEDIFF_DB_NAME="cerc_testing"
|
||||
CERC_STATEDIFF_DB_USER="vdbm"
|
||||
CERC_STATEDIFF_DB_PASSWORD="password"
|
||||
CERC_STATEDIFF_DB_GOOSE_MIN_VER=23
|
||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||
|
||||
FROM cerc/go-ethereum:local
|
||||
# Using the same golang image as used to build geth: https://github.com/cerc-io/go-ethereum/blob/HEAD/Dockerfile
|
||||
FROM golang:1.18-alpine as delve
|
||||
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
|
||||
FROM cerc/go-ethereum:local as geth
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache python3 python3-dev py3-pip curl wget jq build-base gettext libintl openssl bash bind-tools postgresql-client
|
||||
|
||||
COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/eth2-testnet-genesis
|
||||
COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/eth2-val-tools
|
||||
COPY --from=delve /go/bin/dlv /usr/local/bin/
|
||||
COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/
|
||||
COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/
|
||||
COPY --from=ethgen /apps /apps
|
||||
|
||||
RUN cd /apps/el-gen && pip3 install -r requirements.txt
|
||||
@@ -14,6 +21,7 @@ COPY run-el.sh /opt/testnet/run.sh
|
||||
|
||||
RUN cd /opt/testnet && make genesis-el
|
||||
|
||||
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
||||
RUN geth init /opt/testnet/build/el/geth.json && rm -f ~/.ethereum/geth/nodekey
|
||||
|
||||
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||
|
||||
@@ -9,13 +9,18 @@ cd /opt/testnet/build/el
|
||||
python3 -m http.server 9898 &
|
||||
cd $HOME_DIR
|
||||
|
||||
if [ "true" == "$RUN_BOOTNODE" ]; then
|
||||
geth \
|
||||
START_CMD="geth"
|
||||
if [ "true" == "$CERC_REMOTE_DEBUG" ] && [ -x "/usr/local/bin/dlv" ]; then
|
||||
START_CMD="/usr/local/bin/dlv --listen=:40000 --headless=true --api-version=2 --accept-multiclient exec /usr/local/bin/geth --continue --"
|
||||
fi
|
||||
|
||||
if [ "true" == "$RUN_BOOTNODE" ]; then
|
||||
$START_CMD \
|
||||
--nodekeyhex="${BOOTNODE_KEY}" \
|
||||
--nodiscover \
|
||||
--ipcdisable \
|
||||
--networkid=${NETWORK_ID} \
|
||||
--netrestrict="${NETRESTRICT}" 2>&1 | tee /var/log/geth_bootnode.log
|
||||
--netrestrict="${NETRESTRICT}"
|
||||
else
|
||||
cd /opt/testnet/accounts
|
||||
./import_keys.sh
|
||||
@@ -56,17 +61,18 @@ else
|
||||
--statediff.db.password=$CERC_STATEDIFF_DB_PASSWORD \
|
||||
--statediff.db.port=$CERC_STATEDIFF_DB_PORT \
|
||||
--statediff.db.user=$CERC_STATEDIFF_DB_USER \
|
||||
--statediff.db.logstatements=${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false} \
|
||||
--statediff.waitforsync=true \
|
||||
--statediff.writing=true"
|
||||
fi
|
||||
|
||||
geth \
|
||||
$START_CMD \
|
||||
--bootnodes="${ENODE}" \
|
||||
--allow-insecure-unlock \
|
||||
--http \
|
||||
--http.addr="0.0.0.0" \
|
||||
--http.vhosts="*" \
|
||||
--http.api="eth,web3,net,admin,personal" \
|
||||
--http.api="eth,web3,net,admin,personal,debug,statediff" \
|
||||
--http.corsdomain="*" \
|
||||
--authrpc.addr="0.0.0.0" \
|
||||
--authrpc.vhosts="*" \
|
||||
@@ -79,6 +85,8 @@ else
|
||||
--syncmode=full \
|
||||
--mine \
|
||||
--miner.threads=1 \
|
||||
--verbosity=5 \
|
||||
--miner.etherbase="${ETHERBASE}" ${STATEDIFF_OPTS} 2>&1 | tee /var/log/geth.log
|
||||
--metrics \
|
||||
--verbosity=${CERC_GETH_VERBOSITY:-3} \
|
||||
--vmodule="${CERC_GETH_VMODULE:-statediff/*=5}" \
|
||||
--miner.etherbase="${ETHERBASE}" ${STATEDIFF_OPTS}
|
||||
fi
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# This file should be re-generated running: scripts/update-version-file.sh script
|
||||
v1.0.6-alpha-ae7a17c
|
||||
v1.0.7-alpha-7edfa1b
|
||||
|
||||
@@ -20,7 +20,7 @@ import os
|
||||
import sys
|
||||
from python_on_whales import DockerClient
|
||||
import click
|
||||
import importlib
|
||||
import importlib.resources
|
||||
from pathlib import Path
|
||||
from .util import include_exclude_check
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ from decouple import config
|
||||
import git
|
||||
from tqdm import tqdm
|
||||
import click
|
||||
import importlib
|
||||
import importlib.resources
|
||||
from .util import include_exclude_check
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||
|
||||
import click
|
||||
import importlib
|
||||
import importlib.resources
|
||||
|
||||
@click.command()
|
||||
@click.pass_context
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Builds the shiv "package" for distribution
|
||||
# TODO: add build version/tag to filename
|
||||
# TODO: add version info to code for version subcommand
|
||||
shiv -c laconic-so -o package/laconic-so .
|
||||
@@ -1,3 +1,4 @@
|
||||
# Builds the shiv "package" for distribution
|
||||
mkdir -p ./package
|
||||
version_string=$( ./scripts/update_version_file.sh)
|
||||
shiv -c laconic-so -o package/laconic-so-${version_string} .
|
||||
|
||||
Reference in New Issue
Block a user