Compare commits
22 Commits
dboreham/m
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
ce966f1baa | |
|
|
db4728a9e3 | |
|
|
7ca7bcc952 | |
|
|
32f8d65bb8 | |
|
|
d19b9a65b9 | |
|
|
98e1d120cc | |
|
|
26ff7a969c | |
|
|
a8e198ad55 | |
|
|
f1a626ddf5 | |
|
|
ff616db4ad | |
|
|
9880b48b78 | |
|
|
23a336020c | |
|
|
605db8a4d2 | |
|
|
6ec55ba460 | |
|
|
938f51ef8c | |
|
|
6d620ba9c2 | |
|
|
0c4c128465 | |
|
|
97c1ae1c43 | |
|
|
ec6b5439f4 | |
|
|
1d8f252a51 | |
|
|
161665ef72 | |
|
|
9c5f6469ff |
|
|
@ -35,5 +35,5 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
||||||
sleep 5
|
sleep 5
|
||||||
- name: "Run smoke tests"
|
- name: "Run deploy tests"
|
||||||
run: ./tests/deploy/run-deploy-test.sh
|
run: ./tests/deploy/run-deploy-test.sh
|
||||||
|
|
|
||||||
|
|
@ -25,5 +25,5 @@ jobs:
|
||||||
run: ./scripts/create_build_tag_file.sh
|
run: ./scripts/create_build_tag_file.sh
|
||||||
- name: "Build local shiv package"
|
- name: "Build local shiv package"
|
||||||
run: ./scripts/build_shiv_package.sh
|
run: ./scripts/build_shiv_package.sh
|
||||||
- name: "Run smoke tests"
|
- name: "Run deploy tests"
|
||||||
run: ./tests/deploy/run-deploy-test.sh
|
run: ./tests/deploy/run-deploy-test.sh
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
# Stack Orchestrator
|
# Stack Orchestrator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator.
|
Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator.
|
||||||
|
|
||||||

|

|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||||
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
||||||
"CERC_HOST_UID": f"{os.getuid()}",
|
"CERC_HOST_UID": f"{os.getuid()}",
|
||||||
"CERC_HOST_GID": f"{os.getgid()}",
|
"CERC_HOST_GID": f"{os.getgid()}",
|
||||||
"DOCKER_BUILDKIT": "0"
|
"DOCKER_BUILDKIT": config("DOCKER_BUILDKIT", default="0")
|
||||||
}
|
}
|
||||||
container_build_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
container_build_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
||||||
container_build_env.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
container_build_env.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ services:
|
||||||
- SYS_PTRACE
|
- SYS_PTRACE
|
||||||
environment:
|
environment:
|
||||||
CERC_REMOTE_DEBUG: "true"
|
CERC_REMOTE_DEBUG: "true"
|
||||||
CERC_RUN_STATEDIFF: "detect"
|
CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
|
||||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
services:
|
||||||
|
fixturenet-eth-bootnode-geth:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-bootnode-geth
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
environment:
|
||||||
|
RUN_BOOTNODE: "true"
|
||||||
|
image: cerc/fixturenet-plugeth-plugeth:local
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_bootnode_geth_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
|
ports:
|
||||||
|
- "9898"
|
||||||
|
- "30303"
|
||||||
|
|
||||||
|
fixturenet-eth-geth-1:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-geth-1
|
||||||
|
cap_add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
environment:
|
||||||
|
CERC_REMOTE_DEBUG: "true"
|
||||||
|
CERC_RUN_STATEDIFF: "detect"
|
||||||
|
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||||
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
image: cerc/fixturenet-plugeth-plugeth:local
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_geth_1_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 3s
|
||||||
|
depends_on:
|
||||||
|
- fixturenet-eth-bootnode-geth
|
||||||
|
ports:
|
||||||
|
- "8545"
|
||||||
|
- "40000"
|
||||||
|
- "6060"
|
||||||
|
|
||||||
|
fixturenet-eth-geth-2:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-geth-2
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 3s
|
||||||
|
environment:
|
||||||
|
CERC_KEEP_RUNNING_AFTER_GETH_EXIT: "true"
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
image: cerc/fixturenet-plugeth-plugeth:local
|
||||||
|
depends_on:
|
||||||
|
- fixturenet-eth-bootnode-geth
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_geth_2_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
|
|
||||||
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-bootnode-lighthouse
|
||||||
|
environment:
|
||||||
|
RUN_BOOTNODE: "true"
|
||||||
|
image: cerc/fixturenet-plugeth-lighthouse:local
|
||||||
|
|
||||||
|
fixturenet-eth-lighthouse-1:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-lighthouse-1
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 30s
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
environment:
|
||||||
|
NODE_NUMBER: "1"
|
||||||
|
ETH1_ENDPOINT: "http://fixturenet-eth-geth-1:8545"
|
||||||
|
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551"
|
||||||
|
image: cerc/fixturenet-plugeth-lighthouse:local
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_lighthouse_1_data:/opt/testnet/build/cl
|
||||||
|
depends_on:
|
||||||
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
|
condition: service_started
|
||||||
|
fixturenet-eth-geth-1:
|
||||||
|
condition: service_healthy
|
||||||
|
ports:
|
||||||
|
- "8001"
|
||||||
|
|
||||||
|
fixturenet-eth-lighthouse-2:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-lighthouse-2
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 30s
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
environment:
|
||||||
|
NODE_NUMBER: "2"
|
||||||
|
ETH1_ENDPOINT: "http://fixturenet-eth-geth-2:8545"
|
||||||
|
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-2:8551"
|
||||||
|
LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0"
|
||||||
|
image: cerc/fixturenet-plugeth-lighthouse:local
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_lighthouse_2_data:/opt/testnet/build/cl
|
||||||
|
depends_on:
|
||||||
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
|
condition: service_started
|
||||||
|
fixturenet-eth-geth-2:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
fixturenet_plugeth_bootnode_geth_data:
|
||||||
|
fixturenet_plugeth_geth_1_data:
|
||||||
|
fixturenet_plugeth_geth_2_data:
|
||||||
|
fixturenet_plugeth_lighthouse_1_data:
|
||||||
|
fixturenet_plugeth_lighthouse_2_data:
|
||||||
|
|
@ -7,11 +7,9 @@ services:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
image: cerc/ipld-eth-server:local
|
image: cerc/ipld-eth-server:local
|
||||||
environment:
|
environment:
|
||||||
IPLD_SERVER_GRAPHQL: "true"
|
SERVER_HTTP_PATH: 0.0.0.0:8081
|
||||||
IPLD_POSTGRAPHILEPATH: http://graphql:5000
|
SERVER_GRAPHQL: "true"
|
||||||
ETH_SERVER_HTTPPATH: 0.0.0.0:8081
|
SERVER_GRAPHQLPATH: 0.0.0.0:8082
|
||||||
ETH_SERVER_GRAPHQL: "true"
|
|
||||||
ETH_SERVER_GRAPHQLPATH: 0.0.0.0:8082
|
|
||||||
VDB_COMMAND: "serve"
|
VDB_COMMAND: "serve"
|
||||||
ETH_CHAIN_CONFIG: "/tmp/chain.json"
|
ETH_CHAIN_CONFIG: "/tmp/chain.json"
|
||||||
DATABASE_NAME: cerc_testing
|
DATABASE_NAME: cerc_testing
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
version: '3.2'
|
version: '3.2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
# Builds and serves the peer-test react-app
|
||||||
peer-test-app:
|
peer-test-app:
|
||||||
# Builds and serves the peer-test react-app
|
restart: unless-stopped
|
||||||
image: cerc/react-peer:local
|
image: cerc/react-peer:local
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ CERC_STATEDIFF_DB_PORT=5432
|
||||||
CERC_STATEDIFF_DB_NAME="cerc_testing"
|
CERC_STATEDIFF_DB_NAME="cerc_testing"
|
||||||
CERC_STATEDIFF_DB_USER="vdbm"
|
CERC_STATEDIFF_DB_USER="vdbm"
|
||||||
CERC_STATEDIFF_DB_PASSWORD="password"
|
CERC_STATEDIFF_DB_PASSWORD="password"
|
||||||
CERC_STATEDIFF_DB_GOOSE_MIN_VER=23
|
CERC_STATEDIFF_DB_GOOSE_MIN_VER=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-18}
|
||||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
||||||
|
CERC_STATEDIFF_WORKERS=2
|
||||||
|
|
||||||
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
See: https://docs.plugeth.org/
|
||||||
|
|
@ -27,8 +27,8 @@ yarn_info_output=$(yarn info --json $versioned_target_package 2>/dev/null)
|
||||||
# If it doesn't exist there will be no .data.dist.tarball element,
|
# If it doesn't exist there will be no .data.dist.tarball element,
|
||||||
# and jq will output the string "null"
|
# and jq will output the string "null"
|
||||||
package_tarball=$(echo $yarn_info_output | jq -r .data.dist.tarball)
|
package_tarball=$(echo $yarn_info_output | jq -r .data.dist.tarball)
|
||||||
if [[ $package_tarball == "null" ]]; then
|
if [[ "$yarn_info_output" == "" || $package_tarball == "null" ]]; then
|
||||||
echo "FATAL: Target package version ($versioned_target_package) not found" >&2
|
echo "FATAL: Target package version ($versioned_target_package) not found (or bad npm auth token)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Code below parses out the values we need
|
# Code below parses out the values we need
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,18 @@ COPY run-el.sh /opt/testnet/run.sh
|
||||||
RUN cd /opt/testnet && make genesis-el
|
RUN cd /opt/testnet && make genesis-el
|
||||||
|
|
||||||
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
||||||
|
|
||||||
|
# Snag the genesis block info.
|
||||||
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
||||||
|
RUN cp -rp ~/ethdata ~/tmpeth && \
|
||||||
|
geth --datadir ~/tmpeth init /opt/testnet/build/el/geth.json && \
|
||||||
|
geth --datadir ~/tmpeth --http & \
|
||||||
|
sleep 5 && \
|
||||||
|
curl -q --location 'localhost:8545' \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{ "jsonrpc": "2.0", "id": 14, "method": "eth_getBlockByNumber", "params": ["0x0", false] }' \
|
||||||
|
-o /opt/testnet/build/el/genesis_block.json && \
|
||||||
|
killall -9 geth && \
|
||||||
|
rm -rf ~/tmpeth
|
||||||
|
|
||||||
ENTRYPOINT ["/opt/testnet/run.sh"]
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||||
|
|
|
||||||
|
|
@ -34,5 +34,7 @@ python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | \
|
||||||
jq ".config.istanbulBlock=$istanbul_block" | \
|
jq ".config.istanbulBlock=$istanbul_block" | \
|
||||||
jq ".config.berlinBlock=$berlin_block" | \
|
jq ".config.berlinBlock=$berlin_block" | \
|
||||||
jq ".config.londonBlock=$london_block" | \
|
jq ".config.londonBlock=$london_block" | \
|
||||||
jq ".config.mergeForkBlock=$merge_fork_block" > ../build/el/geth.json
|
jq ".config.mergeForkBlock=$merge_fork_block" | \
|
||||||
|
jq ".config.mergeNetsplitBlock=$merge_fork_block" \
|
||||||
|
> ../build/el/geth.json
|
||||||
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
|
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ else
|
||||||
STATEDIFF_OPTS=""
|
STATEDIFF_OPTS=""
|
||||||
if [ "$CERC_RUN_STATEDIFF" == "true" ]; then
|
if [ "$CERC_RUN_STATEDIFF" == "true" ]; then
|
||||||
ready=0
|
ready=0
|
||||||
|
echo "Waiting for statediff DB..."
|
||||||
while [ $ready -eq 0 ]; do
|
while [ $ready -eq 0 ]; do
|
||||||
echo "Waiting for statediff DB..."
|
|
||||||
sleep 1
|
sleep 1
|
||||||
export PGPASSWORD="$CERC_STATEDIFF_DB_PASSWORD"
|
export PGPASSWORD="$CERC_STATEDIFF_DB_PASSWORD"
|
||||||
result=$(psql -h "$CERC_STATEDIFF_DB_HOST" \
|
result=$(psql -h "$CERC_STATEDIFF_DB_HOST" \
|
||||||
|
|
@ -73,9 +73,13 @@ else
|
||||||
-U "$CERC_STATEDIFF_DB_USER" \
|
-U "$CERC_STATEDIFF_DB_USER" \
|
||||||
-d "$CERC_STATEDIFF_DB_NAME" \
|
-d "$CERC_STATEDIFF_DB_NAME" \
|
||||||
-t -c 'select max(version_id) from goose_db_version;' 2>/dev/null | awk '{ print $1 }')
|
-t -c 'select max(version_id) from goose_db_version;' 2>/dev/null | awk '{ print $1 }')
|
||||||
if [ -n "$result" ] && [ $result -ge $CERC_STATEDIFF_DB_GOOSE_MIN_VER ]; then
|
if [ -n "$result" ]; then
|
||||||
echo "DB ready..."
|
echo "DB ready..."
|
||||||
ready=1
|
if [ $result -ge $CERC_STATEDIFF_DB_GOOSE_MIN_VER ]; then
|
||||||
|
ready=1
|
||||||
|
else
|
||||||
|
echo "DB not at required version (want $CERC_STATEDIFF_DB_GOOSE_MIN_VER, have $result)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
STATEDIFF_OPTS="--statediff=true \
|
STATEDIFF_OPTS="--statediff=true \
|
||||||
|
|
@ -88,6 +92,7 @@ else
|
||||||
--statediff.db.logstatements=${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false} \
|
--statediff.db.logstatements=${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false} \
|
||||||
--statediff.db.copyfrom=${CERC_STATEDIFF_DB_COPY_FROM:-true} \
|
--statediff.db.copyfrom=${CERC_STATEDIFF_DB_COPY_FROM:-true} \
|
||||||
--statediff.waitforsync=true \
|
--statediff.waitforsync=true \
|
||||||
|
--statediff.workers=${CERC_STATEDIFF_WORKERS:-1} \
|
||||||
--statediff.writing=true"
|
--statediff.writing=true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM sigp/lcli:v4.1.0 AS lcli
|
FROM cerc/lighthouse-cli:local AS lcli
|
||||||
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||||
FROM cerc/fixturenet-eth-geth:local AS fnetgeth
|
FROM cerc/fixturenet-eth-geth:local AS fnetgeth
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,14 @@ lcli \
|
||||||
--deposit-contract-address $ETH1_DEPOSIT_CONTRACT_ADDRESS \
|
--deposit-contract-address $ETH1_DEPOSIT_CONTRACT_ADDRESS \
|
||||||
--testnet-dir $TESTNET_DIR \
|
--testnet-dir $TESTNET_DIR \
|
||||||
--min-genesis-active-validator-count $GENESIS_VALIDATOR_COUNT \
|
--min-genesis-active-validator-count $GENESIS_VALIDATOR_COUNT \
|
||||||
|
--validator-count $VALIDATOR_COUNT \
|
||||||
--min-genesis-time $GENESIS_TIME \
|
--min-genesis-time $GENESIS_TIME \
|
||||||
--genesis-delay $GENESIS_DELAY \
|
--genesis-delay $GENESIS_DELAY \
|
||||||
--genesis-fork-version $GENESIS_FORK_VERSION \
|
--genesis-fork-version $GENESIS_FORK_VERSION \
|
||||||
--altair-fork-epoch $ALTAIR_FORK_EPOCH \
|
--altair-fork-epoch $ALTAIR_FORK_EPOCH \
|
||||||
--merge-fork-epoch $MERGE_FORK_EPOCH \
|
--bellatrix-fork-epoch $MERGE_FORK_EPOCH \
|
||||||
--eth1-id $ETH1_CHAIN_ID \
|
--eth1-id $ETH1_CHAIN_ID \
|
||||||
|
--eth1-block-hash $ETH1_BLOCK_HASH \
|
||||||
--eth1-follow-distance 1 \
|
--eth1-follow-distance 1 \
|
||||||
--seconds-per-slot $SECONDS_PER_SLOT \
|
--seconds-per-slot $SECONDS_PER_SLOT \
|
||||||
--seconds-per-eth1-block $SECONDS_PER_ETH1_BLOCK \
|
--seconds-per-eth1-block $SECONDS_PER_ETH1_BLOCK \
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,6 @@ GENESIS_VALIDATOR_COUNT=${GENESIS_VALIDATOR_COUNT:-80}
|
||||||
# Number of beacon_node instances that you intend to run
|
# Number of beacon_node instances that you intend to run
|
||||||
BN_COUNT=${BN_COUNT:-2}
|
BN_COUNT=${BN_COUNT:-2}
|
||||||
|
|
||||||
# Number of validator clients
|
|
||||||
VC_COUNT=${VC_COUNT:-$BN_COUNT}
|
|
||||||
|
|
||||||
# Number of seconds to delay to start genesis block.
|
# Number of seconds to delay to start genesis block.
|
||||||
# If started by a script this can be 0, if starting by hand
|
# If started by a script this can be 0, if starting by hand
|
||||||
# use something like 180.
|
# use something like 180.
|
||||||
|
|
@ -45,7 +42,9 @@ VC_ARGS=${VC_ARGS:-""}
|
||||||
EXECUTION_ENDPOINT=${EXECUTION_ENDPOINT:-http://localhost:8551}
|
EXECUTION_ENDPOINT=${EXECUTION_ENDPOINT:-http://localhost:8551}
|
||||||
|
|
||||||
ETH1_GENESIS_JSON=${ETH1_GENESIS_JSON:-"../build/el/geth.json"}
|
ETH1_GENESIS_JSON=${ETH1_GENESIS_JSON:-"../build/el/geth.json"}
|
||||||
|
ETH1_GENESIS_BLOCK_JSON=${ETH1_GENESIS_BLOCK_JSON:-"../build/el/genesis_block.json"}
|
||||||
ETH1_CONFIG_YAML=${ETH1_CONFIG_YAML:-"../el/el-config.yaml"}
|
ETH1_CONFIG_YAML=${ETH1_CONFIG_YAML:-"../el/el-config.yaml"}
|
||||||
|
ETH1_BLOCK_HASH=${ETH1_BLOCK_HASH:-`cat $ETH1_GENESIS_BLOCK_JSON | jq -r '.result.hash' | cut -d'x' -f2`}
|
||||||
|
|
||||||
ETH1_CHAIN_ID=${ETH1_CHAIN_ID:-`cat $ETH1_GENESIS_JSON | jq -r '.config.chainId'`}
|
ETH1_CHAIN_ID=${ETH1_CHAIN_ID:-`cat $ETH1_GENESIS_JSON | jq -r '.config.chainId'`}
|
||||||
ETH1_TTD=${ETH1_TTD:-`cat $ETH1_GENESIS_JSON | jq -r '.config.terminalTotalDifficulty'`}
|
ETH1_TTD=${ETH1_TTD:-`cat $ETH1_GENESIS_JSON | jq -r '.config.terminalTotalDifficulty'`}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,14 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MIN_BLOCK_NUM=${1:-${MIN_BLOCK_NUM:-3}}
|
MIN_BLOCK_NUM=${1:-${MIN_BLOCK_NUM:-3}}
|
||||||
STATUSES=("geth to generate DAG" "beacon phase0" "beacon altair" "beacon bellatrix pre-merge" "beacon bellatrix merge" "block number $MIN_BLOCK_NUM")
|
STATUSES=(
|
||||||
|
"geth to generate DAG"
|
||||||
|
"beacon phase0"
|
||||||
|
"beacon altair"
|
||||||
|
"beacon bellatrix pre-merge"
|
||||||
|
"beacon bellatrix merge"
|
||||||
|
"block number $MIN_BLOCK_NUM"
|
||||||
|
)
|
||||||
STATUS=0
|
STATUS=0
|
||||||
|
|
||||||
LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL}
|
LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL}
|
||||||
|
|
@ -36,7 +43,6 @@ MARKER="."
|
||||||
|
|
||||||
function inc_status() {
|
function inc_status() {
|
||||||
echo " done"
|
echo " done"
|
||||||
MARKEr="."
|
|
||||||
STATUS=$((STATUS + 1))
|
STATUS=$((STATUS + 1))
|
||||||
if [ $STATUS -lt ${#STATUSES[@]} ]; then
|
if [ $STATUS -lt ${#STATUSES[@]} ]; then
|
||||||
echo -n "Waiting for ${STATUSES[$STATUS]}..."
|
echo -n "Waiting for ${STATUSES[$STATUS]}..."
|
||||||
|
|
@ -55,7 +61,7 @@ while [ $STATUS -lt ${#STATUSES[@]} ]; do
|
||||||
inc_status
|
inc_status
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
1)
|
1)
|
||||||
result=`wget --no-check-certificate --quiet -O - "$LIGHTHOUSE_BASE_URL/eth/v2/beacon/blocks/head" | jq -r '.data.message.slot'`
|
result=`wget --no-check-certificate --quiet -O - "$LIGHTHOUSE_BASE_URL/eth/v2/beacon/blocks/head" | jq -r '.data.message.slot'`
|
||||||
if [ ! -z "$result" ] && [ $result -gt 0 ]; then
|
if [ ! -z "$result" ] && [ $result -gt 0 ]; then
|
||||||
inc_status
|
inc_status
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||||
|
|
||||||
|
FROM golang:1.19.4-bullseye AS delve
|
||||||
|
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||||
|
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
python3 python3-dev python3-pip curl wget jq gettext gettext-base openssl bash dnsutils postgresql-client make iproute2 netcat && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
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 wget -O /usr/local/bin/geth https://github.com/openrelayxyz/plugeth/releases/download/v1.11.6.1.0/geth-linux-amd64-v1.1.0-v1.11.6.1.0 && chmod a+x /usr/local/bin/geth
|
||||||
|
RUN cd /apps/el-gen && pip3 install -r requirements.txt
|
||||||
|
|
||||||
|
COPY genesis /opt/testnet
|
||||||
|
COPY run-el.sh /opt/testnet/run.sh
|
||||||
|
|
||||||
|
RUN cd /opt/testnet && make genesis-el
|
||||||
|
|
||||||
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
||||||
|
|
||||||
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/fixturenet-eth-plugeth
|
||||||
|
set -x
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/genesis" ]; then
|
||||||
|
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/genesis ${SCRIPT_DIR}/genesis
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/run-el.sh" ]; then
|
||||||
|
cp -fp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/run-el.sh ${SCRIPT_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build -t cerc/fixturenet-eth-plugeth:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
FROM cerc/lighthouse-cli:local AS lcli
|
||||||
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||||
|
FROM cerc/fixturenet-plugeth-plugeth:local AS fnetgeth
|
||||||
|
|
||||||
|
FROM cerc/lighthouse:local
|
||||||
|
|
||||||
|
# cerc/lighthouse is based on Ubuntu
|
||||||
|
RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
|
||||||
|
libssl-dev ca-certificates \
|
||||||
|
curl socat iproute2 telnet wget jq \
|
||||||
|
build-essential python3 python3-dev python3-pip gettext-base \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY genesis /opt/testnet
|
||||||
|
COPY run-cl.sh /opt/testnet/run.sh
|
||||||
|
|
||||||
|
COPY --from=lcli /usr/local/bin/lcli /usr/local/bin/lcli
|
||||||
|
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=ethgen /apps /apps
|
||||||
|
COPY --from=fnetgeth /opt/testnet/el /opt/testnet/el
|
||||||
|
COPY --from=fnetgeth /opt/testnet/build/el /opt/testnet/build/el
|
||||||
|
|
||||||
|
RUN cd /opt/testnet && make genesis-cl
|
||||||
|
|
||||||
|
# Work around some bugs in lcli where the default path is always used.
|
||||||
|
RUN mkdir -p /root/.lighthouse && cd /root/.lighthouse && ln -s /opt/testnet/build/cl/testnet
|
||||||
|
|
||||||
|
RUN mkdir -p /scripts
|
||||||
|
COPY scripts/status-internal.sh /scripts
|
||||||
|
COPY scripts/status.sh /scripts
|
||||||
|
|
||||||
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/fixturenet-plugeth-lighthouse
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/genesis" ]; then
|
||||||
|
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-lighthouse/genesis ${SCRIPT_DIR}/genesis
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "${SCRIPT_DIR}/run-cl.sh" ]; then
|
||||||
|
cp -fp ${SCRIPT_DIR}/../cerc-fixturenet-eth-lighthouse/run-cl.sh ${SCRIPT_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/scripts" ]; then
|
||||||
|
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-lighthouse/scripts ${SCRIPT_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build -t cerc/fixturenet-plugeth-lighthouse:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||||
|
|
||||||
|
FROM golang:1.19.4-bullseye AS delve
|
||||||
|
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||||
|
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
python3 python3-dev python3-pip curl wget jq gettext gettext-base openssl bash dnsutils postgresql-client make iproute2 netcat psmisc && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
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 wget -O /usr/local/bin/geth https://github.com/openrelayxyz/plugeth/releases/download/v1.11.6.1.0/geth-linux-amd64-v1.1.0-v1.11.6.1.0 && chmod a+x /usr/local/bin/geth
|
||||||
|
RUN cd /apps/el-gen && pip3 install -r requirements.txt
|
||||||
|
|
||||||
|
COPY genesis /opt/testnet
|
||||||
|
COPY run-el.sh /opt/testnet/run.sh
|
||||||
|
|
||||||
|
RUN cd /opt/testnet && make genesis-el
|
||||||
|
|
||||||
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
||||||
|
|
||||||
|
# Snag the genesis block info.
|
||||||
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
||||||
|
RUN cp -rp ~/ethdata ~/tmpeth && \
|
||||||
|
geth --datadir ~/tmpeth init /opt/testnet/build/el/geth.json && \
|
||||||
|
geth --datadir ~/tmpeth --http & \
|
||||||
|
sleep 5 && \
|
||||||
|
curl -q --location 'localhost:8545' \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{ "jsonrpc": "2.0", "id": 14, "method": "eth_getBlockByNumber", "params": ["0x0", false] }' \
|
||||||
|
-o /opt/testnet/build/el/genesis_block.json && \
|
||||||
|
killall -9 geth && \
|
||||||
|
rm -rf ~/tmpeth
|
||||||
|
|
||||||
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/fixturenet-plugeth-plugeth
|
||||||
|
set -x
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/genesis" ]; then
|
||||||
|
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/genesis ${SCRIPT_DIR}/genesis
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "${SCRIPT_DIR}/run-el.sh" ]; then
|
||||||
|
cp -fp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/run-el.sh ${SCRIPT_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build -t cerc/fixturenet-plugeth-plugeth:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR
|
||||||
|
|
@ -16,7 +16,7 @@ db-waitforsync=bool Should the statediff service start once geth has synced to
|
||||||
rpc-port=port change RPC port (default: 8545)
|
rpc-port=port change RPC port (default: 8545)
|
||||||
rpc-addr=address change RPC address (default: 127.0.0.1)
|
rpc-addr=address change RPC address (default: 127.0.0.1)
|
||||||
chain-id=number change chain ID (default: 99)
|
chain-id=number change chain ID (default: 99)
|
||||||
extra-args=name extra args to pass to geth on startup
|
extra-args=name extra args to pass to geth on startup
|
||||||
period=seconds use a block time instead of instamine
|
period=seconds use a block time instead of instamine
|
||||||
accounts=number create multiple accounts (default: 1)
|
accounts=number create multiple accounts (default: 1)
|
||||||
address=address eth address to add to genesis
|
address=address eth address to add to genesis
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/lighthouse-cli
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
project_dir=${CERC_REPO_BASE_DIR}/lighthouse
|
||||||
|
docker build -t cerc/lighthouse-cli:local --build-arg PORTABLE=true -f ${project_dir}/lcli/Dockerfile ${build_command_args} ${project_dir}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
FROM sigp/lighthouse:v4.1.0-modern
|
ARG TAG_SUFFIX="-modern"
|
||||||
|
FROM sigp/lighthouse:v4.1.0${TAG_SUFFIX}
|
||||||
|
|
||||||
RUN apt-get update; apt-get install bash netcat curl less jq -y;
|
RUN apt-get update; apt-get install bash netcat curl less jq -y;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,36 @@
|
||||||
cerc-io/ipld-eth-db
|
github.com/cerc-io/ipld-eth-db
|
||||||
cerc-io/go-ethereum
|
github.com/cerc-io/go-ethereum
|
||||||
cerc-io/ipld-eth-server
|
github.com/cerc-io/ipld-eth-server
|
||||||
cerc-io/eth-statediff-service
|
github.com/cerc-io/eth-statediff-service
|
||||||
cerc-io/eth-statediff-fill-service
|
github.com/cerc-io/eth-statediff-fill-service
|
||||||
cerc-io/ipld-eth-db-validator
|
github.com/cerc-io/ipld-eth-db-validator
|
||||||
cerc-io/ipld-eth-beacon-indexer
|
github.com/cerc-io/ipld-eth-beacon-indexer
|
||||||
cerc-io/ipld-eth-beacon-db
|
github.com/cerc-io/ipld-eth-beacon-db
|
||||||
cerc-io/laconicd
|
github.com/cerc-io/laconicd
|
||||||
cerc-io/laconic-sdk
|
github.com/cerc-io/laconic-sdk
|
||||||
cerc-io/laconic-registry-cli
|
github.com/cerc-io/laconic-registry-cli
|
||||||
cerc-io/laconic-console
|
github.com/cerc-io/laconic-console
|
||||||
cerc-io/mobymask-watcher
|
github.com/cerc-io/mobymask-watcher
|
||||||
cerc-io/watcher-ts
|
github.com/cerc-io/watcher-ts
|
||||||
cerc-io/mobymask-v2-watcher-ts
|
github.com/cerc-io/mobymask-v2-watcher-ts
|
||||||
cerc-io/MobyMask
|
github.com/cerc-io/MobyMask
|
||||||
vulcanize/uniswap-watcher-ts
|
github.com/vulcanize/uniswap-watcher-ts
|
||||||
vulcanize/uniswap-v3-info
|
github.com/vulcanize/uniswap-v3-info
|
||||||
vulcanize/assemblyscript
|
github.com/vulcanize/assemblyscript
|
||||||
cerc-io/eth-probe
|
github.com/cerc-io/eth-probe
|
||||||
cerc-io/tx-spammer
|
github.com/cerc-io/tx-spammer
|
||||||
dboreham/foundry
|
github.com/dboreham/foundry
|
||||||
lirewine/gem
|
github.com/lirewine/gem
|
||||||
lirewine/debug
|
github.com/lirewine/debug
|
||||||
lirewine/crypto
|
github.com/lirewine/crypto
|
||||||
lirewine/sdk
|
github.com/lirewine/sdk
|
||||||
telackey/act_runner
|
github.com/telackey/act_runner
|
||||||
ethereum-optimism/op-geth
|
github.com/ethereum-optimism/op-geth
|
||||||
ethereum-optimism/optimism
|
github.com/ethereum-optimism/optimism
|
||||||
pokt-network/pocket-core
|
github.com/pokt-network/pocket-core
|
||||||
pokt-network/pocket-core-deployments
|
github.com/pokt-network/pocket-core-deployments
|
||||||
cerc-io/azimuth-watcher-ts
|
github.com/cerc-io/azimuth-watcher-ts
|
||||||
cerc-io/ipld-eth-state-snapshot
|
github.com/cerc-io/ipld-eth-state-snapshot
|
||||||
cerc-io/gelato-watcher-ts
|
github.com/cerc-io/gelato-watcher-ts
|
||||||
filecoin-project/lotus
|
github.com/filecoin-project/lotus
|
||||||
|
git.vdb.to/cerc-io/test-project
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: azimuth
|
name: azimuth
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/azimuth-watcher-ts
|
- github.com/cerc-io/azimuth-watcher-ts
|
||||||
containers:
|
containers:
|
||||||
- cerc/watcher-azimuth
|
- cerc/watcher-azimuth
|
||||||
pods:
|
pods:
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@ version: "1.0"
|
||||||
name: chain-chunker
|
name: chain-chunker
|
||||||
decription: "Stack to build containers for chain-chunker"
|
decription: "Stack to build containers for chain-chunker"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/ipld-eth-state-snapshot
|
- github.com/cerc-io/ipld-eth-state-snapshot@v5
|
||||||
- cerc-io/eth-statediff-service
|
- github.com/cerc-io/eth-statediff-service@v5
|
||||||
- cerc-io/ipld-eth-db
|
- github.com/cerc-io/ipld-eth-db@v5
|
||||||
- cerc-io/ipld-eth-server
|
- github.com/cerc-io/ipld-eth-server@v5
|
||||||
containers:
|
containers:
|
||||||
- cerc/ipld-eth-state-snapshot
|
- cerc/ipld-eth-state-snapshot
|
||||||
- cerc/eth-statediff-service
|
- cerc/eth-statediff-service
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: erc20-watcher
|
name: erc20-watcher
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- cerc-io/ipld-eth-db
|
- github.com/cerc-io/ipld-eth-db
|
||||||
- cerc-io/ipld-eth-server
|
- github.com/cerc-io/ipld-eth-server
|
||||||
- cerc-io/watcher-ts
|
- github.com/cerc-io/watcher-ts
|
||||||
- dboreham/foundry
|
- github.com/dboreham/foundry
|
||||||
containers:
|
containers:
|
||||||
- cerc/foundry
|
- cerc/foundry
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: erc721-watcher
|
name: erc721-watcher
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- cerc-io/ipld-eth-db
|
- github.com/cerc-io/ipld-eth-db
|
||||||
- cerc-io/ipld-eth-server
|
- github.com/cerc-io/ipld-eth-server
|
||||||
- cerc-io/watcher-ts
|
- github.com/cerc-io/watcher-ts
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/go-ethereum-foundry
|
- cerc/go-ethereum-foundry
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,15 @@ version: "1.0"
|
||||||
name: fixturenet-eth-loaded
|
name: fixturenet-eth-loaded
|
||||||
decription: "Loaded Ethereum Fixturenet"
|
decription: "Loaded Ethereum Fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- cerc-io/tx-spammer
|
- github.com/cerc-io/tx-spammer
|
||||||
- cerc-io/ipld-eth-server
|
- github.com/cerc-io/ipld-eth-server
|
||||||
- cerc-io/ipld-eth-db
|
- github.com/cerc-io/ipld-eth-db
|
||||||
- cerc/go-ethereum
|
- github.com/cerc-io/lighthouse
|
||||||
containers:
|
containers:
|
||||||
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/ipld-eth-server
|
- cerc/ipld-eth-server
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,14 @@ version: "1.2"
|
||||||
name: fixturenet-eth-tx
|
name: fixturenet-eth-tx
|
||||||
decription: "Ethereum Fixturenet w/ tx-spammer"
|
decription: "Ethereum Fixturenet w/ tx-spammer"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- cerc-io/tx-spammer
|
- github.com/cerc-io/tx-spammer
|
||||||
- dboreham/foundry
|
- github.com/dboreham/foundry
|
||||||
|
- github.com/cerc-io/lighthouse
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/tx-spammer
|
- cerc/tx-spammer
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# fixturenet-eth
|
# fixturenet-eth
|
||||||
|
|
||||||
Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator (the installation of which is covered [here](https://github.com/cerc-io/stack-orchestrator#user-mode)):
|
Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator (the installation of which is covered [here](https://github.com/cerc-io/stack-orchestrator)):
|
||||||
|
|
||||||
## Clone required repositories
|
## Clone required repositories
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ It is not necessary to use them all at once, but a complete example follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Setup
|
# Setup
|
||||||
$ laconic-so setup-repositories --include cerc-io/go-ethereum,cerc-io/ipld-eth-db,cerc-io/ipld-eth-server,cerc-io/ipld-eth-beacon-db,cerc-io/ipld-eth-beacon-indexer,cerc-io/eth-probe,cerc-io/tx-spammer
|
$ laconic-so setup-repositories --include github.com/cerc-io/go-ethereum,github.com/cerc-io/ipld-eth-db,github.com/cerc-io/ipld-eth-server,github.com/cerc-io/ipld-eth-beacon-db,github.com/cerc-io/ipld-eth-beacon-indexer,github.com/cerc-io/eth-probe,github.com/cerc-io/tx-spammer
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
$ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/ipld-eth-beacon-db,cerc/ipld-eth-beacon-indexer,cerc/eth-probe,cerc/keycloak,cerc/tx-spammer
|
$ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/ipld-eth-beacon-db,cerc/ipld-eth-beacon-indexer,cerc/eth-probe,cerc/keycloak,cerc/tx-spammer
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,13 @@ version: "1.1"
|
||||||
name: fixturenet-eth
|
name: fixturenet-eth
|
||||||
decription: "Ethereum Fixturenet"
|
decription: "Ethereum Fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- dboreham/foundry
|
- github.com/cerc-io/lighthouse
|
||||||
|
- github.com/dboreham/foundry
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/foundry
|
- cerc/foundry
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@ version: "1.1"
|
||||||
name: fixturenet-laconic-loaded
|
name: fixturenet-laconic-loaded
|
||||||
description: "A full featured laconic fixturenet"
|
description: "A full featured laconic fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/laconicd
|
- github.com/cerc-io/laconicd
|
||||||
- lirewine/debug
|
- github.com/lirewine/debug
|
||||||
- lirewine/crypto
|
- github.com/lirewine/crypto
|
||||||
- lirewine/gem
|
- github.com/lirewine/gem
|
||||||
- lirewine/sdk
|
- github.com/lirewine/sdk
|
||||||
- cerc-io/laconic-sdk
|
- github.com/cerc-io/laconic-sdk
|
||||||
- cerc-io/laconic-registry-cli
|
- github.com/cerc-io/laconic-registry-cli
|
||||||
- cerc-io/laconic-console
|
- github.com/cerc-io/laconic-console
|
||||||
npms:
|
npms:
|
||||||
- laconic-sdk
|
- laconic-sdk
|
||||||
- laconic-registry-cli
|
- laconic-registry-cli
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ version: "1.0"
|
||||||
name: fixturenet-laconicd
|
name: fixturenet-laconicd
|
||||||
description: "A laconicd fixturenet"
|
description: "A laconicd fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/laconicd
|
- github.com/cerc-io/laconicd
|
||||||
- cerc-io/laconic-sdk
|
- github.com/cerc-io/laconic-sdk
|
||||||
- cerc-io/laconic-registry-cli
|
- github.com/cerc-io/laconic-registry-cli
|
||||||
npms:
|
npms:
|
||||||
- laconic-sdk
|
- laconic-sdk
|
||||||
- laconic-registry-cli
|
- laconic-registry-cli
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ version: "1.0"
|
||||||
name: fixturenet-lotus
|
name: fixturenet-lotus
|
||||||
description: "A lotus fixturenet"
|
description: "A lotus fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- filecoin-project/lotus
|
- github.com/filecoin-project/lotus
|
||||||
containers:
|
containers:
|
||||||
- cerc/lotus
|
- cerc/lotus
|
||||||
pods:
|
pods:
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,6 @@ laconic-so --stack fixturenet-optimism setup-repositories
|
||||||
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
||||||
```
|
```
|
||||||
|
|
||||||
Checkout to the required versions and branches in repos:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Optimism
|
|
||||||
cd ~/cerc/optimism
|
|
||||||
git checkout v1.0.4
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the container images:
|
Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -9,19 +9,11 @@ Prerequisite: An L1 Ethereum RPC endpoint
|
||||||
Clone required repositories:
|
Clone required repositories:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so --stack fixturenet-optimism setup-repositories --exclude cerc-io/go-ethereum
|
laconic-so --stack fixturenet-optimism setup-repositories --exclude github.com/cerc-io/go-ethereum
|
||||||
|
|
||||||
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
||||||
```
|
```
|
||||||
|
|
||||||
Checkout to the required versions and branches in repos:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Optimism
|
|
||||||
cd ~/cerc/optimism
|
|
||||||
git checkout v1.0.4
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the container images:
|
Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,15 @@ version: "1.0"
|
||||||
name: fixturenet-optimism
|
name: fixturenet-optimism
|
||||||
decription: "Optimism Fixturenet"
|
decription: "Optimism Fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- dboreham/foundry
|
- github.com/cerc-io/lighthouse
|
||||||
- ethereum-optimism/optimism
|
- github.com/dboreham/foundry
|
||||||
- ethereum-optimism/op-geth
|
- github.com/ethereum-optimism/optimism@v1.0.4
|
||||||
|
- github.com/ethereum-optimism/op-geth@v1.101105.2
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/foundry
|
- cerc/foundry
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# fixturenet-plugeth-tx
|
||||||
|
|
||||||
|
A variation of `fixturenet-eth` that uses `plugeth` instead of `go-ethereum`.
|
||||||
|
|
||||||
|
See `stacks/fixturenet-eth/README.md` for more information.
|
||||||
|
|
||||||
|
## Containers
|
||||||
|
|
||||||
|
* cerc/lighthouse
|
||||||
|
* cerc/fixturenet-eth-plugeth
|
||||||
|
* cerc/fixturenet-eth-lighthouse
|
||||||
|
* cerc/tx-spammer
|
||||||
|
|
||||||
|
## Deploy the stack
|
||||||
|
```
|
||||||
|
$ laconic-so --stack fixturenet-plugeth-tx setup-repositories
|
||||||
|
$ laconic-so --stack fixturenet-plugeth-tx build-containers
|
||||||
|
$ laconic-so --stack fixturenet-plugeth-tx deploy up
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
version: "1.2"
|
||||||
|
name: fixturenet-plugeth-tx
|
||||||
|
decription: "plugeth Ethereum Fixturenet w/ tx-spammer"
|
||||||
|
repos:
|
||||||
|
- github.com/cerc-io/tx-spammer
|
||||||
|
- github.com/dboreham/foundry
|
||||||
|
- github.com/cerc-io/lighthouse
|
||||||
|
containers:
|
||||||
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
|
- cerc/fixturenet-plugeth-plugeth
|
||||||
|
- cerc/fixturenet-plugeth-lighthouse
|
||||||
|
- cerc/tx-spammer
|
||||||
|
- cerc/foundry
|
||||||
|
pods:
|
||||||
|
- fixturenet-plugeth
|
||||||
|
- foundry
|
||||||
|
- tx-spammer
|
||||||
|
|
@ -1,41 +1,41 @@
|
||||||
# Pocket Fixturenet
|
# Pocket Fixturenet
|
||||||
|
|
||||||
Instructions for deploying a local single-node Pocket chain alongside a geth + lighthouse blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator.
|
Instructions for deploying a local single-node Pocket chain alongside a geth + lighthouse blockchain "fixturenet" for development and testing purposes using Stack Orchestrator.
|
||||||
|
|
||||||
## 1. Build Laconic Stack Orchestrator
|
## 1. Clone required repositories
|
||||||
Build this fork of Laconic Stack Orchestrator which includes the fixturenet-pocket stack:
|
|
||||||
```
|
|
||||||
$ scripts/build_shiv_package.sh
|
|
||||||
$ cd package
|
|
||||||
$ mv laconic-so-{version} /usr/local/bin/laconic-so # Or move laconic-so to ~/bin or your favorite on-path directory
|
|
||||||
```
|
|
||||||
|
|
||||||
## 2. Clone required repositories
|
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket setup-repositories
|
$ laconic-so --stack fixturenet-pocket setup-repositories
|
||||||
```
|
```
|
||||||
## 3. Build the stack's containers
|
## 2. Build the stack's containers
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket build-containers
|
$ laconic-so --stack fixturenet-pocket build-containers
|
||||||
```
|
```
|
||||||
## 4. Deploy the stack
|
## 3. Deploy the stack
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket deploy up
|
$ laconic-so --stack fixturenet-pocket deploy up
|
||||||
```
|
```
|
||||||
It may take up to 10 minutes for the Eth Fixturenet to fully come online and start producing blocks.
|
It may take up to 10 minutes for the Eth Fixturenet to fully come online and start producing blocks.
|
||||||
## 5. Check status
|
|
||||||
|
## 4. Check status
|
||||||
**Eth Fixturenet:**
|
**Eth Fixturenet:**
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
|
$ laconic-so --stack fixturenet-pocket deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
|
||||||
|
```
|
||||||
|
Response:
|
||||||
|
```
|
||||||
Waiting for geth to generate DAG.... done
|
Waiting for geth to generate DAG.... done
|
||||||
Waiting for beacon phase0.... done
|
Waiting for beacon phase0.... done
|
||||||
Waiting for beacon altair.... done
|
Waiting for beacon altair.... done
|
||||||
Waiting for beacon bellatrix pre-merge.... done
|
Waiting for beacon bellatrix pre-merge.... done
|
||||||
Waiting for beacon bellatrix merge.... done
|
Waiting for beacon bellatrix merge.... done
|
||||||
```
|
```
|
||||||
|
|
||||||
**Pocket node:**
|
**Pocket node:**
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket deploy exec pocket "pocket query height"
|
$ laconic-so --stack fixturenet-pocket deploy exec pocket "pocket query height"
|
||||||
|
```
|
||||||
|
Response:
|
||||||
|
```
|
||||||
2023/04/20 08:07:46 Initializing Pocket Datadir
|
2023/04/20 08:07:46 Initializing Pocket Datadir
|
||||||
2023/04/20 08:07:46 datadir = /home/app/.pocket
|
2023/04/20 08:07:46 datadir = /home/app/.pocket
|
||||||
http://localhost:8081/v1/query/height
|
http://localhost:8081/v1/query/height
|
||||||
|
|
@ -43,17 +43,18 @@ http://localhost:8081/v1/query/height
|
||||||
"height": 4
|
"height": 4
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
or
|
or see the full logs:
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket deploy logs pocket
|
$ laconic-so --stack fixturenet-pocket deploy logs pocket
|
||||||
```
|
```
|
||||||
## 6. Send a relay request to Pocket node
|
## 5. Send a relay request to Pocket node
|
||||||
The Pocket node serves relay requests at `http://localhost:8081/v1/client/sim`
|
The Pocket node serves relay requests at `http://localhost:8081/v1/client/sim`
|
||||||
**Example request:**
|
|
||||||
|
Example request:
|
||||||
```
|
```
|
||||||
$ curl -X POST --data '{"relay_network_id":"0021","payload":{"data":"{\"jsonrpc\": \"2.0\",\"id\": 1,\"method\": \"eth_blockNumber\",\"params\": []}","method":"POST","path":"","headers":{}}}' http://localhost:8081/v1/client/sim
|
$ curl -X POST --data '{"relay_network_id":"0021","payload":{"data":"{\"jsonrpc\": \"2.0\",\"id\": 1,\"method\": \"eth_blockNumber\",\"params\": []}","method":"POST","path":"","headers":{}}}' http://localhost:8081/v1/client/sim
|
||||||
```
|
```
|
||||||
**Response:**
|
Response:
|
||||||
```
|
```
|
||||||
"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x6fe\"}\n"
|
"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x6fe\"}\n"
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,14 @@ version: "1.0"
|
||||||
name: fixturenet-pocket
|
name: fixturenet-pocket
|
||||||
description: "A single node pocket chain that can serve relays from the geth-1 node in eth-fixturenet"
|
description: "A single node pocket chain that can serve relays from the geth-1 node in eth-fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- pokt-network/pocket-core
|
- github.com/cerc-io/lighthouse
|
||||||
- pokt-network/pocket-core-deployments # contains the dockerfile
|
- github.com/pokt-network/pocket-core
|
||||||
|
- github.com/pokt-network/pocket-core-deployments # contains the dockerfile
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/pocket
|
- cerc/pocket
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: gelato
|
name: gelato
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/gelato-watcher-ts
|
- github.com/cerc-io/gelato-watcher-ts
|
||||||
containers:
|
containers:
|
||||||
- cerc/watcher-gelato
|
- cerc/watcher-gelato
|
||||||
pods:
|
pods:
|
||||||
|
|
|
||||||
|
|
@ -18,26 +18,6 @@ laconic-so --stack mobymask-v2 setup-repositories
|
||||||
NOTE: If repositories already exist and are checked out to different versions, `setup-repositories` command will throw an error.
|
NOTE: If repositories already exist and are checked out to different versions, `setup-repositories` command will throw an error.
|
||||||
For getting around this, the repositories mentioned below can be removed and then run the command.
|
For getting around this, the repositories mentioned below can be removed and then run the command.
|
||||||
|
|
||||||
Checkout to the required versions and branches in repos
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# watcher-ts
|
|
||||||
cd ~/cerc/watcher-ts
|
|
||||||
git checkout v0.2.41
|
|
||||||
|
|
||||||
# mobymask-v2-watcher-ts
|
|
||||||
cd ~/cerc/mobymask-v2-watcher-ts
|
|
||||||
git checkout v0.1.1
|
|
||||||
|
|
||||||
# MobyMask
|
|
||||||
cd ~/cerc/MobyMask
|
|
||||||
git checkout v0.1.2
|
|
||||||
|
|
||||||
# Optimism
|
|
||||||
cd ~/cerc/optimism
|
|
||||||
git checkout v1.0.4
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the container images:
|
Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -9,27 +9,11 @@ Prerequisite: L2 Optimism Geth and Node RPC endpoints
|
||||||
Clone required repositories:
|
Clone required repositories:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/MobyMask,cerc-io/watcher-ts,cerc-io/mobymask-v2-watcher-ts
|
laconic-so --stack mobymask-v2 setup-repositories --include github.com/cerc-io/MobyMask,github.com/cerc-io/watcher-ts,github.com/cerc-io/mobymask-v2-watcher-ts
|
||||||
|
|
||||||
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
||||||
```
|
```
|
||||||
|
|
||||||
Checkout to the required versions and branches in repos:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# watcher-ts
|
|
||||||
cd ~/cerc/watcher-ts
|
|
||||||
git checkout v0.2.41
|
|
||||||
|
|
||||||
# mobymask-v2-watcher-ts
|
|
||||||
cd ~/cerc/mobymask-v2-watcher-ts
|
|
||||||
git checkout v0.1.1
|
|
||||||
|
|
||||||
# MobyMask
|
|
||||||
cd ~/cerc/MobyMask
|
|
||||||
git checkout v0.1.2
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the container images:
|
Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,25 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: mobymask-v2
|
name: mobymask-v2
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- dboreham/foundry
|
- github.com/cerc-io/lighthouse
|
||||||
- ethereum-optimism/optimism
|
- github.com/dboreham/foundry
|
||||||
- ethereum-optimism/op-geth
|
- github.com/ethereum-optimism/optimism@v1.0.4
|
||||||
- cerc-io/watcher-ts
|
- github.com/ethereum-optimism/op-geth@v1.101105.2
|
||||||
- cerc-io/mobymask-v2-watcher-ts
|
- github.com/cerc-io/watcher-ts@v0.2.43
|
||||||
- cerc-io/MobyMask
|
- github.com/cerc-io/mobymask-v2-watcher-ts@v0.1.1
|
||||||
|
- github.com/cerc-io/MobyMask@v0.1.2
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/foundry
|
- cerc/foundry
|
||||||
- cerc/optimism-contracts
|
- cerc/optimism-contracts
|
||||||
- cerc/optimism-l2geth
|
- cerc/optimism-l2geth
|
||||||
- cerc/optimism-op-batcher
|
- cerc/optimism-op-batcher
|
||||||
|
- cerc/optimism-op-proposer
|
||||||
- cerc/optimism-op-node
|
- cerc/optimism-op-node
|
||||||
- cerc/watcher-ts
|
- cerc/watcher-ts
|
||||||
- cerc/watcher-mobymask-v2
|
- cerc/watcher-mobymask-v2
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ This demo has been tested on a `Ubuntu 22.04 LTS` machine with `8GB` of RAM
|
||||||
Clone required repositories:
|
Clone required repositories:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/MobyMask,cerc-io/watcher-ts,cerc-io/mobymask-v2-watcher-ts
|
laconic-so --stack mobymask-v2 setup-repositories --include github.com/cerc-io/MobyMask,github.com/cerc-io/watcher-ts,github.com/cerc-io/mobymask-v2-watcher-ts
|
||||||
|
|
||||||
# This will clone the required repositories at ~/cerc
|
# This will clone the required repositories at ~/cerc
|
||||||
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned in the next step and re-run the command
|
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned in the next step and re-run the command
|
||||||
|
|
@ -30,22 +30,6 @@ Clone required repositories:
|
||||||
# 100%|##############################################################################################################################################| 1.41k/1.41k [00:18<00:00, 76.4B/s]
|
# 100%|##############################################################################################################################################| 1.41k/1.41k [00:18<00:00, 76.4B/s]
|
||||||
```
|
```
|
||||||
|
|
||||||
Checkout to the required versions and branches in repos:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# watcher-ts
|
|
||||||
cd ~/cerc/watcher-ts
|
|
||||||
git checkout v0.2.41
|
|
||||||
|
|
||||||
# mobymask-v2-watcher-ts
|
|
||||||
cd ~/cerc/mobymask-v2-watcher-ts
|
|
||||||
git checkout v0.1.1
|
|
||||||
|
|
||||||
# MobyMask
|
|
||||||
cd ~/cerc/MobyMask
|
|
||||||
git checkout v0.1.2
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the container images:
|
Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ This deployment expects that ipld-eth-server's endpoints are available on the lo
|
||||||
## Clone required repositories
|
## Clone required repositories
|
||||||
|
|
||||||
```
|
```
|
||||||
$ laconic-so setup-repositories --include cerc-io/watcher-ts
|
$ laconic-so setup-repositories --include github.com/cerc-io/watcher-ts
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build the watcher container
|
## Build the watcher container
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: mobymask-watcher
|
name: mobymask-watcher
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/watcher-ts/v0.2.19
|
- github.com/cerc-io/watcher-ts/v0.2.19
|
||||||
containers:
|
containers:
|
||||||
- cerc/watcher-mobymask
|
- cerc/watcher-mobymask
|
||||||
pods:
|
pods:
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ version: "1.1"
|
||||||
name: package-registry
|
name: package-registry
|
||||||
decription: "Local Package Registry"
|
decription: "Local Package Registry"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/hosting
|
- github.com/cerc-io/hosting
|
||||||
- telackey/act_runner
|
- gitea.com/gitea/act_runner
|
||||||
containers:
|
containers:
|
||||||
- cerc/act-runner
|
- cerc/act-runner
|
||||||
- cerc/act-runner-task-executor
|
- cerc/act-runner-task-executor
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@ version: "1.0"
|
||||||
name: test
|
name: test
|
||||||
description: "A test stack"
|
description: "A test stack"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/laconicd
|
- github.com/cerc-io/laconicd
|
||||||
|
- git.vdb.to/cerc-io/test-project@test-branch
|
||||||
containers:
|
containers:
|
||||||
- cerc/test-container
|
- cerc/test-container
|
||||||
pods:
|
pods:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: uniswap-v3
|
name: uniswap-v3
|
||||||
repos:
|
repos:
|
||||||
- vulcanize/uniswap-watcher-ts
|
- github.com/vulcanize/uniswap-watcher-ts
|
||||||
- vulcanize/uniswap-v3-info
|
- github.com/vulcanize/uniswap-v3-info
|
||||||
containers:
|
containers:
|
||||||
- cerc/watcher-uniswap-v3
|
- cerc/watcher-uniswap-v3
|
||||||
- cerc/uniswap-v3-info
|
- cerc/uniswap-v3-info
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,11 @@ def up(ctx, extra_args):
|
||||||
if global_context.verbose:
|
if global_context.verbose:
|
||||||
print(f"Running compose up with container_exec_env: {container_exec_env}, extra_args: {extra_args_list}")
|
print(f"Running compose up with container_exec_env: {container_exec_env}, extra_args: {extra_args_list}")
|
||||||
for pre_start_command in cluster_context.pre_start_commands:
|
for pre_start_command in cluster_context.pre_start_commands:
|
||||||
_run_command(ctx.obj, cluster_context.cluster, pre_start_command)
|
_run_command(global_context, cluster_context.cluster, pre_start_command)
|
||||||
ctx.obj.docker.compose.up(detach=True, services=extra_args_list)
|
ctx.obj.docker.compose.up(detach=True, services=extra_args_list)
|
||||||
for post_start_command in cluster_context.post_start_commands:
|
for post_start_command in cluster_context.post_start_commands:
|
||||||
_run_command(ctx.obj, cluster_context.cluster, post_start_command)
|
_run_command(global_context, cluster_context.cluster, post_start_command)
|
||||||
_orchestrate_cluster_config(ctx.obj, cluster_context.config, ctx.obj.docker, container_exec_env)
|
_orchestrate_cluster_config(global_context, cluster_context.config, ctx.obj.docker, container_exec_env)
|
||||||
|
|
||||||
|
|
||||||
@command.command()
|
@command.command()
|
||||||
|
|
@ -130,7 +130,7 @@ def port(ctx, extra_args):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
service_name = extra_args_list[0]
|
service_name = extra_args_list[0]
|
||||||
exposed_port = extra_args_list[1]
|
exposed_port = extra_args_list[1]
|
||||||
if ctx.parent.obj.verbose:
|
if global_context.verbose:
|
||||||
print(f"Running compose port {service_name} {exposed_port}")
|
print(f"Running compose port {service_name} {exposed_port}")
|
||||||
mapped_port_data = ctx.obj.docker.compose.port(service_name, exposed_port)
|
mapped_port_data = ctx.obj.docker.compose.port(service_name, exposed_port)
|
||||||
print(f"{mapped_port_data[0]}:{mapped_port_data[1]}")
|
print(f"{mapped_port_data[0]}:{mapped_port_data[1]}")
|
||||||
|
|
|
||||||
|
|
@ -52,15 +52,111 @@ def is_git_repo(path):
|
||||||
# )
|
# )
|
||||||
|
|
||||||
|
|
||||||
|
def branch_strip(s):
|
||||||
|
return s.split('@')[0]
|
||||||
|
|
||||||
|
|
||||||
|
def host_and_path_for_repo(fully_qualified_repo):
|
||||||
|
repo_branch_split = fully_qualified_repo.split("@")
|
||||||
|
repo_branch = repo_branch_split[-1] if len(repo_branch_split) > 1 else None
|
||||||
|
repo_host_split = repo_branch_split[0].split("/")
|
||||||
|
# Legacy unqualified repo means github
|
||||||
|
if len(repo_host_split) == 2:
|
||||||
|
return "github.com", "/".join(repo_host_split), repo_branch
|
||||||
|
else:
|
||||||
|
if len(repo_host_split) == 3:
|
||||||
|
# First part is the host
|
||||||
|
return repo_host_split[0], "/".join(repo_host_split[1:]), repo_branch
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: fix the messy arg list here
|
||||||
|
def process_repo(verbose, quiet, dry_run, pull, check_only, git_ssh, dev_root_path, branches_array, fully_qualified_repo):
|
||||||
|
repo_host, repo_path, repo_branch = host_and_path_for_repo(fully_qualified_repo)
|
||||||
|
git_ssh_prefix = f"git@{repo_host}:"
|
||||||
|
git_http_prefix = f"https://{repo_host}/"
|
||||||
|
full_github_repo_path = f"{git_ssh_prefix if git_ssh else git_http_prefix}{repo_path}"
|
||||||
|
repoName = repo_path.split("/")[-1]
|
||||||
|
full_filesystem_repo_path = os.path.join(dev_root_path, repoName)
|
||||||
|
is_present = os.path.isdir(full_filesystem_repo_path)
|
||||||
|
current_repo_branch = git.Repo(full_filesystem_repo_path).active_branch.name if is_present else None
|
||||||
|
if not quiet:
|
||||||
|
present_text = f"already exists active branch: {current_repo_branch}" if is_present \
|
||||||
|
else 'Needs to be fetched'
|
||||||
|
print(f"Checking: {full_filesystem_repo_path}: {present_text}")
|
||||||
|
# Quick check that it's actually a repo
|
||||||
|
if is_present:
|
||||||
|
if not is_git_repo(full_filesystem_repo_path):
|
||||||
|
print(f"Error: {full_filesystem_repo_path} does not contain a valid git repository")
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
if pull:
|
||||||
|
if verbose:
|
||||||
|
print(f"Running git pull for {full_filesystem_repo_path}")
|
||||||
|
if not check_only:
|
||||||
|
git_repo = git.Repo(full_filesystem_repo_path)
|
||||||
|
origin = git_repo.remotes.origin
|
||||||
|
origin.pull(progress=None if quiet else GitProgress())
|
||||||
|
else:
|
||||||
|
print("(git pull skipped)")
|
||||||
|
if not is_present:
|
||||||
|
# Clone
|
||||||
|
if verbose:
|
||||||
|
print(f'Running git clone for {full_github_repo_path} into {full_filesystem_repo_path}')
|
||||||
|
if not dry_run:
|
||||||
|
git.Repo.clone_from(full_github_repo_path,
|
||||||
|
full_filesystem_repo_path,
|
||||||
|
progress=None if quiet else GitProgress())
|
||||||
|
else:
|
||||||
|
print("(git clone skipped)")
|
||||||
|
# Checkout the requested branch, if one was specified
|
||||||
|
branch_to_checkout = None
|
||||||
|
if branches_array:
|
||||||
|
# Find the current repo in the branches list
|
||||||
|
print("Checking")
|
||||||
|
for repo_branch in branches_array:
|
||||||
|
repo_branch_tuple = repo_branch.split(" ")
|
||||||
|
if repo_branch_tuple[0] == branch_strip(fully_qualified_repo):
|
||||||
|
# checkout specified branch
|
||||||
|
branch_to_checkout = repo_branch_tuple[1]
|
||||||
|
else:
|
||||||
|
branch_to_checkout = repo_branch
|
||||||
|
|
||||||
|
if branch_to_checkout:
|
||||||
|
if current_repo_branch is None or (current_repo_branch and (current_repo_branch != branch_to_checkout)):
|
||||||
|
if not quiet:
|
||||||
|
print(f"switching to branch {branch_to_checkout} in repo {repo_path}")
|
||||||
|
git_repo = git.Repo(full_filesystem_repo_path)
|
||||||
|
git_repo.git.checkout(branch_to_checkout)
|
||||||
|
else:
|
||||||
|
if verbose:
|
||||||
|
print(f"repo {repo_path} is already switched to branch {branch_to_checkout}")
|
||||||
|
|
||||||
|
|
||||||
|
def parse_branches(branches_string):
|
||||||
|
if branches_string:
|
||||||
|
result_array = []
|
||||||
|
branches_directives = branches_string.split(",")
|
||||||
|
for branch_directive in branches_directives:
|
||||||
|
split_directive = branch_directive.split("@")
|
||||||
|
if len(split_directive) != 2:
|
||||||
|
print(f"Error: branch specified is not valid: {branch_directive}")
|
||||||
|
sys.exit(1)
|
||||||
|
result_array.append(f"{split_directive[0]} {split_directive[1]}")
|
||||||
|
return result_array
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
||||||
@click.option("--include", help="only clone these repositories")
|
@click.option("--include", help="only clone these repositories")
|
||||||
@click.option("--exclude", help="don\'t clone these repositories")
|
@click.option("--exclude", help="don\'t clone these repositories")
|
||||||
@click.option('--git-ssh', is_flag=True, default=False)
|
@click.option('--git-ssh', is_flag=True, default=False)
|
||||||
@click.option('--check-only', is_flag=True, default=False)
|
@click.option('--check-only', is_flag=True, default=False)
|
||||||
@click.option('--pull', is_flag=True, default=False)
|
@click.option('--pull', is_flag=True, default=False)
|
||||||
|
@click.option("--branches", help="override branches for repositories")
|
||||||
@click.option('--branches-file', help="checkout branches specified in this file")
|
@click.option('--branches-file', help="checkout branches specified in this file")
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def command(ctx, include, exclude, git_ssh, check_only, pull, branches_file):
|
def command(ctx, include, exclude, git_ssh, check_only, pull, branches, branches_file):
|
||||||
'''git clone the set of repositories required to build the complete system from source'''
|
'''git clone the set of repositories required to build the complete system from source'''
|
||||||
|
|
||||||
quiet = ctx.obj.quiet
|
quiet = ctx.obj.quiet
|
||||||
|
|
@ -68,16 +164,29 @@ def command(ctx, include, exclude, git_ssh, check_only, pull, branches_file):
|
||||||
dry_run = ctx.obj.dry_run
|
dry_run = ctx.obj.dry_run
|
||||||
stack = ctx.obj.stack
|
stack = ctx.obj.stack
|
||||||
|
|
||||||
branches = []
|
branches_array = []
|
||||||
|
|
||||||
# TODO: branches file needs to be re-worked in the context of stacks
|
# TODO: branches file needs to be re-worked in the context of stacks
|
||||||
if branches_file:
|
if branches_file:
|
||||||
if verbose:
|
if branches:
|
||||||
print(f"loading branches from: {branches_file}")
|
print("Error: can't specify both --branches and --branches-file")
|
||||||
with open(branches_file) as branches_file_open:
|
sys.exit(1)
|
||||||
branches = branches_file_open.read().splitlines()
|
else:
|
||||||
if verbose:
|
if verbose:
|
||||||
print(f"Branches are: {branches}")
|
print(f"loading branches from: {branches_file}")
|
||||||
|
with open(branches_file) as branches_file_open:
|
||||||
|
branches_array = branches_file_open.read().splitlines()
|
||||||
|
|
||||||
|
print(f"branches: {branches}")
|
||||||
|
if branches:
|
||||||
|
if branches_file:
|
||||||
|
print("Error: can't specify both --branches and --branches-file")
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
branches_array = parse_branches(branches)
|
||||||
|
|
||||||
|
if branches_array and verbose:
|
||||||
|
print(f"Branches are: {branches_array}")
|
||||||
|
|
||||||
local_stack = ctx.obj.local_stack
|
local_stack = ctx.obj.local_stack
|
||||||
|
|
||||||
|
|
@ -119,64 +228,15 @@ def command(ctx, include, exclude, git_ssh, check_only, pull, branches_file):
|
||||||
|
|
||||||
repos = []
|
repos = []
|
||||||
for repo in repos_in_scope:
|
for repo in repos_in_scope:
|
||||||
if include_exclude_check(repo, include, exclude):
|
if include_exclude_check(branch_strip(repo), include, exclude):
|
||||||
repos.append(repo)
|
repos.append(repo)
|
||||||
else:
|
else:
|
||||||
if verbose:
|
if verbose:
|
||||||
print(f"Excluding: {repo}")
|
print(f"Excluding: {repo}")
|
||||||
|
|
||||||
def process_repo(repo):
|
|
||||||
git_ssh_prefix = "git@github.com:"
|
|
||||||
git_http_prefix = "https://github.com/"
|
|
||||||
full_github_repo_path = f"{git_ssh_prefix if git_ssh else git_http_prefix}{repo}"
|
|
||||||
repoName = repo.split("/")[-1]
|
|
||||||
full_filesystem_repo_path = os.path.join(dev_root_path, repoName)
|
|
||||||
is_present = os.path.isdir(full_filesystem_repo_path)
|
|
||||||
if not quiet:
|
|
||||||
present_text = f"already exists active branch: {git.Repo(full_filesystem_repo_path).active_branch}" if is_present \
|
|
||||||
else 'Needs to be fetched'
|
|
||||||
print(f"Checking: {full_filesystem_repo_path}: {present_text}")
|
|
||||||
# Quick check that it's actually a repo
|
|
||||||
if is_present:
|
|
||||||
if not is_git_repo(full_filesystem_repo_path):
|
|
||||||
print(f"Error: {full_filesystem_repo_path} does not contain a valid git repository")
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
if pull:
|
|
||||||
if verbose:
|
|
||||||
print(f"Running git pull for {full_filesystem_repo_path}")
|
|
||||||
if not check_only:
|
|
||||||
git_repo = git.Repo(full_filesystem_repo_path)
|
|
||||||
origin = git_repo.remotes.origin
|
|
||||||
origin.pull(progress=None if quiet else GitProgress())
|
|
||||||
else:
|
|
||||||
print("(git pull skipped)")
|
|
||||||
if not is_present:
|
|
||||||
# Clone
|
|
||||||
if verbose:
|
|
||||||
print(f'Running git clone for {full_github_repo_path} into {full_filesystem_repo_path}')
|
|
||||||
if not dry_run:
|
|
||||||
git.Repo.clone_from(full_github_repo_path,
|
|
||||||
full_filesystem_repo_path,
|
|
||||||
progress=None if quiet else GitProgress())
|
|
||||||
else:
|
|
||||||
print("(git clone skipped)")
|
|
||||||
# Checkout the requested branch, if one was specified
|
|
||||||
if branches:
|
|
||||||
# Find the current repo in the branches list
|
|
||||||
for repo_branch in branches:
|
|
||||||
repo_branch_tuple = repo_branch.split(" ")
|
|
||||||
if repo_branch_tuple[0] == repo:
|
|
||||||
# checkout specified branch
|
|
||||||
branch_to_checkout = repo_branch_tuple[1]
|
|
||||||
if verbose:
|
|
||||||
print(f"checking out branch {branch_to_checkout} in repo {repo}")
|
|
||||||
git_repo = git.Repo(full_filesystem_repo_path)
|
|
||||||
git_repo.git.checkout(branch_to_checkout)
|
|
||||||
|
|
||||||
for repo in repos:
|
for repo in repos:
|
||||||
try:
|
try:
|
||||||
process_repo(repo)
|
process_repo(verbose, quiet, dry_run, pull, check_only, git_ssh, dev_root_path, branches_array, repo)
|
||||||
except git.exc.GitCommandError as error:
|
except git.exc.GitCommandError as error:
|
||||||
print(f"\n******* git command returned error exit status:\n{error}")
|
print(f"\n******* git command returned error exit status:\n{error}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
||||||
21
cli.py
21
cli.py
|
|
@ -14,6 +14,7 @@
|
||||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from app import setup_repositories
|
from app import setup_repositories
|
||||||
from app import build_containers
|
from app import build_containers
|
||||||
|
|
@ -24,17 +25,15 @@ from app import version
|
||||||
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
|
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
|
||||||
|
|
||||||
|
|
||||||
# TODO: this seems kind of weird and heavy on boilerplate -- check it is
|
@dataclass
|
||||||
# the best Python can do for us.
|
class Options:
|
||||||
class Options(object):
|
stack: str
|
||||||
def __init__(self, stack, quiet, verbose, dry_run, local_stack, debug, continue_on_error):
|
quiet: bool = False
|
||||||
self.stack = stack
|
verbose: bool = False
|
||||||
self.quiet = quiet
|
dry_run: bool = False
|
||||||
self.verbose = verbose
|
local_stack: bool = False
|
||||||
self.dry_run = dry_run
|
debug: bool = False
|
||||||
self.local_stack = local_stack
|
continue_on_error: bool = False
|
||||||
self.debug = debug
|
|
||||||
self.continue_on_error = continue_on_error
|
|
||||||
|
|
||||||
|
|
||||||
@click.group(context_settings=CONTEXT_SETTINGS)
|
@click.group(context_settings=CONTEXT_SETTINGS)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
#cloud-config
|
||||||
|
|
||||||
|
# Used for easily testing stacks-in-development on cloud platforms
|
||||||
|
# Assumes Ubuntu, edit the last line if targeting a different OS
|
||||||
|
|
||||||
|
# Once SSH'd into the server, run:
|
||||||
|
# `$ cd stack-orchestrator`
|
||||||
|
# `$ git checkout <branch>
|
||||||
|
# `$ ./scripts/developer-mode-setup.sh`
|
||||||
|
# `$ source ./venv/bin/activate`
|
||||||
|
|
||||||
|
# Followed by the stack instructions.
|
||||||
|
|
||||||
|
package_update: true
|
||||||
|
package_upgrade: true
|
||||||
|
|
||||||
|
groups:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
system_info:
|
||||||
|
default_user:
|
||||||
|
groups: [ docker ]
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- apt-transport-https
|
||||||
|
- ca-certificates
|
||||||
|
- curl
|
||||||
|
- jq
|
||||||
|
- git
|
||||||
|
- gnupg
|
||||||
|
- lsb-release
|
||||||
|
- unattended-upgrades
|
||||||
|
- python3.10-venv
|
||||||
|
- pip
|
||||||
|
|
||||||
|
runcmd:
|
||||||
|
- mkdir -p /etc/apt/keyrings
|
||||||
|
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
|
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
- systemctl enable docker
|
||||||
|
- systemctl start docker
|
||||||
|
- git clone https://github.com/cerc-io/stack-orchestrator.git /home/ubuntu/stack-orchestrator
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
#cloud-config
|
||||||
|
|
||||||
|
# Used for installing Stack Orchestrator on platforms that support `cloud-init`
|
||||||
|
# Tested on Ubuntu
|
||||||
|
|
||||||
|
package_update: true
|
||||||
|
package_upgrade: true
|
||||||
|
|
||||||
|
groups:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
system_info:
|
||||||
|
default_user:
|
||||||
|
groups: [ docker ]
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- apt-transport-https
|
||||||
|
- ca-certificates
|
||||||
|
- curl
|
||||||
|
- jq
|
||||||
|
- git
|
||||||
|
- gnupg
|
||||||
|
- lsb-release
|
||||||
|
- unattended-upgrades
|
||||||
|
|
||||||
|
runcmd:
|
||||||
|
- mkdir -p /etc/apt/keyrings
|
||||||
|
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
|
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
- systemctl enable docker
|
||||||
|
- systemctl start docker
|
||||||
|
- curl -L -o /usr/local/bin/laconic-so https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so
|
||||||
|
- chmod +x /usr/local/bin/laconic-so
|
||||||
|
|
@ -24,6 +24,14 @@ mkdir -p $CERC_REPO_BASE_DIR
|
||||||
$TEST_TARGET_SO --stack test setup-repositories
|
$TEST_TARGET_SO --stack test setup-repositories
|
||||||
$TEST_TARGET_SO --stack test build-containers
|
$TEST_TARGET_SO --stack test build-containers
|
||||||
$TEST_TARGET_SO --stack test deploy up
|
$TEST_TARGET_SO --stack test deploy up
|
||||||
|
# Test deploy port command
|
||||||
|
deploy_port_output=$( $TEST_TARGET_SO --stack test deploy port test 80 )
|
||||||
|
if [[ "$deploy_port_output" =~ ^0.0.0.0:[1-9][0-9]* ]]; then
|
||||||
|
echo "Deploy port test: passed"
|
||||||
|
else
|
||||||
|
echo "Deploy port test: FAILED"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
$TEST_TARGET_SO --stack test deploy down
|
$TEST_TARGET_SO --stack test deploy down
|
||||||
# The next time we bring the container up the volume will be old (from the previous run above)
|
# The next time we bring the container up the volume will be old (from the previous run above)
|
||||||
$TEST_TARGET_SO --stack test deploy up
|
$TEST_TARGET_SO --stack test deploy up
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ set -e
|
||||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
set -e
|
|
||||||
echo "Running stack-orchestrator Ethereum fixturenet test"
|
echo "Running stack-orchestrator Ethereum fixturenet test"
|
||||||
# Bit of a hack, test the most recent package
|
# Bit of a hack, test the most recent package
|
||||||
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 )
|
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 )
|
||||||
|
|
@ -15,7 +15,7 @@ reported_version_string=$( $TEST_TARGET_SO version )
|
||||||
echo "Version reported is: ${reported_version_string}"
|
echo "Version reported is: ${reported_version_string}"
|
||||||
echo "Cloning repositories into: $CERC_REPO_BASE_DIR"
|
echo "Cloning repositories into: $CERC_REPO_BASE_DIR"
|
||||||
$TEST_TARGET_SO --stack fixturenet-eth setup-repositories
|
$TEST_TARGET_SO --stack fixturenet-eth setup-repositories
|
||||||
$TEST_TARGET_SO --stack fixturenet-eth build-containers
|
$TEST_TARGET_SO --stack fixturenet-eth build-containers
|
||||||
$TEST_TARGET_SO --stack fixturenet-eth deploy up
|
$TEST_TARGET_SO --stack fixturenet-eth deploy up
|
||||||
# Verify that the fixturenet is up and running
|
# Verify that the fixturenet is up and running
|
||||||
$TEST_TARGET_SO --stack fixturenet-eth deploy ps
|
$TEST_TARGET_SO --stack fixturenet-eth deploy ps
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue